package hmggirlfront.render.mob;

import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;

import gvclib.event.gun.Layermat;
import gvclib.item.ItemGunBase;
import gvclib.render.ModelBase_Non;
import hmggirlfront.entity.mob.EntityIBCBase;
import hmggirlfront.entity.mob.EntityIBCBoss03;
import hmggirlfront.entity.mob.EntityIBCBoss06;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderLiving;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.MathHelper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import objmodel.AdvancedModelLoader;
import objmodel.IModelCustom;

@SideOnly(Side.CLIENT)
public class RenderIBCBoss06 extends RenderLiving<EntityIBCBoss06> //extends RenderLiving<EntityDoll>
{
	private static final ResourceLocation boatTextures = new ResourceLocation("hmggirlfront:textures/model/mob/ibc_boss06.png");
    private static final IModelCustom tankk = AdvancedModelLoader.loadModel(new ResourceLocation("hmggirlfront:textures/model/mob/ibc_boss06.mqo"));
    
    public int[] arm_r_time = new int[200];
    public float[] arm_r_xrote = new float[200];
    public float[] arm_r_yrote = new float[200];
    public float[] arm_r_zrote = new float[200];
    
    public int[] arm_l_time = new int[200];
    public float[] arm_l_xrote = new float[200];
    public float[] arm_l_yrote = new float[200];
    public float[] arm_l_zrote = new float[200];
    
    public int[] gun_r_time = new int[200];
    public float[] gun_r_xrote = new float[200];
    public float[] gun_r_yrote = new float[200];
    public float[] gun_r_zrote = new float[200];
    
    public RenderIBCBoss06(RenderManager renderManagerIn)
    {
    	super(renderManagerIn, new ModelBase_Non(),0.5F);
        this.shadowSize = 0.5F;
        
        arm_r_time[0] = 5;
        arm_r_xrote[0] = -30;
        
        arm_r_time[1] = 15;
        arm_r_xrote[1] = 0;
        
        arm_r_time[2] = 20;
        arm_r_xrote[2] = 0;
        
        arm_r_time[3] = 30;
        arm_r_xrote[3] = -120;
        
        arm_r_time[4] = 35;
        arm_r_xrote[4] = -120;
        
        arm_r_time[5] = 40;
        arm_r_xrote[5] = -45;
        
        arm_l_time[0] = 5;
        arm_l_xrote[0] = -30;
        arm_l_zrote[0] = -30;
        
        arm_l_time[1] = 15;
        arm_l_xrote[1] = 0;
        arm_l_zrote[1] = -30;
        
        arm_l_time[2] = 20;
        arm_l_xrote[2] = 0;
        arm_l_zrote[2] = -30;
        
        arm_l_time[3] = 30;
        arm_l_xrote[3] = -120;
        arm_l_zrote[3] = -30;
        
        arm_l_time[4] = 35;
        arm_l_xrote[4] = -120;
        arm_l_zrote[4] = -30;
        
        arm_l_time[5] = 40;
        arm_l_xrote[5] = -45;
        arm_l_zrote[5] = -30;
        
        gun_r_time[0] = 0;
        gun_r_xrote[0] = -45;
        
        gun_r_time[1] = 5;
        gun_r_xrote[1] = -90;
        
        gun_r_time[2] = 15;
        gun_r_xrote[2] = 135;
        
        gun_r_time[3] = 80;
        gun_r_xrote[3] = 135;
    }

    public void rendermodel(EntityIBCBoss06 entity, String model) {
    	tankk.renderPart(model);
    }
    
    /**
     * Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
     */
    protected ResourceLocation getEntityTexture(EntityIBCBoss06 entity)
    {
    	ResourceLocation dolltex = boatTextures;
		return dolltex;
    }
    
    
    
