From 68fedf025708aef890e40b97c4080990836ec979 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sun, 1 Sep 2024 18:21:55 +0700 Subject: [PATCH] Fix mattery container not deserializing properly --- .../ru/dbotthepony/mc/otm/container/MatteryContainer.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/container/MatteryContainer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/container/MatteryContainer.kt index a9dd72df3..644ea98c1 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/container/MatteryContainer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/container/MatteryContainer.kt @@ -247,12 +247,14 @@ open class MatteryContainer(var listener: ContainerListener, private val size: I if (freeSlots.remove(slotID)) { slots[slotID] = item + // trackedSlots[slotID] = item.copy() } else if (freeSlots.isEmpty()) { break } else { val slotID = freeSlots.firstInt() freeSlots.remove(slotID) slots[slotID] = item + // trackedSlots[slotID] = item.copy() } } @@ -262,6 +264,8 @@ open class MatteryContainer(var listener: ContainerListener, private val size: I filters[index] = item map?.put(index, item) } + + setChanged() } } }