Fix attaching stabilizers not instantly updating black hole properties on client
This commit is contained in:
parent
c240f9cc1a
commit
ffc56ada1a
@ -95,8 +95,18 @@ class BlackHoleBlockEntity(p_155229_: BlockPos, p_155230_: BlockState) : Synchro
|
||||
sleepTicks = 4
|
||||
}
|
||||
|
||||
private fun updateMass() {
|
||||
mass = mass
|
||||
}
|
||||
|
||||
private val stabilizers = LinkedList<GravitationStabilizerBlockEntity>()
|
||||
private var stabilizerClientCount by synchronizer.int()
|
||||
private var stabilizerClientCount by synchronizer.int(setter = setter@{ value, field, setByRemote ->
|
||||
field.write(value)
|
||||
|
||||
if (setByRemote) {
|
||||
updateMass()
|
||||
}
|
||||
})
|
||||
|
||||
fun stabilizerAttached(stabilizer: GravitationStabilizerBlockEntity) {
|
||||
if (stabilizer in stabilizers)
|
||||
|
Loading…
Reference in New Issue
Block a user