geforkt von Mirrors/Paper
Make timings more tolerant of corrupt chunks
Fixes GH-744
Dieser Commit ist enthalten in:
Ursprung
61bbe8c3b3
Commit
f63f531f42
@ -671,7 +671,7 @@ index 00000000..916b6f9d
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
new file mode 100644
|
||||
index 00000000..389875b3
|
||||
index 00000000..c2c2fb83
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@ -787,10 +787,20 @@ index 00000000..389875b3
|
||||
+ RegionData data = regions.get(new RegionId(chunk.getX(), chunk.getZ()));
|
||||
+
|
||||
+ for (Entity entity : chunk.getEntities()) {
|
||||
+ if (entity == null) {
|
||||
+ Bukkit.getLogger().warning("Null entity detected in chunk at position x: " + chunk.getX() + ", z: " + chunk.getZ());
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ data.entityCounts.get(entity.getType()).increment();
|
||||
+ }
|
||||
+
|
||||
+ for (BlockState tileEntity : chunk.getTileEntities()) {
|
||||
+ if (tileEntity == null) {
|
||||
+ Bukkit.getLogger().warning("Null tileentity detected in chunk at position x: " + chunk.getX() + ", z: " + chunk.getZ());
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ data.tileEntityCounts.get(tileEntity.getBlock().getType()).increment();
|
||||
+ }
|
||||
+ }
|
||||
@ -3185,7 +3195,7 @@ index 00000000..5527e7c8
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index cdf838eb..39b275cb 100644
|
||||
index 71709126..b886cd82 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -0,0 +0,0 @@ public class SimpleCommandMap implements CommandMap {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren