This commit is contained in:
DBotThePony 2025-03-22 19:09:59 +07:00
parent faba736bd7
commit 524c36aade
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -170,8 +170,8 @@ abstract class EnhancedContainer<out S : IContainerSlot>(private val size: Int)
val slot = element.getInt("slot")
if (!seenSlots.add(slot)) continue
if ("item" in nbt) {
ItemStack.OPTIONAL_CODEC.decode(ops, nbt["item"])
if ("item" in element) {
ItemStack.OPTIONAL_CODEC.decode(ops, element["item"])
.map { it.first }
.ifError { LOGGER.error("Failed to deserialize item stack in slot $slot: ${it.message()}") }
.ifSuccess {