From c32c74f4ce7274776ee7edebed69db9b72825bbf Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Tue, 4 Jul 2023 10:22:56 +0200
Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9440)

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:
01aa02eb PR-858: Add LivingEntity#playHurtAnimation()
9421320f PR-884: Refinements to new ban API for improved compatibility and correctness
37a60b45 SPIGOT-6455, SPIGOT-7030, PR-750: Improve ban API
4eeb174b All smithing inventories are now the new smithing inventory
f2bb168e PR-880: Add methods to get/set FallingBlock CancelDrop
e7a807fa PR-879: Add Player#sendHealthUpdate()
692b8e96 SPIGOT-7370: Remove float value conversion in plugin.yml
2d033390 SPIGOT-7403: Add direct API for waxed signs
16a08373 PR-876: Add missing Raider API and 'no action ticks'

CraftBukkit Changes:
b60a95c8c PR-1189: Add LivingEntity#playHurtAnimation()
95c335c63 PR-1226: Fix VehicleEnterEvent not being called for certain entities
0a0fc3bee PR-1227: Refinements to new ban API for improved compatibility and correctness
0d0b1e5dc Revert bad change to PathfinderGoalSit causing all cats to sit
648196070 SPIGOT-6455, SPIGOT-7030, PR-1054: Improve ban API
31fe848d6 All smithing inventories are now the new smithing inventory
9a919a143 SPIGOT-7416: SmithItemEvent not firing in Smithing Table
9f64f0d22 PR-1221: Add methods to get/set FallingBlock CancelDrop
3be9ac171 PR-1220: Add Player#sendHealthUpdate()
c1279f775 PR-1209: Clean up various patches
c432e4397 Fix Raider#setCelebrating() implementation
504d96665 SPIGOT-7403: Add direct API for waxed signs
c68c1f1b3 PR-1216: Add missing Raider API and 'no action ticks'
85b89c3dd Increase outdated build delay

Spigot Changes:
9ebce8af Rebuild patches
64b565e6 Rebuild patches
---
 patches/api/Add-API-for-waxed-signs.patch     |  48 -------
 .../Add-Ban-Methods-to-Player-Objects.patch   |   2 +-
 .../api/Add-player-health-update-API.patch    |  42 ------
 patches/api/Adventure.patch                   |   4 +-
 patches/api/Fix-upstream-javadocs.patch       |  39 +-----
 patches/api/Missing-Entity-Behavior-API.patch |  25 ----
 patches/api/Paper-Plugins.patch               |   2 +-
 patches/api/Player.setPlayerProfile-API.patch |   2 +-
 ...the-experimental-smithing-inventory-.patch |   7 +-
 patches/server/Add-API-for-waxed-signs.patch  |  29 ----
 .../server/Add-EntityInsideBlockEvent.patch   |   8 +-
 patches/server/Add-EntityZapEvent.patch       |   8 +-
 patches/server/Add-ThrownEggHatchEvent.patch  |  12 +-
 .../server/Add-player-health-update-API.patch |  37 -----
 patches/server/Build-system-changes.patch     |   2 +-
 patches/server/CB-fixes.patch                 |  15 --
 ...llow-entities-to-ride-themselves-572.patch |  18 ---
 patches/server/EndermanEscapeEvent.patch      |   4 +-
 ...assenger-world-matches-ridden-entity.patch |  16 +--
 ...ntityChangeBlockEvent-in-more-places.patch |  22 +--
 .../server/Fix-api-checking-banned-ips.patch  |  19 ---
 ...elled-powdered-snow-bucket-placement.patch |   2 +-
 ...lock-data-for-EntityChangeBlockEvent.patch |  39 +++---
 ...und-playing-for-BlockItem-ItemStacks.patch |   2 +-
 patches/server/Fix-this-stupid-bullshit.patch |   2 +-
 ...lement-alternative-item-despawn-rate.patch |   4 +-
 ...Implemented-BlockFailedDispenseEvent.patch |   4 +-
 patches/server/Improve-death-events.patch     |   8 +-
 .../server/Missing-Entity-Behavior-API.patch  |  25 +---
 .../server/Player.setPlayerProfile-API.patch  |   2 +-
 .../server/PlayerAttemptPickupItemEvent.patch |   2 +-
 ...PlayerPickupItemEvent-setFlyAtPlayer.patch |   2 +-
 ...CreateEvent-needs-to-know-its-entity.patch |   2 +-
 ...mpty-items-from-being-added-to-world.patch |   2 +-
 ...the-experimental-smithing-inventory-.patch | 130 ------------------
 ...ient-crashes-server-lists-and-Mojang.patch |   2 +-
 patches/server/Turtle-API.patch               |   6 +-
 ...ed-flag-on-cancel-of-Explosion-Event.patch |   2 +-
 .../Use-ConcurrentHashMap-in-JsonList.patch   |   2 +-
 .../Use-a-Shared-Random-for-Entities.patch    |   4 +-
 ...entity-dismount-during-teleportation.patch |   2 +-
 work/Bukkit                                   |   2 +-
 work/CraftBukkit                              |   2 +-
 work/Spigot                                   |   2 +-
 44 files changed, 95 insertions(+), 516 deletions(-)
 delete mode 100644 patches/api/Add-API-for-waxed-signs.patch
 delete mode 100644 patches/api/Add-player-health-update-API.patch
 delete mode 100644 patches/server/Add-API-for-waxed-signs.patch
 delete mode 100644 patches/server/Add-player-health-update-API.patch
 delete mode 100644 patches/server/Don-t-allow-entities-to-ride-themselves-572.patch
 delete mode 100644 patches/server/Fix-api-checking-banned-ips.patch
 delete mode 100644 patches/server/Properly-remove-the-experimental-smithing-inventory-.patch

