From 8f76e1455b7954e0c31c6c8f8a81b1eb0e9fc521 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 22 Jul 2023 15:07:35 +0700 Subject: [PATCH] =?UTF-8?q?=D0=BC=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mc/otm/block/entity/MatteryBlockEntity.kt | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt index 75517e9c3..4577c8cee 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryBlockEntity.kt @@ -219,9 +219,8 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc if (value !== field) { field = value - if (value.isPresent) - for (tracker in listeners) - tracker.accept(value) + for (tracker in listeners) + tracker.accept(value) } } @@ -229,9 +228,7 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc fun addListener(listener: Consumer>) { listeners.add(listener) - - if (value.isPresent) - listener.accept(value) + listener.accept(value) } override fun get(): LazyOptional {