Posted January 31, 20169 yr I have a boolean called isLinked. That determines a number of things, which is whether or not the player can use it and if the block should have particles. It saves everything just fine, but is there something I'm missing, because when I debug, it isn't updated server side when reading. Do I need to send a packet to the server, or is there something that I can implement in my class that'll take care of it?
January 31, 20169 yr Author I'm not sure I quite understand. I Notice that it's only saving nbt on the client side. Is that correct? Why is it that when I load back into the game, the server still doesn't update it's data. (Client data is correct, server data isn't)
January 31, 20169 yr Author There is something severely wrong with your code if that's the case. You are most likely correct... Main tile entity class -- EnergyTE http://pastebin.com/kwCEgV6W Teleporter Tile Entity class -- the one with the issue, but I'm sure it's related to the main TE class http://pastebin.com/S2tMU2qn Teleporter Container -- Not sure if needed, but just in case http://pastebin.com/zcXTMCYW Yikes! I always get so nervous when I share my code. All I know is i'm super happy it's not the code it use to be. The previous code would give everyone a heart attack -- (Wrote code, caused problems, wrote more code to solve problems, caused more problems and so on... haha) Thanks for helping! Edit: Noticed #markDirty() was called every tick. Fixed it
January 31, 20169 yr Author The setting Prior to saving and quitting, it is working properly. But when I load the game.. When the TE is linked, it displays particles above it. Also, when the inventory is opened, text is displayed saying whether or not it is linked. It says it isn't. While debugging, I notice that #world.isRemote is always false while reading from nbt. But here is the interesting part. When I open one of the TE's, it still doesn't work. But when I open the second TE, (The one that it's suppose to be linked to) everything goes back into motion and particles are displayed on both blocks, as well as a message saying they are linked. Edit: worldObj is now null. Maybe I misread. So now I can't really tell. I'm guessing that is is being run on the server side, because #readFromNBT is being called twice
January 31, 20169 yr Author Would detectAndSendChanges() do the trick? I want it to update on game load, so probably not. And you're definitely correct about it saving serverside. Sorry about that
January 31, 20169 yr You should set data on the client, the server is responsible for that. Then the client get's informed via packets. I think you are missing a very critical word between 'should' and 'set'... http://i.imgur.com/NdrFdld.png[/img]
January 31, 20169 yr I think you are missing a very critical word between 'should' and 'set'... Hm? Didn't you mean to say "You should NOT set data on the client..." ? http://i.imgur.com/NdrFdld.png[/img]
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.