Reduce redundant suspension checks
This commit is contained in:
parent
10f8be3d93
commit
9f56c913fa
|
|
@ -68,7 +68,9 @@ public abstract class ChunkHolderMixin extends GenerationChunkHolder implements
|
||||||
// register for suspension check when chain completes
|
// register for suspension check when chain completes
|
||||||
var map = ((ISuspendedHolderTrackingChunkMap)this.playerProvider);
|
var map = ((ISuspendedHolderTrackingChunkMap)this.playerProvider);
|
||||||
this.saveSync.whenCompleteAsync((r, e) -> {
|
this.saveSync.whenCompleteAsync((r, e) -> {
|
||||||
map.mfix$markForSuspensionCheck(this.pos);
|
if (this.getLatestChunk() != null) {
|
||||||
|
map.mfix$markForSuspensionCheck(this.pos);
|
||||||
|
}
|
||||||
}, map.mfix$getMainThreadExecutor());
|
}, map.mfix$getMainThreadExecutor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user