Jump to content

How to sync custom entity NBT data [1.16.5]?


RInventor7

Recommended Posts

Hi! My custom entity has a number variable stored in its NBT data. When I print out the values I see that it is showing me on server thread correct output (10 for example) but on the client/render thread it is always showing 0. If the value gets set on render thread I send the serverbound packet to server and set the value on server as well. Sadly, all the logic (variable value setting included) happens mostly on server thread. Or the value is 0 on the client thread and the correct server value is overwritten with the wrong client value.

Is there an easy way to sync client and server values?

And if not, then how to send clientbound packets? And would it even work?

Edited by RInventor7
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.