package net.minecraft.client.renderer.entity;

import net.minecraft.client.renderer.entity.layers.RenderLayer;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.client.renderer.MultiBufferSource;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.renderer.entity.layers.ItemInHandLayer;
import net.minecraft.client.model.IllagerModel;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.monster.SpellcasterIllager;

public class EvokerRenderer<T extends SpellcasterIllager> extends IllagerRenderer<T> {
    private static final ResourceLocation EVOKER_ILLAGER;
    
    public EvokerRenderer(final EntityRenderDispatcher dvf) {
        super(dvf, new IllagerModel(0.0f, 0.0f, 64, 64), 0.5f);
        this.addLayer((RenderLayer<T, IllagerModel<T>>)new ItemInHandLayer<T, IllagerModel<T>>(this) {
            @Override
            public void render(final PoseStack cyl, final MultiBufferSource dqt, final int integer, final T axi, final float float5, final float float6, final float float7, final float float8, final float float9, final float float10) {
                if (axi.isCastingSpell()) {
                    super.render(cyl, dqt, integer, axi, float5, float6, float7, float8, float9, float10);
                }
            }
        });
    }
    
    public ResourceLocation getTextureLocation(final T axi) {
        return EvokerRenderer.EVOKER_ILLAGER;
    }
    
    static {
        EVOKER_ILLAGER = new ResourceLocation("textures/entity/illager/evoker.png");
    }
}
