diff options
author | Jake Potrebic <[email protected]> | 2021-11-04 11:20:14 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2021-11-04 11:20:14 -0700 |
commit | 0968cddbcdf82d4dde0851f38df78c7cc275e6b9 (patch) | |
tree | cbc731a9f204fae544e574388c019c1c8457c47c | |
parent | 09d50a92779474cd5b6a1d464c25a2296a7479ab (diff) | |
download | Paper-0968cddbcdf82d4dde0851f38df78c7cc275e6b9.tar.gz Paper-0968cddbcdf82d4dde0851f38df78c7cc275e6b9.zip |
Move async catches back to where they were (#6869)
-rw-r--r-- | patches/server/0835-Async-catch-modifications-to-critical-entity-state.patch | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/patches/server/0835-Async-catch-modifications-to-critical-entity-state.patch b/patches/server/0835-Async-catch-modifications-to-critical-entity-state.patch index 572a2eecf9..df3726516a 100644 --- a/patches/server/0835-Async-catch-modifications-to-critical-entity-state.patch +++ b/patches/server/0835-Async-catch-modifications-to-critical-entity-state.patch @@ -8,7 +8,7 @@ Now in 1.17, this state is _even more_ critical than it was before, so these must exist to catch stupid plugins. diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java -index fe5739c0949636343ea68e403aa5f4bef89e9d9f..394de90cc25179cd7576af9a08214b0d4ad53795 100644 +index fe5739c0949636343ea68e403aa5f4bef89e9d9f..50916d29c98b988a206a692d2babd0c742f5d085 100644 --- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java +++ b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java @@ -134,6 +134,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A @@ -59,14 +59,14 @@ index fe5739c0949636343ea68e403aa5f4bef89e9d9f..394de90cc25179cd7576af9a08214b0d long i = chunkPos.toLong(); if (trackingStatus == Visibility.HIDDEN) { -@@ -292,6 +299,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A +@@ -291,6 +298,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A + private boolean storeChunkSections(long chunkPos, Consumer<T> 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; @@ -320,6 +328,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A } @@ -75,14 +75,14 @@ index fe5739c0949636343ea68e403aa5f4bef89e9d9f..394de90cc25179cd7576af9a08214b0d this.chunkLoadStatuses.put(chunkPos, PersistentEntitySectionManager.ChunkLoadStatus.PENDING); ChunkPos chunkcoordintpair = new ChunkPos(chunkPos); CompletableFuture completablefuture = this.permanentStorage.loadEntities(chunkcoordintpair); -@@ -334,6 +343,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A +@@ -333,6 +342,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> 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 - @@ -357,6 +367,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A } |