From 524c36aaded27749a28468ec1f6f34b89b2f69ec Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 22 Mar 2025 19:09:59 +0700 Subject: [PATCH] oops --- .../ru/dbotthepony/mc/otm/container/EnhancedContainer.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/container/EnhancedContainer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/container/EnhancedContainer.kt index ba96afded..630016b90 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/container/EnhancedContainer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/container/EnhancedContainer.kt @@ -170,8 +170,8 @@ abstract class EnhancedContainer(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 {