Missed Armor Stand and Mob Render for Armored Elytra
This commit is contained in:
parent
43d4dd6adc
commit
8cd7a438e1
4 changed files with 53 additions and 1 deletions
|
@ -0,0 +1,25 @@
|
||||||
|
package ru.betterend.mixin.client;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.ArmorStandArmorModel;
|
||||||
|
import net.minecraft.client.renderer.entity.ArmorStandRenderer;
|
||||||
|
import net.minecraft.client.renderer.entity.EntityRenderDispatcher;
|
||||||
|
import net.minecraft.client.renderer.entity.LivingEntityRenderer;
|
||||||
|
import net.minecraft.world.entity.decoration.ArmorStand;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
import ru.betterend.client.render.ArmoredElytraLayer;
|
||||||
|
|
||||||
|
@Mixin(ArmorStandRenderer.class)
|
||||||
|
public abstract class ArmorStandRendererMixin extends LivingEntityRenderer<ArmorStand, ArmorStandArmorModel> {
|
||||||
|
|
||||||
|
public ArmorStandRendererMixin(EntityRenderDispatcher entityRenderDispatcher, ArmorStandArmorModel entityModel, float f) {
|
||||||
|
super(entityRenderDispatcher, entityModel, f);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "<init>*", at = @At("TAIL"))
|
||||||
|
public void be_addCustomLayer(EntityRenderDispatcher entityRenderDispatcher, CallbackInfo info) {
|
||||||
|
addLayer(new ArmoredElytraLayer<>(this));
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package ru.betterend.mixin.client;
|
||||||
|
|
||||||
|
import net.minecraft.client.model.HumanoidModel;
|
||||||
|
import net.minecraft.client.renderer.entity.EntityRenderDispatcher;
|
||||||
|
import net.minecraft.client.renderer.entity.HumanoidMobRenderer;
|
||||||
|
import net.minecraft.client.renderer.entity.MobRenderer;
|
||||||
|
import net.minecraft.world.entity.Mob;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
import ru.betterend.client.render.ArmoredElytraLayer;
|
||||||
|
|
||||||
|
@Mixin(HumanoidMobRenderer.class)
|
||||||
|
public abstract class HumanoidMobRendererMixin<T extends Mob, M extends HumanoidModel<T>> extends MobRenderer<T, M> {
|
||||||
|
|
||||||
|
public HumanoidMobRendererMixin(EntityRenderDispatcher entityRenderDispatcher, M entityModel, float f) {
|
||||||
|
super(entityRenderDispatcher, entityModel, f);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "<init>*", at = @At("TAIL"))
|
||||||
|
public void be_addCustomLayer(EntityRenderDispatcher entityRenderDispatcher, M humanoidModel, float f, float g, float h, float i, CallbackInfo info) {
|
||||||
|
addLayer(new ArmoredElytraLayer<>(this));
|
||||||
|
}
|
||||||
|
}
|
|
@ -21,6 +21,6 @@ public abstract class PlayerRendererMixin extends LivingEntityRenderer<AbstractC
|
||||||
|
|
||||||
@Inject(method = "<init>(Lnet/minecraft/client/renderer/entity/EntityRenderDispatcher;Z)V", at = @At("TAIL"))
|
@Inject(method = "<init>(Lnet/minecraft/client/renderer/entity/EntityRenderDispatcher;Z)V", at = @At("TAIL"))
|
||||||
public void be_addCustomLayer(EntityRenderDispatcher entityRenderDispatcher, boolean bl, CallbackInfo info) {
|
public void be_addCustomLayer(EntityRenderDispatcher entityRenderDispatcher, boolean bl, CallbackInfo info) {
|
||||||
addLayer(new ArmoredElytraLayer<>(PlayerRenderer.class.cast(this)));
|
addLayer(new ArmoredElytraLayer<>(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
"ClientPlayNetworkHandlerMixin",
|
"ClientPlayNetworkHandlerMixin",
|
||||||
"NamespaceResourceManagerMixin",
|
"NamespaceResourceManagerMixin",
|
||||||
"EnchantingTableBlockMixin",
|
"EnchantingTableBlockMixin",
|
||||||
|
"HumanoidMobRendererMixin",
|
||||||
|
"ArmorStandRendererMixin",
|
||||||
"BackgroundRendererMixin",
|
"BackgroundRendererMixin",
|
||||||
"ClientRecipeBookMixin",
|
"ClientRecipeBookMixin",
|
||||||
"ModelVariantMapMixin",
|
"ModelVariantMapMixin",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue