From eee1a019f9ad018e1b700ce564dfadf6c5ad487c Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 17 Aug 2019 04:26:58 +0100 Subject: [PATCH] Updated Upstream (CraftBukkit/Spigot) Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing CraftBukkit Changes: 2012f1e0 SPIGOT-5269: Item attribute modifiers don't persist their order 7a806a3a SPIGOT-5270: Call BlockSpreadEvent when bamboo saplings grow Spigot Changes: 798ea6ab Add async catcher to World#save --- .../0064-Handle-Item-Meta-Inconsistencies.patch | 14 +++++++------- ...rbs-API-for-Reason-Source-Triggering-play.patch | 6 +++--- ...d-World.spawnParticle-API-and-add-Builder.patch | 6 +++--- ...ning-Item-entities-with-World.spawnEntity.patch | 6 +++--- .../0244-Implement-World.getEntity-UUID-API.patch | 6 +++--- ...-packets-from-world-player-list-not-serve.patch | 6 +++--- .../0380-Async-Chunk-placeholder.patch | 6 +++--- ...gurable-Keep-Spawn-Loaded-range-per-world.patch | 6 +++--- .../0396-Fix-World-isChunkGenerated-calls.patch | 6 +++--- work/CraftBukkit | 2 +- work/Spigot | 2 +- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch index 745667f600..8683b32e0b 100644 --- a/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch +++ b/Spigot-Server-Patches/0064-Handle-Item-Meta-Inconsistencies.patch @@ -1,4 +1,4 @@ -From 6fe36de0f7fe5dcb63bfb2f004a97256243b1829 Mon Sep 17 00:00:00 2001 +From 567314edde8875cb8e2617f7743a1d51ed1371c6 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 28 May 2015 23:00:19 -0400 Subject: [PATCH] Handle Item Meta Inconsistencies @@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the ItemMeta API equivalents, and should deprecate the old API's. diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java -index 9ebfbff46b..b1dfd64d15 100644 +index 9ebfbff46..b1dfd64d1 100644 --- a/src/main/java/net/minecraft/server/ItemStack.java +++ b/src/main/java/net/minecraft/server/ItemStack.java @@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader; @@ -78,7 +78,7 @@ index 9ebfbff46b..b1dfd64d15 100644 public boolean hasEnchantments() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index c04ec4a7cb..c45fe35e03 100644 +index c04ec4a7c..c45fe35e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -178,28 +178,11 @@ public final class CraftItemStack extends ItemStack { @@ -193,13 +193,13 @@ index c04ec4a7cb..c45fe35e03 100644 static Map getEnchantments(net.minecraft.server.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index de54a67a2a..084c958899 100644 +index 60ee382f5..c2086c77a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -6,6 +6,7 @@ import com.google.common.collect.HashMultimap; - import com.google.common.collect.ImmutableList; +@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMultimap; + import com.google.common.collect.LinkedHashMultimap; +import com.google.common.collect.ImmutableSortedMap; // Paper import com.google.common.collect.Lists; import com.google.common.collect.Multimap; @@ -304,7 +304,7 @@ index de54a67a2a..084c958899 100644 + clone.enchantments = new EnchantmentMap(this.enchantments); // Paper } if (this.hasAttributeModifiers()) { - clone.attributeModifiers = HashMultimap.create(this.attributeModifiers); + clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); @@ -1428,6 +1431,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } diff --git a/Spigot-Server-Patches/0144-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/Spigot-Server-Patches/0144-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch index af43e356e6..1544b4d2e2 100644 --- a/Spigot-Server-Patches/0144-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch +++ b/Spigot-Server-Patches/0144-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch @@ -1,4 +1,4 @@ -From 529b4e1d50dad36076a1ea5b36cab867575597cf Mon Sep 17 00:00:00 2001 +From 542dd258b6095eb43df13626a8ca40e3fd900332 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 19 Dec 2017 16:31:46 -0500 Subject: [PATCH] ExperienceOrbs API for Reason/Source/Triggering player @@ -265,10 +265,10 @@ index 0cb2e6d87..2bbd3663a 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 2087a38a2..bbfd498b3 100644 +index 5b48bbdfb..75f5e752c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1710,7 +1710,7 @@ public class CraftWorld implements World { +@@ -1711,7 +1711,7 @@ public class CraftWorld implements World { } else if (TNTPrimed.class.isAssignableFrom(clazz)) { entity = new EntityTNTPrimed(world, x, y, z, null); } else if (ExperienceOrb.class.isAssignableFrom(clazz)) { diff --git a/Spigot-Server-Patches/0222-Expand-World.spawnParticle-API-and-add-Builder.patch b/Spigot-Server-Patches/0222-Expand-World.spawnParticle-API-and-add-Builder.patch index da21f097ca..360791e91a 100644 --- a/Spigot-Server-Patches/0222-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/Spigot-Server-Patches/0222-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -1,4 +1,4 @@ -From f1000a5e7302c9c519427dd4470064675c90a442 Mon Sep 17 00:00:00 2001 +From 35f0a2c4813ee62da2f8078175fff6fbc8259dbb 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 @@ -43,10 +43,10 @@ index 18e0455a3..55bb019ea 100644 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 bbfd498b3..0014efeb2 100644 +index 75f5e752c..a0c5f7f91 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2176,11 +2176,17 @@ public class CraftWorld implements World { +@@ -2177,11 +2177,17 @@ public class CraftWorld implements World { @Override public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { diff --git a/Spigot-Server-Patches/0226-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/Spigot-Server-Patches/0226-Allow-spawning-Item-entities-with-World.spawnEntity.patch index 1045e4c4bb..dfeb0503b1 100644 --- a/Spigot-Server-Patches/0226-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/Spigot-Server-Patches/0226-Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -1,4 +1,4 @@ -From c91fae677ab0f60417fb6feb8cb4ddd3b242e1ae Mon Sep 17 00:00:00 2001 +From 030a17b8b5f1d5b6abd32d88f1fd26fa4ac3f52d Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 4 Jun 2018 20:39:20 -0400 Subject: [PATCH] Allow spawning Item entities with World.spawnEntity @@ -8,10 +8,10 @@ This API has more capabilities than .dropItem with the Consumer function Item can be set inside of the Consumer pre spawn function. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0014efeb2..26ddf4a6c 100644 +index a0c5f7f91..2fac4462d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1404,6 +1404,10 @@ public class CraftWorld implements World { +@@ -1405,6 +1405,10 @@ public class CraftWorld implements World { if (Boat.class.isAssignableFrom(clazz)) { entity = new EntityBoat(world, x, y, z); entity.setPositionRotation(x, y, z, yaw, pitch); diff --git a/Spigot-Server-Patches/0244-Implement-World.getEntity-UUID-API.patch b/Spigot-Server-Patches/0244-Implement-World.getEntity-UUID-API.patch index d7c5ea00c4..6a25dd722f 100644 --- a/Spigot-Server-Patches/0244-Implement-World.getEntity-UUID-API.patch +++ b/Spigot-Server-Patches/0244-Implement-World.getEntity-UUID-API.patch @@ -1,11 +1,11 @@ -From 93c339952640cc2620a03bb3e0b0f1c55c74413b Mon Sep 17 00:00:00 2001 +From 4cad924d4ab368e3962e1c69158bac777bb459b3 Mon Sep 17 00:00:00 2001 From: Brokkonaut Date: Tue, 3 Jul 2018 16:08:14 +0200 Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 61732ae8d..601265fb5 100644 +index d75ac36aa..5e53ee010 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1207,6 +1207,15 @@ public class CraftWorld implements World { @@ -23,7 +23,7 @@ index 61732ae8d..601265fb5 100644 + @Override public void save() { - this.server.checkSaveState(); + org.spigotmc.AsyncCatcher.catchOp("world save"); // Spigot -- 2.22.0 diff --git a/Spigot-Server-Patches/0286-Send-nearby-packets-from-world-player-list-not-serve.patch b/Spigot-Server-Patches/0286-Send-nearby-packets-from-world-player-list-not-serve.patch index 1c67e6ad79..23973d3f89 100644 --- a/Spigot-Server-Patches/0286-Send-nearby-packets-from-world-player-list-not-serve.patch +++ b/Spigot-Server-Patches/0286-Send-nearby-packets-from-world-player-list-not-serve.patch @@ -1,4 +1,4 @@ -From 1a129cf6f70425f43daa049512ac51538a11e780 Mon Sep 17 00:00:00 2001 +From a39029faa699a3aeb16dae5e275a9c09a8ff5e2b 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 @@ -68,10 +68,10 @@ index 24f1a6442..0025e4ecf 100644 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4ed4dfdde..80d75bf02 100644 +index 766bb4bc1..88186aac8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2011,7 +2011,7 @@ public class CraftWorld implements World { +@@ -2012,7 +2012,7 @@ public class CraftWorld implements World { double z = loc.getZ(); PacketPlayOutCustomSoundEffect packet = new PacketPlayOutCustomSoundEffect(new MinecraftKey(sound), SoundCategory.valueOf(category.name()), new Vec3D(x, y, z), volume, pitch); diff --git a/Spigot-Server-Patches/0380-Async-Chunk-placeholder.patch b/Spigot-Server-Patches/0380-Async-Chunk-placeholder.patch index eda1c85c96..7ef750cdb3 100644 --- a/Spigot-Server-Patches/0380-Async-Chunk-placeholder.patch +++ b/Spigot-Server-Patches/0380-Async-Chunk-placeholder.patch @@ -1,4 +1,4 @@ -From db9bf66ea58111702713d10357614deaf3928378 Mon Sep 17 00:00:00 2001 +From 34e683e36fe14ee82ad3a444ffadd17470462f5f Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Mon, 6 May 2019 12:29:24 -0700 Subject: [PATCH] Async Chunk placeholder @@ -6,7 +6,7 @@ Subject: [PATCH] Async Chunk placeholder Until we figure out Mojang's ticket system. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5bb567f0b..447b4324f 100644 +index 91b65fde0..afdb6956b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -18,6 +18,7 @@ import java.util.Objects; @@ -17,7 +17,7 @@ index 5bb567f0b..447b4324f 100644 import java.util.function.Predicate; import it.unimi.dsi.fastutil.longs.Long2ObjectMap; import it.unimi.dsi.fastutil.objects.ObjectSortedSet; -@@ -2256,6 +2257,40 @@ public class CraftWorld implements World { +@@ -2257,6 +2258,40 @@ public class CraftWorld implements World { return (nearest == null) ? null : new Location(this, nearest.getX(), nearest.getY(), nearest.getZ()); } diff --git a/Spigot-Server-Patches/0387-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/Spigot-Server-Patches/0387-Configurable-Keep-Spawn-Loaded-range-per-world.patch index e0a7c858f7..0e97cce87d 100644 --- a/Spigot-Server-Patches/0387-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/Spigot-Server-Patches/0387-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -1,4 +1,4 @@ -From 9f5f6ac6b0166e90304a955d9a3709d19547c319 Mon Sep 17 00:00:00 2001 +From 334132e026377b7943f03223c055517f102a83cb 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 @@ -196,10 +196,10 @@ index a6d0635ec..8ac49d8b9 100644 public LongSet getForceLoadedChunks() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 3d62debc7..6c6b98cf0 100644 +index 66701f1cc..080f5abc1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1850,15 +1850,21 @@ public class CraftWorld implements World { +@@ -1851,15 +1851,21 @@ public class CraftWorld implements World { @Override public void setKeepSpawnInMemory(boolean keepLoaded) { diff --git a/Spigot-Server-Patches/0396-Fix-World-isChunkGenerated-calls.patch b/Spigot-Server-Patches/0396-Fix-World-isChunkGenerated-calls.patch index 40f85e12c6..887f016f45 100644 --- a/Spigot-Server-Patches/0396-Fix-World-isChunkGenerated-calls.patch +++ b/Spigot-Server-Patches/0396-Fix-World-isChunkGenerated-calls.patch @@ -1,4 +1,4 @@ -From c4982ae721beaa4917a1342d166d4d4bc2a3b718 Mon Sep 17 00:00:00 2001 +From ab24b40041486e74bcff020d9e040ae3706915c8 Mon Sep 17 00:00:00 2001 From: Spottedleaf Date: Sat, 15 Jun 2019 08:54:33 -0700 Subject: [PATCH] Fix World#isChunkGenerated calls @@ -279,7 +279,7 @@ index 6f34d8aea..d2b328945 100644 printOversizedLog("ChunkTooLarge even after reduction. Trying in overzealous mode.", regionfile.file, chunkX, chunkZ); // Eek, major fail. We have retry logic, so reduce threshholds and fall back diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 6c6b98cf0..78e018caa 100644 +index 080f5abc1..f59b2e49c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -406,8 +406,22 @@ public class CraftWorld implements World { @@ -366,7 +366,7 @@ index 6c6b98cf0..78e018caa 100644 } @Override -@@ -2264,21 +2307,44 @@ public class CraftWorld implements World { +@@ -2265,21 +2308,44 @@ public class CraftWorld implements World { // Paper start private Chunk getChunkAtGen(int x, int z, boolean gen) { diff --git a/work/CraftBukkit b/work/CraftBukkit index 368f4e9940..2012f1e048 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 368f4e994069cf418f5c874f9101fc8804ee4aa9 +Subproject commit 2012f1e048773ef777a97dd3ebf138e20004f6c8 diff --git a/work/Spigot b/work/Spigot index ea7e48b3e6..798ea6ab89 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit ea7e48b3e6d973551afe440a8cbc6d96a49d10fc +Subproject commit 798ea6ab892b769b5ba354bc1c1170ad934080bc