Posted January 21, 201312 yr I am trying to make a tile entity that works like a gear shaft. The shaft is meant to connect to other shafts when I place them next to each other. I've set up the onNeighborBlockChange function to make adjacent shafts connect when you place one, but for some reason only the one I placed updates. A bit of debugging has told me that the shafts are updating correctly on the server side, but not on the client side. I have packet handling set up in the tile entity, and it's being updated correctly in the onDataPacket function, so I don't know why it's not updated correctly when rendering. Here is my code (I've only included the parts I think are important): TileEntityShaft: http://pastebin.com/0tB535Sc BlockShaft: http://pastebin.com/4Anj8dGb If anyone wants the full code, it's at https://github.com/LogiCo-Modding/Geartech
January 21, 201312 yr im at my tablet so i cant help to much you, but what about world.updateBlockForRender?
February 1, 201312 yr After changing the tile entity's state, you need to call the block's markBlockForUpdate method -- this ensures that the state is sent to the client and the block is re-rendered. You should also call the tile entity's OnInventoryChanged method, otherwise the state might not get saved to disk.
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.