From 55201f00e8926d17b23fdacdf4d13a12610a3da1 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 11 Jun 2022 02:02:57 -0700 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit) (#7936) 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: c1d911a2 Add compat constructor to PlayerAnimationEvent CraftBukkit Changes: effea36a2 PR-1065: Add missing calls for BlockSpreadEvent when Sculk spreads --- .../api/0314-Adds-PlayerArmSwingEvent.patch | 20 +++---------------- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/patches/api/0314-Adds-PlayerArmSwingEvent.patch b/patches/api/0314-Adds-PlayerArmSwingEvent.patch index 02cdf0c25..0a501495f 100644 --- a/patches/api/0314-Adds-PlayerArmSwingEvent.patch +++ b/patches/api/0314-Adds-PlayerArmSwingEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Adds PlayerArmSwingEvent diff --git a/src/main/java/io/papermc/paper/event/player/PlayerArmSwingEvent.java b/src/main/java/io/papermc/paper/event/player/PlayerArmSwingEvent.java new file mode 100644 -index 0000000000000000000000000000000000000000..1a4550a73e89f9cf92d2831d21bcfb46f92fd189 +index 0000000000000000000000000000000000000000..ce76b07cfaa9173c78e2844add2bc5bb437b1106 --- /dev/null +++ b/src/main/java/io/papermc/paper/event/player/PlayerArmSwingEvent.java @@ -0,0 +1,27 @@ @@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..1a4550a73e89f9cf92d2831d21bcfb46 + private final EquipmentSlot equipmentSlot; + + public PlayerArmSwingEvent(@NotNull Player player, @NotNull EquipmentSlot equipmentSlot) { -+ super(player, PlayerAnimationType.ARM_SWING); ++ super(player, equipmentSlot == EquipmentSlot.HAND ? PlayerAnimationType.ARM_SWING : PlayerAnimationType.OFF_ARM_SWING); + this.equipmentSlot = equipmentSlot; + } + @@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..1a4550a73e89f9cf92d2831d21bcfb46 + } +} diff --git a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java -index b7ca545c3574d4639f2783f2367de871086a5704..e93bb1ed0fdb99b38ecb84eba99bf08f150f75f0 100644 +index eb722a1e3b987b86fae2fa8346606fa15fada26f..11c27b1a4a749e129ed4b2d906c315d97a4b66e7 100644 --- a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java @@ -7,6 +7,7 @@ import org.jetbrains.annotations.NotNull; @@ -49,17 +49,3 @@ index b7ca545c3574d4639f2783f2367de871086a5704..e93bb1ed0fdb99b38ecb84eba99bf08f */ public class PlayerAnimationEvent extends PlayerEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); -@@ -24,6 +25,13 @@ public class PlayerAnimationEvent extends PlayerEvent implements Cancellable { - animationType = playerAnimationType; - } - -+ // Paper start - readd old constructor -+ @Deprecated -+ public PlayerAnimationEvent(@NotNull final Player player) { -+ this(player, PlayerAnimationType.ARM_SWING); -+ } -+ // Paper end -+ - /** - * Get the type of this animation event - * diff --git a/work/Bukkit b/work/Bukkit index 45d9c73c3..c1d911a2b 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 45d9c73c34736f64e2bbdf4227081be5d41dc093 +Subproject commit c1d911a2b4f2aaf85aa6cf9030230fe5940d49da diff --git a/work/CraftBukkit b/work/CraftBukkit index cc7edd6bc..effea36a2 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit cc7edd6bc52f405818c8b995e576cfdcb537d88b +Subproject commit effea36a28a3a0796a6ac0cc35609573c404e73c