Fix block entity synchers sometimes not ticking
This commit is contained in:
parent
d38c780fdd
commit
577ea070db
@ -70,8 +70,6 @@ import kotlin.collections.ArrayList
|
||||
* Absolute barebone (lol) block entity class in Overdrive that Matters, providing bare minimum (lulmao, minecraft engine) functionality
|
||||
*/
|
||||
abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: BlockPos, p_155230_: BlockState) : BlockEntity(p_155228_, p_155229_, p_155230_), INeighbourChangeListener {
|
||||
private var isSynchronizing = false
|
||||
|
||||
private val sidelessCaps = Reference2ObjectOpenHashMap<BlockCapability<*, *>, Any>()
|
||||
private val sidedCaps = Array(RelativeSide.entries.size) {
|
||||
Reference2ObjectOpenHashMap<BlockCapability<*, *>, ControllableCapability<*>>()
|
||||
@ -470,6 +468,8 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc
|
||||
blockEntities.forEach {
|
||||
it.synchers[player] = it.syncher.Remote()
|
||||
}
|
||||
|
||||
checkShouldTick()
|
||||
}
|
||||
} else if (player in players && player.hasDisconnected()) {
|
||||
unsubscribe(player)
|
||||
@ -513,6 +513,8 @@ abstract class MatteryBlockEntity(p_155228_: BlockEntityType<*>, p_155229_: Bloc
|
||||
blockEntity.synchers[it] = blockEntity.syncher.Remote()
|
||||
}
|
||||
}
|
||||
|
||||
checkShouldTick()
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user