Reduce redundant suspension checks

This commit is contained in:
embeddedt 2026-03-22 22:14:54 -04:00
parent 10f8be3d93
commit 9f56c913fa
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -68,7 +68,9 @@ public abstract class ChunkHolderMixin extends GenerationChunkHolder implements
// register for suspension check when chain completes
var map = ((ISuspendedHolderTrackingChunkMap)this.playerProvider);
this.saveSync.whenCompleteAsync((r, e) -> {
map.mfix$markForSuspensionCheck(this.pos);
if (this.getLatestChunk() != null) {
map.mfix$markForSuspensionCheck(this.pos);
}
}, map.mfix$getMainThreadExecutor());
}
}