Jump to content

PlayerEvent.LoadFromFile Data Not Syncing De-Serialization


jredfox

Recommended Posts

My goal is to manipulate data on PlayerEvent.LoadFromFile to always change the spawn dimension to the overworld. The issue I change the player spawn dimension via nbt and player.readFromNBT() but, the client is saying it's still renders previous nether dimension's sky. 

I thought PlayerEvent.LoadFromFile was for parsing data including parsing the dimension so if this isn't an early enough event for de-serialization for the client then what is? Before you go I need packets well the regular nbt doesn't get any packet updates until after the forge event and their dimension may change. I doubt it's packets there is probably something wrong with the world.

I would also like to manipulate other data on this event but, it appears even though vanilla "parses data there" it doesn't appear to be syncing with anything.

 

I am using this event as it's suppose to parse stuff from the disk so packets shouldn't be needed but, tell me what I am doing wrong. otherwise I need to teleport the player across dimensions and lag up load time even more when it should just be able to say he this data parsed from the disk is this packets get sent automatically after and I am planing on data manipulation of other data so player login event is simply not an option

Edited by jredfox
Link to comment
Share on other sites

6 minutes ago, diesieben07 said:

PlayerEvent.LoadFromFile is for loading very low-level file-based custom player data. It is not intended to modify what is loaded into the player and not guaranteed to work for that.

FML pre-sends the dimension to the client as part of the FML network handshake. I am not sure why this is the case, but I am sure there is a good reason for it. To do this, it reads the player NBT before the player is even constructed and parses the dimension out of it, you can see this happening in NetworkDispatcher#serverInitiateHandshake. There is no way to override the dimension that is sent to the client. A new event or hook would be needed for that.

ok is there anything else hard coded data before the PlayerList.initializeConnectionToPlayer()? I know hooks are going to be needed not a problem. I already had to hook to get my skins/capes working without replacing the player model for my new mod so I don't have an issue with ASM.

Where is the EntityPlayerMP constructed anyways?

Edited by jredfox
Link to comment
Share on other sites

5 minutes ago, diesieben07 said:

Stop. Do not make custom skins and capes. This goes against Mojang's stated intention. And no, ASM will not be supported here for something does not need ASM. Your ways to go about things break everything and go against the community. Stop doing this.

 

Use your IDE.

where does it state no skin and cape urls? this mod seemed to not be closed out
https://www.minecraftforum.net/forums/mapping-and-modding-java-edition/minecraft-mods/2300380-1-7-10-advanced-capes-mod-664000-downloads

 

I do use my IDE but, I am having difficulty finding the class out of thousands which one creates the player on server side

Edited by jredfox
Link to comment
Share on other sites

16 minutes ago, diesieben07 said:

I am no lawyer. But I would interpret Mojang's Brand and Asset guidelines this way. And it has been stated on Twitter before.

my thing doesn't send or receive any mojang assets simply edits a base64 string and nessary send packets to the clients that your skin/cape has changed.

Anyways I will be looking into the dimension with the NetworkDispatcher to alter the dimid

Edited by jredfox
Link to comment
Share on other sites

8 hours ago, diesieben07 said:

There is no way for you to do this.

Alter PlayerList.getPlayerNBT() or Alter NetworkDispatcher. Already tested with altering the player list class method works great I have fixed said issue. 

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.