use of micdoodle8.mods.galacticraft.planets.venus.items.ItemThermalPaddingTier2 in project Galacticraft by micdoodle8.
the class LayerThermalPadding method renderLayerGC.
private void renderLayerGC(EntityLivingBase entitylivingbaseIn, float f2, float f3, float partialTicks, float f5, float f6, float f7, float f8, int armorSlot) {
ItemStack itemstack = this.getCurrentArmor(entitylivingbaseIn, armorSlot);
if (itemstack != null) {
ModelBiped t = this.func_177175_a(armorSlot);
t.setModelAttributes(this.renderer.getMainModel());
t.setLivingAnimations(entitylivingbaseIn, f2, f3, partialTicks);
this.func_177179_a(t, armorSlot);
this.renderer.bindTexture(itemstack.getItem() instanceof ItemThermalPaddingTier2 ? RenderPlayerGC.thermalPaddingTexture1_T2 : RenderPlayerGC.thermalPaddingTexture1);
t.render(entitylivingbaseIn, f2, f3, f5, f6, f7, f8);
// Start alpha render
GlStateManager.disableLighting();
Minecraft.getMinecraft().renderEngine.bindTexture(RenderPlayerGC.thermalPaddingTexture0);
GlStateManager.enableAlpha();
GlStateManager.enableBlend();
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
float time = entitylivingbaseIn.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 (entitylivingbaseIn.worldObj.provider instanceof IGalacticraftWorldProvider) {
float modifier = ((IGalacticraftWorldProvider) entitylivingbaseIn.worldObj.provider).getThermalLevelModifier();
if (modifier > 0) {
b = g;
g = r;
} else if (modifier < 0) {
r = g;
g = b;
}
}
GlStateManager.color(r, g, b, 0.4F * sTime);
t.render(entitylivingbaseIn, f2, f3, f5, f6, f7, f8);
GlStateManager.color(1, 1, 1, 1);
GlStateManager.disableBlend();
GlStateManager.enableAlpha();
GlStateManager.enableLighting();
}
}
Aggregations