Fix Redstone Controller not updating when mode is changed
This commit is contained in:
parent
b78eb192de
commit
e646e1e7c2
|
@ -17,6 +17,10 @@ class RedstoneControllerBlockEntity: DeviceBlockEntity(PhyBlockEntities.REDSTONE
|
|||
|
||||
var managedDevices = Array<IPAddress?>(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]
|
||||
|
||||
|
|
Loading…
Reference in New Issue