Use type specific methods
This commit is contained in:
parent
6cc5659c43
commit
2da70e777f
@ -201,8 +201,8 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo
|
||||
}
|
||||
})
|
||||
|
||||
var automatePull by synchronizer.bool()
|
||||
var automatePush by synchronizer.bool()
|
||||
var automatePull by synchronizer.bool().property
|
||||
var automatePush by synchronizer.bool().property
|
||||
|
||||
init {
|
||||
savetables.enum(::energyFlow, "energy_${side}_flow", FlowDirection::valueOf)
|
||||
@ -336,7 +336,7 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo
|
||||
})
|
||||
|
||||
var automatePull by synchronizer.bool(setter = { value, access, _ ->
|
||||
if (access.read() != value) {
|
||||
if (access.readBoolean() != value) {
|
||||
access.write(value)
|
||||
|
||||
if (value) {
|
||||
@ -344,10 +344,10 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo
|
||||
outerSlotPush = 0
|
||||
}
|
||||
}
|
||||
})
|
||||
}).property
|
||||
|
||||
var automatePush by synchronizer.bool(setter = { value, access, _ ->
|
||||
if (access.read() != value) {
|
||||
if (access.readBoolean() != value) {
|
||||
access.write(value)
|
||||
|
||||
if (value) {
|
||||
@ -355,7 +355,7 @@ abstract class MatteryDeviceBlockEntity(blockEntityType: BlockEntityType<*>, blo
|
||||
outerSlotPush = 0
|
||||
}
|
||||
}
|
||||
})
|
||||
}).property
|
||||
|
||||
init {
|
||||
savetables.bool(::automatePull, "itemhandler_${side}_automatePull")
|
||||
|
Loading…
Reference in New Issue
Block a user