Fix filter deserialization

This commit is contained in:
DBotThePony 2025-03-29 12:41:55 +07:00
parent 8454db6785
commit f5e21f5582
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -44,7 +44,7 @@ open class FilteredContainerSlot(
filter = ItemFilter.EMPTY
if ("filter" in nbt) {
ItemFilter.CODEC.decode(provider.createSerializationContext(NbtOps.INSTANCE), nbt)
ItemFilter.CODEC.decode(provider.createSerializationContext(NbtOps.INSTANCE), nbt["filter"])
.ifError { LOGGER.error("Unable to deserialize item filter: ${it.message()}") }
.resultOrPartial().map { it.first }.ifPresent { filter = it }
}