Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix player data not being copied on respawn #53

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

pjon1
Copy link
Contributor

@pjon1 pjon1 commented Oct 5, 2024

When a player respawns, a new ServerPlayerEntity object is created to replace the old one. Instead of reading nbt data from the save, the game copies the data from the old object. MixinServerPlayerEntity does not have an inject for that, which means the new ServerPlayerEntitySummary remains empty and the player loses all their exploration data. I believe this is the cause of sisby-folk/antique-atlas#170

This is my attempt to fix it. I don't really know java, so I'm not sure if what I did was right, but it seems to work. I haven't tested it in multiplayer.

@sisby-folk
Copy link
Owner

facepalm my god, how did we miss this - we've had to do this so many times. I'm overseas, but I'll post a built jar and someone else can test in multiplayer to confirm

@sisby-folk
Copy link
Owner

Artifacts(1).zip

here's the build! could someone give it a shot to confirm?

@Krimatoria
Copy link

Artifacts(1).zip

here's the build! could someone give it a shot to confirm?

I can try with atlas. Do I just need to add both Surveyors from the archive?

@sisby-folk
Copy link
Owner

sources jar not needed, but yes!

@sisby-folk
Copy link
Owner

sisby-folk commented Oct 8, 2024

feel free to test the dying case, the "open to LAN" case, and the multiplayer death / closing the game case. not actually sure which exact ones cause it / are fixed

@Krimatoria
Copy link

Krimatoria commented Oct 8, 2024

feel free to test the dying case, the "open to LAN" case, and the multiplayer death / closing the game case. not actually sure which exact ones cause it / are fixed

I put the atlas version 2.9.17+1.21 for 1.21 Neoforge, but when I open it it looks like this. That's why I can't check the archive replacement file.

2024-10-09_00 58 52

image
Version 1.21 for Fabric works fine

If there was a version for 1.20.1 in the archive, I could check. I don't know why NeoForge looks like this to me

@Krimatoria
Copy link

sisby-folk/antique-atlas#205 If I had known about it in advance Lol

@Krimatoria
Copy link

Krimatoria commented Oct 8, 2024

Yes, this fix works for Neoforge 1.21.1, I figured it out and updated the version from the archive and now the map is saved when opening the world to the network to enable cheats and make a teleport. Disconnecting and re-entering the world does not delete the map and it is finally saved along with the labels.

I'm really looking forward to the port of this fix for 1.20.1 Forge

image
image

NeoForge 21.1.66
Minecraft 1.21.1

  1. forgified-fabric-api-0.104.0+2.0.14+1.21.1.jar
  2. surveyor-0.6.23+1.21.jar (Artifacts(1).zip)
  3. antique-atlas-2.9.17+1.21.jar
  4. connector-2.0.0-beta.3+1.21.1-full.jar

@Sk1nny18
Copy link

Sk1nny18 commented Oct 9, 2024

Hiya this fix also works for Fabric i just tried it and all my problems with saves seem to be fixed, super happy it works now as was really looking forward to using antique atlas and was bummed surveyor kept messing it up.

@sisby-folk sisby-folk changed the base branch from 1.21 to 1.20 October 11, 2024 12:48
@sisby-folk sisby-folk changed the base branch from 1.20 to 1.21 October 11, 2024 12:49
@sisby-folk sisby-folk merged commit f19107c into sisby-folk:1.21 Oct 11, 2024
1 check passed
@Krimatoria
Copy link

Krimatoria commented Oct 11, 2024

Surveyor Map Framework 0.6.24+1.20
The new version works fine on 1.20.1 thanks)))
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants