diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 27c0b8507b..f7085c3cf3 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1581,7 +1581,7 @@ index f8d859cda8186d706304b4e182bca34573f09433..057d703fe73de9bb9ca6f0e263463d32 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 bd5a2eee9cb435a5ee75a39cea231151fba00387..a559f423b19a1e6f8efb6327270250844e8c6fb6 100644 +index fc7e29abc5a2e4fdf03f61e54c2ab716273df813..35920c82ef9b79a6d8f806b90f2f8dbd0de061c2 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -18,7 +18,6 @@ import org.apache.logging.log4j.Logger; @@ -1628,7 +1628,7 @@ index bd5a2eee9cb435a5ee75a39cea231151fba00387..a559f423b19a1e6f8efb632727025084 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 d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea14a6d33d 100644 +index d643ff0a0ae9d45711c9a40fc12af68157604a33..4b2d67b8f147015c3ecdd19f79b2719ff079c26a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -3,6 +3,8 @@ package net.minecraft.server; @@ -1685,15 +1685,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea gameprofilerfiller.exitEnter("blockEvents"); timings.doSounds.startTiming(); // Spigot this.ah(); -@@ -360,6 +365,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { - - org.spigotmc.ActivationRange.activateEntities(this); // Spigot - timings.entityTick.startTiming(); // Spigot -+ TimingHistory.entityTicks += this.entitiesById.size(); // Paper - while (objectiterator.hasNext()) { - Entry entry = (Entry) objectiterator.next(); - Entity entity = (Entity) entry.getValue(); -@@ -508,6 +514,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -508,6 +513,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } gameprofilerfiller.exitEnter("tickBlocks"); @@ -1701,7 +1693,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea if (i > 0) { ChunkSection[] achunksection = chunk.getSections(); int l = achunksection.length; -@@ -539,7 +546,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -539,7 +545,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } } @@ -1710,7 +1702,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea gameprofilerfiller.exit(); } -@@ -637,6 +644,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -637,6 +643,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (!(entity instanceof EntityHuman) && !this.getChunkProvider().a(entity)) { this.chunkCheck(entity); } else { @@ -1718,7 +1710,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea // Spigot start if (!org.spigotmc.ActivationRange.checkIfActive(entity)) { entity.ticksLived++; -@@ -644,7 +652,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -644,7 +651,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { return; } // Spigot end @@ -1728,7 +1720,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea entity.f(entity.locX(), entity.locY(), entity.locZ()); entity.lastYaw = entity.yaw; entity.lastPitch = entity.pitch; -@@ -671,7 +681,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -671,7 +680,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.a(entity, entity1); } } @@ -1738,7 +1730,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea } } -@@ -748,6 +760,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -748,6 +759,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (!flag1) { org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit @@ -1746,7 +1738,7 @@ index d643ff0a0ae9d45711c9a40fc12af68157604a33..9df9ce88e23b31f0303a3c84136a10ea if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel")); } -@@ -757,7 +770,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -757,7 +769,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { iprogressupdate.c(new ChatMessage("menu.savingChunks")); } diff --git a/Spigot-Server-Patches/0025-Entity-Origin-API.patch b/Spigot-Server-Patches/0025-Entity-Origin-API.patch index 21a93e22ef..6b98a8f693 100644 --- a/Spigot-Server-Patches/0025-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0025-Entity-Origin-API.patch @@ -101,10 +101,10 @@ index ad8a506bb430b26fe147a657a2f826daf9bf4d45..ad4807e0bdd6409bd798f995da8f43ce if (i >= 0 && i < this.list.size()) { NBTBase nbtbase = (NBTBase) this.list.get(i); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 9df9ce88e23b31f0303a3c84136a10ea14a6d33d..f764eaf58d225d3c875dda66c1a2ac43ef3c1eae 100644 +index 4b2d67b8f147015c3ecdd19f79b2719ff079c26a..11bf3797bde480107e60fbfa32db61003c513201 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1088,6 +1088,11 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1087,6 +1087,11 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.navigators.add(((EntityInsentient) entity).getNavigation()); } entity.valid = true; // CraftBukkit diff --git a/Spigot-Server-Patches/0034-Disable-thunder.patch b/Spigot-Server-Patches/0034-Disable-thunder.patch index f2645e0bfd..6abc50d09a 100644 --- a/Spigot-Server-Patches/0034-Disable-thunder.patch +++ b/Spigot-Server-Patches/0034-Disable-thunder.patch @@ -19,10 +19,10 @@ index 25e0717186366af580e512eedfd403b8efc64a75..41436a4ead736dc925ca77d4cabf925f + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f764eaf58d225d3c875dda66c1a2ac43ef3c1eae..cca6879e8304a5f345ecc2603a189d898db283a5 100644 +index 11bf3797bde480107e60fbfa32db61003c513201..3033745e25fb7f905506a18ac06bdf55a9f863df 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -471,7 +471,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -470,7 +470,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { gameprofilerfiller.enter("thunder"); BlockPosition blockposition; diff --git a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch b/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch index 1527552b1b..467fd2715b 100644 --- a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch @@ -19,10 +19,10 @@ index 41436a4ead736dc925ca77d4cabf925f4e492d68..f53d8b96757cbedc5fbb16195952a7da + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index cca6879e8304a5f345ecc2603a189d898db283a5..223482e468862407d53299219e2f4debecd0cd87 100644 +index 3033745e25fb7f905506a18ac06bdf55a9f863df..5330a1f3ea1dd8ba7471b10610f958fa912a7f69 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -495,7 +495,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -494,7 +494,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } gameprofilerfiller.exitEnter("iceandsnow"); diff --git a/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch index 8e413d7e4a..3b0d94a158 100644 --- a/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0070-Configurable-spawn-chances-for-skeleton-horses.patch @@ -22,10 +22,10 @@ index d8b9d87bca6eb95c2cea91e4d8466b9792582d52..92d1dffbf436a21943b4a6aa0fabf54f + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f38c88df648aa715aefb18018779efd8075d781e..5e64aca8c318f2fd909cd0e934867e890a152373 100644 +index 0572f150fc6f83eaa8a4fb708f1eab5df7357735..18b14851ab2c1cbe838d581b560c1f16726a3a61 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -475,7 +475,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -474,7 +474,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { blockposition = this.a(this.a(j, 0, k, 15)); if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); diff --git a/Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch index d2f5db120b..48c3eff578 100644 --- a/Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0073-Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index b800844c9a2ae76019213ccb64655eeea2885a67..85e6b6fbf99b177a15a04b91fce36a5dcbe0cc7b 100644 +index 63f9fbc68c9824832db8c99bbd5ebfe347977242..5bfd8ae57e8808a7f282071b7d46f64acde6dd49 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1056,7 +1056,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1055,7 +1055,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity instanceof EntityInsentient) { this.navigators.remove(((EntityInsentient) entity).getNavigation()); } @@ -17,7 +17,7 @@ index b800844c9a2ae76019213ccb64655eeea2885a67..85e6b6fbf99b177a15a04b91fce36a5d entity.valid = false; // CraftBukkit } -@@ -1094,6 +1094,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1093,6 +1093,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end diff --git a/Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch b/Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch index 5ef8c2944f..1ddcfee5a9 100644 --- a/Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch +++ b/Spigot-Server-Patches/0085-Remove-unused-World-Tile-Entity-List.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remove unused World Tile Entity List Massive hit to performance and it is completely unnecessary. diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 58277457ef879c48f3678efeb2a646e116320754..bd7214e4679044461f141f3000f1dab648a24051 100644 +index 3fc0fcc9e6598ec77fd562c0887335fe018b4051..e2167413702f8a7369e4719fd6bb28e2e4fc86ef 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -39,7 +39,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -67,10 +67,10 @@ index 58277457ef879c48f3678efeb2a646e116320754..bd7214e4679044461f141f3000f1dab6 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 85e6b6fbf99b177a15a04b91fce36a5dcbe0cc7b..6bcead2505365ed2631cd991ac2dae99fff14f78 100644 +index 5bfd8ae57e8808a7f282071b7d46f64acde6dd49..ea3a39a45bbc828728de27174c139432a175f653 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1542,7 +1542,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1541,7 +1541,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } bufferedwriter.write(String.format("entities: %d\n", this.entitiesById.size())); @@ -79,7 +79,7 @@ index 85e6b6fbf99b177a15a04b91fce36a5dcbe0cc7b..6bcead2505365ed2631cd991ac2dae99 bufferedwriter.write(String.format("block_ticks: %d\n", this.getBlockTickList().a())); bufferedwriter.write(String.format("fluid_ticks: %d\n", this.getFluidTickList().a())); bufferedwriter.write("distance_manager: " + playerchunkmap.e().c() + "\n"); -@@ -1681,7 +1681,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1680,7 +1680,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { private void a(Writer writer) throws IOException { CSVWriter csvwriter = CSVWriter.a().a("x").a("y").a("z").a("type").a(writer); diff --git a/Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 18b9d5cc34..395f510e72 100644 --- a/Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/0095-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -102,10 +102,10 @@ index e6d97e7ffae3eadac586bad078123cd4aaa69916..225353e072033d1e5aaf5604b8db255d for ( org.bukkit.map.MapCursor cursor : render.cursors) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 6bcead2505365ed2631cd991ac2dae99fff14f78..f99bb7f52254d7f052ecfce2b94da329a9d05eea 100644 +index ea3a39a45bbc828728de27174c139432a175f653..4667155b33325a6dccf3fd5c5ce42293731282de 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1012,6 +1012,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1011,6 +1011,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { { if ( iter.next().trackee == entity ) { diff --git a/Spigot-Server-Patches/0105-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0105-Fix-Double-World-Add-issues.patch index 40be580819..bb88411b66 100644 --- a/Spigot-Server-Patches/0105-Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/0105-Fix-Double-World-Add-issues.patch @@ -8,10 +8,10 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added. Also add debug if something else tries to, and abort before world gets bad state diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f99bb7f52254d7f052ecfce2b94da329a9d05eea..b68338310106858195099bb45b8bf4da723b8439 100644 +index 4667155b33325a6dccf3fd5c5ce42293731282de..d9250c630a8146ed3c906607b2165594a6000d2d 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -919,6 +919,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -918,6 +918,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot diff --git a/Spigot-Server-Patches/0112-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0112-Chunk-registration-fixes.patch index a302a9c0a0..bee8cc1b97 100644 --- a/Spigot-Server-Patches/0112-Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/0112-Chunk-registration-fixes.patch @@ -8,10 +8,10 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr Keep them consistent diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index b68338310106858195099bb45b8bf4da723b8439..809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6 100644 +index d9250c630a8146ed3c906607b2165594a6000d2d..318345cddb3ecc102d88a6879815af55d05814ee 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -728,7 +728,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -727,7 +727,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity.ck()) { this.getMethodProfiler().enter("chunkCheck"); int i = MathHelper.floor(entity.locX() / 16.0D); diff --git a/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch index 021a009a9a..e21bb4dd54 100644 --- a/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0215-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,7 +10,7 @@ Adds an option to control the force mode of the particle. This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6..10eb83bec33050ec1054de493960c87f67d4ec66 100644 +index 318345cddb3ecc102d88a6879815af55d05814ee..089e7c301d48a2d4302ca3d6bb1235e6207363b7 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -56,7 +56,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -22,7 +22,7 @@ index 809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6..10eb83bec33050ec1054de493960c87f public final ChunkProviderServer chunkProvider; // Paper - public boolean tickingEntities; private final MinecraftServer server; -@@ -1310,12 +1310,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1309,12 +1309,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { } public int sendParticles(EntityPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { @@ -43,7 +43,7 @@ index 809ae79c0febf8a6de8bf0ca4d996b68bff8a2b6..10eb83bec33050ec1054de493960c87f if (this.a(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 81f014977b95056020e9695dd49cbbf45d61b8ea..0a280692e6dc6b0a9e47bfd12f70774d49628398 100644 +index 214e3d1a626a3a3ff523904d15aec1e351b9957b..14e495f4889383c789acb880cca726c81c366d26 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -2329,11 +2329,17 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch index 40722aa0a7..4be1334c3f 100644 --- a/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0237-InventoryCloseEvent-Reason-API.patch @@ -34,7 +34,7 @@ index 08141147f9795546e9397abed95834ed5e69a126..d9e5d71a87140c90b79902887bd2f481 this.activeContainer = this.defaultContainer; } diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java -index d2c61467b8373444609a6aad9688c5b747547d9c..dc8f88d102c06d8fb28ffd66de36f32efec54ff2 100644 +index 49c455ae3ee793523133f0dde8dc6037ca899691..79ae3e47bff8a4e910f4dacda8930619d015c5dc 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -408,7 +408,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -114,10 +114,10 @@ index 9d05320b132679ccd511422c2c187b0d5fa89c2c..4c11aa13b725b2bb502701f2d5fb3878 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(cserver.getPlayer(entityplayer), "\u00A7e" + entityplayer.getName() + " left the game"); cserver.getPluginManager().callEvent(playerQuitEvent); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 10eb83bec33050ec1054de493960c87f67d4ec66..4675ddb1f7c989521dfc9fbd0367e6fbbaa7abda 100644 +index 089e7c301d48a2d4302ca3d6bb1235e6207363b7..b7253c4201d601d1e2e354af5d2b17421629d48e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -967,7 +967,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -966,7 +966,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { for (TileEntity tileentity : chunk.getTileEntities().values()) { if (tileentity instanceof IInventory) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((IInventory) tileentity).getViewers())) { @@ -126,7 +126,7 @@ index 10eb83bec33050ec1054de493960c87f67d4ec66..4675ddb1f7c989521dfc9fbd0367e6fb } } } -@@ -1025,7 +1025,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1024,7 +1024,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) { diff --git a/Spigot-Server-Patches/0242-Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/0242-Re-add-vanilla-entity-warnings-for-duplicates.patch index 04fb42eb8f..9f56e0a634 100644 --- a/Spigot-Server-Patches/0242-Re-add-vanilla-entity-warnings-for-duplicates.patch +++ b/Spigot-Server-Patches/0242-Re-add-vanilla-entity-warnings-for-duplicates.patch @@ -8,10 +8,10 @@ These are a critical sign that somethin went wrong, and you've lost some data... We should kind of know about these things you know. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 4675ddb1f7c989521dfc9fbd0367e6fbbaa7abda..57be6e9c0062cfe94ad551abd7e8bea1213a10b6 100644 +index b7253c4201d601d1e2e354af5d2b17421629d48e..4747c35aee5e3c4cc8b1bcfd63f9d9c43cbef8fc 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -957,7 +957,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -956,7 +956,8 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity1 == null) { return false; } else { diff --git a/Spigot-Server-Patches/0246-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0246-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 931987389c..39a74907ec 100644 --- a/Spigot-Server-Patches/0246-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0246-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -40,7 +40,7 @@ index 4ae3e91677ecf9c2104a229b4e8b229d18b87aa4..458802dc4b1f923b159168efff0546bb protected void g() { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 324967c892ff8878326af4229668fcbde37ef202..5540fc6eee8115400774b7a792b9d3b45eb01e34 100644 +index 9c3c0a6ff57a8d1788cf6d7cd91571f4212eb701..530f204b9bcacdac127a44554e06aabac3897766 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 GeneratorAccess, AutoCloseable { @@ -52,7 +52,7 @@ index 324967c892ff8878326af4229668fcbde37ef202..5540fc6eee8115400774b7a792b9d3b4 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 57be6e9c0062cfe94ad551abd7e8bea1213a10b6..fc6639d9729b2714389f191de7a21cb1aa853c75 100644 +index 4747c35aee5e3c4cc8b1bcfd63f9d9c43cbef8fc..cd6fa624205ab18f9c5a8fd700de3eccb7ef471e 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -83,6 +83,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -65,7 +65,7 @@ index 57be6e9c0062cfe94ad551abd7e8bea1213a10b6..fc6639d9729b2714389f191de7a21cb1 @Override public Chunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkProvider.getChunkAt(x, z, false); -@@ -919,8 +922,28 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -918,8 +921,28 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot @@ -95,7 +95,7 @@ index 57be6e9c0062cfe94ad551abd7e8bea1213a10b6..fc6639d9729b2714389f191de7a21cb1 // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit return false; } else if (this.isUUIDTaken(entity)) { -@@ -1080,7 +1103,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1079,7 +1102,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0257-Prevent-Saving-Bad-entities-to-chunks.patch b/Spigot-Server-Patches/0257-Prevent-Saving-Bad-entities-to-chunks.patch index 32c50a9dc3..f1025edb6d 100644 --- a/Spigot-Server-Patches/0257-Prevent-Saving-Bad-entities-to-chunks.patch +++ b/Spigot-Server-Patches/0257-Prevent-Saving-Bad-entities-to-chunks.patch @@ -80,10 +80,10 @@ index 28039aa8421207ce04840cc90e03d21bc8b7269f..17b8c4445af2bd2ed907d05ed3c396d4 public static ChunkStatus.Type a(@Nullable NBTTagCompound nbttagcompound) { if (nbttagcompound != null) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index fc6639d9729b2714389f191de7a21cb1aa853c75..e5fff59efc2d2794024eae93854a296d2b82cf3e 100644 +index cd6fa624205ab18f9c5a8fd700de3eccb7ef471e..bbc0f1b7b363f21e861be5b187d01aed9a89597c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1000,6 +1000,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -999,6 +999,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { List[] aentityslice = chunk.getEntitySlices(); // Spigot int i = aentityslice.length; @@ -91,7 +91,7 @@ index fc6639d9729b2714389f191de7a21cb1aa853c75..e5fff59efc2d2794024eae93854a296d for (int j = 0; j < i; ++j) { List entityslice = aentityslice[j]; // Spigot Iterator iterator = entityslice.iterator(); -@@ -1012,11 +1013,25 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1011,11 +1012,25 @@ public class WorldServer extends World implements GeneratorAccessSeed { throw (IllegalStateException) SystemUtils.c(new IllegalStateException("Removing entity while ticking!")); } diff --git a/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch index 2a7aba294b..0b524598cf 100644 --- a/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0259-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -63,10 +63,10 @@ index b0338278f3cfecdb30e1d2febf1ff2a04d0cc66d..55f8863f823836065f4de8240bfeb490 public float getBukkitYaw() { return this.yaw; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e5fff59efc2d2794024eae93854a296d2b82cf3e..1a103dd830109e119acc1a371b37386e228586b5 100644 +index bbc0f1b7b363f21e861be5b187d01aed9a89597c..a05e117e76350da7663612f303444bb16b85ba21 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1152,6 +1152,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1151,6 +1151,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end @@ -74,7 +74,7 @@ index e5fff59efc2d2794024eae93854a296d2b82cf3e..1a103dd830109e119acc1a371b37386e new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid } -@@ -1164,6 +1165,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1163,6 +1164,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.removeEntityFromChunk(entity); this.entitiesById.remove(entity.getId()); this.unregisterEntity(entity); @@ -83,7 +83,7 @@ index e5fff59efc2d2794024eae93854a296d2b82cf3e..1a103dd830109e119acc1a371b37386e } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0bfe87fe4ff0fbb94a3339ab8f8d62ca32d659a0..265822138eee71daa1d6858adc17985d941d9d4c 100644 +index b1e51fa8593cd9459058a557f1b506817879bdd4..898b97b52dd1bf8c5aa0b436b01ed0d83681810e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1041,6 +1041,7 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch b/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch index 5db5c21d1f..3c2b6f9771 100644 --- a/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch +++ b/Spigot-Server-Patches/0264-Add-hand-to-bucket-events.patch @@ -73,7 +73,7 @@ index 48958308a89cbe39e1b4dddcdd8d1d0b5ece6339..120bf8436fd82294c339add2e7bff1cd int i = blockposition.getX(); int j = blockposition.getY(); diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index ca3e831e3191dd8ffe7f2b6ab9ecc05acfe1b0af..cc4421aa61d7d87c164c1f88ad8b5fa0df7176f1 100644 +index 9b6912f6e7b3c289948325a6985d9c961a8a8e30..a0f93486b21e3bdbcf3b705c005c2e13f75589ed 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -212,6 +212,17 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -95,10 +95,10 @@ index ca3e831e3191dd8ffe7f2b6ab9ecc05acfe1b0af..cc4421aa61d7d87c164c1f88ad8b5fa0 public boolean s_() { return this.isClientSide; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 1a103dd830109e119acc1a371b37386e228586b5..a343cba51850bb7214c241a92db0694d3c1aaf60 100644 +index a05e117e76350da7663612f303444bb16b85ba21..dff170fb64ffd26cc7c5ab4b3863e48989c79ad4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1483,15 +1483,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1482,15 +1482,17 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.getMinecraftServer().getPlayerList().sendAll(new PacketPlayOutSpawnPosition(blockposition)); } diff --git a/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch index 2b92c0fd1e..8fff15c330 100644 --- a/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0344-Entity-getEntitySpawnReason.patch @@ -84,10 +84,10 @@ index 61d29dabf6ae8be8f8b5b6da9b801e84adda7dfb..6a00d1dcd62034c595723547afb4637e }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a343cba51850bb7214c241a92db0694d3c1aaf60..a76178da7c923b2dc47bf97f848f7455fe275891 100644 +index dff170fb64ffd26cc7c5ab4b3863e48989c79ad4..22d39f465aa366459c1a62422945f5fb6c19e492 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -922,6 +922,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -921,6 +921,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot diff --git a/Spigot-Server-Patches/0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch b/Spigot-Server-Patches/0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch index 460bbd8552..2d7e887180 100644 --- a/Spigot-Server-Patches/0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch +++ b/Spigot-Server-Patches/0358-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch @@ -19,10 +19,10 @@ This change ensures the chunks are always loaded when entities are added to the world, or a valid entity moves between chunks. diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a76178da7c923b2dc47bf97f848f7455fe275891..576f5c8c4d702dae7f2db9fb221365394542fcfb 100644 +index 22d39f465aa366459c1a62422945f5fb6c19e492..9d768cecf31b45710cfcad0d0ac0b302218d67d4 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -735,11 +735,18 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -734,11 +734,18 @@ public class WorldServer extends World implements GeneratorAccessSeed { int k = MathHelper.floor(entity.locZ() / 16.0D); if (!entity.inChunk || entity.chunkX != i || entity.chunkY != j || entity.chunkZ != k) { @@ -42,7 +42,7 @@ index a76178da7c923b2dc47bf97f848f7455fe275891..576f5c8c4d702dae7f2db9fb22136539 if (entity.inChunk) { WorldServer.LOGGER.warn("Entity {} left loaded chunk area", entity); } -@@ -954,7 +961,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -953,7 +960,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { return false; } // CraftBukkit end diff --git a/Spigot-Server-Patches/0359-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0359-Duplicate-UUID-Resolve-Option.patch index 6cbf2074f6..2dcd8a06dc 100644 --- a/Spigot-Server-Patches/0359-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0359-Duplicate-UUID-Resolve-Option.patch @@ -197,7 +197,7 @@ index 458802dc4b1f923b159168efff0546bb731da07b..936be3fd8954933ac218f62a172df687 ChunkCoordIntPair chunkcoordintpair = playerchunk.i(); CompletableFuture, PlayerChunk.Failure>> completablefuture = this.a(chunkcoordintpair, 1, (i) -> { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 576f5c8c4d702dae7f2db9fb221365394542fcfb..a243dc63eb4c811065c742e61b334864ad582fbe 100644 +index 9d768cecf31b45710cfcad0d0ac0b302218d67d4..d1580a77383a4ad5a45aca57f29258869b52b86c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -5,6 +5,8 @@ import com.google.common.collect.ImmutableList; @@ -209,7 +209,7 @@ index 576f5c8c4d702dae7f2db9fb221365394542fcfb..a243dc63eb4c811065c742e61b334864 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Queues; -@@ -988,8 +990,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -987,8 +989,24 @@ public class WorldServer extends World implements GeneratorAccessSeed { if (entity1 == null) { return false; } else { diff --git a/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch index 862cfa085b..56f240dc44 100644 --- a/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0361-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -102,10 +102,10 @@ index 3868572aed50c8bffd93727a139a3fbb8dc19688..ae77805f71c6c574d92f39c51b1e48f2 @Override public void a(ChunkCoordIntPair chunkcoordintpair) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index a243dc63eb4c811065c742e61b334864ad582fbe..e8382aabb36f58c55ba47e6495d47af588b30d03 100644 +index d1580a77383a4ad5a45aca57f29258869b52b86c..45959064c310997d26c5637a0e5cb61775c406c9 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1500,12 +1500,88 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1499,12 +1499,88 @@ public class WorldServer extends World implements GeneratorAccessSeed { return ((PersistentIdCounts) this.getMinecraftServer().D().getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a(); } @@ -198,7 +198,7 @@ index a243dc63eb4c811065c742e61b334864ad582fbe..e8382aabb36f58c55ba47e6495d47af5 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3549404ec211e88f6d91bdcf07c661e2d2ac4875..29d88bf1a8c5272822dd26e5e93d102748d9abf2 100644 +index 48805c32aabe453e0a860168b79ea9026fa848b1..b5621b8456fbd3c5e94a9b9ec9b4be0068962674 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1949,15 +1949,21 @@ public class CraftWorld implements World { diff --git a/Spigot-Server-Patches/0370-incremental-chunk-saving.patch b/Spigot-Server-Patches/0370-incremental-chunk-saving.patch index 073ecf7238..fc879115dd 100644 --- a/Spigot-Server-Patches/0370-incremental-chunk-saving.patch +++ b/Spigot-Server-Patches/0370-incremental-chunk-saving.patch @@ -257,10 +257,10 @@ index 6dda11ffc022aa9bc7481506811a710a184f5e78..39d89d6209123ae2146ae292009cad44 return PlayerChunk.getChunkState(playerchunk.getTicketLevel()); }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e8382aabb36f58c55ba47e6495d47af588b30d03..479271a51ba7e9c433f030918bc926ccd93dc938 100644 +index 45959064c310997d26c5637a0e5cb61775c406c9..e0023c77736bd67bde63e6ebd1822cd0a7918508 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -768,11 +768,43 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -767,11 +767,43 @@ public class WorldServer extends World implements GeneratorAccessSeed { return !this.server.a(this, blockposition, entityhuman) && this.getWorldBorder().a(blockposition); } @@ -305,7 +305,7 @@ index e8382aabb36f58c55ba47e6495d47af588b30d03..479271a51ba7e9c433f030918bc926cc try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel")); -@@ -798,6 +830,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -797,6 +829,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { // CraftBukkit end } diff --git a/Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch b/Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch index 1777b58fae..fed94d8177 100644 --- a/Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch +++ b/Spigot-Server-Patches/0374-Mark-entities-as-being-ticked-when-notifying-navigat.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Mark entities as being ticked when notifying navigation diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7e862f44ad8b8b878a8a86a4d1b48de4b4506c66..4529ccc02f53fadc6ac2df97682b21913487bc22 100644 +index 00446fabbeac8105678cecb9f7f9f3dac4a43d74..b1ac1387e7c9e67120f0155957a4e66cc92a6d0d 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1319,6 +1319,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1318,6 +1318,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition); if (VoxelShapes.c(voxelshape, voxelshape1, OperatorBoolean.NOT_SAME)) { @@ -16,7 +16,7 @@ index 7e862f44ad8b8b878a8a86a4d1b48de4b4506c66..4529ccc02f53fadc6ac2df97682b2191 Iterator iterator = this.navigators.iterator(); while (iterator.hasNext()) { -@@ -1329,6 +1330,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1328,6 +1329,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } diff --git a/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch b/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch index 16b5ce4f38..4275327e95 100644 --- a/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch +++ b/Spigot-Server-Patches/0377-Asynchronous-chunk-IO-and-loading.patch @@ -3899,7 +3899,7 @@ index b8c15047771bd4527b86e514a3b950b2ffc6eef0..303f6b0953ff3c29bd31ec5e02386a92 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 4529ccc02f53fadc6ac2df97682b21913487bc22..85b73e65a4c1af052e75473bc239d91d5d1fd108 100644 +index b1ac1387e7c9e67120f0155957a4e66cc92a6d0d..546a7eaa6cf06a37193104509d78fce7d344b224 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -93,6 +93,79 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -3991,7 +3991,7 @@ index 4529ccc02f53fadc6ac2df97682b21913487bc22..85b73e65a4c1af052e75473bc239d91d } // CraftBukkit start -@@ -1569,7 +1644,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1568,7 +1643,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { } MCUtil.getSpiralOutChunks(spawn, radiusInBlocks >> 4).forEach(pair -> { diff --git a/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch b/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch index 2bd78d134d..ca86c77eb0 100644 --- a/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch +++ b/Spigot-Server-Patches/0417-Optimise-random-block-ticking.patch @@ -243,7 +243,7 @@ index 00827c335e9413e986d7f07d0adbcef0d106a553..c66a8011dde4932e03ea91194ea92a72 // TODO Paper: Obf helpers here can prolly be removed? check that no newer patches use them public final BlockPosition getHome() { return this.getHomePos(); } // Paper - OBFHELPER diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java -index 73e0bf2d0851d2e10cd5b45a4bb90eba104bdc3d..93df6a29035bb3cc96409b145a2e1433d38bbe99 100644 +index 7c6b7955c454c585eed7457d6680ce67e6219162..a31d293a00d325e4ee1eba48126b112df117fcfc 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1466,10 +1466,18 @@ public abstract class World implements GeneratorAccess, AutoCloseable { @@ -267,10 +267,10 @@ index 73e0bf2d0851d2e10cd5b45a4bb90eba104bdc3d..93df6a29035bb3cc96409b145a2e1433 public boolean isSavingDisabled() { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 8458ac3cf864774520afcb9ddc7cd60fc8f9d4e6..d52a75ac37db59e4df23131aecc3e7fc6bedf3a9 100644 +index 4883b12a8033f62e7c777f6b6f21003d89f470e4..f4571b7892cb7962618c1fee3aad86311c92ca28 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -557,7 +557,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -556,7 +556,12 @@ public class WorldServer extends World implements GeneratorAccessSeed { }); } @@ -284,7 +284,7 @@ index 8458ac3cf864774520afcb9ddc7cd60fc8f9d4e6..d52a75ac37db59e4df23131aecc3e7fc ChunkCoordIntPair chunkcoordintpair = chunk.getPos(); boolean flag = this.isRaining(); int j = chunkcoordintpair.d(); -@@ -565,10 +570,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -564,10 +569,10 @@ public class WorldServer extends World implements GeneratorAccessSeed { GameProfilerFiller gameprofilerfiller = this.getMethodProfiler(); gameprofilerfiller.enter("thunder"); @@ -297,7 +297,7 @@ index 8458ac3cf864774520afcb9ddc7cd60fc8f9d4e6..d52a75ac37db59e4df23131aecc3e7fc if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); boolean flag1 = this.getGameRules().getBoolean(GameRules.DO_MOB_SPAWNING) && this.random.nextDouble() < (double) difficultydamagescaler.b() * paperConfig.skeleHorseSpawnChance; // Paper -@@ -591,59 +596,77 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -590,59 +595,77 @@ public class WorldServer extends World implements GeneratorAccessSeed { } gameprofilerfiller.exitEnter("iceandsnow"); diff --git a/Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch b/Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch index f7bf961b2f..217d3156bc 100644 --- a/Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch +++ b/Spigot-Server-Patches/0429-Ensure-Entity-is-never-double-registered.patch @@ -23,10 +23,10 @@ index c49d157b8ca25f9811bf64396c207b1c1d6e085d..e895bf811ce5d441541725ade48e3f07 private boolean locked = false; @Override diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 7426c800002560bc5534aa3f683068fb2dcb7898..ceeefe7ac6b0dcdb96a8939e0d1ba543161aba57 100644 +index 22a726a7c4af08d7e7f40c780f392110ca8bf943..d0ed0348a7568f8313f0073a06d3ff35dbffe184 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -531,6 +531,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -530,6 +530,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { Entity entity2; while ((entity2 = (Entity) this.entitiesToAdd.poll()) != null) { @@ -34,7 +34,7 @@ index 7426c800002560bc5534aa3f683068fb2dcb7898..ceeefe7ac6b0dcdb96a8939e0d1ba543 this.registerEntity(entity2); } -@@ -1227,6 +1228,19 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1226,6 +1227,19 @@ public class WorldServer extends World implements GeneratorAccessSeed { public void unregisterEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity unregister"); // Spigot @@ -54,7 +54,7 @@ index 7426c800002560bc5534aa3f683068fb2dcb7898..ceeefe7ac6b0dcdb96a8939e0d1ba543 // Spigot start if ( entity instanceof EntityHuman ) { -@@ -1293,9 +1307,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1292,9 +1306,21 @@ public class WorldServer extends World implements GeneratorAccessSeed { private void registerEntity(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot diff --git a/Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch b/Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch index 80607819b9..d370f14857 100644 --- a/Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch +++ b/Spigot-Server-Patches/0430-Fix-unregistering-entities-from-unloading-chunks.patch @@ -15,10 +15,10 @@ Combine that with a buggy detail of the previous implementation of the Dupe UUID patch, then this was the likely source of the "Ghost entities" diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index ceeefe7ac6b0dcdb96a8939e0d1ba543161aba57..f21011761ddf3082bc9bb59f1ec6d97e5d98c705 100644 +index d0ed0348a7568f8313f0073a06d3ff35dbffe184..e5f5efa00c69ca0a06b2f28313ef7163a0e5c208 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1386,9 +1386,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1385,9 +1385,9 @@ public class WorldServer extends World implements GeneratorAccessSeed { } private void removeEntityFromChunk(Entity entity) { diff --git a/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index c14b620755..eb2f0be1a6 100644 --- a/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/Spigot-Server-Patches/0433-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -7,7 +7,7 @@ Suspected case would be around the technique used in .stopRiding Stack will identify any causer of this and warn instead of crashing. diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index b530316b582390c4c464bb1f3df48597c8bf7569..6ac39fc6cafdcbf7883e868ecb58a2ebfad41601 100644 +index 210e91c56197818b622a3ef12a644ea1b77584e0..2d3eeb3a87e345ceb3496ec60d684452c070d4b7 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -1443,6 +1443,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -26,10 +26,10 @@ index b530316b582390c4c464bb1f3df48597c8bf7569..6ac39fc6cafdcbf7883e868ecb58a2eb EntityTypes entitytypes = entity.getEntityType(); int i = entitytypes.getChunkRange() * 16; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index f21011761ddf3082bc9bb59f1ec6d97e5d98c705..d28985adf70b7a06688ac3113477a681f4b19693 100644 +index e5f5efa00c69ca0a06b2f28313ef7163a0e5c208..9ae46983ce46f6e9f05869333474d7a3dac41658 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1352,7 +1352,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1351,7 +1351,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } } @@ -38,7 +38,7 @@ index f21011761ddf3082bc9bb59f1ec6d97e5d98c705..d28985adf70b7a06688ac3113477a681 // CraftBukkit start - SPIGOT-5278 if (entity instanceof EntityDrowned) { this.navigators.add(((EntityDrowned) entity).navigationWater); -@@ -1363,6 +1363,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -1362,6 +1362,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { this.navigators.add(((EntityInsentient) entity).getNavigation()); } entity.valid = true; // CraftBukkit diff --git a/Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch b/Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch index c05dc01abf..e48c29aeab 100644 --- a/Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch +++ b/Spigot-Server-Patches/0439-Mid-Tick-Chunk-Tasks-Speed-up-processing-of-chunk-lo.patch @@ -226,7 +226,7 @@ index 0d91765cb6386c9483a6b5494e37bd7806638928..5b6f3d811ff55d0c6d55bddc7707ef87 // Spigot Start CrashReport crashreport; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d28985adf70b7a06688ac3113477a681f4b19693..894c3230cf61403beec29a60a9e69a3719c5870c 100644 +index 9ae46983ce46f6e9f05869333474d7a3dac41658..876ba27b34b0e5ecf9df548ef23c4b84749a7bdd 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -452,6 +452,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -245,7 +245,7 @@ index d28985adf70b7a06688ac3113477a681f4b19693..894c3230cf61403beec29a60a9e69a37 this.ticking = false; gameprofilerfiller.exitEnter("entities"); boolean flag3 = true || !this.players.isEmpty() || !this.getForceLoadedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players -@@ -527,6 +529,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -526,6 +528,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { timings.entityTick.stopTiming(); // Spigot this.tickingEntities = false; @@ -253,7 +253,7 @@ index d28985adf70b7a06688ac3113477a681f4b19693..894c3230cf61403beec29a60a9e69a37 Entity entity2; -@@ -536,6 +539,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -535,6 +538,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { } timings.tickEntities.stopTiming(); // Spigot diff --git a/Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch b/Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch index 6a83f11397..2c1359b508 100644 --- a/Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch +++ b/Spigot-Server-Patches/0445-Delay-unsafe-actions-until-after-entity-ticking-is-d.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Delay unsafe actions until after entity ticking is done This will help prevent many cases of unregistering entities during entity ticking diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 894c3230cf61403beec29a60a9e69a3719c5870c..e99e47b0844bb33560c7c6fcf7712656e9d8cdb4 100644 +index 876ba27b34b0e5ecf9df548ef23c4b84749a7bdd..b2048c87e715bc656e8c52e6628dd9a0905a6638 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -61,6 +61,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -26,7 +26,7 @@ index 894c3230cf61403beec29a60a9e69a3719c5870c..e99e47b0844bb33560c7c6fcf7712656 private final MinecraftServer server; public final WorldDataServer worldDataServer; // CraftBukkit - type public boolean savingDisabled; -@@ -529,6 +539,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { +@@ -528,6 +538,16 @@ public class WorldServer extends World implements GeneratorAccessSeed { timings.entityTick.stopTiming(); // Spigot this.tickingEntities = false; diff --git a/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch b/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch index 0073d98c45..49fc906aa4 100644 --- a/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch +++ b/Spigot-Server-Patches/0505-Optimize-Light-Engine.patch @@ -918,7 +918,7 @@ index 292d8c742d3be41ba8ad7fb7f1251dc7f790b62b..5b7b7506f5d1a7578fb54a578891324d public static final class a extends LightEngineStorageArray { diff --git a/src/main/java/net/minecraft/server/LightEngineStorageSky.java b/src/main/java/net/minecraft/server/LightEngineStorageSky.java -index 097f58e9ac3f4096d3b9dad75b6ebe76021fa92c..f744f62c93370d096c113f92ee81a8232c35501d 100644 +index a35e7b392c74fadf2760d1fc2021e98d33858cb5..944094e8e770cc8c0205ef2aa6c48fff55d74639 100644 --- a/src/main/java/net/minecraft/server/LightEngineStorageSky.java +++ b/src/main/java/net/minecraft/server/LightEngineStorageSky.java @@ -22,7 +22,12 @@ public class LightEngineStorageSky extends LightEngineStorage