Fix updating machine configuration not marking chunk dirty
This commit is contained in:
parent
e2b340ceaf
commit
1955975cee
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user