No-Chat-Reports icon indicating copy to clipboard operation
No-Chat-Reports copied to clipboard

Map of Xaero's World Map gets reset when joining secure servers

Open RedstoneDubstep opened this issue 1 year ago • 0 comments

Modloader

Forge

Minecraft Version

1.19.1

Modloader Version

Forge 43.0.8

No Chat Reports Version

1.19.2-v1.4.0

Modpack Info

No response

The latest.log File

https://pastebin.com/mWLAz0V2

Bug Description

When joining a server with enforce-secure-profile=true with Xaero's World Map and NCR, the previously uncovered world map will be reset. This gets undone when re-joining the server without NCR, in this instance the previous world map is accessible again. Looking into this, this is likely caused by Xaero's World Map not being able to query the IP adress of the server and thus not knowing in what folder the world map for that server is stored. The IP (and, in fact, all other data the client is supposed to know about the current server) doesn't get set properly when connecting to a server with enforce-secure-profile=true with NCR due to it not passing the ServerData argument to ConnectScreen#startConnecting (see NoChatReportsClient#reconnectLastServer).

Steps to Reproduce

  1. Start a Forge client with Xaero's World Map installed, and a local Forge server without any mods and the enforce-secure-profile property set to true.
  2. Join the server and fly around so chunks get added to the world map, then close the client.
  3. Start the client again, this time with Xaero's World Map and this mod installed, and join the server (by clicking the "Proceed" button in NCR's warning screen).
  4. Observe that the previous world map is not accessible anymore, and instead a new, blank world map is started.
  5. Close the client, remove NCR, re-join the server, and observe the world map being accessible again.

Other Information

Tested this with Xaero's World Map 1.26.2. If you want to fix this, I'd propose either trying to access the currentServer field of Minecraft to parse it into the mentioned method (though I don't know whether that field is already reset when the DisconnectionScreen is opened) or storing the server data alongside the server adress in ServerSafetyState.

RedstoneDubstep avatar Aug 12 '22 12:08 RedstoneDubstep