Jump to content

Recommended Posts

Posted (edited)

during PlayerEvent.LoadFromFile I am trying to make the player update it's variables through a new entire nbt from another file. During this test of changing the dimension and position seems to all sync fine on server side but, if player use to be in the nether it still thinks the sky is the nether when going to either overworld/end dimension. This code is eventually for a vanilla bug fix when swaping worlds between two players and eventually another bug fix


I am confused since the data on the client shouldn't even be there till after the load from file event the connection of the player is still null so what the heck isn't syncing? 


Test 1:
have player in vanilla nether somewhere
use this code during PlayerEvent.LoadFromFile event

notice player is at right pos and dimension but, the sky isn't right

NBTTagCompound nbt = new NBTTagCompound();
nbt.setInteger("Dimension",1);
NBTTagList pos = new NBTTagList();
pos.appendTag(new NBTTagDouble(0));
pos.appendTag(new NBTTagDouble(67));
pos.appendTag(new NBTTagDouble(0));
nbt.setTag("Pos",pos);
e.getEntityPlayer().readFromNBT(nbt);

 

Edited by jredfox
Posted (edited)
5 hours ago, diesieben07 said:

Do you even know what this event does? It is not the correct place to do this.

it's when the player is suppose to be serialized from the disk and the client shouldn't be getting any data till after this. This is the right event I have verified when this is firing.

So I need to know what data isn't synced/needs to be changed since when I change it the client thinks it's still there

Edited by jredfox
Posted (edited)
55 minutes ago, diesieben07 said:

No, it is not the right event.

But trying to explain things to you is like arguing with a brick wall.

then what is? You wanted me fixing uuidfixer to another event this is the right event to fix it on. So yes I need this event to serialize the player with the corrected data. Doing it on construction Is too early I will surely get overridden

Edited by jredfox
Posted (edited)

I don't know how the heck the player serialization event isn't the right event for calling player.readFromNBT(). I made a test and the above code produces the issue described don't know why that is since my event serialized it forcibly to be those coords and that dimension.

Edited by jredfox
Posted
21 hours ago, diesieben07 said:

No, it is not the right event.

But trying to explain things to you is like arguing with a brick wall.

I meant to say de-serialize 

Posted

anybody know why the client is rendering the nether. I am trying to override data on de- serialization on server side but, client an't syncing and the data shouldn't get to the client till this event is done what am I missing here?

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.