Jump to content

[1.8] TileEntity NBT not saving when quitting


Recommended Posts

i had a similar issue with tile entity rotations not being saved and the block just pointing north on load. i made some changes based on an example i was able to find. primarily adding a getter and setter, rather than calling the variable directly and checking if the tagcompound.hasKey before setting it in the readfromnbt.





        this.direction = par1.getInteger("direction");




I don't know why either would make a difference, but one of them, at least, solved the issue.

Link to comment
Share on other sites

In the past I know it was a good practice to use worldObj.markBlockForUpdate() as well as markDirty(). Not sure if that would make a difference. Also, you could be having a client/server desync issue, as from what I can tell, you're not syncing any fields.

- Just because things are the way they are doesn't mean they can't be the way you want them to be. Unless they're aspen trees. You can tell they're aspens 'cause the way they are.

Link to comment
Share on other sites

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.

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.