package client.renderer.entity;

import client.renderer.layers.LayerWolfCollar;
import client.renderer.model.ModelBase;
import common.entity.animal.EntityWolf;


public class RenderWolf extends RenderLiving<EntityWolf>
{
    private static final String wolfTextures = "textures/creature/wolf.png";
    private static final String tamedWolfTextures = "textures/creature/wolf_tame.png";
    private static final String anrgyWolfTextures = "textures/creature/wolf_angry.png";

    public RenderWolf(RenderManager renderManagerIn, ModelBase modelBaseIn)
    {
        super(renderManagerIn, modelBaseIn);
        this.addLayer(new LayerWolfCollar(this));
    }

    /**
     * Defines what float the third param in setRotationAngles of ModelBase is
     */
    protected float handleRotationFloat(EntityWolf livingBase, float partialTicks)
    {
        return livingBase.getTailRotation();
    }

    /**
     * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
     */
    protected String getEntityTexture(EntityWolf entity)
    {
        return entity.isTamed() ? tamedWolfTextures : (entity.isAngry() ? anrgyWolfTextures : wolfTextures);
    }
}
