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

Client Data Map data is lost for datapack registries #1867

Open
SiverDX opened this issue Jan 18, 2025 · 0 comments
Open

Client Data Map data is lost for datapack registries #1867

SiverDX opened this issue Jan 18, 2025 · 0 comments
Labels
1.21.1 Targeted at Minecraft 1.21.1 1.21.4 Targeted at Minecraft 1.21.4 bug A bug or error data driven This request involves a data driven system networking Related to networking

Comments

@SiverDX
Copy link

SiverDX commented Jan 18, 2025

Minecraft: 1.21.1
NeoForge: 21.1.93

Datapack registries are created twice in this order:
First creation -> DataMapLoader#apply happens -> Second creation (previous loaded data is lost?)
(Both creations happened on the Render thread)

From Discord:

are data maps actually properly synced to the client?
in the builder i defined .sync (even with mandatory)
server has the data, client does not

in RegistryDataMapNegotiation my map is in the KnownRegistryDataMapsPayload
In ClientRegistryManager it is also present (also part of ourMandatory)

But when you retrieve a value, the innerMap returned from dataMaps in BaseMappedRegistry#getData is null
(and dataMaps is empty)

ClientRegistryManager#handleDataMapSync is never called, at least it never triggers a break point

DataMapLoader#apply seems to receive them, incl. the actual data

it's a datapack registry, i can see that the entity type registry has the parrot imitation map data still
While it's in the DataMapLaoder I can also see the entries, even when it's currently applying some other map

Breakpoints for the clear() call of the dataMaps field never triggered
I noticed though that after the whole loading the registry was a different java object - did it get re-created and the data was lost?

Yeah it seems after the data loader happens a new registry is created
https://gist.github.com/SiverDX/b53cb5fa01c005051648963d6bc2ea20

@SiverDX SiverDX added the triage Needs triaging and confirmation label Jan 18, 2025
@Matyrobbrt Matyrobbrt added bug A bug or error data driven This request involves a data driven system 1.21.1 Targeted at Minecraft 1.21.1 1.21.4 Targeted at Minecraft 1.21.4 networking Related to networking and removed triage Needs triaging and confirmation labels Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.1 Targeted at Minecraft 1.21.1 1.21.4 Targeted at Minecraft 1.21.4 bug A bug or error data driven This request involves a data driven system networking Related to networking
Projects
None yet
Development

No branches or pull requests

2 participants