package net.minecraft.client.renderer.entity;

import net.minecraft.world.entity.LivingEntity;
import com.mojang.math.Vector3f;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.renderer.entity.layers.RenderLayer;
import net.minecraft.world.entity.Entity;
import net.minecraft.client.renderer.entity.layers.PhantomEyesLayer;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.client.model.PhantomModel;
import net.minecraft.world.entity.monster.Phantom;

public class PhantomRenderer extends MobRenderer<Phantom, PhantomModel<Phantom>> {
    private static final ResourceLocation PHANTOM_LOCATION;
    
    public PhantomRenderer(final EntityRenderDispatcher dvf) {
        super(dvf, new PhantomModel(), 0.75f);
        this.addLayer((RenderLayer<Phantom, PhantomModel<Phantom>>)new PhantomEyesLayer((RenderLayerParent<Entity, PhantomModel<Entity>>)this));
    }
    
    @Override
    public ResourceLocation getTextureLocation(final Phantom awy) {
        return PhantomRenderer.PHANTOM_LOCATION;
    }
    
    @Override
    protected void scale(final Phantom awy, final PoseStack cyl, final float float3) {
        final int integer5 = awy.getPhantomSize();
        final float float4 = 1.0f + 0.15f * integer5;
        cyl.scale(float4, float4, float4);
        cyl.translate(0.0, 1.3125, 0.1875);
    }
    
    @Override
    protected void setupRotations(final Phantom awy, final PoseStack cyl, final float float3, final float float4, final float float5) {
        super.setupRotations(awy, cyl, float3, float4, float5);
        cyl.mulPose(Vector3f.XP.rotationDegrees(awy.xRot));
    }
    
    static {
        PHANTOM_LOCATION = new ResourceLocation("textures/entity/phantom.png");
    }
}
