From ef7202b9c250d474d3b85fb4e9393967b5a5815e Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 8 Jul 2019 06:29:22 -0700 Subject: [PATCH] Fix entity count in timings graph (#2293) --- Spigot-Server-Patches/0009-Timings-v2.patch | 20 +++++++++++++------ .../0025-Entity-Origin-API.patch | 8 ++++---- .../0034-Disable-thunder.patch | 8 ++++---- .../0035-Disable-ice-and-snow.patch | 8 ++++---- ...le-spawn-chances-for-skeleton-horses.patch | 6 +++--- ...Entity-AddTo-RemoveFrom-World-Events.patch | 8 ++++---- ...item-frames-performance-and-bug-fixe.patch | 6 +++--- .../0110-Fix-Double-World-Add-issues.patch | 6 +++--- .../0119-Chunk-registration-fixes.patch | 6 +++--- ...ld.spawnParticle-API-and-add-Builder.patch | 6 +++--- .../0247-InventoryCloseEvent-Reason-API.patch | 8 ++++---- ...nilla-entity-warnings-for-duplicates.patch | 6 +++--- ...ies-option-to-debug-dupe-uuid-issues.patch | 12 +++++------ ...ead-Entities-in-entityList-iteration.patch | 12 +++++------ ...ets-from-world-player-list-not-serve.patch | 8 ++++---- ...mit-lightning-strike-effect-distance.patch | 10 +++++----- .../0368-Entity-getEntitySpawnReason.patch | 8 ++++---- ...h-entity-loss-due-to-unloaded-chunks.patch | 8 ++++---- .../0390-Duplicate-UUID-Resolve-Option.patch | 8 ++++---- ...le-Keep-Spawn-Loaded-range-per-world.patch | 16 +++++++-------- .../0399-incremental-chunk-saving.patch | 20 +++++++++---------- 21 files changed, 103 insertions(+), 95 deletions(-) diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch index 84030c6b22..d1892cf5bf 100644 --- a/Spigot-Server-Patches/0009-Timings-v2.patch +++ b/Spigot-Server-Patches/0009-Timings-v2.patch @@ -1,4 +1,4 @@ -From 5a6ac2574a72aca6611ad1c416a65c6ec393569a Mon Sep 17 00:00:00 2001 +From 9e00b0ab023fe548a1acb5c67f03ce7bfbc18ca0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 3 Mar 2016 04:00:11 -0600 Subject: [PATCH] Timings v2 @@ -1056,7 +1056,7 @@ index 32981c4422..2f608305f7 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 df518ff633..229cff562f 100644 +index df518ff633..69af071e60 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -1,5 +1,7 @@ @@ -1111,7 +1111,15 @@ index df518ff633..229cff562f 100644 while (objectiterator.hasNext()) { Entry entry = (Entry) objectiterator.next(); Entity entity1 = (Entity) entry.getValue(); -@@ -421,6 +423,7 @@ public class WorldServer extends World { +@@ -344,6 +346,7 @@ public class WorldServer extends World { + gameprofilerfiller.enter("tick"); + if (!entity1.dead && !(entity1 instanceof EntityComplexPart)) { + this.a(this::entityJoinedWorld, entity1); ++ ++TimingHistory.entityTicks; // Paper + } + + gameprofilerfiller.exit(); +@@ -421,6 +424,7 @@ public class WorldServer extends World { } gameprofilerfiller.exitEnter("tickBlocks"); @@ -1119,7 +1127,7 @@ index df518ff633..229cff562f 100644 if (i > 0) { ChunkSection[] achunksection = chunk.getSections(); int l = achunksection.length; -@@ -452,7 +455,7 @@ public class WorldServer extends World { +@@ -452,7 +456,7 @@ public class WorldServer extends World { } } } @@ -1128,7 +1136,7 @@ index df518ff633..229cff562f 100644 gameprofilerfiller.exit(); } -@@ -747,6 +750,7 @@ public class WorldServer extends World { +@@ -747,6 +751,7 @@ public class WorldServer extends World { if (!flag1) { org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit @@ -1136,7 +1144,7 @@ index df518ff633..229cff562f 100644 if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); } -@@ -756,7 +760,10 @@ public class WorldServer extends World { +@@ -756,7 +761,10 @@ public class WorldServer extends World { iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0])); } diff --git a/Spigot-Server-Patches/0025-Entity-Origin-API.patch b/Spigot-Server-Patches/0025-Entity-Origin-API.patch index 0901a1ea33..dd3c1b0da1 100644 --- a/Spigot-Server-Patches/0025-Entity-Origin-API.patch +++ b/Spigot-Server-Patches/0025-Entity-Origin-API.patch @@ -1,11 +1,11 @@ -From 4c0fc34009ad13105bbafb5be1d5a1f5b464a530 Mon Sep 17 00:00:00 2001 +From 81ae322c6e25e4776ad972fd967a4152790f8fa4 Mon Sep 17 00:00:00 2001 From: Byteflux Date: Tue, 1 Mar 2016 23:45:08 -0600 Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 187374666b..0bfa78bd22 100644 +index 617e7d3a71..e5f5dbe980 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -163,6 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -101,10 +101,10 @@ index ce510c4867..b7c94fe238 100644 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 229cff562f..16da9c7acf 100644 +index 69af071e60..458c14e1d1 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1103,6 +1103,11 @@ public class WorldServer extends World { +@@ -1104,6 +1104,11 @@ public class WorldServer extends World { this.I.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 1d403e25f8..7fa90a959d 100644 --- a/Spigot-Server-Patches/0034-Disable-thunder.patch +++ b/Spigot-Server-Patches/0034-Disable-thunder.patch @@ -1,4 +1,4 @@ -From 5e2def35ef8073cbeb41db5b9c5bf97b57d0371e Mon Sep 17 00:00:00 2001 +From b7c3348e24a4f8b8152de7710e197c368163d797 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:52:43 -0600 Subject: [PATCH] Disable thunder @@ -19,10 +19,10 @@ index 6a307d5dd6..bf0cd6a8b4 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index fc582fead6..91ec2f9842 100644 +index 458c14e1d1..5358c7379a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -384,7 +384,7 @@ public class WorldServer extends World { +@@ -385,7 +385,7 @@ public class WorldServer extends World { gameprofilerfiller.enter("thunder"); BlockPosition blockposition; @@ -32,5 +32,5 @@ index fc582fead6..91ec2f9842 100644 if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch b/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch index e3a4822d5c..22121e8969 100644 --- a/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch +++ b/Spigot-Server-Patches/0035-Disable-ice-and-snow.patch @@ -1,4 +1,4 @@ -From 0527ad333e7ce35d6a6500109a22824607d4d4cf Mon Sep 17 00:00:00 2001 +From f5f389e934a6c08470c975a0f85441748562ddf6 Mon Sep 17 00:00:00 2001 From: Sudzzy Date: Wed, 2 Mar 2016 14:57:24 -0600 Subject: [PATCH] Disable ice and snow @@ -19,10 +19,10 @@ index bf0cd6a8b4..8db5c3f3fe 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 91ec2f9842..7b78946ece 100644 +index 5358c7379a..b72e1b8062 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -404,7 +404,7 @@ public class WorldServer extends World { +@@ -405,7 +405,7 @@ public class WorldServer extends World { } gameprofilerfiller.exitEnter("iceandsnow"); @@ -32,5 +32,5 @@ index 91ec2f9842..7b78946ece 100644 BlockPosition blockposition1 = blockposition.down(); BiomeBase biomebase = this.getBiome(blockposition); -- -2.21.0 +2.22.0 diff --git a/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch b/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch index 7bee04780a..d1e4423f05 100644 --- a/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch +++ b/Spigot-Server-Patches/0071-Configurable-spawn-chances-for-skeleton-horses.patch @@ -1,4 +1,4 @@ -From 317afc73fa8b1b25148f5a5743024957fb3ceb0f Mon Sep 17 00:00:00 2001 +From cd5273fe9fa835c8840a82f4844be6f873b88cc7 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Tue, 22 Mar 2016 12:04:28 -0500 Subject: [PATCH] Configurable spawn chances for skeleton horses @@ -22,10 +22,10 @@ index 98049567f4..2a71381dae 100644 + } } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 2895b50915..b5ff34443c 100644 +index b72e1b8062..48ee9d7a5c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -388,7 +388,7 @@ public class WorldServer extends World { +@@ -389,7 +389,7 @@ public class WorldServer extends World { blockposition = this.a(this.a(j, 0, k, 15)); if (this.isRainingAt(blockposition)) { DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition); diff --git a/Spigot-Server-Patches/0075-Entity-AddTo-RemoveFrom-World-Events.patch b/Spigot-Server-Patches/0075-Entity-AddTo-RemoveFrom-World-Events.patch index 5d552f54d0..6ccf443630 100644 --- a/Spigot-Server-Patches/0075-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/Spigot-Server-Patches/0075-Entity-AddTo-RemoveFrom-World-Events.patch @@ -1,14 +1,14 @@ -From 0a45d9187c646b7b0fa332fcd3e9385cfe607950 Mon Sep 17 00:00:00 2001 +From 41fc6241ac74a486d2515d43f542b4d0c04c192d Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 28 Mar 2016 20:32:58 -0400 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 b7e98bc269..edcb99be2c 100644 +index 443986ef3a..28a6a62dfc 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1109,6 +1109,7 @@ public class WorldServer extends World { +@@ -1110,6 +1110,7 @@ public class WorldServer extends World { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end @@ -16,7 +16,7 @@ index b7e98bc269..edcb99be2c 100644 } } -@@ -1118,6 +1119,7 @@ public class WorldServer extends World { +@@ -1119,6 +1120,7 @@ public class WorldServer extends World { if (this.tickingEntities) { throw new IllegalStateException("Removing entity while ticking!"); } else { diff --git a/Spigot-Server-Patches/0100-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/Spigot-Server-Patches/0100-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 13d99450fb..d834fa5301 100644 --- a/Spigot-Server-Patches/0100-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/Spigot-Server-Patches/0100-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -1,4 +1,4 @@ -From a0d1cba8b421d1536b09fb97f3e089d64aeb3c26 Mon Sep 17 00:00:00 2001 +From e06128b6420b69d097ae32d57ee1089c36dcc268 Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 29 Apr 2016 20:02:00 -0400 Subject: [PATCH] Improve Maps (in item frames) performance and bug fixes @@ -102,10 +102,10 @@ index fc08158937..090d3dbd31 100644 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 edcb99be2c..fd2a204d3e 100644 +index 28a6a62dfc..d0ab361904 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1046,6 +1046,7 @@ public class WorldServer extends World { +@@ -1047,6 +1047,7 @@ public class WorldServer extends World { { if ( iter.next().trackee == entity ) { diff --git a/Spigot-Server-Patches/0110-Fix-Double-World-Add-issues.patch b/Spigot-Server-Patches/0110-Fix-Double-World-Add-issues.patch index 7400f93899..19a4948540 100644 --- a/Spigot-Server-Patches/0110-Fix-Double-World-Add-issues.patch +++ b/Spigot-Server-Patches/0110-Fix-Double-World-Add-issues.patch @@ -1,4 +1,4 @@ -From 417e09c01cdadc732b5c9ea0ba14c591af101d2b Mon Sep 17 00:00:00 2001 +From 58e45655ecd32572a107bc7ce748ffefd05f52f2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 21 Jun 2016 22:54:34 -0400 Subject: [PATCH] Fix Double World Add issues @@ -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 fd2a204d3e..8fd4478f2b 100644 +index d0ab361904..4ba5b00aef 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -936,6 +936,7 @@ public class WorldServer extends World { +@@ -937,6 +937,7 @@ public class WorldServer extends World { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot diff --git a/Spigot-Server-Patches/0119-Chunk-registration-fixes.patch b/Spigot-Server-Patches/0119-Chunk-registration-fixes.patch index 92d8e66d83..fe100e023e 100644 --- a/Spigot-Server-Patches/0119-Chunk-registration-fixes.patch +++ b/Spigot-Server-Patches/0119-Chunk-registration-fixes.patch @@ -1,4 +1,4 @@ -From 13accd53a25699c460e044a5b1c5825016fd7e16 Mon Sep 17 00:00:00 2001 +From 05f6bfc3adf98f785d098f84f809be59eebd28d0 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 21 Sep 2016 22:54:28 -0400 Subject: [PATCH] Chunk registration fixes @@ -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 8fd4478f2b..6bd60ce46c 100644 +index 4ba5b00aef..690f530416 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -624,7 +624,7 @@ public class WorldServer extends World { +@@ -625,7 +625,7 @@ public class WorldServer extends World { public void chunkCheck(Entity entity) { this.getMethodProfiler().enter("chunkCheck"); int i = MathHelper.floor(entity.locX / 16.0D); diff --git a/Spigot-Server-Patches/0224-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0224-Expand-World.spawnParticle-API-and-add-Builder.patch index 868b34c1cf..631bd7f0f2 100644 --- a/Spigot-Server-Patches/0224-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0224-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -1,4 +1,4 @@ -From 2e8b98f9f26aa269a7e1df92886f9b98120a5a50 Mon Sep 17 00:00:00 2001 +From 60c17edb75c3d029b1237a8ce8bdabc08cc30b42 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 15 Aug 2017 22:29:12 -0400 Subject: [PATCH] Expand World.spawnParticle API and add Builder @@ -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 6bd60ce46c..4e17f74ff0 100644 +index 690f530416..74939dce3a 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -48,7 +48,7 @@ public class WorldServer extends World { @@ -22,7 +22,7 @@ index 6bd60ce46c..4e17f74ff0 100644 boolean tickingEntities; private final MinecraftServer server; private final WorldNBTStorage dataManager; -@@ -1331,12 +1331,17 @@ public class WorldServer extends World { +@@ -1332,12 +1332,17 @@ public class WorldServer extends World { } 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) { diff --git a/Spigot-Server-Patches/0247-InventoryCloseEvent-Reason-API.patch b/Spigot-Server-Patches/0247-InventoryCloseEvent-Reason-API.patch index 71da17623d..012e9dc159 100644 --- a/Spigot-Server-Patches/0247-InventoryCloseEvent-Reason-API.patch +++ b/Spigot-Server-Patches/0247-InventoryCloseEvent-Reason-API.patch @@ -1,4 +1,4 @@ -From 9c7802eb0238ad39dd2bed450702083f69c0c32e Mon Sep 17 00:00:00 2001 +From 2f3f0e148171ee21582fb264b3933e65d4361165 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 3 Jul 2018 21:56:23 -0400 Subject: [PATCH] InventoryCloseEvent Reason API @@ -114,10 +114,10 @@ index a167843bfb..9e5cd22d7d 100644 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 4e17f74ff0..c55a2a213f 100644 +index 74939dce3a..71e5dffb95 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -989,7 +989,7 @@ public class WorldServer extends World { +@@ -990,7 +990,7 @@ public class WorldServer extends World { { if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) { @@ -126,7 +126,7 @@ index 4e17f74ff0..c55a2a213f 100644 } } } -@@ -1012,7 +1012,7 @@ public class WorldServer extends World { +@@ -1013,7 +1013,7 @@ public class WorldServer extends World { { if ( h instanceof org.bukkit.craftbukkit.entity.CraftHumanEntity ) { diff --git a/Spigot-Server-Patches/0252-Re-add-vanilla-entity-warnings-for-duplicates.patch b/Spigot-Server-Patches/0252-Re-add-vanilla-entity-warnings-for-duplicates.patch index 366551d631..18a60a1c78 100644 --- a/Spigot-Server-Patches/0252-Re-add-vanilla-entity-warnings-for-duplicates.patch +++ b/Spigot-Server-Patches/0252-Re-add-vanilla-entity-warnings-for-duplicates.patch @@ -1,4 +1,4 @@ -From a54d2f532d9fa34870e1e88b5318ac4a45bb7f4c Mon Sep 17 00:00:00 2001 +From 3ade88ed3cd7d0e49d2f22f47a7758397d7d5575 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 19 Jul 2018 01:08:05 -0400 Subject: [PATCH] Re-add vanilla entity warnings for duplicates @@ -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 c55a2a213f..1e727fa989 100644 +index 71e5dffb95..2e19b7342f 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -974,7 +974,8 @@ public class WorldServer extends World { +@@ -975,7 +975,8 @@ public class WorldServer extends World { if (entity1 == null) { return false; } else { diff --git a/Spigot-Server-Patches/0256-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/Spigot-Server-Patches/0256-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 3518548c71..dfe0c60c4d 100644 --- a/Spigot-Server-Patches/0256-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/Spigot-Server-Patches/0256-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -1,4 +1,4 @@ -From d36df81ad826c2207447db7aefef352cc02fdbf4 Mon Sep 17 00:00:00 2001 +From a01f84d4d3117850f5f7f66118084860c9b85088 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 bd3e610786..20b6ad48a9 100644 +index 146ce3a7a6..143937236d 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 @@ -40,7 +40,7 @@ index 1212f3f67d..b38bc77c93 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 985b459efe..f476f326f1 100644 +index b9570ea928..23d5555d93 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 985b459efe..f476f326f1 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 1e727fa989..e36e1c2721 100644 +index 2e19b7342f..dbdc4b66e9 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -69,6 +69,9 @@ public class WorldServer extends World { @@ -65,7 +65,7 @@ index 1e727fa989..e36e1c2721 100644 // Add env and gen to constructor public WorldServer(MinecraftServer minecraftserver, Executor executor, WorldNBTStorage worldnbtstorage, WorldData worlddata, DimensionManager dimensionmanager, GameProfilerFiller gameprofilerfiller, WorldLoadListener worldloadlistener, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) { -@@ -938,6 +941,12 @@ public class WorldServer extends World { +@@ -939,6 +942,12 @@ public class WorldServer extends World { org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable()); return true; } // Paper if (entity.dead) { @@ -78,7 +78,7 @@ index 1e727fa989..e36e1c2721 100644 // 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)) { -@@ -1101,7 +1110,24 @@ public class WorldServer extends World { +@@ -1102,7 +1111,24 @@ public class WorldServer extends World { } } diff --git a/Spigot-Server-Patches/0270-Ignore-Dead-Entities-in-entityList-iteration.patch b/Spigot-Server-Patches/0270-Ignore-Dead-Entities-in-entityList-iteration.patch index ed33fe9f82..d9c5cff16a 100644 --- a/Spigot-Server-Patches/0270-Ignore-Dead-Entities-in-entityList-iteration.patch +++ b/Spigot-Server-Patches/0270-Ignore-Dead-Entities-in-entityList-iteration.patch @@ -1,4 +1,4 @@ -From 2cd0a100f8299533b6802f20e1462325cb2bb352 Mon Sep 17 00:00:00 2001 +From ab4142cd2764ba31b8b5325c1071109507bb43e2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 28 Jul 2018 12:18:27 -0400 Subject: [PATCH] Ignore Dead Entities in entityList iteration @@ -51,7 +51,7 @@ index ebc00f355e..099f0ad78b 100644 if (oclass.isInstance(t0) && t0.getBoundingBox().c(axisalignedbb) && (predicate == null || predicate.test(t0))) { // Spigot - instance check list.add(t0); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index e1cd5e72a5..b02b084556 100644 +index 76e9891054..6064d414ef 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -126,6 +126,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -63,10 +63,10 @@ index e1cd5e72a5..b02b084556 100644 private float av; private float aw; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index e36e1c2721..adeff1ef19 100644 +index dbdc4b66e9..f52321fbc8 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -846,6 +846,7 @@ public class WorldServer extends World { +@@ -847,6 +847,7 @@ public class WorldServer extends World { while (objectiterator.hasNext()) { Entity entity = (Entity) objectiterator.next(); @@ -74,7 +74,7 @@ index e36e1c2721..adeff1ef19 100644 // CraftBukkit start - Split out persistent check, don't apply it to special persistent mobs if (entity instanceof EntityInsentient) { EntityInsentient entityinsentient = (EntityInsentient) entity; -@@ -1138,6 +1139,7 @@ public class WorldServer extends World { +@@ -1139,6 +1140,7 @@ public class WorldServer extends World { entity.origin = entity.getBukkitEntity().getLocation(); } // Paper end @@ -82,7 +82,7 @@ index e36e1c2721..adeff1ef19 100644 new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity()).callEvent(); // Paper - fire while valid } -@@ -1152,6 +1154,7 @@ public class WorldServer extends World { +@@ -1153,6 +1155,7 @@ public class WorldServer extends World { this.removeEntityFromChunk(entity); this.entitiesById.remove(entity.getId()); this.unregisterEntity(entity); diff --git a/Spigot-Server-Patches/0288-Send-nearby-packets-from-world-player-list-not-serve.patch b/Spigot-Server-Patches/0288-Send-nearby-packets-from-world-player-list-not-serve.patch index 3c97954c9a..9ae869eae9 100644 --- a/Spigot-Server-Patches/0288-Send-nearby-packets-from-world-player-list-not-serve.patch +++ b/Spigot-Server-Patches/0288-Send-nearby-packets-from-world-player-list-not-serve.patch @@ -1,4 +1,4 @@ -From ae55b8c787098245f360f1832020027995902aa3 Mon Sep 17 00:00:00 2001 +From 9abfcdef1ec35ecc3163d6688d925dbbd6711783 Mon Sep 17 00:00:00 2001 From: Mystiflow Date: Fri, 6 Jul 2018 13:21:30 +0100 Subject: [PATCH] Send nearby packets from world player list not server list @@ -46,10 +46,10 @@ index 9e5cd22d7d..049d702cb9 100644 double d5 = d1 - entityplayer.locY; double d6 = d2 - entityplayer.locZ; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index adeff1ef19..990c0afb85 100644 +index f52321fbc8..cca4d97030 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1187,7 +1187,7 @@ public class WorldServer extends World { +@@ -1188,7 +1188,7 @@ public class WorldServer extends World { } // CraftBukkit end this.globalEntityList.add(entitylightning); @@ -58,7 +58,7 @@ index adeff1ef19..990c0afb85 100644 } @Override -@@ -1319,7 +1319,7 @@ public class WorldServer extends World { +@@ -1320,7 +1320,7 @@ public class WorldServer extends World { BlockActionData blockactiondata = (BlockActionData) this.J.removeFirst(); if (this.a(blockactiondata)) { diff --git a/Spigot-Server-Patches/0324-Limit-lightning-strike-effect-distance.patch b/Spigot-Server-Patches/0324-Limit-lightning-strike-effect-distance.patch index 517ef28938..d4bc7b2d8f 100644 --- a/Spigot-Server-Patches/0324-Limit-lightning-strike-effect-distance.patch +++ b/Spigot-Server-Patches/0324-Limit-lightning-strike-effect-distance.patch @@ -1,11 +1,11 @@ -From 8ba844393ca690aeda331914d6dfe84d054f5335 Mon Sep 17 00:00:00 2001 +From df681b2f1c2bb8068ba9ed8336354e2c2d87c71c Mon Sep 17 00:00:00 2001 From: Trigary Date: Fri, 14 Sep 2018 17:42:08 +0200 Subject: [PATCH] Limit lightning strike effect distance diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 7e031d18..63f313a9 100644 +index 7e031d18e0..63f313a92d 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -234,6 +234,28 @@ public class PaperWorldConfig { @@ -38,7 +38,7 @@ index 7e031d18..63f313a9 100644 public int fixedInhabitedTime; private void fixedInhabitedTime() { diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java -index 0169f261..da857860 100644 +index 0169f261c6..da85786046 100644 --- a/src/main/java/net/minecraft/server/EntityLightning.java +++ b/src/main/java/net/minecraft/server/EntityLightning.java @@ -64,6 +64,17 @@ public class EntityLightning extends Entity { @@ -69,10 +69,10 @@ index 0169f261..da857860 100644 --this.lifeTicks; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 990c0afb..28702361 100644 +index cca4d97030..9a3690d664 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -1187,7 +1187,7 @@ public class WorldServer extends World { +@@ -1188,7 +1188,7 @@ public class WorldServer extends World { } // CraftBukkit end this.globalEntityList.add(entitylightning); diff --git a/Spigot-Server-Patches/0368-Entity-getEntitySpawnReason.patch b/Spigot-Server-Patches/0368-Entity-getEntitySpawnReason.patch index 36043b7ae0..6fd92b10c7 100644 --- a/Spigot-Server-Patches/0368-Entity-getEntitySpawnReason.patch +++ b/Spigot-Server-Patches/0368-Entity-getEntitySpawnReason.patch @@ -1,4 +1,4 @@ -From 5b0aad32383403388285e2fef30988764f8a53f1 Mon Sep 17 00:00:00 2001 +From a9ffddc41689d09f15c07e33899089a2d3c89389 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sun, 24 Mar 2019 00:24:52 -0400 Subject: [PATCH] Entity#getEntitySpawnReason @@ -10,7 +10,7 @@ persistenting Living Entity, SPAWNER for spawners, or DEFAULT since data was not stored. diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 74eb6f0606..a5f80de34e 100644 +index 12b7d2531b..c5ba24f27f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -68,6 +68,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -72,10 +72,10 @@ index 65df0e7c8c..abddc8895e 100644 }); diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 2870236108..a85125133b 100644 +index 9a3690d664..f992fc34c3 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -940,6 +940,7 @@ public class WorldServer extends World { +@@ -941,6 +941,7 @@ public class WorldServer extends World { // CraftBukkit start private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp( "entity add"); // Spigot diff --git a/Spigot-Server-Patches/0389-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch b/Spigot-Server-Patches/0389-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch index 8ca4e2b482..7de51f56d7 100644 --- a/Spigot-Server-Patches/0389-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch +++ b/Spigot-Server-Patches/0389-Fix-issues-with-entity-loss-due-to-unloaded-chunks.patch @@ -1,4 +1,4 @@ -From ff7a203e4718519b882f42c9249ba0533b0095aa Mon Sep 17 00:00:00 2001 +From 80795b11a3129f541ec73a1a0bb78cda48bc981d Mon Sep 17 00:00:00 2001 From: Aikar Date: Fri, 28 Sep 2018 21:49:53 -0400 Subject: [PATCH] Fix issues with entity loss due to unloaded chunks @@ -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 a85125133b..d47ef7efa0 100644 +index f992fc34c3..8d5a291d7c 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -635,7 +635,7 @@ public class WorldServer extends World { +@@ -636,7 +636,7 @@ public class WorldServer extends World { this.getChunkAt(entity.chunkX, entity.chunkZ).a(entity, entity.chunkY); } @@ -31,7 +31,7 @@ index a85125133b..d47ef7efa0 100644 entity.inChunk = false; } else { this.getChunkAt(i, k).a(entity); -@@ -958,7 +958,7 @@ public class WorldServer extends World { +@@ -959,7 +959,7 @@ public class WorldServer extends World { return false; } // CraftBukkit end diff --git a/Spigot-Server-Patches/0390-Duplicate-UUID-Resolve-Option.patch b/Spigot-Server-Patches/0390-Duplicate-UUID-Resolve-Option.patch index 81c3096a48..0e893848a2 100644 --- a/Spigot-Server-Patches/0390-Duplicate-UUID-Resolve-Option.patch +++ b/Spigot-Server-Patches/0390-Duplicate-UUID-Resolve-Option.patch @@ -1,4 +1,4 @@ -From b3d082d43bde961d07c9dd54eabebd30e815f850 Mon Sep 17 00:00:00 2001 +From 7cae6a999380675c040812ee336143b86a07b9b8 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 21 Jul 2018 14:27:34 -0400 Subject: [PATCH] Duplicate UUID Resolve Option @@ -195,7 +195,7 @@ index b38bc77c93..9102bf8b60 100644 if (list != null) { diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index d47ef7efa0..52a0e0a37f 100644 +index 8d5a291d7c..04cf967616 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -2,6 +2,8 @@ package net.minecraft.server; @@ -207,7 +207,7 @@ index d47ef7efa0..52a0e0a37f 100644 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Queues; -@@ -985,8 +987,23 @@ public class WorldServer extends World { +@@ -986,8 +988,23 @@ public class WorldServer extends World { if (entity1 == null) { return false; } else { @@ -233,7 +233,7 @@ index d47ef7efa0..52a0e0a37f 100644 return true; } } -@@ -1117,7 +1134,7 @@ public class WorldServer extends World { +@@ -1118,7 +1135,7 @@ public class WorldServer extends World { } Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity); diff --git a/Spigot-Server-Patches/0392-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0392-Configurable-Keep-Spawn-Loaded-range-per-world.patch index c6f104ba22..e9de06355b 100644 --- a/Spigot-Server-Patches/0392-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0392-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -1,4 +1,4 @@ -From 1bbc5c28e88afb1b898c6499fe01ff219e17dc21 Mon Sep 17 00:00:00 2001 +From 6ccb99a5f6c86956c086076fc925b579fcd07da7 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 13 Sep 2014 23:14:43 -0400 Subject: [PATCH] Configurable Keep Spawn Loaded range per world @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world This lets you disable it for some worlds and lower it for others. diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index d8bb1369..de11a91a 100644 +index d8bb13693d..de11a91af6 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -483,4 +483,10 @@ public class PaperWorldConfig { @@ -21,7 +21,7 @@ index d8bb1369..de11a91a 100644 + } } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8136a97f..d6c99ce8 100644 +index 8136a97f44..d6c99ce897 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -569,6 +569,13 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant Date: Sun, 9 Jun 2019 03:53:22 +0100 Subject: [PATCH] incremental chunk saving diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index de11a91a..4d3c6c6b 100644 +index de11a91af6..4d3c6c6b47 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java @@ -489,4 +489,19 @@ public class PaperWorldConfig { @@ -29,7 +29,7 @@ index de11a91a..4d3c6c6b 100644 + } } diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java -index 5bf781bb..e2a48695 100644 +index 5bf781bb63..e2a48695df 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess { @@ -42,7 +42,7 @@ index 5bf781bb..e2a48695 100644 private long t; @Nullable diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d6c99ce8..2b99fdc6 100644 +index d6c99ce897..2b99fdc630 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -155,6 +155,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant 100) { // Spigot diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java -index d85220b6..c4ad039f 100644 +index d85220b66c..c4ad039ffd 100644 --- a/src/main/java/net/minecraft/server/PlayerChunkMap.java +++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java @@ -293,15 +293,32 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d { @@ -126,10 +126,10 @@ index d85220b6..c4ad039f 100644 } diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 2e697675..ccc12952 100644 +index 5eeec7be76..c646393eb0 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java -@@ -755,8 +755,9 @@ public class WorldServer extends World { +@@ -756,8 +756,9 @@ public class WorldServer extends World { ChunkProviderServer chunkproviderserver = this.getChunkProvider(); if (!flag1) { @@ -140,7 +140,7 @@ index 2e697675..ccc12952 100644 if (iprogressupdate != null) { iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0])); } -@@ -765,6 +766,7 @@ public class WorldServer extends World { +@@ -766,6 +767,7 @@ public class WorldServer extends World { if (iprogressupdate != null) { iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0])); } @@ -148,7 +148,7 @@ index 2e697675..ccc12952 100644 timings.worldSaveChunks.startTiming(); // Paper chunkproviderserver.save(flag); -@@ -772,6 +774,7 @@ public class WorldServer extends World { +@@ -773,6 +775,7 @@ public class WorldServer extends World { } // Paper } @@ -156,7 +156,7 @@ index 2e697675..ccc12952 100644 // CraftBukkit start - moved from MinecraftServer.saveChunks // PAIL - rename WorldServer worldserver1 = this; -@@ -781,6 +784,7 @@ public class WorldServer extends World { +@@ -782,6 +785,7 @@ public class WorldServer extends World { worlddata.c(this.server.getBossBattleCustomData().c()); worldserver1.getDataManager().saveWorldData(worlddata, this.server.getPlayerList().r()); // CraftBukkit end