Posted May 3, 20223 yr I noticed my GUI's values and the actual values of the BlockEntity(using debugging and watching the behvaiour) I then did a toString() and saw 2 different addressed and debugging the constructor when a block is placed TWO BlockEntities spawn. I assume one is client sided and one is server sides but idrk.. what I do know is, the changes are surely updated on the server(as said before), but not on the client, so while the beaviour of the blocks change accordingly to the given values, opening the screen doesn't actually show them properly... I assumed it is server and client because I get the BlockEntity on the Screen using menu.blockEntity (which is client sided) and on the server I get it by usering ServerPlayer.getContainer.getBlockEntity() (or smth along these lines) so clearly server side... How do I fix it? I can post code if needed
May 3, 20223 yr Author I use the FriendlyBteBuf to send data, I also call setChanged() when my values change.. Idrk what it does but it seemed logical to do so in my set methods...
May 3, 20223 yr Author Oh I forgot to register the channel from the constructor(altho I did pass it with the buffer), I did it now, it works. Thank you!
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.