From 280cf8d8dbe897443d9fc076ec8d62425cad6b1e Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 4 Nov 2021 11:20:14 -0700 Subject: [PATCH] Move async catches back to where they were (#6869) --- ...ync-catch-modifications-to-critical-entity-state.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/server/Async-catch-modifications-to-critical-entity-state.patch b/patches/server/Async-catch-modifications-to-critical-entity-state.patch index b9a21bb661..ad4dd5417c 100644 --- a/patches/server/Async-catch-modifications-to-critical-entity-state.patch +++ b/patches/server/Async-catch-modifications-to-critical-entity-state.patch @@ -60,13 +60,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 if (trackingStatus == Visibility.HIDDEN) { @@ -0,0 +0,0 @@ public class PersistentEntitySectionManager implements A + private boolean storeChunkSections(long chunkPos, Consumer action, boolean callEvent) { // CraftBukkit end - PersistentEntitySectionManager.ChunkLoadStatus persistententitysectionmanager_b = (PersistentEntitySectionManager.ChunkLoadStatus) this.chunkLoadStatuses.get(chunkPos); + org.spigotmc.AsyncCatcher.catchOp("Entity chunk save"); // Paper + PersistentEntitySectionManager.ChunkLoadStatus persistententitysectionmanager_b = (PersistentEntitySectionManager.ChunkLoadStatus) this.chunkLoadStatuses.get(chunkPos); if (persistententitysectionmanager_b == PersistentEntitySectionManager.ChunkLoadStatus.PENDING) { - return false; @@ -0,0 +0,0 @@ public class PersistentEntitySectionManager implements A } @@ -76,13 +76,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 ChunkPos chunkcoordintpair = new ChunkPos(chunkPos); CompletableFuture completablefuture = this.permanentStorage.loadEntities(chunkcoordintpair); @@ -0,0 +0,0 @@ public class PersistentEntitySectionManager implements A + } private boolean processChunkUnload(long chunkPos) { - boolean flag = this.storeChunkSections(chunkPos, (entityaccess) -> { + org.spigotmc.AsyncCatcher.catchOp("Entity chunk unload process"); // Paper + boolean flag = this.storeChunkSections(chunkPos, (entityaccess) -> { entityaccess.getPassengersAndSelf().forEach(this::unloadEntity); }, true); // CraftBukkit - add boolean for event call - @@ -0,0 +0,0 @@ public class PersistentEntitySectionManager implements A }