diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryDeviceBlockEntity.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryDeviceBlockEntity.kt index 8b236083c..6cfc56de3 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryDeviceBlockEntity.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/block/entity/MatteryDeviceBlockEntity.kt @@ -145,6 +145,7 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo if (access.read() != value) { access.write(value) + setChangedLight() if (value == FlowDirection.NONE) { controller.close() @@ -157,8 +158,16 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo // var automatePull by synchronizer.bool().property var automatePull = false + set(value) { + field = value + setChangedLight() + } // var automatePush by synchronizer.bool().property var automatePush = false + set(value) { + field = value + setChangedLight() + } override fun tick() { if (flow == FlowDirection.NONE || !automatePull && !automatePush || redstoneControl.isBlockedByRedstone) @@ -310,8 +319,16 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo // var automatePull by synchronizer.bool().property var automatePull = false + set(value) { + field = value + setChangedLight() + } // var automatePush by synchronizer.bool().property var automatePush = false + set(value) { + field = value + setChangedLight() + } init { tickList.always(this) @@ -371,6 +388,7 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo if (access.read() != value) { access.write(value) + setChangedLight() if (value == FlowDirection.NONE) { for (controller in capControllers) @@ -499,6 +517,7 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo if (access.read() != value) { access.write(value) + setChangedLight() if (value == ItemHandlerMode.DISABLED) { capController.close() @@ -543,6 +562,7 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo set(value) { if (field != value) { field = value + setChangedLight() if (value) { innerSlotPush = 0 @@ -555,6 +575,7 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo set(value) { if (field != value) { field = value + setChangedLight() if (value) { innerSlotPush = 0