Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • Author
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

  • Author
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

  • Author

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

  • Author
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 

  • Author

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.