feat: slow down PSH mutex checks
This commit is contained in:
parent
fa16d2172f
commit
30187548bb
@ -12,6 +12,7 @@ object ProjectionShellMutex {
|
||||
|
||||
init {
|
||||
TickEvent.SERVER_POST.register { server ->
|
||||
if (server.tickCount and 8 == 0) {
|
||||
val mutex = (server as ProjectionShellMutexAccessor).`quaedam$getProjectionShellMutex`()
|
||||
val currentTime = System.currentTimeMillis()
|
||||
mutex.forEach { (pos, lock) ->
|
||||
@ -22,6 +23,7 @@ object ProjectionShellMutex {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun tryLock(level: ServerLevel, pos: BlockPos, player: ServerPlayer): Boolean {
|
||||
val mutex = (level.server as ProjectionShellMutexAccessor).`quaedam$getProjectionShellMutex`()
|
||||
|
Loading…
Reference in New Issue
Block a user