    /**
     * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
     * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
     * (Render<T extends Entity>) and this method has signature public void func_76986_a(T entity, double d, double d1,
     * double d2, float f, float f1). But JAD is pre 1.5 so doe
     */
    float iii;
    public void doRender(EntityIBCBoss06 entity, double x, double y, double z, float entityYaw, float partialTicks)
    {
    	{
			//doRenderShadowAndFire(entity, x, y, z, entityYaw, partialTicks);
		}
    	float limbSwing = this.F6(entity, partialTicks);
		float limbSwingAmount = this.F5(entity, partialTicks);
    	this.bindEntityTexture(entity);
    	GL11.glPushMatrix();
		GL11.glTranslatef((float) x, (float) y, (float) z);
		GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
		GL11.glEnable(GL12.GL_RESCALE_NORMAL);

		GL11.glScaled(1.5, 1.5, 1.5);
		
		
		if(entity.deathTime > 0){
			GL11.glColor4f(0.6F, 0.6F, 0.6F, 1F);
			GL11.glRotatef(180.0F - entity.renderYawOffset, 0.0F, 1.0F, 0.0F);
			if(entity.deathTime <= 20){
				float ka = (float)Math.sin((entity.deathTime %100) * 0.1) * 2F;
				GL11.glRotatef(ka, 1.0F, 0.0F, 0.0F);
				this.rendermodel(entity, "leg_l");
				this.rendermodel(entity, "leg_r");
				{
					this.rendermodel(entity, "body");
					this.rendermodel(entity, "body1");
					this.rendermodel(entity, "mantle");
					this.rendermodel(entity, "arm_l");
					this.rendermodel(entity, "arm_r");
					this.rendermodel(entity, "head");
					this.rendermodel(entity, "head1");
				}
			}
			else if(entity.deathTime > 20 && entity.deathTime <= 30){
				GL11.glRotatef((entity.deathTime - 20)*9, 1.0F, 0.0F, 0.0F);
				this.rendermodel(entity, "leg_l");
				this.rendermodel(entity, "leg_r");
				
				GL11.glTranslatef(0F, 0.75F, 0.0F);
				GL11.glRotatef(-(entity.deathTime - 20)*9, 1.0F, 0.0F, 0.0F);
				GL11.glTranslatef(0F, -0.75F, 0.0F);
				{
					this.rendermodel(entity, "body");
					this.rendermodel(entity, "body1");
					this.rendermodel(entity, "mantle");
					this.rendermodel(entity, "arm_l");
					this.rendermodel(entity, "arm_r");
					this.rendermodel(entity, "head");
					this.rendermodel(entity, "head1");
				}
			}
			else if(entity.deathTime > 30 && entity.deathTime <= 80){
				GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
				this.rendermodel(entity, "leg_l");
				this.rendermodel(entity, "leg_r");
				
				GL11.glTranslatef(0F, 0.75F, 0.0F);
				float ka = (float)Math.sin((entity.deathTime %100) * 0.1) * 5F;
				GL11.glRotatef( -90 + ka, 1.0F, 0.0F, 0.0F);
				GL11.glTranslatef(0F, -0.75F, 0.0F);
				{
					this.rendermodel(entity, "body");
					this.rendermodel(entity, "body1");
					this.rendermodel(entity, "mantle");
					this.rendermodel(entity, "arm_l");
					this.rendermodel(entity, "arm_r");
					this.rendermodel(entity, "head");
					this.rendermodel(entity, "head1");
				}
			}
			else if(entity.deathTime > 80 && entity.deathTime <= 85){
				GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
				this.rendermodel(entity, "leg_l");
				this.rendermodel(entity, "leg_r");
				
				GL11.glTranslatef(0F, 0.75F, 0.0F);
				GL11.glRotatef( -90 + (entity.deathTime - 80)*6, 1.0F, 0.0F, 0.0F);
				GL11.glTranslatef(0F, -0.75F, 0.0F);
				{
					this.rendermodel(entity, "body");
					this.rendermodel(entity, "body1");
					this.rendermodel(entity, "mantle");
					this.rendermodel(entity, "arm_l");
					this.rendermodel(entity, "arm_r");
					this.rendermodel(entity, "head");
					this.rendermodel(entity, "head1");
				}
			}
			else if(entity.deathTime > 85 && entity.deathTime <= 90){
				GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
				this.rendermodel(entity, "leg_l");
				this.rendermodel(entity, "leg_r");
				
				GL11.glTranslatef(0F, 0.75F, 0.0F);
				GL11.glRotatef( -90 + 30, 1.0F, 0.0F, 0.0F);
				GL11.glTranslatef(0F, -0.75F, 0.0F);
				{
					this.rendermodel(entity, "body");
					this.rendermodel(entity, "body1");
					this.rendermodel(entity, "mantle");
					this.rendermodel(entity, "arm_l");
					this.rendermodel(entity, "arm_r");
					GL11.glTranslatef(0F, 1.5F, 0.0F);
					GL11.glRotatef((entity.deathTime - 85)*6, 1.0F, 0.0F, 0.0F);
					GL11.glTranslatef(0F, -1.5F, 0.0F);
					this.rendermodel(entity, "head");
					this.rendermodel(entity, "head1");
				}
			}
			else {
				GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
				this.rendermodel(entity, "leg_l");
				this.rendermodel(entity, "leg_r");
				
				GL11.glTranslatef(0F, 0.75F, 0.0F);
				GL11.glRotatef( -90 + 30, 1.0F, 0.0F, 0.0F);
				GL11.glTranslatef(0F, -0.75F, 0.0F);
				{
					this.rendermodel(entity, "body");
					this.rendermodel(entity, "body1");
					this.rendermodel(entity, "mantle");
					this.rendermodel(entity, "arm_l");
					this.rendermodel(entity, "arm_r");
					GL11.glTranslatef(0F, 1.5F, 0.0F);
					GL11.glRotatef(30, 1.0F, 0.0F, 0.0F);
					GL11.glTranslatef(0F, -1.5F, 0.0F);
					this.rendermodel(entity, "head");
					this.rendermodel(entity, "head1");
				}
			}
		}else {
			if (entity.deathTime > 0) {
				GL11.glColor4f(0.6F, 0.6F, 0.6F, 1F);
			} else {
				if (entity.hurtTime > 0) {
					GL11.glColor4f(0.7F, 0.2F, 0.2F, 1F);
				} else {
					GL11.glColor4f(1F, 1F, 1F, 1F);
				}
			}
			if (entity.getattacktask() && !(entity.deathTime > 0)) {
				GL11.glRotatef(180.0F - entity.rotationYawHead, 0.0F, 1.0F, 0.0F);
			} else {
				GL11.glRotatef(180.0F - entity.renderYawOffset, 0.0F, 1.0F, 0.0F);
			}
			{
				GL11.glPushMatrix();// glstart
				this.renderlegs(entity, limbSwing, limbSwingAmount, partialTicks);
				GL11.glPopMatrix();// glend
			}
			if (entity.isRiding()) {
				GL11.glTranslatef(0F, -0.5F, 0.0F);
			}

			if (entity.swingProgressInt > 0) {
				GL11.glTranslatef(0F, 0.75F, 0.0F);
				GL11.glRotatef(20, 1.0F, 0.0F, 0.0F);
				GL11.glTranslatef(0F, -0.75F, 0.0F);
			}

			{
				GL11.glPushMatrix();// glstart
				this.renderbody(entity, limbSwing, limbSwingAmount, partialTicks);
				GL11.glPopMatrix();// glend
			}
			this.bindEntityTexture(entity);
			if (entity.deathTime > 0) {
				GL11.glTranslatef(0F, -0.1F, 0.25F);
				GL11.glTranslatef(0F, 1.5F, 0.0F);
				GL11.glRotatef(10, 1.0F, 0.0F, 0.0F);
				GL11.glTranslatef(0F, -1.5F, 0.0F);
			}
			if (entity.getattacktask() && !(entity.deathTime > 0)) {
				GL11.glRotatef(-(180.0F - entity.rotationYawHead), 0.0F, 1.0F, 0.0F);
			} else {
				GL11.glRotatef(-(180.0F - entity.renderYawOffset), 0.0F, 1.0F, 0.0F);
			}
			GL11.glTranslatef(0F, 1.5F, 0.0F);
			GL11.glRotatef(180.0F - entity.rotationYawHead, 0.0F, 1.0F, 0.0F);
			GL11.glRotatef(entity.rotationPitch, 1.0F, 0.0F, 0.0F);
			GL11.glTranslatef(0F, -1.5F, 0.0F);
			this.rendermodel(entity, "head");
			this.rendermodel(entity, "head1");
			EntityPlayer player = Minecraft.getMinecraft().player;
		}
		GL11.glColor4f(1F, 1F, 1F, 1F);
		GL11.glDisable(GL12.GL_RESCALE_NORMAL);
		GL11.glPopMatrix();
		super.doRender(entity, x, y, z, entityYaw, partialTicks);
    }
    
