package client.renderer.layers;

import client.renderer.entity.RenderPig;
import client.renderer.model.ModelPig;
import common.entity.animal.EntityPig;


public class LayerSaddle implements LayerRenderer<EntityPig>
{
    private static final String TEXTURE = "textures/creature/pig_saddle.png";
    private final RenderPig pigRenderer;
    private final ModelPig pigModel = new ModelPig(0.5F);

    public LayerSaddle(RenderPig pigRendererIn)
    {
        this.pigRenderer = pigRendererIn;
    }

    public void doRenderLayer(EntityPig 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.getSaddled())
        {
            this.pigRenderer.bindTexture(TEXTURE);
            this.pigModel.setModelAttributes(this.pigRenderer.getMainModel());
            this.pigModel.render(entitylivingbaseIn, p_177141_2_, p_177141_3_, p_177141_5_, p_177141_6_, p_177141_7_, scale);
        }
    }

    public boolean shouldCombineTextures()
    {
        return false;
    }
}
