Jump to content

Some issues with saving / loading variables for an entity from NBT


Potato

Recommended Posts

I've been having some issues saving and loading variables for an entity from the NBT. Specifically, I'm trying to set a randomized variable for the size of the entity (bigger/smaller, obviously) and it works, but the size isn't saved or loaded properly once i exit the world. When I re-enter the world, the size of the entity is randomized again. Any help would be appreciated!

Link to comment
Share on other sites

Figured out the issue on my own; For any topic viewers who are stumped, DataWatchers are pretty much the best thing ever. Look at how EntitySlime uses them to get an example of how to use them, and keep in mind the client reads datawatcher values from the server with no extra hassle.

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.

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.

Announcements



×
×
  • Create New...

Important Information

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