I started my mod in 1.4.7 and it was working okay until this new 1.5 crazy texture change and now my ItemRenderer class is acting up in relation to the binding and unbinding of a texture. If anyone knows how to fix this for the newer update, I'd appreciate it
@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
switch (type) {
case EQUIPPED: {
GL11.glPushMatrix();
//ForgeHooksClient.bindTexture("/lederhosensheep/stevechem/egun.png", 0);
GL11.glRotatef(190F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(15F, 0.0F, 1.0F, 0.0F);
GL11.glRotatef(250F, 0.0F, 0.0F, 1.0F);
boolean isFirstPerson = false;
if (data[1] != null && data[1] instanceof EntityPlayer) {
if (!((EntityPlayer) data[1] == Minecraft.getMinecraft().renderViewEntity && Minecraft.getMinecraft().gameSettings.thirdPersonView == 0 && !((Minecraft.getMinecraft().currentScreen instanceof GuiInventory || Minecraft.getMinecraft().currentScreen instanceof GuiContainerCreative) && RenderManager.instance.playerViewY == 180.0F))) {
GL11.glTranslatef(0.2F, -0.5F, 0.2F);
} else {
isFirstPerson = true;
}
} else {
GL11.glTranslatef(0.2F, -0.5F, 0.2F);
}
float scale = 1.2F;
GL11.glScalef(scale, scale, scale);
egunModel.render((Entity) data[1], 0.0F, 0.0F, 0.0F, 0.0F, 0.0F,
0.0625F);
//ForgeHooksClient.unbindTexture();
GL11.glPopMatrix();
}
default:
break;
}
}
Thanks in advance! - Leder