    private void renderlegs(EntityIBCBoss06 entity, float limbSwing, float limbSwingAmount, float partialTicks){
    	GL11.glPushMatrix();//glstart
    	{
			float Ax = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * limbSwingAmount;
			GL11.glTranslatef(0.15F, 0.625F, 0.0F);//GL11.glTranslatef(0.15F, 0.75F, 0.0F);
			if(entity.isRiding()) {
				GL11.glTranslatef(0F, -0.5F, 0.0F);
				GL11.glRotatef(-90, 1.0F, 0.0F, 0.0F);
				GL11.glRotatef(20, 0.0F, 0.0F, 1.0F);
			}else {
				/*if(entity.getAIType2() == 1) {
					GL11.glRotatef(-20, 1.0F, 0.0F, 0.0F);
					GL11.glRotatef(10, 0.0F, 0.0F, 1.0F);
				}else */
				{
					GL11.glRotatef(Ax * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
				}
			}
			GL11.glTranslatef(-0.15F, -0.625F, 0.0F);
			this.rendermodel(entity, "leg_l");
		}
		GL11.glPopMatrix();//glend
		
		GL11.glPushMatrix();//glstart
		{
			float Ax =MathHelper.cos(limbSwing * 0.6662F) * limbSwingAmount;
			GL11.glTranslatef(-0.15F, 0.625F, 0.0F);
			if(entity.isRiding()) {
				GL11.glTranslatef(0F, -0.5F, 0.0F);
				GL11.glRotatef(-90, 1.0F, 0.0F, 0.0F);
				GL11.glRotatef(-20, 0.0F, 0.0F, 1.0F);
			}else {
				/*if(entity.getAIType2() == 1) {
					GL11.glRotatef(30, 1.0F, 0.0F, 0.0F);
					GL11.glRotatef(-10, 0.0F, 0.0F, 1.0F);
				}else*/
				{
					GL11.glRotatef(Ax * (180F / (float)Math.PI), 1.0F, 0.0F, 0.0F);
				}
			}
			GL11.glTranslatef(0.15F, -0.625F, 0.0F);
			this.rendermodel(entity, "leg_r");
		}
		GL11.glPopMatrix();//glend
	}
    
    private void renderbody(EntityIBCBoss06 entity, float limbSwing, float limbSwingAmount, float partialTicks){
    	if(entity.deathTime > 0){
    		GL11.glTranslatef(0F, 0.75F, 0.0F);
    		GL11.glRotatef(20, 1.0F, 0.0F, 0.0F);
    		GL11.glTranslatef(0F, -0.75F, 0.0F);
    	}
    	GL11.glPushMatrix();//glstart
    	this.rendermodel(entity, "body");
		this.rendermodel(entity, "body1");
		this.rendermodel(entity, "mantle");
		GL11.glPopMatrix();//glend
    	
		ItemStack main = entity.getHeldItemMainhand();
		ItemStack off = entity.getHeldItemOffhand();
		 float arm_l_rotex = 0;
	     float arm_l_rotez = 0;
	     float arm_l_rotey = 0;
	     float arm_r_rotex = 0;
	     float arm_r_rotez = 0;
	     float arm_r_rotey = 0;
	     //lefthand
    	GL11.glPushMatrix();//glstart
    	{
    		float Ax = MathHelper.cos(limbSwing * 0.6662F) * limbSwingAmount;
			GL11.glTranslatef(0.35F, 1.375F, 0.0F);
			//arm_l_rotex = (MathHelper.sin(partialTicks * 0.067F) * 0.05F) * (180F / (float)Math.PI);
			if(entity.getattacktask() && !(entity.deathTime > 0)) {
				if(entity.isSwingInProgress) {
					arm_l_rotex = -150 + entity.swingProgressInt * 30;
					/*if(entity.swingProgressInt < 3) {
						arm_l_rotez = 0 + entity.swingProgressInt * 10;
					}else {
						arm_l_rotez = 0 + entity.swingProgressInt * 10;
					}*/
					arm_l_rotez = -30 + entity.swingProgressInt * 15;
				}else if(entity.getAIType() == 1) {
					arm_l_rotex = 30;
					arm_l_rotez = 20;
				}
				else if(entity.getAIType() == 4) {
					arm_l_rotex = -30;
					arm_l_rotez = 20;
				}
				else if(entity.getAIType() == 5) {
					arm_l_rotex = -140;
					arm_l_rotez = -40;
				}
				else
				{
					if(entity.getClient_Gun_Count(entity) < 4 && entity.getClient_Gun_Count(entity)%2 == 1){
		    			GL11.glRotatef(-entity.getClient_Gun_Count(entity) * 5, 1.0F, 0.0F, 0.0F);
		    		}
					arm_l_rotex = -90 + entity.rotationPitch;
				}
			}else if(entity.isRiding()) {
				arm_l_rotex = -30;
			}
			else if(entity.deathTime > 0){
				arm_l_rotex = -30;
				arm_l_rotez = -40;
			}else {
				arm_l_rotex = Ax * (180F / (float)Math.PI) * 2;
			}
			GL11.glRotatef(arm_l_rotex, 1.0F, 0.0F, 0.0F);
			GL11.glRotatef(arm_l_rotey, 0.0F, 1.0F, 0.0F);
			GL11.glRotatef(arm_l_rotez, 0.0F, 0.0F, 1.0F);
			
			GL11.glTranslatef(-0.35F, -1.375F, 0.0F);
			this.rendermodel(entity, "arm_l");
		}
		GL11.glPopMatrix();//glend
		
		
		//righthand
		GL11.glPushMatrix();//glstart
		{
			float Ax = MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) * limbSwingAmount;
			GL11.glTranslatef(-0.35F, 1.375F, 0.0F);
			//arm_r_rotex = (MathHelper.sin(partialTicks * 0.067F) * 0.05F) * (180F / (float)Math.PI);
			if(entity.getattacktask() && !(entity.deathTime > 0)) {
				if(entity.isSwingInProgress) {
					arm_r_rotex = -150 + entity.swingProgressInt * 30;
					arm_r_rotez = 30 - entity.swingProgressInt * 15;
				}else if(entity.getAIType() == 1) {
					arm_r_rotex = 30;
					arm_r_rotez = -20;
				}
				else if(entity.getAIType() == 4) {
					arm_r_rotex = -30;
					arm_r_rotez = -20;
				}
				else if(entity.getAIType() == 5) {
					arm_r_rotex = -140;
					arm_r_rotez = 40;
				}
				else
				{
					if(entity.getClient_Gun_Count(entity) < 4 && entity.getClient_Gun_Count(entity)%2 == 0){
		    			GL11.glRotatef(-entity.getClient_Gun_Count(entity) * 5, 1.0F, 0.0F, 0.0F);
		    		}
					arm_r_rotex = -90 + entity.rotationPitch;
				}
			}else if(entity.isRiding()) {
				arm_r_rotex = -30;
			}
			else if(entity.deathTime > 0){
				arm_r_rotex = -20;
			}
			else {
				arm_r_rotex = Ax * (180F / (float)Math.PI) * 2;
			}
			
			GL11.glRotatef(arm_r_rotex, 1.0F, 0.0F, 0.0F);
			GL11.glRotatef(arm_r_rotey, 0.0F, 1.0F, 0.0F);
			GL11.glRotatef(arm_r_rotez, 0.0F, 0.0F, 1.0F);
			
			GL11.glTranslatef(0.35F, -1.375F, 0.0F);
			this.rendermodel(entity, "arm_r");
			
		}
		GL11.glPopMatrix();//glend
	}
    
