From d58099f73b57a27ee78ff7f0f43f658fb6e3899c Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 22 Jul 2021 11:11:56 -0700 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6245) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: e7b0f8d6 #642: Add Crafting methods to API 9e58831e SPIGOT-6641: Use varargs in sendMessage e409fe49 SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled 6997c726 SPIGOT-6661: Fix missing radius from GenericGameEvent 02d03f35 SPIGOT-6369: Add ItemStack to HangingPlaceEvent CraftBukkit Changes: 0abf420c SPIGOT-6665: Shearing a Snowman does not drop a carved pumpkin e8e3cbcc #893: Add Crafting methods to API 879acfee Fix missing varargs from previous commit 6572b9c3 SPIGOT-6641: Use varargs in sendMessage 9e06bb2a SPIGOT-6663: Chicken Jockeys chickens don't despawn 699f2d36 SPIGOT-6545: Unable to set Guardian target via API while awareness is disabled 8ffa54ba SPIGOT-6369: Add ItemStack to HangingPlaceEvent c851639c SPIGOT-6645: Call EntityChangeBlockEvent before PlayerHarvestBlockEvent 8d244b0b SPIGOT-3725, SPIGOT-6638, MC-136917: Properly clear tile entities before replacing Spigot Changes: 18c71bf4 Rebuild patches --- patches/api/Adventure.patch | 4 ++-- patches/server/Add-Destroy-Speed-API.patch | 2 +- .../Add-a-bunch-of-missing-forceDrop-toggles.patch | 14 -------------- ...o-get-translation-keys-for-blocks-entitie.patch | 2 +- .../server/Implement-CraftBlockSoundGroup.patch | 2 +- patches/server/Line-Of-Sight-Changes.patch | 2 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- work/Spigot | 2 +- 9 files changed, 9 insertions(+), 23 deletions(-) diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch index 0b5369ce1b..abfcdcfa8f 100644 --- a/patches/api/Adventure.patch +++ b/patches/api/Adventure.patch @@ -1185,7 +1185,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @param messages An array of messages to be displayed + * @see #sendMessage(net.kyori.adventure.text.Component) */ - public void sendMessage(@NotNull String[] messages); + public void sendMessage(@NotNull String... messages); @@ -0,0 +0,0 @@ public interface CommandSender extends Permissible { * @@ -1201,7 +1201,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 * @param sender The sender of this message + * @see #sendMessage(net.kyori.adventure.identity.Identified, net.kyori.adventure.text.Component) */ - public void sendMessage(@Nullable UUID sender, @NotNull String[] messages); + public void sendMessage(@Nullable UUID sender, @NotNull String... messages); @@ -0,0 +0,0 @@ public interface CommandSender extends Permissible { * Sends this sender a chat component. diff --git a/patches/server/Add-Destroy-Speed-API.patch b/patches/server/Add-Destroy-Speed-API.patch index 85196c63a1..64312bf671 100644 --- a/patches/server/Add-Destroy-Speed-API.patch +++ b/patches/server/Add-Destroy-Speed-API.patch @@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } else { + nmsItemStack = CraftItemStack.asNMSCopy(itemStack); + } -+ float speed = nmsItemStack.getItem().getDestroySpeed(nmsItemStack, this.getNMSBlock().defaultBlockState()); ++ float speed = nmsItemStack.getItem().getDestroySpeed(nmsItemStack, this.getNMS().getBlock().defaultBlockState()); + if (speed > 1.0F && considerEnchants) { + int enchantLevel = net.minecraft.world.item.enchantment.EnchantmentHelper.getItemEnchantmentLevel(net.minecraft.world.item.enchantment.Enchantments.BLOCK_EFFICIENCY, nmsItemStack); + if (enchantLevel > 0) { diff --git a/patches/server/Add-a-bunch-of-missing-forceDrop-toggles.patch b/patches/server/Add-a-bunch-of-missing-forceDrop-toggles.patch index edbcbe2ad9..bea9f8f9b8 100644 --- a/patches/server/Add-a-bunch-of-missing-forceDrop-toggles.patch +++ b/patches/server/Add-a-bunch-of-missing-forceDrop-toggles.patch @@ -45,20 +45,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + this.forceDrops = false; // Paper } - } -diff --git a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java -+++ b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java -@@ -0,0 +0,0 @@ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackM - this.level.playSound((Player) null, (Entity) this, SoundEvents.SNOW_GOLEM_SHEAR, shearedSoundCategory, 1.0F, 1.0F); - if (!this.level.isClientSide()) { - this.setPumpkin(false); -+ this.forceDrops = true; // Paper - this.spawnAtLocation(new ItemStack(Items.CARVED_PUMPKIN), 1.7F); -+ this.forceDrops = false; // Paper - } - } diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 diff --git a/patches/server/Add-a-way-to-get-translation-keys-for-blocks-entitie.patch b/patches/server/Add-a-way-to-get-translation-keys-for-blocks-entitie.patch index 99ba4f06ff..b980978bbd 100644 --- a/patches/server/Add-a-way-to-get-translation-keys-for-blocks-entitie.patch +++ b/patches/server/Add-a-way-to-get-translation-keys-for-blocks-entitie.patch @@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -0,0 +0,0 @@ public class CraftBlock implements Block { public com.destroystokyo.paper.block.BlockSoundGroup getSoundGroup() { - return new com.destroystokyo.paper.block.CraftBlockSoundGroup(getNMSBlock().defaultBlockState().getSoundType()); + return new com.destroystokyo.paper.block.CraftBlockSoundGroup(getNMS().getBlock().defaultBlockState().getSoundType()); } + + @Override diff --git a/patches/server/Implement-CraftBlockSoundGroup.patch b/patches/server/Implement-CraftBlockSoundGroup.patch index 2c8884a072..cc014ec24d 100644 --- a/patches/server/Implement-CraftBlockSoundGroup.patch +++ b/patches/server/Implement-CraftBlockSoundGroup.patch @@ -59,7 +59,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start + @Override + public com.destroystokyo.paper.block.BlockSoundGroup getSoundGroup() { -+ return new com.destroystokyo.paper.block.CraftBlockSoundGroup(getNMSBlock().defaultBlockState().getSoundType()); ++ return new com.destroystokyo.paper.block.CraftBlockSoundGroup(getNMS().getBlock().defaultBlockState().getSoundType()); + } + // Paper end } diff --git a/patches/server/Line-Of-Sight-Changes.patch b/patches/server/Line-Of-Sight-Changes.patch index b83f12a5f0..166f27aa4f 100644 --- a/patches/server/Line-Of-Sight-Changes.patch +++ b/patches/server/Line-Of-Sight-Changes.patch @@ -73,4 +73,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Override public boolean getRemoveWhenFarAway() { - return this.getHandle() instanceof Mob && !((Mob) this.getHandle()).persistenceRequired; + return this.getHandle() instanceof Mob && !((Mob) this.getHandle()).isPersistenceRequired(); diff --git a/work/Bukkit b/work/Bukkit index eec4aab001..e7b0f8d608 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit eec4aab0016f14b085a3a1d573266d6b7b4a0146 +Subproject commit e7b0f8d608d8ee93768cc81d128b2eb5e21fcd8f diff --git a/work/CraftBukkit b/work/CraftBukkit index b8c522d56d..0abf420c4b 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit b8c522d56d159fb9b7a291f1f7973e67fb41ea66 +Subproject commit 0abf420c4b7f12a0c5a3c2116a73c78643711a05 diff --git a/work/Spigot b/work/Spigot index d03d7f12a4..18c71bf4fd 160000 --- a/work/Spigot +++ b/work/Spigot @@ -1 +1 @@ -Subproject commit d03d7f12a440519dd6f4d1491af3a7988a56b5c0 +Subproject commit 18c71bf4fd43113ac9b24c21afe6d88c16170f30