From 69b406ca4549f18d8533982026015e4f4a2dc7d6 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Sat, 25 Jun 2022 13:26:00 -0700
Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit) (#8042)

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:
d5a777e7 SPIGOT-7078: Add EntityPotionEffectEvent.Cause#WARDEN

CraftBukkit Changes:
82f757467 SPIGOT-7078: Add EntityPotionEffectEvent.Cause#WARDEN
c924fa531 SPIGOT-7072: Call events for stepping on sculk sensors and sculk shriekers
---
 patches/server/Add-WardenAngerChangeEvent.patch | 13 ++-----------
 patches/server/Setup-Gradle-project.patch       |  7 +++++++
 work/Bukkit                                     |  2 +-
 work/CraftBukkit                                |  2 +-
 4 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/patches/server/Add-WardenAngerChangeEvent.patch b/patches/server/Add-WardenAngerChangeEvent.patch
index b811c0e6af..1ecbe8d3e3 100644
--- a/patches/server/Add-WardenAngerChangeEvent.patch
+++ b/patches/server/Add-WardenAngerChangeEvent.patch
@@ -21,15 +21,6 @@ diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
 +++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java
-@@ -0,0 +0,0 @@ public class Warden extends Monster implements VibrationListener.VibrationListen
- 
-     @Override
-     public Brain<Warden> getBrain() {
--        return super.getBrain();
-+        return (Brain<Warden>) super.getBrain(); // Paper - decompile fix
-     }
- 
-     @Override
 @@ -0,0 +0,0 @@ public class Warden extends Monster implements VibrationListener.VibrationListen
      @VisibleForTesting
      public void increaseAngerAt(@Nullable Entity entity, int amount, boolean listening) {
@@ -44,5 +35,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +            amount = event.getNewAnger() - activeAnger;
 +            // Paper end
              WardenAi.setDigCooldown(this);
-             boolean bl = !(this.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse((LivingEntity)null) instanceof Player);
-             int i = this.angerManagement.increaseAnger(entity, amount);
+             boolean flag1 = !(this.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null) instanceof Player); // CraftBukkit - decompile error
+             int j = this.angerManagement.increaseAnger(entity, amount);
diff --git a/patches/server/Setup-Gradle-project.patch b/patches/server/Setup-Gradle-project.patch
index e85da1e0d6..a2a4d410f4 100644
--- a/patches/server/Setup-Gradle-project.patch
+++ b/patches/server/Setup-Gradle-project.patch
@@ -440,6 +440,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 -            <version>1.7.3</version>
 -            <scope>runtime</scope>
 -        </dependency>
+-        <!-- annotations -->
+-        <dependency>
+-            <groupId>org.jetbrains</groupId>
+-            <artifactId>annotations-java5</artifactId>
+-            <version>23.0.0</version>
+-            <scope>provided</scope>
+-        </dependency>
 -        <!-- testing -->
 -        <dependency>
 -            <groupId>junit</groupId>
diff --git a/work/Bukkit b/work/Bukkit
index 05ae036c0a..d5a777e736 160000
--- a/work/Bukkit
+++ b/work/Bukkit
@@ -1 +1 @@
-Subproject commit 05ae036c0adae7026b1c3f7da3a8502f49a7d2e5
+Subproject commit d5a777e7366d73cd126515ae8088c0cf81853de4
diff --git a/work/CraftBukkit b/work/CraftBukkit
index 622dbe6c24..82f757467a 160000
--- a/work/CraftBukkit
+++ b/work/CraftBukkit
@@ -1 +1 @@
-Subproject commit 622dbe6c248167ebb9ec439632021decec6a489f
+Subproject commit 82f757467a7ba67c9be1ecef9601d49aff754849