If we are ticking normally, don't use global tick handler to send blockentity changes to players
This commit is contained in:
parent
135dcb667d
commit
9cd5bad152
@ -113,8 +113,12 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc
|
||||
*/
|
||||
protected val savetablesLevel = Savetables()
|
||||
|
||||
private var tickedOnce = false
|
||||
|
||||
open fun tick() {
|
||||
tickList.tick()
|
||||
tickedOnce = true
|
||||
synchronizeToPlayers(false)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -528,7 +532,7 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc
|
||||
}
|
||||
|
||||
val synchronizer = FieldSynchronizer {
|
||||
if (isSynchronizing)
|
||||
if (isSynchronizing || tickedOnce)
|
||||
return@FieldSynchronizer
|
||||
|
||||
if (!isRemoved && level?.isClientSide == false && (_subCache == null || (_subCache ?: throw ConcurrentModificationException()).players.isNotEmpty())) {
|
||||
|
Loading…
Reference in New Issue
Block a user