Improve 24w05a port ()

* Fix wrong ops being used in AttachmentSerializingImpl

* Remove unused private method

* Require and use registry future in advancements and loot tables
This commit is contained in:
apple502j 2024-02-05 20:30:14 +09:00 committed by GitHub
parent 03be9f1df2
commit 04ac8cf319
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 51 additions and 36 deletions
fabric-data-attachment-api-v1/src/main/java/net/fabricmc/fabric/impl/attachment

View file

@ -82,7 +82,7 @@ public class AttachmentSerializingImpl {
if (codec != null) {
RegistryOps<NbtElement> registryOps = RegistryOps.of(NbtOps.INSTANCE, wrapperLookup);
codec.parse(NbtOps.INSTANCE, compound.get(key))
codec.parse(registryOps, compound.get(key))
.get()
.ifRight(partial -> {
LOGGER.warn("Couldn't deserialize attachment " + type.identifier() + ", skipping. Error:");