From 3032599d3864696a4ec3dc3b045a9fb3b1d9b0b1 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 5 Dec 2019 10:23:10 +0000 Subject: [PATCH] Updated Upstream (CraftBukkit) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: 43183eab SPIGOT-5399: spawn-npcs ignored during world generation e9bb2f15 SPIGOT-5403: isSimilar returns true for different skulls 5c9e7236 SPIGOT-5409: Remove unnecessary defaulting in CraftMetaBookSigned 821238b6 SPIGOT-5412: Use SpawnReason.NATURAL for wandering traders and trader llamas --- Spigot-Server-Patches/0009-Timings-v2.patch | 68 ++++++++--------- ...sition-the-first-time-an-entity-is-s.patch | 12 +-- .../0054-Add-exception-reporting-event.patch | 30 ++++---- ...5-PlayerNaturallySpawnCreaturesEvent.patch | 8 +- ...ies-option-to-debug-dupe-uuid-issues.patch | 16 ++-- .../0383-Duplicate-UUID-Resolve-Option.patch | 33 ++++++--- ...393-Fix-World-isChunkGenerated-calls.patch | 22 +++--- ...Status-cache-when-saving-protochunks.patch | 8 +- Spigot-Server-Patches/0397-Anti-Xray.patch | 10 +-- ...09-Asynchronous-chunk-IO-and-loading.patch | 74 +++++++++---------- work/CraftBukkit | 2 +- 11 files changed, 148 insertions(+), 135 deletions(-) diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index b2e248e2c6..114dbe343d 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From 11dc8e1f66a697395be40b58e2249371b50e1e59 Mon Sep 17 00:00:00 2001 +From 4c63953c6c9a33d2b257fc8fcd781e6291181aba Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2 diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java new file mode 100644 -index 0000000000..c6818bc86a +index 000000000..c6818bc86 --- /dev/null +++ b/src/main/java/co/aikar/timings/MinecraftTimings.java @@ -0,0 +1,135 @@ @@ -147,7 +147,7 @@ index 0000000000..c6818bc86a +} diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java new file mode 100644 -index 0000000000..3a79cde595 +index 000000000..3a79cde59 --- /dev/null +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -0,0 +1,130 @@ @@ -282,7 +282,7 @@ index 0000000000..3a79cde595 + } +} diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index 5518ec1e54..0c65afccfd 100644 +index b6d470e59..f402a29b0 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit; @@ -329,7 +329,7 @@ index 5518ec1e54..0c65afccfd 100644 + } } diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java -index abba434dac..1426bd01ad 100644 +index abba434da..1426bd01a 100644 --- a/src/main/java/net/minecraft/server/Block.java +++ b/src/main/java/net/minecraft/server/Block.java @@ -31,6 +31,15 @@ public class Block implements IMaterial { @@ -349,7 +349,7 @@ index abba434dac..1426bd01ad 100644 private final float frictionFactor; protected final BlockStateList blockStateList; diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 3ed48be382..c4d989f702 100644 +index 3ed48be38..c4d989f70 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -573,6 +573,7 @@ public class Chunk implements IChunkAccess { @@ -369,7 +369,7 @@ index 3ed48be382..c4d989f702 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 3b785a3ade..15480a8dfb 100644 +index 3b785a3ad..15480a8df 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -129,11 +129,13 @@ public class ChunkProviderServer extends IChunkProvider { @@ -481,7 +481,7 @@ index 3b785a3ade..15480a8dfb 100644 @Override diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index 28bf9e14d6..03be77299b 100644 +index 28bf9e14d..03be77299 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -1,5 +1,6 @@ @@ -519,7 +519,7 @@ index 28bf9e14d6..03be77299b 100644 } diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java -index 12885cbd60..49de6e997a 100644 +index 12885cbd6..49de6e997 100644 --- a/src/main/java/net/minecraft/server/CustomFunction.java +++ b/src/main/java/net/minecraft/server/CustomFunction.java @@ -13,12 +13,22 @@ public class CustomFunction { @@ -546,7 +546,7 @@ index 12885cbd60..49de6e997a 100644 return this.b; } diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java -index 53735b52a3..721839b4c6 100644 +index 53735b52a..721839b4c 100644 --- a/src/main/java/net/minecraft/server/CustomFunctionData.java +++ b/src/main/java/net/minecraft/server/CustomFunctionData.java @@ -101,7 +101,7 @@ public class CustomFunctionData implements IResourcePackListener { @@ -559,7 +559,7 @@ index 53735b52a3..721839b4c6 100644 int j = 0; CustomFunction.c[] acustomfunction_c = customfunction.b(); diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java -index e6cf90484c..ce3ca4830e 100644 +index e6cf90484..ce3ca4830 100644 --- a/src/main/java/net/minecraft/server/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/DedicatedServer.java @@ -19,6 +19,8 @@ import java.util.Collections; @@ -647,7 +647,7 @@ index e6cf90484c..ce3ca4830e 100644 } diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index d4954801cb..fd4712c710 100644 +index d4954801c..fd4712c71 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender; @@ -686,7 +686,7 @@ index d4954801cb..fd4712c710 100644 protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) { diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 2b13f4c9f9..47379046dc 100644 +index 2b13f4c9f..47379046d 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -762,7 +762,7 @@ index 2b13f4c9f9..47379046dc 100644 } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cec3794cd4..c76f262db9 100644 +index cec3794cd..c76f262db 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -63,7 +63,7 @@ import org.bukkit.craftbukkit.CraftServer; @@ -934,7 +934,7 @@ index cec3794cd4..c76f262db9 100644 this.methodProfiler.exit(); } diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index e41d21f915..cf3d291af8 100644 +index e81de0971..049ca1b4f 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -1,7 +1,9 @@ @@ -978,7 +978,7 @@ index e41d21f915..cf3d291af8 100644 ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); Chunk chunk; -@@ -606,6 +612,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -613,6 +619,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } return chunk; @@ -986,7 +986,7 @@ index e41d21f915..cf3d291af8 100644 }); }, (runnable) -> { Mailbox mailbox = this.mailboxMain; -@@ -1042,6 +1049,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1049,6 +1056,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { PlayerChunkMap.EntityTracker playerchunkmap_entitytracker; ObjectIterator objectiterator; @@ -994,7 +994,7 @@ index e41d21f915..cf3d291af8 100644 for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) { playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next(); -@@ -1059,13 +1067,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1066,13 +1074,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { playerchunkmap_entitytracker.e = sectionposition1; } } @@ -1012,7 +1012,7 @@ index e41d21f915..cf3d291af8 100644 } diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java -index 301b1c0829..36c56773f3 100644 +index 301b1c082..36c56773f 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory; @@ -1067,7 +1067,7 @@ index 301b1c0829..36c56773f3 100644 // this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s); // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java -index a677ec74d4..e928525b8f 100644 +index a677ec74d..e928525b8 100644 --- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java +++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -1094,7 +1094,7 @@ index a677ec74d4..e928525b8f 100644 PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet); } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java -index ee22d6c81a..fb6b48e3fe 100644 +index ee22d6c81..fb6b48e3f 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -1,5 +1,6 @@ @@ -1118,7 +1118,7 @@ index ee22d6c81a..fb6b48e3fe 100644 public WhiteList getWhitelist() { diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java -index 00bbd34b6a..f533860bbe 100644 +index 00bbd34b6..f533860bb 100644 --- a/src/main/java/net/minecraft/server/TickListServer.java +++ b/src/main/java/net/minecraft/server/TickListServer.java @@ -28,13 +28,18 @@ public class TickListServer implements TickList { @@ -1168,7 +1168,7 @@ index 00bbd34b6a..f533860bbe 100644 this.g.clear(); } diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java -index 2efaf516ff..22a8ea916a 100644 +index 2efaf516f..22a8ea916 100644 --- a/src/main/java/net/minecraft/server/TileEntity.java +++ b/src/main/java/net/minecraft/server/TileEntity.java @@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer; @@ -1187,7 +1187,7 @@ index 2efaf516ff..22a8ea916a 100644 private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry(); public CraftPersistentDataContainer persistentDataContainer; diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index a71d7a80c2..67cfcdd602 100644 +index a71d7a80c..67cfcdd60 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1,5 +1,7 @@ @@ -1242,7 +1242,7 @@ index a71d7a80c2..67cfcdd602 100644 CrashReport crashreport = CrashReport.a(throwable, "Ticking entity"); CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked"); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f4cefa00fa..ef9abdc28d 100644 +index f4cefa00f..ef9abdc28 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1,5 +1,7 @@ @@ -1370,7 +1370,7 @@ index f4cefa00fa..ef9abdc28d 100644 // CraftBukkit start - moved from MinecraftServer.saveChunks diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index dce5bde54f..a59f61e73a 100644 +index dce5bde54..a59f61e73 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1932,12 +1932,31 @@ public final class CraftServer implements Server { @@ -1407,7 +1407,7 @@ index dce5bde54f..a59f61e73a 100644 org.spigotmc.RestartCommand.restart(); diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java deleted file mode 100644 -index b98a7b56a4..0000000000 +index b98a7b56a..000000000 --- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java +++ /dev/null @@ -1,164 +0,0 @@ @@ -1576,7 +1576,7 @@ index b98a7b56a4..0000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e434738cb1..9f5080b233 100644 +index e434738cb..9f5080b23 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1749,6 +1749,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1595,7 +1595,7 @@ index e434738cb1..9f5080b233 100644 public Player.Spigot spigot() diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index b90979c7ba..8823f94f7b 100644 +index b90979c7b..8823f94f7 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -1,5 +1,6 @@ @@ -1661,7 +1661,7 @@ index b90979c7ba..8823f94f7b 100644 private boolean isReady(final int currentTick) { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java -index 3f55381c15..0d9a466809 100644 +index 3f55381c1..0d9a46680 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java @@ -1,9 +1,11 @@ @@ -1746,7 +1746,7 @@ index 3f55381c15..0d9a466809 100644 - // Spigot end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java -index e52ef47b78..3d90b34268 100644 +index e52ef47b7..3d90b3426 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java @@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon; @@ -1758,7 +1758,7 @@ index e52ef47b78..3d90b34268 100644 this.value = value; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index dd602243d3..924ab7f541 100644 +index dd602243d..924ab7f54 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -288,6 +288,13 @@ public final class CraftMagicNumbers implements UnsafeValues { @@ -1776,7 +1776,7 @@ index dd602243d3..924ab7f541 100644 * This helper class represents the different NBT Tags. *

diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index ca7789b5e0..4423839697 100644 +index ca7789b5e..442383969 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -31,7 +31,7 @@ import net.minecraft.server.EntityWither; @@ -1837,5 +1837,5 @@ index ca7789b5e0..4423839697 100644 } } -- -2.22.1 +2.24.0 diff --git a/Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch b/Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch index e0c9e962f8..46335eb3ab 100644 --- a/Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch +++ b/Spigot-Server-Patches/0037-Send-absolute-position-the-first-time-an-entity-is-s.patch @@ -1,11 +1,11 @@ -From 612915a00e67427a0bc209686be7c6b15e3c43dc Mon Sep 17 00:00:00 2001 +From 2709e7544ecdfd3e3a55c130e518e64f00a1f2fe Mon Sep 17 00:00:00 2001 From: Jedediah Smith Date: Wed, 2 Mar 2016 23:13:07 -0600 Subject: [PATCH] Send absolute position the first time an entity is seen diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java -index cf0e1a6a0c..f04a9d18c4 100644 +index cf0e1a6a0..f04a9d18c 100644 --- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java +++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java @@ -2,6 +2,7 @@ package net.minecraft.server; @@ -77,10 +77,10 @@ index cf0e1a6a0c..f04a9d18c4 100644 this.c(); diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 1dec47bc18..e2ab4b1bfb 100644 +index 049ca1b4f..04a65b487 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1165,10 +1165,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1172,10 +1172,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private final Entity tracker; private final int trackingDistance; private SectionPosition e; @@ -97,7 +97,7 @@ index 1dec47bc18..e2ab4b1bfb 100644 this.tracker = entity; this.trackingDistance = i; this.e = SectionPosition.a(entity); -@@ -1250,7 +1254,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1257,7 +1261,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId())); // CraftBukkit end @@ -107,5 +107,5 @@ index 1dec47bc18..e2ab4b1bfb 100644 } } else if (this.trackedPlayers.remove(entityplayer)) { -- -2.22.0 +2.24.0 diff --git a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch index 7e420d1996..f2bdafa699 100644 --- a/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch +++ b/Spigot-Server-Patches/0054-Add-exception-reporting-event.patch @@ -1,4 +1,4 @@ -From f2305fbc79aca7ff5edca26550381010447e8b93 Mon Sep 17 00:00:00 2001 +From a7a3c92a8a4cc9c19e672c543cc83faad68ef8ba Mon Sep 17 00:00:00 2001 From: Joseph Hirschfeld Date: Thu, 3 Mar 2016 03:15:41 -0600 Subject: [PATCH] Add exception reporting event @@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java new file mode 100644 -index 0000000000..f699ce18ca +index 000000000..f699ce18c --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java @@ -0,0 +1,38 @@ @@ -49,7 +49,7 @@ index 0000000000..f699ce18ca + } +} diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 46635a5308..6c13ae3bae 100644 +index 46635a530..6c13ae3ba 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -1,5 +1,6 @@ @@ -80,7 +80,7 @@ index 46635a5308..6c13ae3bae 100644 } } diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index e51e3b74cc..0ce2d6d0fb 100644 +index 15480a8df..0e8f08569 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -15,6 +15,9 @@ import java.util.function.BooleanSupplier; @@ -94,7 +94,7 @@ index e51e3b74cc..0ce2d6d0fb 100644 public class ChunkProviderServer extends IChunkProvider { diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java -index 2cb0962ff1..21a8ed3231 100644 +index 2cb0962ff..21a8ed323 100644 --- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java +++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java @@ -1,5 +1,6 @@ @@ -121,10 +121,10 @@ index 2cb0962ff1..21a8ed3231 100644 } // CraftBukkit end diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 89694d3faf..7a681bda7c 100644 +index 04a65b487..b65f4226b 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -681,6 +681,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -688,6 +688,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { this.world.checkSession(); } catch (ExceptionWorldConflict exceptionworldconflict) { PlayerChunkMap.LOGGER.error("Couldn't save chunk; already in use by another instance of Minecraft?", exceptionworldconflict); @@ -132,7 +132,7 @@ index 89694d3faf..7a681bda7c 100644 return false; } -@@ -708,6 +709,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -715,6 +716,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return true; } catch (Exception exception) { PlayerChunkMap.LOGGER.error("Failed to save chunk {},{}", chunkcoordintpair.x, chunkcoordintpair.z, exception); @@ -141,7 +141,7 @@ index 89694d3faf..7a681bda7c 100644 } } diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index 8b17dde509..d6cecfc09b 100644 +index 8b17dde50..d6cecfc09 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -1,5 +1,6 @@ @@ -168,7 +168,7 @@ index 8b17dde509..d6cecfc09b 100644 } diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java -index fc2bb1d693..9c065c9997 100644 +index fc2bb1d69..9c065c999 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -8,6 +8,7 @@ import org.apache.logging.log4j.LogManager; @@ -196,7 +196,7 @@ index fc2bb1d693..9c065c9997 100644 } diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java -index a58d3ba4cd..6e4c5d4d8f 100644 +index a58d3ba4c..6e4c5d4d8 100644 --- a/src/main/java/net/minecraft/server/VillageSiege.java +++ b/src/main/java/net/minecraft/server/VillageSiege.java @@ -1,5 +1,7 @@ @@ -216,7 +216,7 @@ index a58d3ba4cd..6e4c5d4d8f 100644 } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index d80497e993..6e7f72a1a4 100644 +index 76704abda..ce723c62e 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -2,6 +2,9 @@ package net.minecraft.server; @@ -255,7 +255,7 @@ index d80497e993..6e7f72a1a4 100644 return; // Paper end diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java -index f5f540032f..00e9a17355 100644 +index f5f540032..00e9a1735 100644 --- a/src/main/java/net/minecraft/server/WorldPersistentData.java +++ b/src/main/java/net/minecraft/server/WorldPersistentData.java @@ -121,6 +121,7 @@ public class WorldPersistentData { @@ -267,7 +267,7 @@ index f5f540032f..00e9a17355 100644 } finally { if (pushbackinputstream != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 8823f94f7b..552daf4376 100644 +index 8823f94f7..552daf437 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -16,6 +16,9 @@ import java.util.concurrent.atomic.AtomicInteger; @@ -313,5 +313,5 @@ index 8823f94f7b..552daf4376 100644 // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) } -- -2.22.0 +2.24.0 diff --git a/Spigot-Server-Patches/0195-PlayerNaturallySpawnCreaturesEvent.patch b/Spigot-Server-Patches/0195-PlayerNaturallySpawnCreaturesEvent.patch index 3d252cb23d..ebd5d32c8c 100644 --- a/Spigot-Server-Patches/0195-PlayerNaturallySpawnCreaturesEvent.patch +++ b/Spigot-Server-Patches/0195-PlayerNaturallySpawnCreaturesEvent.patch @@ -1,4 +1,4 @@ -From 9e159fdf185d9d4add91a0b6e62f66d1c39448a5 Mon Sep 17 00:00:00 2001 +From d13d8591c15acda5b1d6521ddad05834b9fbc65b Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 14 Jan 2018 17:36:02 -0500 Subject: [PATCH] PlayerNaturallySpawnCreaturesEvent @@ -9,10 +9,10 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 63140fb642..ce13b91f66 100644 +index 6a3a66e7d..649600b3e 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -835,12 +835,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -842,12 +842,24 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { chunkRange = (chunkRange > world.spigotConfig.viewDistance) ? (byte) world.spigotConfig.viewDistance : chunkRange; chunkRange = (chunkRange > 8) ? 8 : chunkRange; @@ -40,5 +40,5 @@ index 63140fb642..ce13b91f66 100644 } -- -2.22.0 +2.24.0 diff --git a/Spigot-Server-Patches/0254-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0254-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index a3573cb89a..c84a8169d8 100644 --- a/Spigot-Server-Patches/0254-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0254-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -1,4 +1,4 @@ -From 6315f15c7212c50a763b23a1b28ac784a7987dc3 Mon Sep 17 00:00:00 2001 +From 5cb60c4b7e17203bd071de97545634cdd037c2d7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 08:25:40 -0400 Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues @@ -6,7 +6,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues Add -Ddebug.entities=true to your JVM flags to gain more information diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 6ada923797..9241874139 100644 +index 6ada92379..924187413 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -75,6 +75,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -19,10 +19,10 @@ index 6ada923797..9241874139 100644 if (bukkitEntity == null) { bukkitEntity = CraftEntity.getEntity(world.getServer(), this); diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index e6c55d87b4..6379d2d84f 100644 +index 649600b3e..db938da25 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -1014,6 +1014,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1021,6 +1021,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } else { PlayerChunkMap.EntityTracker playerchunkmap_entitytracker = new PlayerChunkMap.EntityTracker(entity, i, j, entitytypes.isDeltaTracking()); @@ -30,7 +30,7 @@ index e6c55d87b4..6379d2d84f 100644 this.trackedEntities.put(entity.getId(), playerchunkmap_entitytracker); playerchunkmap_entitytracker.track(this.world.getPlayers()); if (entity instanceof EntityPlayer) { -@@ -1056,7 +1057,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1063,7 +1064,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (playerchunkmap_entitytracker1 != null) { playerchunkmap_entitytracker1.a(); } @@ -40,7 +40,7 @@ index e6c55d87b4..6379d2d84f 100644 protected void g() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 6226a8c1a5..95c809ba95 100644 +index 6226a8c1a..95c809ba9 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -68,6 +68,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose @@ -52,7 +52,7 @@ index 6226a8c1a5..95c809ba95 100644 public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 3671b44feb..a5ba64a4c9 100644 +index 3671b44fe..a5ba64a4c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -73,6 +73,9 @@ public class WorldServer extends World { @@ -122,5 +122,5 @@ index 3671b44feb..a5ba64a4c9 100644 // CraftBukkit start - SPIGOT-5278 if (entity instanceof EntityDrowned) { -- -2.22.1 +2.24.0 diff --git a/Spigot-Server-Patches/0383-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0383-Duplicate-UUID-Resolve-Option.patch index 50d924cff8..6ee69f4524 100644 --- a/Spigot-Server-Patches/0383-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0383-Duplicate-UUID-Resolve-Option.patch @@ -1,4 +1,4 @@ -From 18d82f31c755d23c045283654eb024db32a8eeff Mon Sep 17 00:00:00 2001 +From 8b9d55b7935238a4142c03140a818bbdfc72dc5e Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 14:27:34 -0400 Subject: [PATCH] Duplicate UUID Resolve Option @@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA It is recommended you regenerate the entities, as these were legit entities, and deserve your love. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 1ad6d6483..acc84eec1 100644 +index cf9470057..2cf5ef8b7 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -449,4 +449,43 @@ public class PaperWorldConfig { @@ -105,7 +105,7 @@ index f87514a20..55c73ffca 100644 this.uniqueID = uuid; 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 -index 6379d2d84..67d011745 100644 +index db938da25..82b7d328a 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -1,6 +1,7 @@ @@ -133,20 +133,35 @@ index 6379d2d84..67d011745 100644 import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionException; import java.util.concurrent.Executor; -@@ -593,12 +597,49 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -593,19 +597,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { for (int j = 0; j < i; ++j) { List entityslice = aentityslice[j]; // Spigot - Iterator iterator = entityslice.iterator(); - +- - while (iterator.hasNext()) { - Entity entity = (Entity) iterator.next(); +- // CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities +- boolean needsRemoval = false; +- if (chunk.needsDecoration && !this.world.getServer().getServer().getSpawnNPCs() && entity instanceof NPC) { +- entity.die(); +- needsRemoval = true; +- } + +- if (!(entity instanceof EntityHuman) && (needsRemoval || !this.world.addEntityChunk(entity))) { + // Paper start + PaperWorldConfig.DuplicateUUIDMode mode = world.paperConfig.duplicateUUIDMode; + if (mode == PaperWorldConfig.DuplicateUUIDMode.WARN || mode == PaperWorldConfig.DuplicateUUIDMode.DELETE || mode == PaperWorldConfig.DuplicateUUIDMode.SAFE_REGEN) { + Map thisChunk = new HashMap<>(); + for (Iterator iterator = ((List) entityslice).iterator(); iterator.hasNext(); ) { + Entity entity = iterator.next(); ++ ++ // CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities ++ if (chunk.needsDecoration && !this.world.getServer().getServer().getSpawnNPCs() && entity instanceof NPC) { ++ entity.die(); ++ } + // CraftBukkit end ++ + if (entity.dead || entity.valid) continue; + Entity other = ((WorldServer) world).getEntity(entity.uniqueID); + if (other == null || other.dead) { @@ -180,14 +195,12 @@ index 6379d2d84..67d011745 100644 + break; + } + } -+ - -- if (!(entity instanceof EntityHuman) && !this.world.addEntityChunk(entity)) { ++ // Paper end + if (!(entity instanceof EntityHuman) && (entity.dead || !this.world.addEntityChunk(entity))) { // Paper if (list == null) { list = Lists.newArrayList(new Entity[]{entity}); } else { -@@ -606,6 +647,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -613,6 +653,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } } } @@ -244,5 +257,5 @@ index cc2c13990..29bb795f7 100644 logger.error("Overwrote an existing entity " + old + " with " + entity); if (DEBUG_ENTITIES) { -- -2.23.0 +2.24.0 diff --git a/Spigot-Server-Patches/0393-Fix-World-isChunkGenerated-calls.patch b/Spigot-Server-Patches/0393-Fix-World-isChunkGenerated-calls.patch index 1bffc40074..5877458fa3 100644 --- a/Spigot-Server-Patches/0393-Fix-World-isChunkGenerated-calls.patch +++ b/Spigot-Server-Patches/0393-Fix-World-isChunkGenerated-calls.patch @@ -1,4 +1,4 @@ -From e75dd6f49cefb63386cd758f1ac5d5b94086a093 Mon Sep 17 00:00:00 2001 +From 14f4011c2f16754e3f39826237f4822c3b6446b1 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 15 Jun 2019 08:54:33 -0700 Subject: [PATCH] Fix World#isChunkGenerated calls @@ -8,7 +8,7 @@ This patch also adds a chunk status cache on region files (note that its only purpose is to cache the status on DISK) diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 8689e0f9f0..56761afdf4 100644 +index 8689e0f9f..56761afdf 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -28,7 +28,7 @@ public class ChunkProviderServer extends IChunkProvider { @@ -43,7 +43,7 @@ index 8689e0f9f0..56761afdf4 100644 @Nullable diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index e778c2e857..73f93e4948 100644 +index e778c2e85..73f93e494 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -410,6 +410,17 @@ public class ChunkRegionLoader { @@ -65,7 +65,7 @@ index e778c2e857..73f93e4948 100644 if (nbttagcompound != null) { ChunkStatus chunkstatus = ChunkStatus.a(nbttagcompound.getCompound("Level").getString("Status")); diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java -index dd1822d6ff..e324989b46 100644 +index dd1822d6f..e324989b4 100644 --- a/src/main/java/net/minecraft/server/ChunkStatus.java +++ b/src/main/java/net/minecraft/server/ChunkStatus.java @@ -176,6 +176,7 @@ public class ChunkStatus { @@ -95,7 +95,7 @@ index dd1822d6ff..e324989b46 100644 return (ChunkStatus) IRegistry.CHUNK_STATUS.get(MinecraftKey.a(s)); } diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java -index 14a176d61d..98590e233a 100644 +index 14a176d61..98590e233 100644 --- a/src/main/java/net/minecraft/server/PlayerChunk.java +++ b/src/main/java/net/minecraft/server/PlayerChunk.java @@ -70,6 +70,19 @@ public class PlayerChunk { @@ -119,10 +119,10 @@ index 14a176d61d..98590e233a 100644 public CompletableFuture> getStatusFutureUnchecked(ChunkStatus chunkstatus) { diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index 2be6fa0f07..bdadbd436e 100644 +index 6f1e48ba4..eb49e9021 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -891,11 +891,61 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -897,11 +897,61 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @Nullable @@ -187,7 +187,7 @@ index 2be6fa0f07..bdadbd436e 100644 boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) { // Spigot start diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index ccc3d6c7ad..b487e80602 100644 +index ccc3d6c7a..b487e8060 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -31,6 +31,30 @@ public class RegionFile implements AutoCloseable { @@ -246,7 +246,7 @@ index ccc3d6c7ad..b487e80602 100644 } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index 6f34d8aea0..d2b3289450 100644 +index 6f34d8aea..d2b328945 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -47,6 +47,12 @@ public abstract class RegionFileCache implements AutoCloseable { @@ -279,7 +279,7 @@ index 6f34d8aea0..d2b3289450 100644 printOversizedLog("ChunkTooLarge even after reduction. Trying in overzealous mode.", regionfile.file, chunkX, chunkZ); // Eek, major fail. We have retry logic, so reduce threshholds and fall back diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index e42bd26380..2227de3bf1 100644 +index e42bd2638..2227de3bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -18,6 +18,7 @@ import java.util.Objects; @@ -375,5 +375,5 @@ index e42bd26380..2227de3bf1 100644 @Override -- -2.23.0 +2.24.0 diff --git a/Spigot-Server-Patches/0396-Use-ChunkStatus-cache-when-saving-protochunks.patch b/Spigot-Server-Patches/0396-Use-ChunkStatus-cache-when-saving-protochunks.patch index 9fd6b6c516..7e39539f83 100644 --- a/Spigot-Server-Patches/0396-Use-ChunkStatus-cache-when-saving-protochunks.patch +++ b/Spigot-Server-Patches/0396-Use-ChunkStatus-cache-when-saving-protochunks.patch @@ -1,4 +1,4 @@ -From 03e8755740d9f2ccd80b90149c5b8a5a47ae4967 Mon Sep 17 00:00:00 2001 +From ed1c70806a105bbdab1a54def039ed2e4f4307b4 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 22 Jun 2019 04:20:47 -0700 Subject: [PATCH] Use ChunkStatus cache when saving protochunks @@ -7,10 +7,10 @@ The cache should contain the chunk status when saving. If not it will load it. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index bdadbd436..fbbd4d5dd 100644 +index eb49e9021..b04657356 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java -@@ -768,8 +768,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -774,8 +774,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { NBTTagCompound nbttagcompound; if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) { @@ -24,5 +24,5 @@ index bdadbd436..fbbd4d5dd 100644 } -- -2.23.0 +2.24.0 diff --git a/Spigot-Server-Patches/0397-Anti-Xray.patch b/Spigot-Server-Patches/0397-Anti-Xray.patch index ef19514272..c3c19172c0 100644 --- a/Spigot-Server-Patches/0397-Anti-Xray.patch +++ b/Spigot-Server-Patches/0397-Anti-Xray.patch @@ -1,11 +1,11 @@ -From b06153f5f4cf93ac437d8bcf90ff306d2e56dbe1 Mon Sep 17 00:00:00 2001 +From a226c1b147367c8bd55c5f0e9327ac1ee156837c Mon Sep 17 00:00:00 2001 From: stonar96 Date: Mon, 20 Aug 2018 03:03:58 +0200 Subject: [PATCH] Anti-Xray diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index e98b1f243..e9d1b47ad 100644 +index 55b78f54c..cfc4156bc 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -1,7 +1,11 @@ @@ -1558,7 +1558,7 @@ index 98590e233..af934ef8b 100644 this.a(new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, chunk), false); diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index fbbd4d5dd..fd0d2b6e6 100644 +index b04657356..a5df9fee6 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -539,7 +539,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -1570,7 +1570,7 @@ index fbbd4d5dd..fd0d2b6e6 100644 }, this.executor); } -@@ -1241,7 +1241,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1247,7 +1247,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { private void a(EntityPlayer entityplayer, Packet[] apacket, Chunk chunk) { if (apacket[0] == null) { @@ -1710,5 +1710,5 @@ index 7772d5900..4570ed999 100644 return section; } -- -2.23.0 +2.24.0 diff --git a/Spigot-Server-Patches/0409-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0409-Asynchronous-chunk-IO-and-loading.patch index 5a4347fdca..82fa3e47cb 100644 --- a/Spigot-Server-Patches/0409-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0409-Asynchronous-chunk-IO-and-loading.patch @@ -1,4 +1,4 @@ -From 7245bd98a8538578656b46e9fdba082d409dc0cf Mon Sep 17 00:00:00 2001 +From f50b22a006bec81218b6cdaa1f7162cc17d9d74b Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 13 Jul 2019 09:23:10 -0700 Subject: [PATCH] Asynchronous chunk IO and loading @@ -121,7 +121,7 @@ tasks required to be executed by the chunk load task (i.e lighting and some poi tasks). diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java -index 3a79cde595..8de6c4816c 100644 +index 3a79cde59..8de6c4816 100644 --- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java +++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java @@ -63,6 +63,17 @@ public class WorldTimingsHandler { @@ -161,7 +161,7 @@ index 3a79cde595..8de6c4816c 100644 public static Timing getTickList(WorldServer worldserver, String timingsType) { diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java -index c88b5e9dd6..93c0c422da 100644 +index c88b5e9dd..93c0c422d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java @@ -1,5 +1,6 @@ @@ -237,7 +237,7 @@ index c88b5e9dd6..93c0c422da 100644 + } } diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java -index 23626bef3a..1edcecd2ee 100644 +index 23626bef3..1edcecd2e 100644 --- a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java +++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java @@ -9,6 +9,7 @@ import java.util.concurrent.Executors; @@ -318,7 +318,7 @@ index 23626bef3a..1edcecd2ee 100644 diff --git a/src/main/java/com/destroystokyo/paper/io/IOUtil.java b/src/main/java/com/destroystokyo/paper/io/IOUtil.java new file mode 100644 -index 0000000000..5af0ac3d9e +index 000000000..5af0ac3d9 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/IOUtil.java @@ -0,0 +1,62 @@ @@ -386,7 +386,7 @@ index 0000000000..5af0ac3d9e +} diff --git a/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java b/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java new file mode 100644 -index 0000000000..4f10a8311e +index 000000000..4f10a8311 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/PaperFileIOThread.java @@ -0,0 +1,661 @@ @@ -1053,7 +1053,7 @@ index 0000000000..4f10a8311e +} diff --git a/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java b/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java new file mode 100644 -index 0000000000..78bd238f4c +index 000000000..78bd238f4 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/PrioritizedTaskQueue.java @@ -0,0 +1,276 @@ @@ -1335,7 +1335,7 @@ index 0000000000..78bd238f4c +} diff --git a/src/main/java/com/destroystokyo/paper/io/QueueExecutorThread.java b/src/main/java/com/destroystokyo/paper/io/QueueExecutorThread.java new file mode 100644 -index 0000000000..ee906b594b +index 000000000..ee906b594 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/QueueExecutorThread.java @@ -0,0 +1,241 @@ @@ -1582,7 +1582,7 @@ index 0000000000..ee906b594b +} diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java new file mode 100644 -index 0000000000..305da47868 +index 000000000..305da4786 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkLoadTask.java @@ -0,0 +1,149 @@ @@ -1737,7 +1737,7 @@ index 0000000000..305da47868 +} diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkSaveTask.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkSaveTask.java new file mode 100644 -index 0000000000..60312b85f9 +index 000000000..60312b85f --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkSaveTask.java @@ -0,0 +1,112 @@ @@ -1855,7 +1855,7 @@ index 0000000000..60312b85f9 +} diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTask.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTask.java new file mode 100644 -index 0000000000..1dfa8abfd8 +index 000000000..1dfa8abfd --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTask.java @@ -0,0 +1,40 @@ @@ -1901,7 +1901,7 @@ index 0000000000..1dfa8abfd8 +} diff --git a/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java new file mode 100644 -index 0000000000..59d73bfad7 +index 000000000..59d73bfad --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/io/chunk/ChunkTaskManager.java @@ -0,0 +1,453 @@ @@ -2359,7 +2359,7 @@ index 0000000000..59d73bfad7 + +} diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java -index 56761afdf4..277c2245d7 100644 +index 56761afdf..277c2245d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -124,11 +124,137 @@ public class ChunkProviderServer extends IChunkProvider { @@ -2529,7 +2529,7 @@ index 56761afdf4..277c2245d7 100644 } finally { playerChunkMap.callbackExecutor.run(); diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java -index a028074112..98cc4efcf5 100644 +index a02807411..98cc4efcf 100644 --- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java +++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java @@ -6,6 +6,7 @@ import it.unimi.dsi.fastutil.longs.LongOpenHashSet; @@ -2798,7 +2798,7 @@ index a028074112..98cc4efcf5 100644 nbttagcompound1.set("PostProcessing", a(ichunkaccess.l())); diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java -index e324989b46..abb0d69d2f 100644 +index e324989b4..abb0d69d2 100644 --- a/src/main/java/net/minecraft/server/ChunkStatus.java +++ b/src/main/java/net/minecraft/server/ChunkStatus.java @@ -153,6 +153,7 @@ public class ChunkStatus { @@ -2810,7 +2810,7 @@ index e324989b46..abb0d69d2f 100644 return ChunkStatus.r.getInt(chunkstatus.c()); } diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java -index d521d25cf5..84024e6ba4 100644 +index d521d25cf..84024e6ba 100644 --- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java +++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java @@ -91,7 +91,7 @@ public abstract class IAsyncTaskHandler implements Mailbox> b(PlayerChunk playerchunk, ChunkStatus chunkstatus) { -@@ -746,18 +838,43 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -752,18 +844,43 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { return this.v.get(); } @@ -3294,7 +3294,7 @@ index fd0d2b6e67..31d106f951 100644 ichunkaccess.setLastSaved(this.world.getTime()); ichunkaccess.setNeedsSaving(false); -@@ -768,27 +885,33 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -774,27 +891,33 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { NBTTagCompound nbttagcompound; if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) { @@ -3331,7 +3331,7 @@ index fd0d2b6e67..31d106f951 100644 } protected void setViewDistance(int i) { -@@ -892,6 +1015,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -898,6 +1021,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } } @@ -3374,7 +3374,7 @@ index fd0d2b6e67..31d106f951 100644 @Nullable public NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { // Paper - private -> public NBTTagCompound nbttagcompound = this.read(chunkcoordintpair); -@@ -914,12 +1073,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -920,12 +1079,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { // Paper start - chunk status cache "api" public ChunkStatus getChunkStatusOnDiskIfCached(ChunkCoordIntPair chunkPos) { @@ -3417,7 +3417,7 @@ index fd0d2b6e67..31d106f951 100644 RegionFile regionFile = this.getRegionFile(chunkPos, false); if (!regionFile.chunkExists(chunkPos)) { -@@ -931,18 +1120,56 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -937,18 +1126,56 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { if (status != null) { return status; } @@ -3476,7 +3476,7 @@ index fd0d2b6e67..31d106f951 100644 public IChunkAccess getUnloadingChunk(int chunkX, int chunkZ) { PlayerChunk chunkHolder = this.pendingUnload.get(ChunkCoordIntPair.pair(chunkX, chunkZ)); return chunkHolder == null ? null : chunkHolder.getAvailableChunkNow(); -@@ -1290,6 +1517,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { +@@ -1296,6 +1523,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { } @@ -3485,7 +3485,7 @@ index fd0d2b6e67..31d106f951 100644 return this.n; } diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java -index a8c8ace46c..22144eb002 100644 +index a8c8ace46..22144eb00 100644 --- a/src/main/java/net/minecraft/server/RegionFile.java +++ b/src/main/java/net/minecraft/server/RegionFile.java @@ -343,7 +343,7 @@ public class RegionFile implements AutoCloseable { @@ -3498,7 +3498,7 @@ index a8c8ace46c..22144eb002 100644 this.b.close(); } diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java -index d2b3289450..d3d6107422 100644 +index d2b328945..d3d610742 100644 --- a/src/main/java/net/minecraft/server/RegionFileCache.java +++ b/src/main/java/net/minecraft/server/RegionFileCache.java @@ -48,13 +48,13 @@ public abstract class RegionFileCache implements AutoCloseable { @@ -3527,7 +3527,7 @@ index d2b3289450..d3d6107422 100644 RegionFile regionfile = a(pos, true); diff --git a/src/main/java/net/minecraft/server/RegionFileSection.java b/src/main/java/net/minecraft/server/RegionFileSection.java -index 4b3e0c0f01..04b7dab646 100644 +index 4b3e0c0f0..04b7dab64 100644 --- a/src/main/java/net/minecraft/server/RegionFileSection.java +++ b/src/main/java/net/minecraft/server/RegionFileSection.java @@ -24,7 +24,7 @@ public class RegionFileSection extends RegionFi @@ -3629,7 +3629,7 @@ index 4b3e0c0f01..04b7dab646 100644 + // Paper end } diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java -index 9c114d2d37..e3150f85a5 100644 +index 9c114d2d3..e3150f85a 100644 --- a/src/main/java/net/minecraft/server/TicketType.java +++ b/src/main/java/net/minecraft/server/TicketType.java @@ -22,6 +22,7 @@ public class TicketType { @@ -3641,7 +3641,7 @@ index 9c114d2d37..e3150f85a5 100644 public static TicketType a(String s, Comparator comparator) { return new TicketType<>(s, comparator, 0L); diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java -index 3169590641..0e98b7803b 100644 +index 316959064..0e98b7803 100644 --- a/src/main/java/net/minecraft/server/VillagePlace.java +++ b/src/main/java/net/minecraft/server/VillagePlace.java @@ -20,8 +20,16 @@ public class VillagePlace extends RegionFileSection { @@ -3730,7 +3730,7 @@ index 3169590641..0e98b7803b 100644 HAS_SPACE(VillagePlaceRecord::d), IS_OCCUPIED(VillagePlaceRecord::e), ANY((villageplacerecord) -> { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1330956655..5e0f6a105d 100644 +index 133095665..5e0f6a105 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -79,6 +79,79 @@ public class WorldServer extends World { @@ -3823,7 +3823,7 @@ index 1330956655..5e0f6a105d 100644 // CraftBukkit start diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 2227de3bf1..243722b672 100644 +index 2227de3bf..243722b67 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -554,22 +554,23 @@ public class CraftWorld implements World { @@ -3885,7 +3885,7 @@ index 2227de3bf1..243722b672 100644 @Override public int getViewDistance() { diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java -index a1d93200e6..6ca0ebfdee 100644 +index a1d93200e..6ca0ebfde 100644 --- a/src/main/java/org/spigotmc/WatchdogThread.java +++ b/src/main/java/org/spigotmc/WatchdogThread.java @@ -6,6 +6,7 @@ import java.lang.management.ThreadInfo; diff --git a/work/CraftBukkit b/work/CraftBukkit index eafd74240d..43183eabc2 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit eafd74240dd38ad733832d8ff6b93938fc34ec55 +Subproject commit 43183eabc2d3f438cc9053a0cbb87c2c683b6f70