Fix flywheel battery not marking chunk dirty when energy level changes

This commit is contained in:
DBotThePony 2025-03-03 22:17:20 +07:00
parent d2f119a112
commit 38923d7978
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -37,6 +37,13 @@ class FlywheelBatteryBlockEntity(blockPos: BlockPos, blockState: BlockState) : M
private var multiblock: ShapedMultiblock? = null
private var lastHeight = -1
var batteryLevel = Decimal.ZERO
set(value) {
if (field != value) {
field = value
markDirtyFast()
}
}
private var cachedChargeEfficiency = Decimal.ONE
val formed: Boolean