package snidgert.harrypottermod.mobs.render;

import net.minecraft.client.model.*;

import org.lwjgl.opengl.*;
import net.minecraft.entity.*;
import net.minecraft.util.*;
import snidgert.harrypottermod.mobs.*;
import snidgert.harrypottermod.mobs.entity.*;
import net.minecraft.client.renderer.entity.*;

public class RenderUkaranianIronbelly extends RenderLiving
{
    public static final ResourceLocation EntityTexture;
    protected UkaranianIronbelly model;
    private float scale;
    
    public RenderUkaranianIronbelly(final ModelBase p_i1262_1_, final float p_i1262_2_) {
        super(p_i1262_1_, p_i1262_2_);
        this.model = (UkaranianIronbelly)this.mainModel;
        this.scale = 2.0f;
    }
    
    protected void preRenderCallback(final EntityUkaranianIronbelly entityhorntail, final float par2) {
        GL11.glScalef(this.scale, this.scale, this.scale);
    }
    
    @Override
	protected void preRenderCallback(final EntityLivingBase par1EntityLivingBase, final float par2) {
        this.preRenderCallback((EntityUkaranianIronbelly)par1EntityLivingBase, par2);
    }
    
    public void renderUkaranianIronbelly(final EntityUkaranianIronbelly entity, final double par2, final double par4, final double par6, final float par8, final float par9) {
        super.doRender(entity, par2, par4, par6, par8, par9);
    }
    
    public void doRenderLiving(final EntityLiving par1EntityLiving, final double par2, final double par4, final double par6, final float par8, final float par9) {
        this.renderUkaranianIronbelly((EntityUkaranianIronbelly)par1EntityLiving, par2, par4, par6, par8, par9);
    }
    
    @Override
	public void doRender(final Entity par1Entity, final double par2, final double par4, final double par6, final float par8, final float par9) {
        this.renderUkaranianIronbelly((EntityUkaranianIronbelly)par1Entity, par2, par4, par6, par8, par9);
    }
    
    @Override
	protected ResourceLocation getEntityTexture(final Entity entity) {
        return RenderUkaranianIronbelly.EntityTexture;
    }
    
    protected float handleRotationFloat(final EntityUkaranianIronbelly par1EntityChicken, final float par2) {
        final float f1 = par1EntityChicken.field_70888_h + (par1EntityChicken.field_70886_e - par1EntityChicken.field_70888_h) * par2;
        final float f2 = par1EntityChicken.field_70884_g + (par1EntityChicken.destPos - par1EntityChicken.field_70884_g) * par2;
        return (MathHelper.sin(f1) + 1.0f) * f2;
    }
    
    @Override
	protected float handleRotationFloat(final EntityLivingBase par1EntityLivingBase, final float par2) {
        return this.handleRotationFloat((EntityUkaranianIronbelly)par1EntityLivingBase, par2);
    }
    
    static {
        EntityTexture = new ResourceLocation("harrypottermod:textures/mobs/ukrainianironbelly.png");
    }
}
