Jump to content

Recommended Posts

Posted

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?

Posted

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)

Posted

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

Posted

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

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.