package client.renderer.entity;

import client.renderer.model.ModelBase;
import common.entity.animal.EntityChicken;
import common.util.ExtMath;


public class RenderChicken extends RenderLiving<EntityChicken>
{
    private static final String chickenTextures = "textures/creature/chicken.png";

    public RenderChicken(RenderManager renderManagerIn, ModelBase modelBaseIn)
    {
        super(renderManagerIn, modelBaseIn);
    }

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

    /**
     * Defines what float the third param in setRotationAngles of ModelBase is
     */
    protected float handleRotationFloat(EntityChicken livingBase, float partialTicks)
    {
        float f = livingBase.lastWingRotation + (livingBase.wingRotation - livingBase.lastWingRotation) * partialTicks;
        float f1 = livingBase.lastDestPos + (livingBase.destPos - livingBase.lastDestPos) * partialTicks;
        return (ExtMath.sin(f) + 1.0F) * f1;
    }
}
