/* * Decompiled with CFR 0.152. */ package net.minecraft.client.renderer.entity; import net.minecraft.client.model.ZombifiedPiglinModel; import net.minecraft.client.model.geom.ModelLayerLocation; import net.minecraft.client.renderer.entity.ArmorModelSet; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.HumanoidMobRenderer; import net.minecraft.client.renderer.entity.PiglinRenderer; import net.minecraft.client.renderer.entity.layers.HumanoidArmorLayer; import net.minecraft.client.renderer.entity.state.ZombifiedPiglinRenderState; import net.minecraft.resources.Identifier; import net.minecraft.world.entity.monster.ZombifiedPiglin; public class ZombifiedPiglinRenderer extends HumanoidMobRenderer { private static final Identifier ZOMBIFIED_PIGLIN_LOCATION = Identifier.withDefaultNamespace("textures/entity/piglin/zombified_piglin.png"); public ZombifiedPiglinRenderer(EntityRendererProvider.Context context, ModelLayerLocation body, ModelLayerLocation babyBody, ArmorModelSet armorSet, ArmorModelSet babyArmorSet) { super(context, new ZombifiedPiglinModel(context.bakeLayer(body)), new ZombifiedPiglinModel(context.bakeLayer(babyBody)), 0.5f, PiglinRenderer.PIGLIN_CUSTOM_HEAD_TRANSFORMS); this.addLayer(new HumanoidArmorLayer(this, ArmorModelSet.bake(armorSet, context.getModelSet(), ZombifiedPiglinModel::new), ArmorModelSet.bake(babyArmorSet, context.getModelSet(), ZombifiedPiglinModel::new), context.getEquipmentRenderer())); } @Override public Identifier getTextureLocation(ZombifiedPiglinRenderState state) { return ZOMBIFIED_PIGLIN_LOCATION; } @Override public ZombifiedPiglinRenderState createRenderState() { return new ZombifiedPiglinRenderState(); } @Override public void extractRenderState(ZombifiedPiglin entity, ZombifiedPiglinRenderState state, float partialTicks) { super.extractRenderState(entity, state, partialTicks); state.isAggressive = entity.isAggressive(); } }