{
PlayerGearData gearData = ClientProxyCore.playerItemData.get(par1EntityLivingBase.getCommandSenderName());
if (gearData != null && !RenderPlayerGC.flagThermalOverride)
{
ModelBiped modelBiped;
for (int i = 0; i < 4; ++i)
{
if (i == 0)
{
modelBiped = this.modelThermalPaddingHelmet;
}
else
{
modelBiped = this.modelThermalPadding;
}
int padding = gearData.getThermalPadding(i);
if (padding >= 0)
{
GL11.glColor4f(1, 1, 1, 1);
FMLClientHandler.instance().getClient().getTextureManager().bindTexture(thermalPaddingTexture1);
modelBiped.bipedHead.showModel = i == 0;
modelBiped.bipedHeadwear.showModel = i == 0;
modelBiped.bipedBody.showModel = i == 1 || i == 2;
modelBiped.bipedRightArm.showModel = i == 1;
modelBiped.bipedLeftArm.showModel = i == 1;
modelBiped.bipedRightLeg.showModel = i == 2 || i == 3;
modelBiped.bipedLeftLeg.showModel = i == 2 || i == 3;
modelBiped.onGround = this.renderPlayer.modelBipedMain.onGround;
modelBiped.isRiding = this.renderPlayer.modelBipedMain.isRiding;
modelBiped.isChild = this.renderPlayer.modelBipedMain.isChild;
if (this.renderPlayer.modelBipedMain != null)
{
modelBiped.heldItemLeft = this.renderPlayer.modelBipedMain.heldItemLeft;
modelBiped.heldItemRight = this.renderPlayer.modelBipedMain.heldItemRight;
modelBiped.isSneak = this.renderPlayer.modelBipedMain.isSneak;
modelBiped.aimedBow = this.renderPlayer.modelBipedMain.aimedBow;
}
modelBiped.setLivingAnimations(par1EntityLivingBase, par2, par3, 0.0F);
modelBiped.render(par1EntityLivingBase, par2, par3, par4, par5, par6, par7);
// Start alpha render
GL11.glDisable(GL11.GL_LIGHTING);
FMLClientHandler.instance().getClient().getTextureManager().bindTexture(thermalPaddingTexture0);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_BLEND);
GL11.glAlphaFunc(GL11.GL_GREATER, 0.0F);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
float time = par1EntityLivingBase.ticksExisted / 10.0F;
float sTime = (float) Math.sin(time) * 0.5F + 0.5F;
float r = 0.2F * sTime;
float g = 1.0F * sTime;
float b = 0.2F * sTime;
if (par1EntityLivingBase.worldObj.provider instanceof IGalacticraftWorldProvider)
{
float modifier = ((IGalacticraftWorldProvider) par1EntityLivingBase.worldObj.provider).getThermalLevelModifier();
if (modifier > 0)
{
b = g;
g = r;
}
else if (modifier < 0)
{
r = g;
g = b;
}
}
GL11.glColor4f(r, g, b, 0.4F * sTime);
modelBiped.render(par1EntityLivingBase, par2, par3, par4, par5, par6, par7);
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glColor4f(1, 1, 1, 1);
GL11.glEnable(GL11.GL_LIGHTING);
}