diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerHandler.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerHandler.kt index 7a6c610b0..c0d59ac10 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerHandler.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/container/ContainerHandler.kt @@ -21,7 +21,6 @@ class ContainerHandler @JvmOverloads internal constructor( if (localStack.isEmpty) { if (!simulate) { val copy = stack.copy() - container.setChanged(slot, copy, ItemStack.EMPTY) container.setItem(slot, copy) } 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 6fc6f998f..aa3f35760 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/container/MatteryContainer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/container/MatteryContainer.kt @@ -32,7 +32,6 @@ open class MatteryContainer(protected val watcher: Runnable, private val size: I require(size >= 0) { "Invalid container size $size" } } - private var ignoreChangeNotifications = 0 protected val slots: Array = Array(size) { ItemStack.EMPTY } private val trackedSlots: Array = Array(size) { ItemStack.EMPTY } private val filters: Array = arrayOfNulls(size) @@ -103,19 +102,6 @@ open class MatteryContainer(protected val watcher: Runnable, private val size: I } final override fun getContainerSize() = size - - fun startIgnoreUpdates() { - if (++ignoreChangeNotifications == 1) { - startedIgnoringUpdates() - } - } - - fun stopIgnoreUpdates() { - if (--ignoreChangeNotifications == 0) { - stoppedIgnoringUpdates() - } - } - protected open fun startedIgnoringUpdates() {} protected open fun stoppedIgnoringUpdates() {} @@ -187,7 +173,7 @@ open class MatteryContainer(protected val watcher: Runnable, private val size: I } open fun setChanged(slot: Int, new: ItemStack, old: ItemStack) { - if (ignoreChangeNotifications == 0) watcher.run() + watcher.run() } override fun serializeNBT(): CompoundTag {