Jump to content

IExtendedEntityProperties readFromNBT not called first time join LAN world


gegy1000

Recommended Posts

So I am using IExtendedEntityProperties for my mod, but I have a problem with it. When another player joins a LAN world for the first time, it won't call readFromNBT on it. However, if I join again after that it does get called. I have used IExtendedEntityProperties and never got a problem with this. So that's why I posted this here.

 

You can find the source code here: https://github.com/gegy1000/WarriorsMod/blob/master/src/main/java/net/gegy1000/warriors/common/data/WarriorCatData.java

 

And my Event:

https://github.com/gegy1000/WarriorsMod/blob/master/src/main/java/net/gegy1000/warriors/common/event/CommonEventHandler.java

Link to comment
Share on other sites

Of course it won't call it. Since the player has never been on the server before there is no data from previous connections that could be read. This is not any different from normal servers.

Makes sense, ok. I will try think of another way to do this. Because as you can see in my read, I am getting a random name if it doesn't already have one... What event would I use if I wanted it to get called sometime after read is called?
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.