package hmggirlfront.render.mob;

import gvclib.event.gun.LayerGunBase;
import hmggirlfront.entity.mob.EntityELID_SKELETEN;
import net.minecraft.client.model.ModelSkeleton;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.RenderBiped;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.layers.LayerBipedArmor;
import net.minecraft.client.renderer.entity.layers.LayerHeldItem;
import net.minecraft.entity.monster.AbstractSkeleton;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class RenderELID_SKELETEN extends RenderBiped<EntityELID_SKELETEN>
{
    private static final ResourceLocation SKELETON_TEXTURES = new ResourceLocation("hmggirlfront:textures/entity/mob/elid_skeleton.png");

    public RenderELID_SKELETEN(RenderManager renderManagerIn)
    {
        super(renderManagerIn, new ModelELIDSkeleton(), 0.5F);
        this.addLayer(new LayerHeldItem(this));
        this.addLayer(new LayerGunBase(this));
        this.addLayer(new LayerBipedArmor(this)
        {
            protected void initArmor()
            {
                this.modelLeggings = new ModelELIDSkeleton(0.5F, true);
                this.modelArmor = new ModelELIDSkeleton(1.0F, true);
            }
        });
    }

    public void transformHeldFull3DItemLayer()
    {
        GlStateManager.translate(0.09375F, 0.1875F, 0.0F);
    }

    /**
     * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
     */
    protected ResourceLocation getEntityTexture(EntityELID_SKELETEN entity)
    {
        return SKELETON_TEXTURES;
    }
}