    private static void motion(EntityIBCBase entity, int[] remattime
			, float[] remat_xrote, float[] remat_yrote, float[] remat_zrote){
		//if(mat != null)
		{
			for(int i = 1; i < 200; ++i) {
				if(entity.getClient_cooltime2(entity) >= remattime[i - 1] && entity.getClient_cooltime2(entity) < remattime[i]){
					int time = remattime[i] - remattime[i - 1];
					int nowtime = entity.getClient_cooltime2(entity) - remattime[i - 1];
					
					/*float xpoint = remat_xpoint[i] - remat_xpoint[i - 1];
					xpoint = xpoint / time;
					float ypoint = remat_ypoint[i] - remat_ypoint[i - 1];
					ypoint = ypoint / time;
					float zpoint = remat_zpoint[i] - remat_zpoint[i - 1];
					zpoint = zpoint / time;*/
					
					float xrote = remat_xrote[i] - remat_xrote[i - 1];
					xrote = xrote / time;
					float yrote = remat_yrote[i] - remat_yrote[i - 1];
					yrote = yrote / time;
					float zrote = remat_zrote[i] - remat_zrote[i - 1];
					zrote = zrote / time;
					
					/*float xmove = remat_xmove[i] - remat_xmove[i - 1];
					xmove = xmove / time;
					float ymove = remat_ymove[i] - remat_ymove[i - 1];
					ymove = ymove / time;
					float zmove = remat_zmove[i] - remat_zmove[i - 1];
					zmove = zmove / time;*/
					
					/*GL11.glTranslatef((remat_xpoint[i - 1] + xpoint * nowtime)
							,(remat_ypoint[i - 1] + ypoint * nowtime)
							,(remat_zpoint[i - 1] + zpoint * nowtime));*/
					GL11.glRotatef(remat_xrote[i - 1] + xrote * nowtime, 1.0F, 0.0F, 0.0F);
					GL11.glRotatef(remat_yrote[i - 1] + yrote * nowtime, 0.0F, 1.0F, 0.0F);
					GL11.glRotatef(remat_zrote[i - 1] + zrote * nowtime, 0.0F, 0.0F, 1.0F);
					/*GL11.glTranslatef(-(remat_xpoint[i - 1] + xpoint * nowtime)
							,-(remat_ypoint[i - 1] + ypoint * nowtime)
							,-(remat_zpoint[i - 1] + zpoint * nowtime));*/
				}
			}
			
		}
	}
    
