-
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Labels
1.20.1Targets Minecraft 1.20.1Targets Minecraft 1.20.1bugSomething isn't workingSomething isn't working
Description
Minecraft version
1.20.1 (LTS)
Describe the bug
possible null ptr due to thraed local usage
Steps to reproduce
in DataPackContentsMixin, which targets the ReloadableServerResources class reload method, a thread local is set ResourceConditionsImpl.CURRENT_REGISTRIES.
this field is later accessed inside the reloader which assumes the reload happens on same thread.
That is not guaranteed, nothing stops a mod from wrapping the returned reload instance and run it in another thread.
To me this reliance on thread local static field to pass that registry access along seems very brittle and unreliable way to propagate objects around.
This is not an issue in 1.21.1
Logs
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
1.20.1Targets Minecraft 1.20.1Targets Minecraft 1.20.1bugSomething isn't workingSomething isn't working