Posted March 18, 201312 yr 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
March 18, 201312 yr You should use the method Minecraft.getMinecraft().renderEngine.func_98187_b(texture) instead of ForgeHooksClient.bindTexture(texture) Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! | mah twitter This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.