package client.renderer.layers;

import client.renderer.GlState;
import client.renderer.entity.RenderWolf;
import common.entity.animal.EntityWolf;


public class LayerWolfCollar implements LayerRenderer<EntityWolf>
{
    private static final String WOLF_COLLAR = "textures/creature/wolf_collar.png";
    private final RenderWolf wolfRenderer;

    public LayerWolfCollar(RenderWolf wolfRendererIn)
    {
        this.wolfRenderer = wolfRendererIn;
    }

    public void doRenderLayer(EntityWolf entitylivingbaseIn, float p_177141_2_, float p_177141_3_, float partialTicks, float p_177141_5_, float p_177141_6_, float p_177141_7_, float scale)
    {
        if (entitylivingbaseIn.isTamed()) // && !entitylivingbaseIn.isInvisible())
        {
            this.wolfRenderer.bindTexture(WOLF_COLLAR);
            GlState.color(entitylivingbaseIn.getCollarColor().getColor() | 0xff000000);
            this.wolfRenderer.getMainModel().render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
        }
    }

    public boolean shouldCombineTextures()
    {
        return true;
    }
}
