Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 02:50:09 +01:00
Move async catches back to where they were (#6869)
Dieser Commit ist enthalten in:
Ursprung
09d50a9277
Commit
0968cddbcd
@ -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.
|
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
|
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
|
--- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
|
||||||
+++ b/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
|
@@ -134,6 +134,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
|
||||||
@ -59,14 +59,14 @@ index fe5739c0949636343ea68e403aa5f4bef89e9d9f..394de90cc25179cd7576af9a08214b0d
|
|||||||
long i = chunkPos.toLong();
|
long i = chunkPos.toLong();
|
||||||
|
|
||||||
if (trackingStatus == Visibility.HIDDEN) {
|
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) {
|
private boolean storeChunkSections(long chunkPos, Consumer<T> action, boolean callEvent) {
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
PersistentEntitySectionManager.ChunkLoadStatus persistententitysectionmanager_b = (PersistentEntitySectionManager.ChunkLoadStatus) this.chunkLoadStatuses.get(chunkPos);
|
|
||||||
+ org.spigotmc.AsyncCatcher.catchOp("Entity chunk save"); // Paper
|
+ org.spigotmc.AsyncCatcher.catchOp("Entity chunk save"); // Paper
|
||||||
|
PersistentEntitySectionManager.ChunkLoadStatus persistententitysectionmanager_b = (PersistentEntitySectionManager.ChunkLoadStatus) this.chunkLoadStatuses.get(chunkPos);
|
||||||
|
|
||||||
if (persistententitysectionmanager_b == PersistentEntitySectionManager.ChunkLoadStatus.PENDING) {
|
if (persistententitysectionmanager_b == PersistentEntitySectionManager.ChunkLoadStatus.PENDING) {
|
||||||
return false;
|
|
||||||
@@ -320,6 +328,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
|
@@ -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);
|
this.chunkLoadStatuses.put(chunkPos, PersistentEntitySectionManager.ChunkLoadStatus.PENDING);
|
||||||
ChunkPos chunkcoordintpair = new ChunkPos(chunkPos);
|
ChunkPos chunkcoordintpair = new ChunkPos(chunkPos);
|
||||||
CompletableFuture completablefuture = this.permanentStorage.loadEntities(chunkcoordintpair);
|
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) {
|
private boolean processChunkUnload(long chunkPos) {
|
||||||
boolean flag = this.storeChunkSections(chunkPos, (entityaccess) -> {
|
|
||||||
+ org.spigotmc.AsyncCatcher.catchOp("Entity chunk unload process"); // Paper
|
+ org.spigotmc.AsyncCatcher.catchOp("Entity chunk unload process"); // Paper
|
||||||
|
boolean flag = this.storeChunkSections(chunkPos, (entityaccess) -> {
|
||||||
entityaccess.getPassengersAndSelf().forEach(this::unloadEntity);
|
entityaccess.getPassengersAndSelf().forEach(this::unloadEntity);
|
||||||
}, true); // CraftBukkit - add boolean for event call
|
}, true); // CraftBukkit - add boolean for event call
|
||||||
|
|
||||||
@@ -357,6 +367,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
|
@@ -357,6 +367,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren