From 26b3a17e5870149c2749509fa14e1ac4b00769f2 Mon Sep 17 00:00:00 2001 From: Kino Date: Thu, 31 Jan 2019 20:35:54 -0500 Subject: [PATCH] Fixed CCE with first person gloves --- .../client/renders/AetherItemRenderer.java | 35 ++++++++++--------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/legacy/aether/client/renders/AetherItemRenderer.java b/src/main/java/com/legacy/aether/client/renders/AetherItemRenderer.java index 420c518..c90ca4b 100644 --- a/src/main/java/com/legacy/aether/client/renders/AetherItemRenderer.java +++ b/src/main/java/com/legacy/aether/client/renders/AetherItemRenderer.java @@ -67,25 +67,28 @@ public class AetherItemRenderer extends ItemRenderer { renderPlayer.renderFirstPersonArm(playerIn); - this.mc.getTextureManager().bindTexture(((ItemAccessory) gloves.getItem()).texture); + if (gloves.getItem() instanceof ItemAccessory) + { + this.mc.getTextureManager().bindTexture(((ItemAccessory) gloves.getItem()).texture); - int colour = gloves.getItem().getColorFromItemStack(gloves, 0); - float red = ((colour >> 16) & 0xff) / 255F; - float green = ((colour >> 8) & 0xff) / 255F; - float blue = (colour & 0xff) / 255F; + int colour = gloves.getItem().getColorFromItemStack(gloves, 0); + float red = ((colour >> 16) & 0xff) / 255F; + float green = ((colour >> 8) & 0xff) / 255F; + float blue = (colour & 0xff) / 255F; - if (gloves.getItem() != ItemsAether.phoenix_gloves) { - GL11.glColor3f(red, green, blue); + if (gloves.getItem() != ItemsAether.phoenix_gloves) { + GL11.glColor3f(red, green, blue); + } + + GL11.glEnable(GL11.GL_BLEND); + + renderPlayer.modelBipedMain.onGround = 0.0F; + renderPlayer.modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, playerIn); + renderPlayer.modelBipedMain.bipedRightArm.render(0.0625F); + + GL11.glDisable(GL11.GL_BLEND); + GL11.glColor3f(1.0F, 1.0F, 1.0F); } - - GL11.glEnable(GL11.GL_BLEND); - - renderPlayer.modelBipedMain.onGround = 0.0F; - renderPlayer.modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 0.0625F, playerIn); - renderPlayer.modelBipedMain.bipedRightArm.render(0.0625F); - - GL11.glDisable(GL11.GL_BLEND); - GL11.glColor3f(1.0F, 1.0F, 1.0F); } @Override