-
Notifications
You must be signed in to change notification settings - Fork 417
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
Modded BE nbt data is lost when upgrading from 21w42a or below #1837
Comments
Realistically this is not going to happen before the 1.18 release. |
Doesn’t mean the issue is fixed… |
It just means that it will never be fixed in time for it to matter. |
@apple502j has a mostly finished solution already actually, just needs an extra step imho (which is to run data fixers on each nbt entry and if it's null then to use previous value). |
@apple502j I think the most straightforward fix would be to mixin into |
I can confirm this mixin enables 1.18 to load chunks with 1.17 Carpet-autoCraftingTable TileEntities: @Mixin(Schema2684.class)
public abstract class Schema2684Mixin {
@Inject(at = @At("TAIL"), method = "registerBlockEntities", locals = LocalCapture.CAPTURE_FAILEXCEPTION)
private void addModdedBEs(Schema schema, CallbackInfoReturnable<Map<String, Supplier<TypeTemplate>>> cir, Map<String, Supplier<TypeTemplate>> map) {
schema.registerSimple(map, "carpet:crafting_table");
}
} |
Fixed in vanilla update I believe? |
Basically the chunk format change that happened in 21w43a fails to process modded block entities preventing all block entities in the chunk from being migrated to the new format.
Should be a relatively easy fix to implement in fabric api by manually copying the block entities list after the whole chunk tag has been updated in
VersionedChunkStorage#updateChunkNbt
( line 52 with cfr decompiler on 1.18-pre1 ). Only caveat is that any fixes done to block entity tags may be missed and I haven't looked into how to fix those manually yet.The text was updated successfully, but these errors were encountered: