-
Notifications
You must be signed in to change notification settings - Fork 212
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 fixers for the post-1.20.1 world(s) #1749
Comments
No-no-no-no-no-no-no-no-no-no-no-no-no-no-no-no-no |
It's honestly a really cool system - I'm assuming block entities will be migrating to something similar at some point. But yes, also a nightmare for every mod. |
Okay, looked at a 1.20.5 workspace, and this actually looks fairly manageable. I think we can do the following: 1.20.4Mixin to 1.20.5
|
Every version, the way Minecraft stores game data (such as blocks and items) changes slightly. For instance, post 1.20.1 (the current version CC:T targets):
Minecraft handles this migration by using the DFU library. However, CC: Tweaked (like most mods), does not hook into it - DFU doesn't really have good support for mods (Mojang/DataFixerUpper#80), and (AFAIK) mod loaders have deemed adding support too complex to be worth it.
This is a problem for CC: Tweaked, as it means that worlds cannot be migrated between versions (or at least, not without some data loss).
It's not entirely clear what should be done here. At a bare-minimum, we should mixin to Minecraft's existing data-fixers, and register CC:T's block entities as inventories - this at least ensures items inside turtles (and disk drives and printers) will be migrated.
I'm less sure what to do about 1.20.5's components. I've not actually looked at how data-fixers for that are implemented - it may be quite simple to hook into as well, but failing that we can probably convert NBT on-the-fly, reading out of the
custom_nbt
component and adding our custom one instead.Turtle/pocket computer upgrades are a bit tricky here. Upgrade data may store item NBT which we'd want to migrate, but because it's currently unstructured, we can't automatically do so. Ideally we'd be able to expose data fixers for upgrade data too, but I don't think that's really possible :(. Maybe time to revisit #903?
The text was updated successfully, but these errors were encountered: