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

import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.client.Minecraft;
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.EndermanModel;
import net.minecraft.world.entity.monster.EnderMan;

public class CarriedBlockLayer extends RenderLayer<EnderMan, EndermanModel<EnderMan>> {
    public CarriedBlockLayer(final RenderLayerParent<EnderMan, EndermanModel<EnderMan>> eid) {
        super(eid);
    }
    
    @Override
    public void render(final PoseStack dhl, final MultiBufferSource ebz, final int integer, final EnderMan bbr, final float float5, final float float6, final float float7, final float float8, final float float9, final float float10) {
        final BlockState cfj12 = bbr.getCarriedBlock();
        if (cfj12 == null) {
            return;
        }
        dhl.pushPose();
        dhl.translate(0.0, 0.6875, -0.75);
        dhl.mulPose(Vector3f.XP.rotationDegrees(20.0f));
        dhl.mulPose(Vector3f.YP.rotationDegrees(45.0f));
        dhl.translate(0.25, 0.1875, 0.25);
        final float float11 = 0.5f;
        dhl.scale(-0.5f, -0.5f, 0.5f);
        dhl.mulPose(Vector3f.YP.rotationDegrees(90.0f));
        Minecraft.getInstance().getBlockRenderer().renderSingleBlock(cfj12, dhl, ebz, integer, OverlayTexture.NO_OVERLAY);
        dhl.popPose();
    }
}
