diff --git a/src/main/kotlin/net/shadowfacts/phycon/block/redstone_controller/RedstoneControllerBlockEntity.kt b/src/main/kotlin/net/shadowfacts/phycon/block/redstone_controller/RedstoneControllerBlockEntity.kt index 75cee55..07df638 100644 --- a/src/main/kotlin/net/shadowfacts/phycon/block/redstone_controller/RedstoneControllerBlockEntity.kt +++ b/src/main/kotlin/net/shadowfacts/phycon/block/redstone_controller/RedstoneControllerBlockEntity.kt @@ -17,6 +17,10 @@ class RedstoneControllerBlockEntity: DeviceBlockEntity(PhyBlockEntities.REDSTONE var managedDevices = Array(5) { null } var redstoneMode = RedstoneMode.HIGH + set(value) { + field = value + redstoneStateChanged() + } private var redstonePowered = false @@ -24,6 +28,8 @@ class RedstoneControllerBlockEntity: DeviceBlockEntity(PhyBlockEntities.REDSTONE } fun redstoneStateChanged() { + if (world!!.isClient) return + val oldPowered = redstonePowered redstonePowered = cachedState[RedstoneControllerBlock.POWERED]