package net.minecraft.client.renderer.entity.layers;

import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.client.renderer.entity.LivingEntityRenderer;
import net.minecraft.client.renderer.block.model.ItemTransforms;
import net.minecraft.client.Minecraft;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Blocks;
import com.mojang.math.Vector3f;
import net.minecraft.client.renderer.MultiBufferSource;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.renderer.entity.RenderLayerParent;
import net.minecraft.client.model.SnowGolemModel;
import net.minecraft.world.entity.animal.SnowGolem;

public class SnowGolemHeadLayer extends RenderLayer<SnowGolem, SnowGolemModel<SnowGolem>> {
    public SnowGolemHeadLayer(final RenderLayerParent<SnowGolem, SnowGolemModel<SnowGolem>> eid) {
        super(eid);
    }
    
    @Override
    public void render(final PoseStack dhl, final MultiBufferSource ebz, final int integer, final SnowGolem azf, final float float5, final float float6, final float float7, final float float8, final float float9, final float float10) {
        if (azf.isInvisible() || !azf.hasPumpkin()) {
            return;
        }
        dhl.pushPose();
        ((RenderLayer<T, SnowGolemModel>)this).getParentModel().getHead().translateAndRotate(dhl);
        final float float11 = 0.625f;
        dhl.translate(0.0, -0.34375, 0.0);
        dhl.mulPose(Vector3f.YP.rotationDegrees(180.0f));
        dhl.scale(0.625f, -0.625f, -0.625f);
        final ItemStack bki13 = new ItemStack(Blocks.CARVED_PUMPKIN);
        Minecraft.getInstance().getItemRenderer().renderStatic(azf, bki13, ItemTransforms.TransformType.HEAD, false, dhl, ebz, azf.level, integer, LivingEntityRenderer.getOverlayCoords(azf, 0.0f));
        dhl.popPose();
    }
}
