try-with-resources on populate timer (Fixes #2061)
Lets also ignore the fixup patch, that never existed, right? Right.
Dieser Commit ist enthalten in:
Ursprung
e16dd85327
Commit
6b05c3f8d6
@ -1,4 +1,4 @@
|
|||||||
From 4e211b4edbac7f732678a856dd62fb6aace2e605 Mon Sep 17 00:00:00 2001
|
From 20fc8f74ff6be390fce1225aa08b949898f635cf Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 3 Mar 2016 04:00:11 -0600
|
Date: Thu, 3 Mar 2016 04:00:11 -0600
|
||||||
Subject: [PATCH] Timings v2
|
Subject: [PATCH] Timings v2
|
||||||
@ -322,14 +322,14 @@ index afa9f0c1e..85a5776b0 100644
|
|||||||
private final float frictionFactor;
|
private final float frictionFactor;
|
||||||
protected final BlockStateList<Block, IBlockData> blockStateList;
|
protected final BlockStateList<Block, IBlockData> blockStateList;
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 937fcd7fa..b317a9800 100644
|
index 937fcd7fa..d62c84516 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -547,6 +547,7 @@ public class Chunk implements IChunkAccess {
|
@@ -547,6 +547,7 @@ public class Chunk implements IChunkAccess {
|
||||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration));
|
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration));
|
||||||
|
|
||||||
if (this.needsDecoration) {
|
if (this.needsDecoration) {
|
||||||
+ this.world.timings.syncChunkLoadPopulateTimer.startTiming(); // Paper
|
+ try (co.aikar.timings.Timing ignored = this.world.timings.syncChunkLoadPopulateTimer.startTiming()) { // Paper
|
||||||
java.util.Random random = new java.util.Random();
|
java.util.Random random = new java.util.Random();
|
||||||
random.setSeed(world.getSeed());
|
random.setSeed(world.getSeed());
|
||||||
long xRand = random.nextLong() / 2L * 2L + 1L;
|
long xRand = random.nextLong() / 2L * 2L + 1L;
|
||||||
@ -337,7 +337,7 @@ index 937fcd7fa..b317a9800 100644
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
||||||
+ this.world.timings.syncChunkLoadPopulateTimer.stopTiming(); // Paper
|
+ } // Paper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -624,7 +624,7 @@ index 1a33b7048..7c72fb918 100644
|
|||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 25972072f..581ecf71d 100644
|
index 64318e6e7..c76620f2b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1,5 +1,7 @@
|
@@ -1,5 +1,7 @@
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
From 7c17dfd40b62a1e3e8f0cc2e0d0a7f46513e109f Mon Sep 17 00:00:00 2001
|
From 37aa9a36b8ab3a0c5c5e89fa4eb776da3ba11d5c Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 21 Jul 2018 14:27:34 -0400
|
Date: Sat, 21 Jul 2018 14:27:34 -0400
|
||||||
Subject: [PATCH] Duplicate UUID Resolve Option
|
Subject: [PATCH] Duplicate UUID Resolve Option
|
||||||
@ -81,7 +81,7 @@ index ef882b897..385b3ac0c 100644
|
|||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 4d96e4fb1..26cf42a45 100644
|
index 292365607..6e435d77f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -392,6 +392,7 @@ public class Chunk implements IChunkAccess {
|
@@ -392,6 +392,7 @@ public class Chunk implements IChunkAccess {
|
||||||
@ -105,7 +105,7 @@ index d02e48a86..3b1555dd2 100644
|
|||||||
this.uniqueID = uuid;
|
this.uniqueID = uuid;
|
||||||
this.ap = this.uniqueID.toString();
|
this.ap = this.uniqueID.toString();
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index 1cf516192..292fa782d 100644
|
index 1cf516192..31fe5f5e6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
@ -155,7 +155,7 @@ index 1cf516192..292fa782d 100644
|
|||||||
+ && entity.getBukkitEntity().getLocation().distance(other.getBukkitEntity().getLocation()) < world.paperConfig.duplicateUUIDDeleteRange
|
+ && entity.getBukkitEntity().getLocation().distance(other.getBukkitEntity().getLocation()) < world.paperConfig.duplicateUUIDDeleteRange
|
||||||
+ ) {
|
+ ) {
|
||||||
+ if (World.DEBUG_ENTITIES) LOGGER.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + " because it was near the duplicate and likely an actual duplicate. See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about.");
|
+ if (World.DEBUG_ENTITIES) LOGGER.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + " because it was near the duplicate and likely an actual duplicate. See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about.");
|
||||||
+ entity.die();
|
+ entity.dead = true;
|
||||||
+ iterator.remove();
|
+ iterator.remove();
|
||||||
+ continue;
|
+ continue;
|
||||||
+ }
|
+ }
|
||||||
@ -168,7 +168,7 @@ index 1cf516192..292fa782d 100644
|
|||||||
+ }
|
+ }
|
||||||
+ case DELETE: {
|
+ case DELETE: {
|
||||||
+ if (World.DEBUG_ENTITIES) LOGGER.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about.");
|
+ if (World.DEBUG_ENTITIES) LOGGER.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about.");
|
||||||
+ entity.die();
|
+ entity.dead = true;
|
||||||
+ iterator.remove();
|
+ iterator.remove();
|
||||||
+ break;
|
+ break;
|
||||||
+ }
|
+ }
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
From cfe63d9feba2cdcc85e82090d86529f9e869db9b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Shane Freeder <theboyetronic@gmail.com>
|
|
||||||
Date: Sun, 19 May 2019 20:46:35 +0100
|
|
||||||
Subject: [PATCH] fixup! Duplicate UUID Resolve Option
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
||||||
index 292fa782d..31fe5f5e6 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
|
||||||
@@ -524,7 +524,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
||||||
&& entity.getBukkitEntity().getLocation().distance(other.getBukkitEntity().getLocation()) < world.paperConfig.duplicateUUIDDeleteRange
|
|
||||||
) {
|
|
||||||
if (World.DEBUG_ENTITIES) LOGGER.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + " because it was near the duplicate and likely an actual duplicate. See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about.");
|
|
||||||
- entity.die();
|
|
||||||
+ entity.dead = true;
|
|
||||||
iterator.remove();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
@@ -537,7 +537,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
|
||||||
}
|
|
||||||
case DELETE: {
|
|
||||||
if (World.DEBUG_ENTITIES) LOGGER.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about.");
|
|
||||||
- entity.die();
|
|
||||||
+ entity.dead = true;
|
|
||||||
iterator.remove();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
--
|
|
||||||
2.21.0
|
|
||||||
|
|
In neuem Issue referenzieren
Einen Benutzer sperren