Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/7-15-1' into 7-15-1
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/java/com/equilibrium/mixin/PlayerEntityMixin.java
  • Loading branch information
Lithewings committed Jul 15, 2024
2 parents d0d6bec + a21bed4 commit b7b5468
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 740 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/equilibrium/MITEequilibriumClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


import com.equilibrium.client.render.entity.InvisibleStalker;
import com.equilibrium.client.render.entity.ZombieEntityRendererTransparent;
import com.equilibrium.client.render.entity.TestZombie;
import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry;

Expand All @@ -16,7 +16,7 @@ public void onInitializeClient() {
//将注册的实体和模型结合起来


EntityRendererRegistry.register(TEST_ZOMBIE, ZombieEntityRendererTransparent::new);
EntityRendererRegistry.register(TEST_ZOMBIE, TestZombie::new);
EntityRendererRegistry.register(INVISIBLE_STALKER, InvisibleStalker::new);


Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
package com.equilibrium.client.render.entity;

import com.equilibrium.client.render.entity.model.SZombieEntityModel;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.render.entity.BipedEntityRenderer;
import net.minecraft.client.render.entity.EntityRendererFactory;
import net.minecraft.client.render.entity.feature.ArmorFeatureRenderer;
import net.minecraft.client.render.entity.model.ZombieEntityModel;
import net.minecraft.entity.mob.ZombieEntity;
import net.minecraft.util.Identifier;

@Environment(EnvType.CLIENT)
public abstract class TransparentZombieEntityRenderer<T extends ZombieEntity, M extends ZombieEntityModel<T>> extends BipedEntityRenderer<T, M> {
public abstract class AbstractZombieEntityRenderer<T extends ZombieEntity, M extends ZombieEntityModel<T>> extends BipedEntityRenderer<T, M> {


protected TransparentZombieEntityRenderer(EntityRendererFactory.Context ctx, M bodyModel, M legsArmorModel, M bodyArmorModel) {
protected AbstractZombieEntityRenderer(EntityRendererFactory.Context ctx, M bodyModel, M legsArmorModel, M bodyArmorModel) {
super(ctx, bodyModel, 0.5F);
this.addFeature(new ArmorFeatureRenderer<>(this, legsArmorModel, bodyArmorModel, ctx.getModelManager()));
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
package com.equilibrium.client.render.entity;

import com.equilibrium.client.render.entity.model.SZombieEntityModel;
import net.minecraft.client.render.entity.EntityRendererFactory;
import net.minecraft.client.render.entity.model.EntityModelLayer;
import net.minecraft.client.render.entity.model.EntityModelLayers;
import net.minecraft.client.render.entity.model.ZombieEntityModel;
import net.minecraft.entity.mob.ZombieEntity;
import net.minecraft.util.Identifier;

public class InvisibleStalker extends TransparentZombieEntityRenderer<ZombieEntity, ZombieEntityModel<ZombieEntity>> {
public class InvisibleStalker extends AbstractZombieEntityRenderer<ZombieEntity, ZombieEntityModel<ZombieEntity>> {
private static final Identifier TEXTURE = Identifier.of("miteequilibrium","textures/entity/invisible_stalker.png");

public Identifier getTexture(ZombieEntity zombieEntity) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
package com.equilibrium.client.render.entity;

import com.equilibrium.client.render.entity.model.SZombieEntityModel;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.render.entity.EntityRendererFactory;
import net.minecraft.client.render.entity.model.EntityModelLayer;
import net.minecraft.client.render.entity.model.EntityModelLayers;
import net.minecraft.client.render.entity.model.ZombieEntityModel;
import net.minecraft.entity.mob.ZombieEntity;
import net.minecraft.util.Identifier;

@Environment(EnvType.CLIENT)
public class ZombieEntityRendererTransparent extends TransparentZombieEntityRenderer<ZombieEntity, SZombieEntityModel<ZombieEntity>> {
public class TestZombie extends AbstractZombieEntityRenderer<ZombieEntity, ZombieEntityModel<ZombieEntity>> {


private static final Identifier TEXTURE = Identifier.ofVanilla("textures/entity/player/wide/steve.png");
public Identifier getTexture(ZombieEntity zombieEntity) {
return TEXTURE;
}
public ZombieEntityRendererTransparent(EntityRendererFactory.Context context) {
public TestZombie(EntityRendererFactory.Context context) {
this(context, EntityModelLayers.ZOMBIE, EntityModelLayers.ZOMBIE_INNER_ARMOR, EntityModelLayers.ZOMBIE_OUTER_ARMOR);

}
public ZombieEntityRendererTransparent(EntityRendererFactory.Context ctx, EntityModelLayer layer, EntityModelLayer legsArmorLayer, EntityModelLayer bodyArmorLayer) {
public TestZombie(EntityRendererFactory.Context ctx, EntityModelLayer layer, EntityModelLayer legsArmorLayer, EntityModelLayer bodyArmorLayer) {
super(
ctx, new SZombieEntityModel<>(ctx.getPart(layer)), new SZombieEntityModel<>(ctx.getPart(legsArmorLayer)), new SZombieEntityModel<>(ctx.getPart(bodyArmorLayer))
ctx, new ZombieEntityModel<>(ctx.getPart(layer)), new ZombieEntityModel<>(ctx.getPart(legsArmorLayer)), new ZombieEntityModel<>(ctx.getPart(bodyArmorLayer))
);
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit b7b5468

Please sign in to comment.