Posted October 4, 201212 yr I am trying to make a very basic item renderer to work off of, that simply duplicates the vanilla renderer behavior to give me a base to add my stuff to. However, I seem to be failing at even that. My current code is as such: package SoundLogic.materials.core; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; import net.minecraft.client.Minecraft; import net.minecraft.src.ItemStack; import net.minecraft.src.RenderEngine; import net.minecraft.src.Tessellator; import net.minecraftforge.client.*; public class HauntedItemRenderer implements IItemRenderer { @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return type==type.INVENTORY; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return true; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { { Tessellator tes = Tessellator.instance; ForgeHooksClient.bindTexture(item.getItem().getTextureFile(), 0); int var9=item.getIconIndex(); double texX=var9 % 16 * 16; double texY=var9 / 16 * 16; tes.startDrawingQuads(); tes.addVertexWithUV(0, 0, 0, texX, texY); tes.addVertexWithUV(0, 16, 0, texX,texY+16); tes.addVertexWithUV(16,16,0,texX+16,texY+16); tes.addVertexWithUV(16,0,0,texX+16,texY); tes.draw(); } } } I seem to have registered it correctly, since the function is getting called, and I can confirm that the texture and sprite location are valid since it shows up just fine in my hand (which I have not yet implemented a custom renderer for) If anyone could help me with this I would greatly appreciate it. Thank you, Sound Logic
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.