Skip to content

[Feature request] Upgrade persisted NBT data from old version of minecraft using mojang's DataFixerUpper #8

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

Open
SakuraKoi opened this issue Aug 31, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@SakuraKoi
Copy link

SakuraKoi commented Aug 31, 2024

Currently here's a ItemMirror to handle NBT structure changes between minecraft versions, but it doesnt cover all cases

For example:
Enchantment minecraft:sweeping got renamed to minecraft:sweeping_edge
a sword saved in 1.20.1 with ItemTagStream and loaded in 1.21.1 will lose their enchantment due to missing minecraft:sweeping

[15:48:30 ERROR]: Tried to load invalid item: 'Failed to get element minecraft:sweeping missed input: {"minecraft:sweeping":3} missed input: {"minecraft:enchantments":{levels:{"minecraft:fire_aspect":2,"minecraft:knockback":2,"minecraft:looting":3,"minecraft:sharpness":5,"minecraft:sweeping":3,"minecraft:unbreaking":3}}}'

DataFixerUpper is a tool used by mojang to convert worlds created by older versions of Minecraft to the newer versions, it contains a series of rules to modify the saved world and upgrade any data in it.
Use the official way is a better choice as it's fully cover any situation: the upgrade rule is written by mojang

I've implemented a upgrade utils using DataFixerUpper, if you're interested, see here

@Rubenicos Rubenicos added the enhancement New feature or request label Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants