Jump to content

[SOLVED][1.6.4] How to sync mob's custom field between client and server?


Recommended Posts

Posted

Hello guys,

I feel pretty newbie asking this, but I'm not sure what's the best way to do it.

 

I have a mob that has got the custom field "species". Depending on this value, the client must render a different model. So how can I sync this value between server and the clients? I don't want to use the dataWatcher for this so small and "easy" thing. Do you know any better way?

 

Of course "species" value is set only when the mob is created the first time, then it's saved in the NBT but it will never change.

 

Thanks in advance,

Axel

Posted

Hi

 

Three ideas-

(1) turn your single entity into two entities that share all the same code except for that one field

(2) datawatcher (to be honest this is actually not so bad)

(3) custom data packet

 

I'd recommend the datawatcher myself, or splitting into two entities.

 

-TGG

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.