diff --git a/patches/api/Add-API-for-waxed-signs.patch b/patches/api/Add-API-for-waxed-signs.patch
deleted file mode 100644
index ff98ec4a2f..0000000000
--- a/patches/api/Add-API-for-waxed-signs.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jake Potrebic <jake.m.potrebic@gmail.com>
-Date: Thu, 8 Jun 2023 23:22:31 -0700
-Subject: [PATCH] Add API for waxed signs
-
-
-diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit/block/Sign.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/org/bukkit/block/Sign.java
-+++ b/src/main/java/org/bukkit/block/Sign.java
-@@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable {
-      * outside of this event is undefined.
-      *
-      * @return if this sign is currently editable
-+     * @deprecated use {@link #isWaxed()}
-      */
-+    @Deprecated // Paper
-     public boolean isEditable();
- 
-     /**
-@@ -0,0 +0,0 @@ public interface Sign extends TileState, Colorable {
-      * outside of this event is undefined.
-      *
-      * @param editable if this sign is currently editable
-+     * @deprecated use {@link #setWaxed(boolean)}
-      */
-+    @Deprecated // Paper
-     public void setEditable(boolean editable);
- 
-+    // Paper start
-+    /**
-+     * Gets whether the sign has been waxed and therefore prevents editing.
-+     *
-+     * @return true if waxed
-+     */
-+    boolean isWaxed();
-+
-+    /**
-+     * Sets whether the sign is waxed.
-+     *
-+     * @param waxed true to wax and therefore prevent editing
-+     */
-+    void setWaxed(boolean waxed);
-+    // Paper end
-+
-     /**
-      * Gets whether this sign has glowing text. Only affects the {@link Side#FRONT}.
-      *
diff --git a/patches/api/Add-Ban-Methods-to-Player-Objects.patch b/patches/api/Add-Ban-Methods-to-Player-Objects.patch
index cc1a03b8f2..4bd7f07d51 100644
--- a/patches/api/Add-Ban-Methods-to-Player-Objects.patch
+++ b/patches/api/Add-Ban-Methods-to-Player-Objects.patch
@@ -72,7 +72,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +    // Paper end
  
      /**
-      * Checks if this player is whitelisted or not
+      * Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
 diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/org/bukkit/entity/Player.java
diff --git a/patches/api/Add-player-health-update-API.patch b/patches/api/Add-player-health-update-API.patch
deleted file mode 100644
index 64512ec214..0000000000
--- a/patches/api/Add-player-health-update-API.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: SamB440 <sam@islandearth.net>
-Date: Wed, 17 Nov 2021 12:30:36 +0000
-Subject: [PATCH] Add player health update API
-
-
-diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/org/bukkit/entity/Player.java
-+++ b/src/main/java/org/bukkit/entity/Player.java
-@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
-      */
-     public double getHealthScale();
- 
-+    // Paper start
-+    /**
-+     * Forcefully sends a health update to the player.
-+     * <p>This method can cause the client to display health values
-+     * different to their true server values. If the player takes damage or
-+     * causes an action to otherwise cause a health update, these values
-+     * will no longer be shown.</p>
-+     * Setting the visible health to 0 will result in the client seeing
-+     * the death screen, unable to press the respawn button.
-+     * @see #sendHealthUpdate()
-+     * @param health the health of the player
-+     * @param foodLevel the food level of the player
-+     * @param saturationLevel the saturation level of the player
-+     */
-+    public void sendHealthUpdate(final double health, final int foodLevel, final float saturationLevel);
-+    
-+    /**
-+     * Forcefully sends a health update to the player.
-+     * This uses the player's current health, saturation, and food level.
-+     * <p>Use after {@link #setHealth(double)} to show the heart animation
-+     * of gaining or losing health.</p>
-+     */
-+    public void sendHealthUpdate();
-+    // Paper end
-+    
-     /**
-      * Gets the entity which is followed by the camera when in
-      * {@link GameMode#SPECTATOR}.
diff --git a/patches/api/Adventure.patch b/patches/api/Adventure.patch
index 8075c09e61..3e9caa6a36 100644
--- a/patches/api/Adventure.patch
+++ b/patches/api/Adventure.patch
@@ -2270,8 +2270,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +    // Paper end
 +
      /**
-      * Says a message (or runs a command).
-      *
+      * Adds this user to the {@link ProfileBanList}. If a previous ban exists, this will
+      * update the entry.
 @@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
       */
      public void sendEquipmentChange(@NotNull LivingEntity entity, @NotNull Map<EquipmentSlot, ItemStack> items);
diff --git a/patches/api/Fix-upstream-javadocs.patch b/patches/api/Fix-upstream-javadocs.patch
index 4c9061bca9..a84bdc1b47 100644
--- a/patches/api/Fix-upstream-javadocs.patch
+++ b/patches/api/Fix-upstream-javadocs.patch
@@ -9,7 +9,7 @@ diff --git a/src/main/java/org/bukkit/BanList.java b/src/main/java/org/bukkit/Ba
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/org/bukkit/BanList.java
 +++ b/src/main/java/org/bukkit/BanList.java
-@@ -0,0 +0,0 @@ public interface BanList {
+@@ -0,0 +0,0 @@ public interface BanList<T> {
  
      /**
       * Gets a {@link BanEntry} by target.
@@ -19,12 +19,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
       *
       * @param target entry parameter to search for
       * @return the corresponding entry, or null if none found
-@@ -0,0 +0,0 @@ public interface BanList {
-     public BanEntry getBanEntry(@NotNull String target);
- 
+@@ -0,0 +0,0 @@ public interface BanList<T> {
      /**
--     * Adds a ban to the this list. If a previous ban exists, this will
-+     * Adds a ban to this list. If a previous ban exists, this will
+      * Adds a ban to this list. If a previous ban exists, this will
       * update the previous entry.
 +     * <p>
 +     * Bans by name for ban type {@link Type#NAME NAME} are no longer supported and this method will return
@@ -32,7 +29,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
       *
       * @param target the target of the ban
       * @param reason reason for the ban, null indicates implementation default
-@@ -0,0 +0,0 @@ public interface BanList {
+@@ -0,0 +0,0 @@ public interface BanList<T> {
      /**
       * Gets if a {@link BanEntry} exists for the target, indicating an active
       * ban status.
@@ -41,8 +38,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +     * The replacement is bans by UUID.
       *
       * @param target the target to find
-      * @return true if a {@link BanEntry} exists for the name, indicating an
-@@ -0,0 +0,0 @@ public interface BanList {
+      * @return true if a {@link BanEntry} exists for the target, indicating an
+@@ -0,0 +0,0 @@ public interface BanList<T> {
      /**
       * Removes the specified target from this list, therefore indicating a
       * "not banned" status.
@@ -56,18 +53,6 @@ diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Buk
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/org/bukkit/Bukkit.java
 +++ b/src/main/java/org/bukkit/Bukkit.java
-@@ -0,0 +0,0 @@ public final class Bukkit {
-     }
- 
-     /**
--     * Gets a ban list for the supplied type.
--     * <p>
--     * Bans by name are no longer supported and this method will return
--     * null when trying to request them. The replacement is bans by UUID.
-+     * Gets a ban list for the supplied type. <!-- Paper Remove notice: wrong place -->
-      *
-      * @param type the type of list to fetch, cannot be null
-      * @return a ban list of the specified type
 @@ -0,0 +0,0 @@ public final class Bukkit {
  
      /**
@@ -148,18 +133,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
       */
      public int getTicksPerSpawns(@NotNull SpawnCategory spawnCategory);
  
-@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
-     public Set<OfflinePlayer> getBannedPlayers();
- 
-     /**
--     * Gets a ban list for the supplied type.
--     * <p>
--     * Bans by name are no longer supported and this method will return
--     * null when trying to request them. The replacement is bans by UUID.
-+     * Gets a ban list for the supplied type. <!-- Paper Remove notice: wrong place -->
-      *
-      * @param type the type of list to fetch, cannot be null
-      * @return a ban list of the specified type
 @@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
  
      /**
diff --git a/patches/api/Missing-Entity-Behavior-API.patch b/patches/api/Missing-Entity-Behavior-API.patch
index 925cd16d23..f0a3af3118 100644
--- a/patches/api/Missing-Entity-Behavior-API.patch
+++ b/patches/api/Missing-Entity-Behavior-API.patch
@@ -796,31 +796,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
      /**
       * Represents the various types a Rabbit might be.
-diff --git a/src/main/java/org/bukkit/entity/Raider.java b/src/main/java/org/bukkit/entity/Raider.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/org/bukkit/entity/Raider.java
-+++ b/src/main/java/org/bukkit/entity/Raider.java
-@@ -0,0 +0,0 @@ public interface Raider extends Monster {
-      */
-     @NotNull
-     Sound getCelebrationSound();
-+
-+    // Paper start
-+    /**
-+     * Returns whether the raider is celebrating a raid victory.
-+     *
-+     * @return whether the raider is celebrating a raid victory
-+     */
-+    boolean isCelebrating();
-+
-+    /**
-+     * Sets whether the raider is celebrating a raid victory.
-+     *
-+     * @param celebrating whether the raider is celebrating a raid victory
-+     */
-+    void setCelebrating(boolean celebrating);
-+    // Paper end
- }
 diff --git a/src/main/java/org/bukkit/entity/Ravager.java b/src/main/java/org/bukkit/entity/Ravager.java
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/org/bukkit/entity/Ravager.java
diff --git a/patches/api/Paper-Plugins.patch b/patches/api/Paper-Plugins.patch
index 764840f8b0..c9fe1910f5 100644
--- a/patches/api/Paper-Plugins.patch
+++ b/patches/api/Paper-Plugins.patch
@@ -1444,7 +1444,7 @@ diff --git a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java b/src/ma
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
 +++ b/src/main/java/org/bukkit/plugin/PluginDescriptionFile.java
-@@ -0,0 +0,0 @@ import org.yaml.snakeyaml.nodes.Tag;
+@@ -0,0 +0,0 @@ import org.yaml.snakeyaml.representer.Representer;
   *      inferno.burningdeaths: true
   *</pre></blockquote>
   */
diff --git a/patches/api/Player.setPlayerProfile-API.patch b/patches/api/Player.setPlayerProfile-API.patch
index 77217f246c..61564602c1 100644
--- a/patches/api/Player.setPlayerProfile-API.patch
+++ b/patches/api/Player.setPlayerProfile-API.patch
@@ -54,7 +54,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +    com.destroystokyo.paper.profile.PlayerProfile getPlayerProfile(); // Paper
  
      /**
-      * Checks if this player is banned or not
+      * Checks if this player has had their profile banned.
 diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/org/bukkit/Server.java
diff --git a/patches/api/Properly-remove-the-experimental-smithing-inventory-.patch b/patches/api/Properly-remove-the-experimental-smithing-inventory-.patch
index ef86efbe48..6d3ec058c9 100644
--- a/patches/api/Properly-remove-the-experimental-smithing-inventory-.patch
+++ b/patches/api/Properly-remove-the-experimental-smithing-inventory-.patch
@@ -9,13 +9,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 --- a/src/main/java/org/bukkit/event/inventory/InventoryType.java
 +++ b/src/main/java/org/bukkit/event/inventory/InventoryType.java
 @@ -0,0 +0,0 @@ public enum InventoryType {
-     /**
-      * The new smithing inventory, with 3 CRAFTING slots and 1 RESULT slot.
       *
--     * @apiNote draft, experimental 1.20 API
-+     * @deprecated use {@link #SMITHING}
+      * @deprecated use {@link #SMITHING}
       */
--    @MinecraftExperimental
+-    @Deprecated
 +    @Deprecated(forRemoval = true) // Paper
      SMITHING_NEW(4, "Upgrade Gear"),
      ;
diff --git a/patches/server/Add-API-for-waxed-signs.patch b/patches/server/Add-API-for-waxed-signs.patch
deleted file mode 100644
index 0fa155e9bd..0000000000
--- a/patches/server/Add-API-for-waxed-signs.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jake Potrebic <jake.m.potrebic@gmail.com>
-Date: Thu, 8 Jun 2023 23:22:36 -0700
-Subject: [PATCH] Add API for waxed signs
-
-
-diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
-+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
-@@ -0,0 +0,0 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
-         getSnapshot().setWaxed(!editable);
-     }
- 
-+    // Paper start
-+    @Override
-+    public boolean isWaxed() {
-+        return this.getSnapshot().isWaxed();
-+    }
-+
-+    @Override
-+    public void setWaxed(final boolean waxed) {
-+        this.getSnapshot().setWaxed(waxed);
-+    }
-+    // Paper end
-+
-     @Override
-     public boolean isGlowingText() {
-         return this.front.isGlowingText();
diff --git a/patches/server/Add-EntityInsideBlockEvent.patch b/patches/server/Add-EntityInsideBlockEvent.patch
index 11ec92768c..78f73c5cd5 100644
--- a/patches/server/Add-EntityInsideBlockEvent.patch
+++ b/patches/server/Add-EntityInsideBlockEvent.patch
@@ -97,7 +97,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
      @Override
      public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
 +        if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper
-         if (entity instanceof Ravager && !CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { // CraftBukkit
+         if (entity instanceof Ravager && CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit
              world.destroyBlock(pos, true, entity);
          }
 diff --git a/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java b/src/main/java/net/minecraft/world/level/block/DetectorRailBlock.java
@@ -253,9 +253,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
      public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
          super.entityInside(state, world, pos, entity);
 +        if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper
-         if (world instanceof ServerLevel && entity instanceof Boat && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState()).isCancelled()) { // CraftBukkit
-             world.destroyBlock(new BlockPos(pos), true, entity);
-         }
+         if (world instanceof ServerLevel && entity instanceof Boat) {
+             // CraftBukkit start
+             if (!CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState())) {
 diff --git a/src/main/java/net/minecraft/world/level/block/WebBlock.java b/src/main/java/net/minecraft/world/level/block/WebBlock.java
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/net/minecraft/world/level/block/WebBlock.java
diff --git a/patches/server/Add-EntityZapEvent.patch b/patches/server/Add-EntityZapEvent.patch
index 33ebee0b67..2a60b912b2 100644
--- a/patches/server/Add-EntityZapEvent.patch
+++ b/patches/server/Add-EntityZapEvent.patch
@@ -32,7 +32,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
 +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
 @@ -0,0 +0,0 @@ public class CraftEventFactory {
-         return event;
+         return !event.isCancelled();
      }
  
 +    // Paper start
@@ -43,6 +43,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +    }
 +    // Paper end
 +
-     public static HorseJumpEvent callHorseJumpEvent(Entity horse, float power) {
-         HorseJumpEvent event = new HorseJumpEvent((AbstractHorse) horse.getBukkitEntity(), power);
-         horse.getBukkitEntity().getServer().getPluginManager().callEvent(event);
+     public static boolean callEntityChangeBlockEvent(Entity entity, BlockPos position, net.minecraft.world.level.block.state.BlockState newBlock) {
+         return CraftEventFactory.callEntityChangeBlockEvent(entity, position, newBlock, false);
+     }
diff --git a/patches/server/Add-ThrownEggHatchEvent.patch b/patches/server/Add-ThrownEggHatchEvent.patch
index a80f6cb56a..db2f39695c 100644
--- a/patches/server/Add-ThrownEggHatchEvent.patch
+++ b/patches/server/Add-ThrownEggHatchEvent.patch
@@ -11,17 +11,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
 +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
 @@ -0,0 +0,0 @@ public class ThrownEgg extends ThrowableItemProjectile {
-                     hatchingType = event.getHatchingType();
+                     }
                  }
- 
+                 // CraftBukkit end
 +                // Paper start
 +                com.destroystokyo.paper.event.entity.ThrownEggHatchEvent event = new com.destroystokyo.paper.event.entity.ThrownEggHatchEvent((org.bukkit.entity.Egg) getBukkitEntity(), hatching, b0, hatchingType);
 +                event.callEvent();
-+
 +                b0 = event.getNumHatches();
-+                hatching = event.isHatching();
 +                hatchingType = event.getHatchingType();
 +                // Paper end
-                 if (hatching) {
-                     for (int i = 0; i < b0; ++i) {
-                         Entity entity = this.level().getWorld().createEntity(new org.bukkit.Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F), hatchingType.getEntityClass());
+ 
+                 for (int i = 0; i < b0; ++i) {
+                     Entity entitychicken = this.level().getWorld().createEntity(new org.bukkit.Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F), hatchingType.getEntityClass()); // CraftBukkit
diff --git a/patches/server/Add-player-health-update-API.patch b/patches/server/Add-player-health-update-API.patch
deleted file mode 100644
index ee6dcf17ea..0000000000
--- a/patches/server/Add-player-health-update-API.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: SamB440 <sam@islandearth.net>
-Date: Wed, 17 Nov 2021 12:31:42 +0000
-Subject: [PATCH] Add player health update API
-
-
-diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
-         this.getHandle().maxHealthCache = getMaxHealth();
-     }
- 
--    public void sendHealthUpdate() {
-+    // Paper start
-+    @Override
-+    public void sendHealthUpdate(final double health, final int foodLevel, final float saturationLevel) {
-         // Paper start - cancellable death event
--        ClientboundSetHealthPacket packet = new ClientboundSetHealthPacket(this.getScaledHealth(), this.getHandle().getFoodData().getFoodLevel(), this.getHandle().getFoodData().getSaturationLevel());
-+        ClientboundSetHealthPacket packet = new ClientboundSetHealthPacket((float) health, foodLevel, saturationLevel);
-         if (this.getHandle().queueHealthUpdatePacket) {
-             this.getHandle().queuedHealthUpdatePacket = packet;
-         } else {
-@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
-         // Paper end
-     }
- 
-+    @Override
-+    public void sendHealthUpdate() {
-+        this.sendHealthUpdate(this.getScaledHealth(), this.getHandle().getFoodData().getFoodLevel(), this.getHandle().getFoodData().getSaturationLevel());
-+    }
-+    // Paper end
-+
-     public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
-         if (!this.scaledHealth && !force) {
-             return;
diff --git a/patches/server/Build-system-changes.patch b/patches/server/Build-system-changes.patch
index 050771abfd..3a8579debc 100644
--- a/patches/server/Build-system-changes.patch
+++ b/patches/server/Build-system-changes.patch
@@ -90,7 +90,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +                    Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
  
                      Calendar deadline = Calendar.getInstance();
-                     deadline.add(Calendar.DAY_OF_YEAR, -3);
+                     deadline.add(Calendar.DAY_OF_YEAR, -7);
 diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
diff --git a/patches/server/CB-fixes.patch b/patches/server/CB-fixes.patch
index b002f67081..66002d856e 100644
--- a/patches/server/CB-fixes.patch
+++ b/patches/server/CB-fixes.patch
@@ -29,21 +29,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
          this.structureManager = new StructureManager(this, this.serverLevelData.worldGenOptions(), this.structureCheck); // CraftBukkit
          if ((this.dimension() == Level.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END)) || env == org.bukkit.World.Environment.THE_END) { // CraftBukkit - Allow to create EnderDragonBattle in default and custom END
              this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenOptions().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit
-diff --git a/src/main/java/net/minecraft/world/entity/Marker.java b/src/main/java/net/minecraft/world/entity/Marker.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/net/minecraft/world/entity/Marker.java
-+++ b/src/main/java/net/minecraft/world/entity/Marker.java
-@@ -0,0 +0,0 @@ public class Marker extends Entity {
-     }
- 
-     @Override
--    protected void addPassenger(Entity passenger) {
--        throw new IllegalStateException("Should never addPassenger without checking couldAcceptPassenger()");
-+    protected boolean addPassenger(Entity passenger) { // Paper - fix return type
-+        return false; // Paper
-     }
- 
-     @Override
 diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
diff --git a/patches/server/Don-t-allow-entities-to-ride-themselves-572.patch b/patches/server/Don-t-allow-entities-to-ride-themselves-572.patch
deleted file mode 100644
index c4a7431104..0000000000
--- a/patches/server/Don-t-allow-entities-to-ride-themselves-572.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Alfie Cleveland <alfeh@me.com>
-Date: Sun, 8 Jan 2017 04:31:36 +0000
-Subject: [PATCH] Don't allow entities to ride themselves - #572
-
-
-diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/net/minecraft/world/entity/Entity.java
-+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
-     }
- 
-     protected boolean addPassenger(Entity entity) { // CraftBukkit
-+        if (entity == this) throw new IllegalArgumentException("Entities cannot become a passenger of themselves"); // Paper - issue 572
-         if (entity.getVehicle() != this) {
-             throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
-         } else {
diff --git a/patches/server/EndermanEscapeEvent.patch b/patches/server/EndermanEscapeEvent.patch
index 798d169bf7..21976b9f4f 100644
--- a/patches/server/EndermanEscapeEvent.patch
+++ b/patches/server/EndermanEscapeEvent.patch
@@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
 +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
 @@ -0,0 +0,0 @@ public class EnderMan extends Monster implements NeutralMob {
-         this.setTarget(target, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true);
+         this.setTarget(target, EntityTargetEvent.TargetReason.UNKNOWN, true);
      }
  
 +    // Paper start
@@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +    // Paper end
 +
      @Override
-     public boolean setTarget(LivingEntity entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) {
+     public boolean setTarget(LivingEntity entityliving, EntityTargetEvent.TargetReason reason, boolean fireEvent) {
          if (!super.setTarget(entityliving, reason, fireEvent)) {
 @@ -0,0 +0,0 @@ public class EnderMan extends Monster implements NeutralMob {
          if (this.level().isDay() && this.tickCount >= this.targetChangeTime + 600) {
diff --git a/patches/server/Ensure-entity-passenger-world-matches-ridden-entity.patch b/patches/server/Ensure-entity-passenger-world-matches-ridden-entity.patch
index ae19c8bb22..ff4311d3b3 100644
--- a/patches/server/Ensure-entity-passenger-world-matches-ridden-entity.patch
+++ b/patches/server/Ensure-entity-passenger-world-matches-ridden-entity.patch
@@ -12,13 +12,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
      }
  
-     protected boolean addPassenger(Entity entity) { // CraftBukkit
-+        // Paper start
-+        if (entity.level != this.level) {
-+            LOGGER.error("Entity passenger world must match, cannot add " + entity + " as passenger to " + this, new Throwable());
-+            return false;
-+        }
-+        // Paper end
-         if (entity == this) throw new IllegalArgumentException("Entities cannot become a passenger of themselves"); // Paper - issue 572
-         if (entity.getVehicle() != this) {
-             throw new IllegalStateException("Use x.startRiding(y), not y.addPassenger(x)");
+     public boolean startRiding(Entity entity, boolean force) {
+-        if (entity == this.vehicle) {
++        if (entity == this.vehicle || entity.level != this.level) { // Paper - check level
+             return false;
+         } else if (!entity.couldAcceptPassenger()) {
+             return false;
diff --git a/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch
index 6c5e75a276..56232f75bd 100644
--- a/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch
+++ b/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch
@@ -34,7 +34,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 -            world.setBlockAndUpdate(blockposition1, WeatheringCopper.getFirst(world.getBlockState(blockposition1)));
 +            // Paper start - call EntityChangeBlockEvent
 +            BlockState newBlock = WeatheringCopper.getFirst(world.getBlockState(blockposition1));
-+            if (!CraftEventFactory.callEntityChangeBlockEvent(lightning, blockposition1, newBlock).isCancelled()) {
++            if (CraftEventFactory.callEntityChangeBlockEvent(lightning, blockposition1, newBlock)) {
 +                world.setBlockAndUpdate(blockposition1, newBlock);
 +            }
 +            // Paper end
@@ -74,7 +74,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
          BlockPos blockposition1Final = blockposition1; // CraftBukkit - decompile error
          WeatheringCopper.getPrevious(iblockdata).ifPresent((iblockdata1) -> {
-+            if (!CraftEventFactory.callEntityChangeBlockEvent(lightning, blockposition1Final, iblockdata1).isCancelled()) // Paper - call EntityChangeBlockEvent
++            if (CraftEventFactory.callEntityChangeBlockEvent(lightning, blockposition1Final, iblockdata1)) // Paper - call EntityChangeBlockEvent
              world.setBlockAndUpdate(blockposition1Final, iblockdata1); // CraftBukkit - decompile error
          });
          world.levelEvent(3002, blockposition1, -1);
@@ -87,7 +87,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
                                  if (world.getBlockState(blockPos3).isAir()) {
                                      BlockState blockState = frogSpawn.defaultBlockState();
 +                                    // Paper start
-+                                    if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockPos3, blockState).isCancelled()) {
++                                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockPos3, blockState)) {
 +                                        isPregnant.erase(); // forgot pregnant memory
 +                                        return true;
 +                                    }
@@ -104,7 +104,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
          if (optional4.isPresent()) {
 +            // Paper start - EntityChangeBlockEvent
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, blockPos, optional4.get()).isCancelled()) {
++            if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, blockPos, optional4.get())) {
 +                return InteractionResult.PASS;
 +            }
 +            // Paper end
@@ -120,7 +120,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
              } else {
                  BlockState iblockdata1 = (BlockState) iblockdata.setValue(EndPortalFrameBlock.HAS_EYE, true);
 +                // Paper start
-+                if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(context.getPlayer(), blockposition, iblockdata1).isCancelled()) {
++                if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(context.getPlayer(), blockposition, iblockdata1)) {
 +                    return InteractionResult.PASS;
 +                }
 +                // Paper end
@@ -136,7 +136,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
              Player player = context.getPlayer();
              ItemStack itemStack = context.getItemInHand();
 +            // Paper start - EntityChangeBlockEvent
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, blockPos, state).isCancelled()) {
++            if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, blockPos, state)) {
 +                if (!player.isCreative()) {
 +                    player.containerMenu.sendAllDataToRemote();
 +                }
@@ -155,7 +155,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
          if (context.getClickedFace() != Direction.DOWN && iblockdata.is(BlockTags.CONVERTABLE_TO_MUD) && PotionUtils.getPotion(itemstack) == Potions.WATER) {
 +            // Paper start
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityhuman, blockposition, Blocks.MUD.defaultBlockState()).isCancelled()) {
++            if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityhuman, blockposition, Blocks.MUD.defaultBlockState())) {
 +                entityhuman.containerMenu.sendAllDataToRemote();
 +                return InteractionResult.PASS;
 +            }
@@ -190,7 +190,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
              if (blockState3 != null) {
                  if (!level.isClientSide) {
 +                    // Paper start
-+                    if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(context.getPlayer(), blockPos, blockState3).isCancelled()) {
++                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(context.getPlayer(), blockPos, blockState3)) {
 +                        return InteractionResult.PASS;
 +                    }
 +                    afterAction.run();
@@ -219,9 +219,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
              // CraftBukkit start
              double rand = world.getRandom().nextDouble();
 -            BlockState iblockdata1 = ComposterBlock.addItem(user, state, DummyGeneratorAccess.INSTANCE, pos, stack, rand);
--            if (state == iblockdata1 || org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(user, pos, iblockdata1).isCancelled()) {
+-            if (state == iblockdata1 || !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(user, pos, iblockdata1)) {
 +            BlockState iblockdata1 = null; // Paper
-+            if (false && (state == iblockdata1 || org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(user, pos, iblockdata1).isCancelled())) { // Paper - call it later
++            if (false && (state == iblockdata1 || !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(user, pos, iblockdata1))) { // Paper - move event call into addItem
                  return state;
              }
              iblockdata1 = ComposterBlock.addItem(user, state, world, pos, stack, rand);
@@ -252,7 +252,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
              int j = i + 1;
              BlockState iblockdata1 = (BlockState) iblockdata.setValue(ComposterBlock.LEVEL, j);
 +            // Paper start - move the EntityChangeBlockEvent here to avoid conflict later for the compost events
-+            if (entity != null && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata1).isCancelled()) {
++            if (entity != null && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata1)) {
 +                return null;
 +            }
 +            // Paper end
diff --git a/patches/server/Fix-api-checking-banned-ips.patch b/patches/server/Fix-api-checking-banned-ips.patch
deleted file mode 100644
index 0334e1c24e..0000000000
--- a/patches/server/Fix-api-checking-banned-ips.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jake Potrebic <jake.m.potrebic@gmail.com>
-Date: Wed, 22 Mar 2023 13:12:01 -0700
-Subject: [PATCH] Fix api checking banned ips
-
-
-diff --git a/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java b/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java
-+++ b/src/main/java/org/bukkit/craftbukkit/CraftIpBanList.java
-@@ -0,0 +0,0 @@ public class CraftIpBanList implements org.bukkit.BanList {
-     public boolean isBanned(String target) {
-         Preconditions.checkArgument(target != null, "Target cannot be null");
- 
--        return this.list.isBanned(InetSocketAddress.createUnresolved(target, 0));
-+        return this.list.isBanned(target); // Paper - fix checking banned ips
-     }
- 
-     @Override
diff --git a/patches/server/Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/Fix-cancelled-powdered-snow-bucket-placement.patch
index 984375188f..4f792cc631 100644
--- a/patches/server/Fix-cancelled-powdered-snow-bucket-placement.patch
+++ b/patches/server/Fix-cancelled-powdered-snow-bucket-placement.patch
@@ -25,7 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +++ b/src/main/java/net/minecraft/world/item/ItemStack.java
 @@ -0,0 +0,0 @@ public final class ItemStack {
              int oldCount = this.getCount();
-             ServerLevel world = (ServerLevel) itemactioncontext.getLevel();
+             ServerLevel world = (ServerLevel) context.getLevel();
  
 -            if (!(this.getItem() instanceof BucketItem || this.getItem() instanceof SolidBucketItem)) { // if not bucket
 +            if (!(this.getItem() instanceof BucketItem/* || this.getItem() instanceof SolidBucketItem*/)) { // if not bucket // Paper - capture block states for snow buckets
diff --git a/patches/server/Fix-new-block-data-for-EntityChangeBlockEvent.patch b/patches/server/Fix-new-block-data-for-EntityChangeBlockEvent.patch
index 71b7e2ed92..bf5a1e38fa 100644
--- a/patches/server/Fix-new-block-data-for-EntityChangeBlockEvent.patch
+++ b/patches/server/Fix-new-block-data-for-EntityChangeBlockEvent.patch
@@ -10,11 +10,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 --- a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
 +++ b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
 @@ -0,0 +0,0 @@ public class EatBlockGoal extends Goal {
+                 BlockPos blockposition1 = blockposition.below();
  
                  if (this.level.getBlockState(blockposition1).is(Blocks.GRASS_BLOCK)) {
-                     // CraftBukkit
--                    if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition1, Blocks.AIR.defaultBlockState(), !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) {
-+                    if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition1, Blocks.DIRT.defaultBlockState(), !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { // Paper - Fix wrong block state
+-                    if (CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition1, Blocks.AIR.defaultBlockState(), !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit
++                    if (CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition1, Blocks.DIRT.defaultBlockState(), !this.level.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit // Paper - Fix wrong block state
                          this.level.levelEvent(2001, blockposition1, Block.getId(Blocks.GRASS_BLOCK.defaultBlockState()));
                          this.level.setBlock(blockposition1, Blocks.DIRT.defaultBlockState(), 2);
                      }
@@ -26,8 +26,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
                                  if (WitherBoss.canDestroy(iblockdata)) {
                                      // CraftBukkit start
--                                    if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) {
-+                                    if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, iblockdata.getFluidState().createLegacyBlock()).isCancelled()) { // Paper
+-                                    if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.defaultBlockState())) {
++                                    if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, iblockdata.getFluidState().createLegacyBlock())) { // Paper
                                          continue;
                                      }
                                      // CraftBukkit end
@@ -36,14 +36,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 --- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java
 +++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java
 @@ -0,0 +0,0 @@ public class Ravager extends Raider {
-                     BlockState iblockdata = this.level().getBlockState(blockposition);
-                     Block block = iblockdata.getBlock();
  
--                    if (block instanceof LeavesBlock && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState()).isCancelled()) { // CraftBukkit
-+                    if (block instanceof LeavesBlock && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, iblockdata.getFluidState().createLegacyBlock()).isCancelled()) { // CraftBukkit // Paper
-                         flag = this.level().destroyBlock(blockposition, true, this) || flag;
-                     }
-                 }
+                     if (block instanceof LeavesBlock) {
+                         // CraftBukkit start
+-                        if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState())) {
++                        if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, iblockdata.getFluidState().createLegacyBlock())) { // Paper - use correct block state
+                             continue;
+                         }
+                         // CraftBukkit end
 diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
@@ -52,12 +52,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
                              if (block instanceof InfestedBlock) {
                                  // CraftBukkit start
--                                if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition1, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState()).isCancelled()) {
-+                                // Paper start
-+                                BlockState afterState = world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? net.minecraft.world.level.block.Blocks.AIR.defaultBlockState() : ((InfestedBlock) block).hostStateByInfested(world.getBlockState(blockposition1));
-+                                org.bukkit.event.entity.EntityChangeBlockEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition1, afterState);
-+                                if (event.isCancelled()) {
-+                                // Paper end
+-                                if (!CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition1, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState())) {
++                                // Paper start - use correct block state
++                                final BlockState afterState = world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) ? net.minecraft.world.level.block.Blocks.AIR.defaultBlockState() : ((InfestedBlock) block).hostStateByInfested(world.getBlockState(blockposition1));
++                                if (!CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition1, afterState)) {
++                                    // Paper end - use correct block state
                                      continue;
                                  }
                                  // CraftBukkit end
@@ -69,8 +68,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
          if (!world.isClientSide && projectile.mayInteract(world, blockposition) && projectile instanceof ThrownTrident && projectile.getDeltaMovement().length() > 0.6D) {
              // CraftBukkit start
--            if (CraftEventFactory.callEntityChangeBlockEvent(projectile, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) {
-+            if (CraftEventFactory.callEntityChangeBlockEvent(projectile, blockposition, state.getFluidState().createLegacyBlock()).isCancelled()) { // Paper
+-            if (!CraftEventFactory.callEntityChangeBlockEvent(projectile, blockposition, Blocks.AIR.defaultBlockState())) {
++            if (!CraftEventFactory.callEntityChangeBlockEvent(projectile, blockposition, state.getFluidState().createLegacyBlock())) { // Paper - use correct block state
                  return;
              }
              // CraftBukkit end
diff --git a/patches/server/Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
index 77d52c26dc..3c0ccaceb7 100644
--- a/patches/server/Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
+++ b/patches/server/Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
@@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
                      if (this.item instanceof BlockItem) {
 -                        SoundType soundeffecttype = ((BlockItem) this.item).getBlock().defaultBlockState().getSoundType(); // TODO: not strictly correct, however currently only affects decorated pots
 +                        // Paper start
-+                        BlockPos position = new net.minecraft.world.item.context.BlockPlaceContext(itemactioncontext).getClickedPos();
++                        BlockPos position = new net.minecraft.world.item.context.BlockPlaceContext(context).getClickedPos();
 +                        net.minecraft.world.level.block.state.BlockState blockData = world.getBlockState(position);
 +                        SoundType soundeffecttype = blockData.getSoundType();
 +                        // Paper end
diff --git a/patches/server/Fix-this-stupid-bullshit.patch b/patches/server/Fix-this-stupid-bullshit.patch
index 997faaa22d..6cf977ef88 100644
--- a/patches/server/Fix-this-stupid-bullshit.patch
+++ b/patches/server/Fix-this-stupid-bullshit.patch
@@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
 @@ -0,0 +0,0 @@ public class Main {
                      Calendar deadline = Calendar.getInstance();
-                     deadline.add(Calendar.DAY_OF_YEAR, -3);
+                     deadline.add(Calendar.DAY_OF_YEAR, -7);
                      if (buildDate.before(deadline.getTime())) {
 -                        System.err.println("*** Error, this build is outdated ***");
 +                        // Paper start - This is some stupid bullshit
diff --git a/patches/server/Implement-alternative-item-despawn-rate.patch b/patches/server/Implement-alternative-item-despawn-rate.patch
index fa81e7fe6c..5eef75f5dd 100644
--- a/patches/server/Implement-alternative-item-despawn-rate.patch
+++ b/patches/server/Implement-alternative-item-despawn-rate.patch
@@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 -            if (!this.level().isClientSide && this.age >= this.level().spigotConfig.itemDespawnRate) { // Spigot
 +            if (!this.level().isClientSide && this.age >= this.despawnRate) { // Spigot // Paper
                  // CraftBukkit start - fire ItemDespawnEvent
-                 if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
+                 if (CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
                      this.age = 0;
 @@ -0,0 +0,0 @@ public class ItemEntity extends Entity implements TraceableEntity {
          this.lastTick = MinecraftServer.currentTick;
@@ -45,9 +45,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
      private void tryToMerge(ItemEntity other) {
 @@ -0,0 +0,0 @@ public class ItemEntity extends Entity implements TraceableEntity {
+     public void setItem(ItemStack stack) {
          com.google.common.base.Preconditions.checkArgument(!stack.isEmpty(), "Cannot drop air"); // CraftBukkit
          this.getEntityData().set(ItemEntity.DATA_ITEM, stack);
-         this.getEntityData().markDirty(ItemEntity.DATA_ITEM); // CraftBukkit - SPIGOT-4591, must mark dirty
 +        this.despawnRate = this.level().paperConfig().entities.spawning.altItemDespawnRate.enabled ? this.level().paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), this.level().spigotConfig.itemDespawnRate) : this.level().spigotConfig.itemDespawnRate; // Paper
      }
  
diff --git a/patches/server/Implemented-BlockFailedDispenseEvent.patch b/patches/server/Implemented-BlockFailedDispenseEvent.patch
index 017e82a105..ac9062f8c0 100644
--- a/patches/server/Implemented-BlockFailedDispenseEvent.patch
+++ b/patches/server/Implemented-BlockFailedDispenseEvent.patch
@@ -36,8 +36,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
 +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
 @@ -0,0 +0,0 @@ public class CraftEventFactory {
- 
-         return !event.isCancelled();
+         Bukkit.getPluginManager().callEvent(event);
+         return event;
      }
 +
 +    // Paper start
diff --git a/patches/server/Improve-death-events.patch b/patches/server/Improve-death-events.patch
index 7c6f119de4..e49ce48143 100644
--- a/patches/server/Improve-death-events.patch
+++ b/patches/server/Improve-death-events.patch
@@ -396,12 +396,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
 +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
 @@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
-     }
- 
+     @Override
      public void sendHealthUpdate() {
--        this.getHandle().connection.send(new ClientboundSetHealthPacket(this.getScaledHealth(), this.getHandle().getFoodData().getFoodLevel(), this.getHandle().getFoodData().getSaturationLevel()));
+         FoodData foodData = this.getHandle().getFoodData();
+-        this.sendHealthUpdate(this.getScaledHealth(), foodData.getFoodLevel(), foodData.getSaturationLevel());
 +        // Paper start - cancellable death event
-+        ClientboundSetHealthPacket packet = new ClientboundSetHealthPacket(this.getScaledHealth(), this.getHandle().getFoodData().getFoodLevel(), this.getHandle().getFoodData().getSaturationLevel());
++        ClientboundSetHealthPacket packet = new ClientboundSetHealthPacket(this.getScaledHealth(), foodData.getFoodLevel(), foodData.getSaturationLevel());
 +        if (this.getHandle().queueHealthUpdatePacket) {
 +            this.getHandle().queuedHealthUpdatePacket = packet;
 +        } else {
diff --git a/patches/server/Missing-Entity-Behavior-API.patch b/patches/server/Missing-Entity-Behavior-API.patch
index 22a324a679..f551d3d65f 100644
--- a/patches/server/Missing-Entity-Behavior-API.patch
+++ b/patches/server/Missing-Entity-Behavior-API.patch
@@ -945,8 +945,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java
 +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java
 @@ -0,0 +0,0 @@ public class CraftRabbit extends CraftAnimals implements Rabbit {
- 
-         entity.setVariant(net.minecraft.world.entity.animal.Rabbit.Variant.values()[type.ordinal()]);
+     public void setRabbitType(Type type) {
+         this.getHandle().setVariant(net.minecraft.world.entity.animal.Rabbit.Variant.values()[type.ordinal()]);
      }
 +    // Paper start
 +    @Override
@@ -958,27 +958,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +    public int getMoreCarrotTicks() {
 +        return this.getHandle().moreCarrotTicks;
 +    }
-+    // Paper end
- }
-diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
-+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
-@@ -0,0 +0,0 @@ public abstract class CraftRaider extends CraftMonster implements Raider {
-     public Sound getCelebrationSound() {
-         return CraftSound.getBukkit(this.getHandle().getCelebrateSound());
-     }
-+
-+    // Paper start
-+    @Override
-+    public boolean isCelebrating() {
-+        return this.getHandle().isCelebrating();
-+    }
-+
-+    @Override
-+    public void setCelebrating(boolean celebrating) {
-+        this.getHandle().setCelebrating(celebrating);
-+    }
 +    // Paper end
  }
 diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftRavager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftRavager.java
diff --git a/patches/server/Player.setPlayerProfile-API.patch b/patches/server/Player.setPlayerProfile-API.patch
index e50879ed81..e02b05e242 100644
--- a/patches/server/Player.setPlayerProfile-API.patch
+++ b/patches/server/Player.setPlayerProfile-API.patch
@@ -58,7 +58,7 @@ diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
 +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-@@ -0,0 +0,0 @@ import net.minecraft.world.entity.ai.attributes.Attributes;
+@@ -0,0 +0,0 @@ import net.minecraft.world.food.FoodData;
  import net.minecraft.world.inventory.AbstractContainerMenu;
  import net.minecraft.world.level.GameType;
  import net.minecraft.world.level.block.Blocks;
diff --git a/patches/server/PlayerAttemptPickupItemEvent.patch b/patches/server/PlayerAttemptPickupItemEvent.patch
index ffe242d238..bf3e7fc61a 100644
--- a/patches/server/PlayerAttemptPickupItemEvent.patch
+++ b/patches/server/PlayerAttemptPickupItemEvent.patch
@@ -8,7 +8,7 @@ diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src
 index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
 +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -0,0 +0,0 @@ import net.minecraft.stats.Stats;
+@@ -0,0 +0,0 @@ import org.bukkit.entity.Player;
  import org.bukkit.event.entity.EntityPickupItemEvent;
  import org.bukkit.event.player.PlayerPickupItemEvent;
  // CraftBukkit end
diff --git a/patches/server/PlayerPickupItemEvent-setFlyAtPlayer.patch b/patches/server/PlayerPickupItemEvent-setFlyAtPlayer.patch
index 046fb6bae4..92a2b65edc 100644
--- a/patches/server/PlayerPickupItemEvent-setFlyAtPlayer.patch
+++ b/patches/server/PlayerPickupItemEvent-setFlyAtPlayer.patch
@@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
              if (this.pickupDelay <= 0 && canHold > 0) {
                  itemstack.setCount(canHold);
 @@ -0,0 +0,0 @@ public class ItemEntity extends Entity implements TraceableEntity {
-                 PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
+                 PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
                  playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems());
                  this.level().getCraftServer().getPluginManager().callEvent(playerEvent);
 +                flyAtPlayer = playerEvent.getFlyAtPlayer(); // Paper
diff --git a/patches/server/PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/PortalCreateEvent-needs-to-know-its-entity.patch
index 81ddf2e569..8f78da15e1 100644
--- a/patches/server/PortalCreateEvent-needs-to-know-its-entity.patch
+++ b/patches/server/PortalCreateEvent-needs-to-know-its-entity.patch
@@ -13,7 +13,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
                          if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically
 -                            block.getBlock().onPlace(block, world, newblockposition, oldBlock, true);
-+                            block.getBlock().onPlace(block, world, newblockposition, oldBlock, true, itemactioncontext); // Paper - pass itemactioncontext
++                            block.getBlock().onPlace(block, world, newblockposition, oldBlock, true, context); // Paper - pass context
                          }
  
                          world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point
diff --git a/patches/server/Prevent-empty-items-from-being-added-to-world.patch b/patches/server/Prevent-empty-items-from-being-added-to-world.patch
index 3c8f5b5d86..3d02bf1370 100644
--- a/patches/server/Prevent-empty-items-from-being-added-to-world.patch
+++ b/patches/server/Prevent-empty-items-from-being-added-to-world.patch
@@ -29,5 +29,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 -        com.google.common.base.Preconditions.checkArgument(!stack.isEmpty(), "Cannot drop air"); // CraftBukkit
 +        // com.google.common.base.Preconditions.checkArgument(!stack.isEmpty(), "Cannot drop air"); // CraftBukkit // Paper - Remove check
          this.getEntityData().set(ItemEntity.DATA_ITEM, stack);
-         this.getEntityData().markDirty(ItemEntity.DATA_ITEM); // CraftBukkit - SPIGOT-4591, must mark dirty
          this.despawnRate = this.level().paperConfig().entities.spawning.altItemDespawnRate.enabled ? this.level().paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), this.level().spigotConfig.itemDespawnRate) : this.level().spigotConfig.itemDespawnRate; // Paper
+     }
diff --git a/patches/server/Properly-remove-the-experimental-smithing-inventory-.patch b/patches/server/Properly-remove-the-experimental-smithing-inventory-.patch
deleted file mode 100644
index 8945e36c52..0000000000
--- a/patches/server/Properly-remove-the-experimental-smithing-inventory-.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jake Potrebic <jake.m.potrebic@gmail.com>
-Date: Thu, 8 Jun 2023 14:45:18 -0700
-Subject: [PATCH] Properly remove the experimental smithing inventory type
-
-
-diff --git a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/net/minecraft/world/inventory/SmithingMenu.java
-+++ b/src/main/java/net/minecraft/world/inventory/SmithingMenu.java
-@@ -0,0 +0,0 @@ public class SmithingMenu extends ItemCombinerMenu {
-             return this.bukkitEntity;
-         }
- 
--        org.bukkit.craftbukkit.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventorySmithingNew(
-+        org.bukkit.craftbukkit.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventorySmithing( // Paper
-                 access.getLocation(), this.inputSlots, this.resultSlots);
-         this.bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(), inventory, this);
-         return this.bukkitEntity;
-diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
-+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
-@@ -0,0 +0,0 @@ public class CraftContainer extends AbstractContainerMenu {
-             case STONECUTTER:
-                 return MenuType.STONECUTTER;
-             case SMITHING_NEW:
-+            case SMITHING:
-                 return MenuType.SMITHING;
-             case CREATIVE:
-             case CRAFTING:
-@@ -0,0 +0,0 @@ public class CraftContainer extends AbstractContainerMenu {
-                 this.delegate = new HopperMenu(windowId, bottom, top);
-                 break;
-             case ANVIL:
--            case SMITHING:
-                 this.setupAnvil(top, bottom); // SPIGOT-6783 - manually set up slots so we can use the delegated inventory and not the automatically created one
-                 break;
-             case BEACON:
-@@ -0,0 +0,0 @@ public class CraftContainer extends AbstractContainerMenu {
-             case MERCHANT:
-                 this.delegate = new MerchantMenu(windowId, bottom);
-                 break;
-+            case SMITHING: // Paper
-             case SMITHING_NEW:
-                 this.setupSmithing(top, bottom); // SPIGOT-6783 - manually set up slots so we can use the delegated inventory and not the automatically created one
-                 break;
-diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
-+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
-@@ -0,0 +0,0 @@ public class CraftInventory implements Inventory {
-             return InventoryType.COMPOSTER;
-         } else if (this.inventory instanceof JukeboxBlockEntity) {
-             return InventoryType.JUKEBOX;
--        } else if (this instanceof CraftInventorySmithingNew) {
--            return InventoryType.SMITHING_NEW;
-+            // Paper - remove
-         } else {
-             return InventoryType.CHEST;
-         }
-diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java
-+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java
-@@ -0,0 +0,0 @@ public class CraftInventorySmithing extends CraftResultInventory implements Smit
- 
-     @Override
-     public ItemStack getResult() {
--        return getItem(2);
-+        return getItem(net.minecraft.world.inventory.SmithingMenu.RESULT_SLOT); // Paper
-     }
- 
-     @Override
-     public void setResult(ItemStack item) {
--        setItem(2, item);
-+        setItem(net.minecraft.world.inventory.SmithingMenu.RESULT_SLOT, item); // Paper
-     }
- 
-     @Override
-diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithingNew.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithingNew.java
-deleted file mode 100644
-index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithingNew.java
-+++ /dev/null
-@@ -0,0 +0,0 @@
--package org.bukkit.craftbukkit.inventory;
--
--import net.minecraft.world.Container;
--import net.minecraft.world.inventory.ResultContainer;
--import org.bukkit.Location;
--import org.bukkit.inventory.ItemStack;
--import org.bukkit.inventory.Recipe;
--import org.bukkit.inventory.SmithingInventory;
--
--public class CraftInventorySmithingNew extends CraftResultInventory implements SmithingInventory {
--
--    private final Location location;
--
--    public CraftInventorySmithingNew(Location location, Container inventory, ResultContainer resultInventory) {
--        super(inventory, resultInventory);
--        this.location = location;
--    }
--
--    @Override
--    public ResultContainer getResultInventory() {
--        return (ResultContainer) super.getResultInventory();
--    }
--
--    @Override
--    public Location getLocation() {
--        return this.location;
--    }
--
--    @Override
--    public ItemStack getResult() {
--        return getItem(3);
--    }
--
--    @Override
--    public void setResult(ItemStack item) {
--        setItem(3, item);
--    }
--
--    @Override
--    public Recipe getRecipe() {
--        net.minecraft.world.item.crafting.Recipe recipe = this.getResultInventory().getRecipeUsed();
--        return (recipe == null) ? null : recipe.toBukkitRecipe();
--    }
--}
diff --git a/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch
index c1093120a8..a46534b52e 100644
--- a/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch
+++ b/patches/server/Show-Paper-in-client-crashes-server-lists-and-Mojang.patch
@@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 --- a/src/main/java/org/bukkit/craftbukkit/Main.java
 +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
 @@ -0,0 +0,0 @@ public class Main {
-                     deadline.add(Calendar.DAY_OF_YEAR, -3);
+                     deadline.add(Calendar.DAY_OF_YEAR, -7);
                      if (buildDate.before(deadline.getTime())) {
                          System.err.println("*** Error, this build is outdated ***");
 -                        System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
diff --git a/patches/server/Turtle-API.patch b/patches/server/Turtle-API.patch
index 8ccba0b1c7..6ec0a52216 100644
--- a/patches/server/Turtle-API.patch
+++ b/patches/server/Turtle-API.patch
@@ -37,12 +37,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
                  } else if (this.turtle.layEggCounter > this.adjustedTickDelay(200)) {
                      Level world = this.turtle.level();
  
-                     // CraftBukkit start
--                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.turtle, this.blockPos.above(), (BlockState) Blocks.TURTLE_EGG.defaultBlockState().setValue(TurtleEggBlock.EGGS, this.turtle.random.nextInt(4) + 1)).isCancelled()) {
+-                    if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.turtle, this.blockPos.above(), (BlockState) Blocks.TURTLE_EGG.defaultBlockState().setValue(TurtleEggBlock.EGGS, this.turtle.random.nextInt(4) + 1))) { // CraftBukkit
++                    // CraftBukkit start
 +                    // Paper start
 +                    int eggCount = this.turtle.random.nextInt(4) + 1;
 +                    com.destroystokyo.paper.event.entity.TurtleLayEggEvent layEggEvent = new com.destroystokyo.paper.event.entity.TurtleLayEggEvent((org.bukkit.entity.Turtle) this.turtle.getBukkitEntity(), io.papermc.paper.util.MCUtil.toLocation(this.turtle.level(), this.blockPos.above()), eggCount);
-+                    if (layEggEvent.callEvent() && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.turtle, this.blockPos.above(), Blocks.TURTLE_EGG.defaultBlockState().setValue(TurtleEggBlock.EGGS, layEggEvent.getEggCount())).isCancelled()) {
++                    if (layEggEvent.callEvent() && org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.turtle, this.blockPos.above(), Blocks.TURTLE_EGG.defaultBlockState().setValue(TurtleEggBlock.EGGS, layEggEvent.getEggCount()))) {
                      world.playSound((Player) null, blockposition, SoundEvents.TURTLE_LAY_EGG, SoundSource.BLOCKS, 0.3F, 0.9F + world.random.nextFloat() * 0.2F);
                      BlockPos blockposition1 = this.blockPos.above();
 -                    BlockState iblockdata = (BlockState) Blocks.TURTLE_EGG.defaultBlockState().setValue(TurtleEggBlock.EGGS, this.turtle.random.nextInt(4) + 1);
diff --git a/patches/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/patches/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch
index 9e2b2334bd..dd01def422 100644
--- a/patches/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch
+++ b/patches/server/Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch
@@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
 +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
 @@ -0,0 +0,0 @@ public class Creeper extends Monster implements PowerableMob {
-                 this.spawnLingeringCloud();
+             // CraftBukkit start
              } else {
                  this.swell = 0;
 +                this.entityData.set(DATA_IS_IGNITED, Boolean.valueOf(false)); // Paper
diff --git a/patches/server/Use-ConcurrentHashMap-in-JsonList.patch b/patches/server/Use-ConcurrentHashMap-in-JsonList.patch
index b47711e018..1ee09412f2 100644
--- a/patches/server/Use-ConcurrentHashMap-in-JsonList.patch
+++ b/patches/server/Use-ConcurrentHashMap-in-JsonList.patch
@@ -89,7 +89,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
      public void remove(K key) {
 @@ -0,0 +0,0 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
-     // CraftBukkit end
+     }
  
      public boolean isEmpty() {
 -        return this.map.size() < 1;
diff --git a/patches/server/Use-a-Shared-Random-for-Entities.patch b/patches/server/Use-a-Shared-Random-for-Entities.patch
index 67e9f60cf4..f2f74ba205 100644
--- a/patches/server/Use-a-Shared-Random-for-Entities.patch
+++ b/patches/server/Use-a-Shared-Random-for-Entities.patch
@@ -106,8 +106,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
      public Squid(EntityType<? extends Squid> type, Level world) {
          super(type, world);
--        this.random.setSeed((long) this.getId());
-+        //this.random.setSeed((long) this.getId()); // Paper - we set the random to shared, do not clobber the seed
+-        this.random.setSeed((long)this.getId());
++        //this.random.setSeed((long)this.getId()); // Paper - we set the random to shared, do not clobber the seed
          this.tentacleSpeed = 1.0F / (this.random.nextFloat() + 1.0F) * 0.2F;
      }
  
diff --git a/patches/server/force-entity-dismount-during-teleportation.patch b/patches/server/force-entity-dismount-during-teleportation.patch
index 7ae95425a8..1b88b43446 100644
--- a/patches/server/force-entity-dismount-during-teleportation.patch
+++ b/patches/server/force-entity-dismount-during-teleportation.patch
@@ -42,7 +42,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
  
      }
 @@ -0,0 +0,0 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
-         return true; // CraftBukkit
+         }
      }
  
 -    protected boolean removePassenger(Entity entity) { // CraftBukkit
diff --git a/work/Bukkit b/work/Bukkit
index 0c5d870919..01aa02eb53 160000
--- a/work/Bukkit
+++ b/work/Bukkit
@@ -1 +1 @@
-Subproject commit 0c5d870919854258f5f51530a66d839fba20e288
+Subproject commit 01aa02eb531ba554701b02986193c874ccb7635d
diff --git a/work/CraftBukkit b/work/CraftBukkit
index b6b514b7ec..b60a95c8cf 160000
--- a/work/CraftBukkit
+++ b/work/CraftBukkit
@@ -1 +1 @@
-Subproject commit b6b514b7ec49531dc334c4e7bfee2569cfe33398
+Subproject commit b60a95c8cf3ca3a6353be1ecf2a6baa6f9072c57
diff --git a/work/Spigot b/work/Spigot
index c62f4bd99c..9ebce8afbf 160000
--- a/work/Spigot
+++ b/work/Spigot
@@ -1 +1 @@
-Subproject commit c62f4bd99c6f565026bdba8eabb941b0c58a19d8
+Subproject commit 9ebce8afbf14ba4b857ce5befe716fecbd6d8879