Posted February 1, 20178 yr I've been really frustrated with this as of late. I'm trying to render items on the model from the container. Im using a TESR and whenever I place the block down it causes immense lag. https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.11/src/main/java/gunn/modcurrency/client/render/RenderTileVendor.java
February 1, 20178 yr new ItemStack(Items.DIAMOND_CHESTPLATE) You know... You could create this once rather than 30 times... Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
February 1, 20178 yr Author The itemstack is just for testing, eventually it will pull from the tile's container itself
February 1, 20178 yr Author So Im not quite sure how to use the FastTESR. It seems to work much differently then a normal TESR.
February 2, 20178 yr Author My main problem is I'm not sure how to add an item render to the vertexBuffer since you can't use Minecraft.getMinecraft().getRenderItem().renderItem(new ItemStack(Items.DIAMOND_CHESTPLATE), ItemCameraTransforms.TransformType.GROUND);
February 2, 20178 yr Author Is the 'getItemModelWithOverrides' a method of an ItemStack or where do I call it from?
February 2, 20178 yr Author I got that working...But how do I add quads to the vertexBuffer, there isn't a method that accepts quads.
February 5, 20178 yr Author I looked at the renderQuad method. I attempted to do what its doing there but nothing renders, am I close to whats right? https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.11/src/main/java/gunn/modcurrency/client/render/RenderTileVendor.java
February 5, 20178 yr Author After further investigation I noticed the render is rendering under the player and moves when they move, which I know is an issue if you leave a GLStateManager.pushMatrix(); open without popping it...but I have made sure to do this for each use of this piece of code.
February 5, 20178 yr Author Alright well I got it working....sorta. On the old TESR it would render multiple of the item because of the for loop. now it only renders one in an odd spot, or maybe all of them in one spot. I updated my github with my current code. https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.11/src/main/java/gunn/modcurrency/client/render/RenderTileVendor.java Edited February 5, 20178 yr by BeardlessBrady
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.