    private static float motion_x(EntityIBCBase entity, int[] remattime
			, float[] remat_xrote){
		float x = 0;
		{
			for(int i = 1; i < 200; ++i) {
				if(entity.getClient_cooltime2(entity) >= remattime[i - 1] && entity.getClient_cooltime2(entity) < remattime[i]){
					int time = remattime[i] - remattime[i - 1];
					int nowtime = entity.getClient_cooltime2(entity) - remattime[i - 1];
					
					float xrote = remat_xrote[i] - remat_xrote[i - 1];
					xrote = xrote / time;
					//GL11.glRotatef(remat_xrote[i - 1] + xrote * nowtime, 1.0F, 0.0F, 0.0F);
					x = remat_xrote[i - 1] + xrote * nowtime;
				}
			}
			
		}
		return x;
	}
    
    
    
    public float F6(EntityLivingBase entity, float partialTicks){
 		float f6 = 0;
 		if (!entity.isRiding())
        {
            f6 = entity.limbSwing - entity.limbSwingAmount * (1.0F - partialTicks);
            if (entity.isChild())
            {
                f6 *= 3.0F;
            }
        }
 		return f6;
 	}
 	public float F5(EntityLivingBase entity, float partialTicks){
 		float f5 = 0;
 		if (!entity.isRiding())
        {
            f5 = entity.prevLimbSwingAmount + (entity.limbSwingAmount - entity.prevLimbSwingAmount) * partialTicks;
            if (f5 > 1.0F)
            {
                f5 = 1.0F;
            }
        }
 		return f5;
 	}
    
    protected void renderLivingAt(EntityIBCBoss06 entityLivingBaseIn, double x, double y, double z)
    {
        GlStateManager.translate((float)x, (float)y, (float)z);
    }
    protected float handleRotationFloat(EntityIBCBoss06 livingBase, float partialTicks)
    {
        return (float)livingBase.ticksExisted + partialTicks;
    }
}