-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Data Packs forget they are enabled, or get loaded in the wrong order #9938
Comments
petrolpark
added
the
Triage
This request requires the active attention of the Triage Team. Requires labelling or reviews.
label
Apr 25, 2024
petrolpark
changed the title
Data Packs get forget they are enabled, or get loaded in the wrong order
Data Packs forget they are enabled, or get loaded in the wrong order
Apr 25, 2024
LexManos
added a commit
that referenced
this issue
Jun 3, 2024
LexManos
added a commit
that referenced
this issue
Jun 3, 2024
autoforge
bot
removed
the
Triage
This request requires the active attention of the Triage Team. Requires labelling or reviews.
label
Jun 3, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minecraft Version: 1.20.1
Forge Version: 47.2.4
Steps to Reproduce:
AddPackFindersEvent
but don't turn it on by default./datapack
command.Description of issue:
During runtime it seems that the list of data packs is stored in order in a
PackRepository
. But the list is also stored in duplicate inPrimaryLevelData
->LevelSettings
->WorldDataConfiguration
->DataPackConfig
. This is what gets stored inlevel.dat
. Unfortunately, these two storages are desynced. Whenever there is a reload, the idea is that the ordered list of datapacks in the world'sPackRepository
gets copied to theDataPackConfig
, but that does not occur due to an error in this method:As you can see, the world's
LevelSettings
gets passed aWorldDataConfiguration
(which, checking at runtime, does indeed contain the correct order of data packs), but this value is completely unused because the field passed to the constructor is the object fielddataConfiguration
rather than the argumentpDataConfiguration
. I am assuming thatpDataConfiguration
was the thing that was meant to be passed on, because all of the other object fields are preceded by thethis.
.The result is that if you change the list of datapacks during runtime, they are correctly ordered while the level is open, but it is the old list which gets saved, so when you re-open the world next time it has reverted to whatever datapacks the world was originally created with.
Fix:
Simply changing
dataConfiguration
topDataConfiguration
fixes this. I've done it myself with a Mixin for my mod and it seems to work fine.The text was updated successfully, but these errors were encountered: