Posted December 4, 20168 yr I have a block which renders the current item in the slot. The block has two states" 1. Rotation 2. Boolean ========== 1. When an item is first added and the boolean is false the item doesn't render. 2. When the state is updated and the boolean is true the item renders. 3. When the stack is removed and the state is changed by the update method in the TileEntity the state is updated to boolean false but the item continues to render even the the slot is now empty. You can view the source code here: https://bitbucket.org/kitsushadow/forgecraft/src/0c6cb00316b3d00b05a01a68c11c7a3ec042e8f9/1.10.2/src/main/java/nmd/primal/forgecraft/?at=master The block in question is the Firebox
December 4, 20168 yr Author I see what you mean by checking for the active state. I was thinking that may be the case. Would you please elaborate on what u mean by optimized static model and where I may see an example implementation? Thanks diesieben! You always have an answer =p
December 4, 20168 yr Author Thanks for the info and the explanation. Could you please link me the Forge Repo so that I can take a look.
December 4, 20168 yr Author Still not working, I tried with the states and I tried without the states. I'm not having any luck. It's almost as though the client isn't being told that the stack has changed. Or the TileEntitySpecialRenderer is not being run when the block's inventory changes.
December 4, 20168 yr Author 1. Where am I using IInventory use capabilities? 2. I'm not sure if i am synchronizing the inventory to the client other than through the NBT data and by setting the tile.markDirty() at every inventory change. 3. Duplicate Information for the states? I'm not duplicating states.
December 4, 20168 yr Author 1. Where am I using IInventory use capabilities?What? 2. I'm not sure if i am synchronizing the inventory to the client other than through the NBT data and by setting the tile.markDirty() at every inventory change.markDirty is telling Minecraft that your TileEntity needs to be saved to disk the next time around (and notifies neighbor blocks about the TE change). It does not send things to the client. 3. Duplicate Information for the states? I'm not duplicating states.You have the blockstate that mimics whether or not a slot is set, right? Or what is this ACTIVE property used for? 2. How should I be informing the client of inventory changes then? 3. The Active Property manages if the Firebox is On or not. Being On causes the stack to decrement and changes the model texture.
December 4, 20168 yr Author Added the world.notifyBlockUpdate to all the methods that result in inventory changes but still no luck. When I add a stack it renders, when i remove the stack the rendering doesn't clear.
December 5, 20168 yr Author So i had the Server and Client print out their stack contents respectively and after removing the stack from the inventory the Server showed null but the Client still thought that there was an item in the slot. This definitely coincides with the rendering.
December 5, 20168 yr That definitely says that the update packet is not being sent. 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.
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.