aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--build.gradle.kts2
-rw-r--r--gradle.properties4
-rw-r--r--paper-api-generator/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java2
-rw-r--r--paper-api-generator/generated/io/papermc/paper/registry/keys/BiomeKeys.java2
-rw-r--r--paper-api-generator/generated/io/papermc/paper/registry/keys/GameEventKeys.java2
-rw-r--r--paper-api-generator/generated/io/papermc/paper/registry/keys/StructureKeys.java2
-rw-r--r--paper-api-generator/generated/io/papermc/paper/registry/keys/StructureTypeKeys.java2
-rw-r--r--paper-api-generator/generated/io/papermc/paper/registry/keys/TrimMaterialKeys.java2
-rw-r--r--paper-api-generator/generated/io/papermc/paper/registry/keys/TrimPatternKeys.java2
-rw-r--r--patches/api/0001-Convert-project-to-Gradle.patch4
-rw-r--r--patches/api/0056-Fix-upstream-javadocs.patch15
-rw-r--r--patches/api/0394-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch (renamed from patches/api/0394-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch)62
-rw-r--r--patches/server/0001-Setup-Gradle-project.patch4
-rw-r--r--patches/server/0009-MC-Utils.patch4
-rw-r--r--patches/server/0010-Adventure.patch12
-rw-r--r--patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch2
-rw-r--r--patches/server/0019-Paper-Plugins.patch2
-rw-r--r--patches/server/0020-Plugin-remapping.patch2
-rw-r--r--patches/server/0023-Timings-v2.patch6
-rw-r--r--patches/server/0027-Support-components-in-ItemMeta.patch10
-rw-r--r--patches/server/0035-Implement-Paper-VersionChecker.patch2
-rw-r--r--patches/server/0037-Player-affects-spawning-API.patch2
-rw-r--r--patches/server/0040-Prevent-block-entity-and-entity-crashes.patch4
-rw-r--r--patches/server/0045-Fix-lag-from-explosions-processing-dead-entities.patch2
-rw-r--r--patches/server/0046-Optimize-explosions.patch4
-rw-r--r--patches/server/0047-Disable-explosion-knockback.patch2
-rw-r--r--patches/server/0052-Add-BeaconEffectEvent.patch2
-rw-r--r--patches/server/0074-Handle-Item-Meta-Inconsistencies.patch12
-rw-r--r--patches/server/0133-Add-option-to-make-parrots-stay-on-shoulders-despite.patch2
-rw-r--r--patches/server/0142-Shoulder-Entities-Release-API.patch2
-rw-r--r--patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch2
-rw-r--r--patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch8
-rw-r--r--patches/server/0176-Toggleable-player-crits.patch2
-rw-r--r--patches/server/0187-Configurable-sprint-interruption-on-attack.patch2
-rw-r--r--patches/server/0205-PlayerReadyArrowEvent.patch2
-rw-r--r--patches/server/0206-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch4
-rw-r--r--patches/server/0212-InventoryCloseEvent-Reason-API.patch2
-rw-r--r--patches/server/0229-Remove-unnecessary-itemmeta-handling.patch2
-rw-r--r--patches/server/0248-Allow-chests-to-be-placed-with-NBT-data.patch2
-rw-r--r--patches/server/0259-Catch-JsonParseException-in-block-entity-names.patch27
-rw-r--r--patches/server/0259-Catch-JsonParseException-in-entity-and-block-entity-.patch116
-rw-r--r--patches/server/0273-force-entity-dismount-during-teleportation.patch2
-rw-r--r--patches/server/0314-Optimize-call-to-getFluid-for-explosions.patch2
-rw-r--r--patches/server/0335-Add-Raw-Byte-ItemStack-Serialization.patch2
-rw-r--r--patches/server/0341-Dead-Player-s-shouldn-t-be-able-to-move.patch2
-rw-r--r--patches/server/0382-Add-permission-for-command-blocks.patch4
-rw-r--r--patches/server/0389-Convert-legacy-attributes-in-Item-Meta.patch4
-rw-r--r--patches/server/0410-Prevent-headless-pistons-from-being-created.patch2
-rw-r--r--patches/server/0415-PortalCreateEvent-needs-to-know-its-entity.patch2
-rw-r--r--patches/server/0424-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch2
-rw-r--r--patches/server/0440-Fix-client-lag-on-advancement-loading.patch2
-rw-r--r--patches/server/0442-Beacon-API-custom-effect-ranges.patch2
-rw-r--r--patches/server/0459-Expose-LivingEntity-hurt-direction.patch2
-rw-r--r--patches/server/0515-Expand-world-key-API.patch2
-rw-r--r--patches/server/0520-Expose-protocol-version.patch2
-rw-r--r--patches/server/0530-Add-PlayerDeepSleepEvent.patch2
-rw-r--r--patches/server/0532-Add-PlayerBedFailEnterEvent.patch2
-rw-r--r--patches/server/0535-Introduce-beacon-activation-deactivation-events.patch2
-rw-r--r--patches/server/0547-ItemStack-repair-check-API.patch2
-rw-r--r--patches/server/0554-Fix-item-default-attributes-API.patch2
-rw-r--r--patches/server/0572-Fix-PlayerDropItemEvent-using-wrong-item.patch2
-rw-r--r--patches/server/0579-Fix-kick-event-leave-message-not-being-sent.patch2
-rw-r--r--patches/server/0587-Add-PlayerSetSpawnEvent.patch2
-rw-r--r--patches/server/0591-Add-EntityDamageItemEvent.patch2
-rw-r--r--patches/server/0599-Add-missing-team-sidebar-display-slots.patch2
-rw-r--r--patches/server/0602-Get-entity-default-attributes.patch2
-rw-r--r--patches/server/0606-Add-critical-damage-API.patch6
-rw-r--r--patches/server/0608-Add-isCollidable-methods-to-various-places.patch2
-rw-r--r--patches/server/0611-Add-Raw-Byte-Entity-Serialization.patch2
-rw-r--r--patches/server/0613-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch2
-rw-r--r--patches/server/0641-Fix-upstreams-block-state-factories.patch4
-rw-r--r--patches/server/0680-Fix-cancelled-powdered-snow-bucket-placement.patch2
-rw-r--r--patches/server/0712-Expand-PlayerItemDamageEvent.patch2
-rw-r--r--patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch16
-rw-r--r--patches/server/0733-Nameable-Banner-API.patch2
-rw-r--r--patches/server/0734-Don-t-broadcast-messages-to-command-blocks.patch4
-rw-r--r--patches/server/0753-Add-NamespacedKey-biome-methods.patch2
-rw-r--r--patches/server/0767-Fix-a-bunch-of-vanilla-bugs.patch2
-rw-r--r--patches/server/0784-Add-PrePlayerAttackEntityEvent.patch2
-rw-r--r--patches/server/0803-Add-BlockLockCheckEvent.patch4
-rw-r--r--patches/server/0810-Flying-Fall-Damage.patch2
-rw-r--r--patches/server/0811-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch177
-rw-r--r--patches/server/0811-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch (renamed from patches/server/0812-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch)0
-rw-r--r--patches/server/0812-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch67
-rw-r--r--patches/server/0821-Add-EntityFertilizeEggEvent.patch2
-rw-r--r--patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch8
-rw-r--r--patches/server/0842-Expand-PlayerItemMendEvent.patch2
-rw-r--r--patches/server/0845-Fix-block-place-logic.patch2
-rw-r--r--patches/server/0846-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch2
-rw-r--r--patches/server/0853-Add-event-for-player-editing-sign.patch2
-rw-r--r--patches/server/0857-Call-missing-BlockDispenseEvent.patch2
-rw-r--r--patches/server/0859-Optimize-player-lookups-for-beacons.patch2
-rw-r--r--patches/server/0866-ExperienceOrb-should-call-EntitySpawnEvent.patch2
-rw-r--r--patches/server/0874-Only-capture-actual-tree-growth.patch2
-rw-r--r--patches/server/0880-Fix-custom-statistic-criteria-creation.patch2
-rw-r--r--patches/server/0891-Add-BlockFace-to-BlockDamageEvent.patch2
-rw-r--r--patches/server/0901-Add-titleOverride-to-InventoryOpenEvent.patch2
-rw-r--r--patches/server/0918-Fix-UnsafeValues-loadAdvancement.patch2
-rw-r--r--patches/server/0936-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch4
-rw-r--r--patches/server/0937-Restore-vanilla-entity-drops-behavior.patch2
-rw-r--r--patches/server/0938-Dont-resend-blocks-on-interactions.patch2
-rw-r--r--patches/server/0942-Add-experience-points-API.patch2
-rw-r--r--patches/server/0943-Add-drops-to-shear-events.patch2
-rw-r--r--patches/server/0944-Add-PlayerShieldDisableEvent.patch2
-rw-r--r--patches/server/0952-Add-api-for-spawn-egg-texture-colors.patch2
-rw-r--r--patches/server/0953-Add-Lifecycle-Event-system.patch2
-rw-r--r--patches/server/0954-ItemStack-Tooltip-API.patch2
-rw-r--r--patches/server/0969-Fix-DamageSource-API.patch12
-rw-r--r--patches/server/0976-Rewrite-dataconverter-system.patch2
-rw-r--r--patches/server/0981-Rewrite-chunk-system.patch2
-rw-r--r--patches/server/0984-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch2
-rw-r--r--patches/server/0999-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch2
-rw-r--r--patches/server/1020-Optimize-Hoppers.patch8
-rw-r--r--patches/server/1022-Actually-optimise-explosions.patch4
-rw-r--r--patches/server/1031-Properly-handle-pdc-and-custom-tags-in-ItemMeta.patch37
-rw-r--r--patches/server/1031-handle-converting-old-serialized-names-to-new-names.patch (renamed from patches/server/1032-handle-converting-old-serialized-names-to-new-names.patch)8
-rw-r--r--patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch (renamed from patches/server/1033-Add-config-for-mobs-immune-to-default-effects.patch)0
-rw-r--r--patches/server/1033-Deep-clone-nbt-tags-in-PDC.patch (renamed from patches/server/1034-Deep-clone-nbt-tags-in-PDC.patch)4
-rw-r--r--patches/server/1034-Support-old-UUID-format-for-NBT.patch (renamed from patches/server/1035-Support-old-UUID-format-for-NBT.patch)0
-rw-r--r--patches/server/1035-Fix-shield-disable-inconsistency.patch (renamed from patches/server/1036-Fix-shield-disable-inconsistency.patch)0
-rw-r--r--patches/server/1036-Write-SavedData-IO-async.patch (renamed from patches/server/1037-Write-SavedData-IO-async.patch)0
-rw-r--r--patches/server/1037-Don-t-lose-removed-data-components-in-ItemMeta.patch (renamed from patches/server/1038-Don-t-lose-removed-data-components-in-ItemMeta.patch)8
-rw-r--r--patches/server/1038-Add-experimental-improved-give-command.patch (renamed from patches/server/1039-Add-experimental-improved-give-command.patch)0
-rw-r--r--patches/server/1039-Handle-Large-Packets-disconnecting-client.patch (renamed from patches/server/1040-Handle-Large-Packets-disconnecting-client.patch)0
-rw-r--r--patches/server/1040-Fix-ItemFlags.patch (renamed from patches/server/1041-Fix-ItemFlags.patch)24
-rw-r--r--patches/server/1041-Fix-helmet-damage-reduction-inconsistencies.patch (renamed from patches/server/1042-Fix-helmet-damage-reduction-inconsistencies.patch)2
-rw-r--r--patches/server/1042-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch (renamed from patches/server/1043-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch)0
-rw-r--r--patches/server/1043-improve-checking-handled-tags-in-itemmeta.patch (renamed from patches/server/1044-improve-checking-handled-tags-in-itemmeta.patch)6
-rw-r--r--patches/server/1044-General-ItemMeta-fixes.patch (renamed from patches/server/1045-General-ItemMeta-fixes.patch)14
m---------work/BuildData0
m---------work/Bukkit0
m---------work/CraftBukkit0
m---------work/Spigot0
134 files changed, 303 insertions, 588 deletions
diff --git a/README.md b/README.md
index f5b3dde06a..8277f968cb 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ How To (Plugin Developers)
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
- <version>1.20.5-R0.1-SNAPSHOT</version>
+ <version>1.20.6-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
```
@@ -53,7 +53,7 @@ repositories {
}
dependencies {
- compileOnly("io.papermc.paper:paper-api:1.20.5-R0.1-SNAPSHOT")
+ compileOnly("io.papermc.paper:paper-api:1.20.6-R0.1-SNAPSHOT")
}
java {
diff --git a/build.gradle.kts b/build.gradle.kts
index b87e347cf5..df39c8a1fa 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -68,7 +68,7 @@ repositories {
}
dependencies {
- paramMappings("net.fabricmc:yarn:1.20.5+build.1:mergedv2")
+ paramMappings("net.fabricmc:yarn:1.20.6+build.1:mergedv2")
remapper("net.fabricmc:tiny-remapper:0.10.2:fat")
decompiler("org.vineflower:vineflower:1.10.1")
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.13")
diff --git a/gradle.properties b/gradle.properties
index 744935f5ac..cd64968334 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,6 +1,6 @@
group=io.papermc.paper
-version=1.20.5-R0.1-SNAPSHOT
-mcVersion=1.20.5
+version=1.20.6-R0.1-SNAPSHOT
+mcVersion=1.20.6
# Set to true while updating Minecraft version
updatingMinecraft=false
diff --git a/paper-api-generator/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/paper-api-generator/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java
index 7ff40b6c33..43f4deacef 100644
--- a/paper-api-generator/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java
+++ b/paper-api-generator/generated/com/destroystokyo/paper/entity/ai/VanillaGoal.java
@@ -70,7 +70,7 @@ import org.jetbrains.annotations.NotNull;
"unused",
"SpellCheckingInspection"
})
-@GeneratedFrom("1.20.5")
+@GeneratedFrom("1.20.6")
public interface VanillaGoal<T extends Mob> extends Goal<T> {
GoalKey<AbstractHorse> RANDOM_STAND = create("random_stand", AbstractHorse.class);
diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/BiomeKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/BiomeKeys.java
index 3bd15016b0..173550253f 100644
--- a/paper-api-generator/generated/io/papermc/paper/registry/keys/BiomeKeys.java
+++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/BiomeKeys.java
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
"unused",
"SpellCheckingInspection"
})
-@GeneratedFrom("1.20.5")
+@GeneratedFrom("1.20.6")
@ApiStatus.Experimental
public final class BiomeKeys {
/**
diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/GameEventKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/GameEventKeys.java
index 26ce70c2ab..f220c63b8a 100644
--- a/paper-api-generator/generated/io/papermc/paper/registry/keys/GameEventKeys.java
+++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/GameEventKeys.java
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
"unused",
"SpellCheckingInspection"
})
-@GeneratedFrom("1.20.5")
+@GeneratedFrom("1.20.6")
@ApiStatus.Experimental
public final class GameEventKeys {
/**
diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureKeys.java
index 8b679c044e..22d644aa24 100644
--- a/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureKeys.java
+++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureKeys.java
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.NotNull;
"unused",
"SpellCheckingInspection"
})
-@GeneratedFrom("1.20.5")
+@GeneratedFrom("1.20.6")
@ApiStatus.Experimental
public final class StructureKeys {
/**
diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureTypeKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureTypeKeys.java
index 8e7628c6a4..bd36a38558 100644
--- a/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureTypeKeys.java
+++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/StructureTypeKeys.java
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
"unused",
"SpellCheckingInspection"
})
-@GeneratedFrom("1.20.5")
+@GeneratedFrom("1.20.6")
@ApiStatus.Experimental
public final class StructureTypeKeys {
/**
diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimMaterialKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimMaterialKeys.java
index e52bb12173..0635cecd49 100644
--- a/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimMaterialKeys.java
+++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimMaterialKeys.java
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
"unused",
"SpellCheckingInspection"
})
-@GeneratedFrom("1.20.5")
+@GeneratedFrom("1.20.6")
@ApiStatus.Experimental
public final class TrimMaterialKeys {
/**
diff --git a/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimPatternKeys.java b/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimPatternKeys.java
index 72d23426af..b3e92fbbe2 100644
--- a/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimPatternKeys.java
+++ b/paper-api-generator/generated/io/papermc/paper/registry/keys/TrimPatternKeys.java
@@ -24,7 +24,7 @@ import org.jetbrains.annotations.NotNull;
"unused",
"SpellCheckingInspection"
})
-@GeneratedFrom("1.20.5")
+@GeneratedFrom("1.20.6")
@ApiStatus.Experimental
public final class TrimPatternKeys {
/**
diff --git a/patches/api/0001-Convert-project-to-Gradle.patch b/patches/api/0001-Convert-project-to-Gradle.patch
index 81ee13ba35..68949cde0c 100644
--- a/patches/api/0001-Convert-project-to-Gradle.patch
+++ b/patches/api/0001-Convert-project-to-Gradle.patch
@@ -124,7 +124,7 @@ index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c4
+}
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
-index 278ecb12ecdb5e1fdf394a1c990a4d849e53e05e..0000000000000000000000000000000000000000
+index bea9ac450de7ec05f9752d253743e95d79c1cd14..0000000000000000000000000000000000000000
--- a/pom.xml
+++ /dev/null
@@ -1,267 +0,0 @@
@@ -135,7 +135,7 @@ index 278ecb12ecdb5e1fdf394a1c990a4d849e53e05e..00000000000000000000000000000000
-
- <groupId>org.spigotmc</groupId>
- <artifactId>spigot-api</artifactId>
-- <version>1.20.5-R0.1-SNAPSHOT</version>
+- <version>1.20.6-R0.1-SNAPSHOT</version>
- <packaging>jar</packaging>
-
- <name>Spigot-API</name>
diff --git a/patches/api/0056-Fix-upstream-javadocs.patch b/patches/api/0056-Fix-upstream-javadocs.patch
index 1aa0e45854..e671e3d8da 100644
--- a/patches/api/0056-Fix-upstream-javadocs.patch
+++ b/patches/api/0056-Fix-upstream-javadocs.patch
@@ -600,16 +600,15 @@ index a0f6f1af304190b4c5db4b284d460f625eeb7801..7e21548cac8515c281ec86853e9272ab
* The Block is already broken as this event is called, so #getBlock() will be
* AIR in most cases. Use #getBlockState() for more Information about the broken
diff --git a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
-index 44f7f6939a27b9a0a796d91eac4b7c97ec90a643..641c71ab66bd2499b35cf3c1d533fd105d096e10 100644
+index e534954457a9961a26dbec7ac035bec07e1d6694..8309b030c2120f1496d244f3ebc1094def41c869 100644
--- a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
+++ b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
-@@ -7,7 +7,9 @@ import org.bukkit.event.HandlerList;
- import org.jetbrains.annotations.NotNull;
-
- /**
-- * Called when a block explodes
-+ * Called when a block explodes interacting with blocks. The
-+ * event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING}
+@@ -13,6 +13,9 @@ import org.jetbrains.annotations.NotNull;
+ * Note that due to the nature of explosions, {@link #getBlock()} will always be
+ * an air block. {@link #getExplodedBlockState()} should be used to get
+ * information about the block state that exploded.
++ * <p>
++ * The event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING}
+ * is disabled as no block interaction will occur.
*/
public class BlockExplodeEvent extends BlockEvent implements Cancellable {
diff --git a/patches/api/0394-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/api/0394-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch
index de7e84ef8b..88530a6a65 100644
--- a/patches/api/0394-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
+++ b/patches/api/0394-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch
@@ -1,69 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <[email protected]>
Date: Fri, 22 Oct 2021 16:24:17 -0700
-Subject: [PATCH] Add exploded block state to BlockExplodeEvent and
- EntityDamageByBlockEvent
+Subject: [PATCH] Add exploded block state to EntityDamageByBlockEvent
diff --git a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
-index 641c71ab66bd2499b35cf3c1d533fd105d096e10..7dcbb75170296c1dd1d784a032bf369602328b29 100644
+index 8309b030c2120f1496d244f3ebc1094def41c869..a7c297364805c58ae16895055d8eae0484384b7d 100644
--- a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
+++ b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java
-@@ -10,18 +10,31 @@ import org.jetbrains.annotations.NotNull;
- * Called when a block explodes interacting with blocks. The
- * event isn't called if the {@link org.bukkit.GameRule#MOB_GRIEFING}
- * is disabled as no block interaction will occur.
-+ * <p>
-+ * The {@link Block} returned by this event is not necessarily
-+ * the block that caused the explosion, just the block at the location where
-+ * the explosion originated. See {@link #getExplodedBlockState()}
- */
- public class BlockExplodeEvent extends BlockEvent implements Cancellable {
- private static final HandlerList handlers = new HandlerList();
- private boolean cancel;
- private final List<Block> blocks;
- private float yield;
-+ private final org.bukkit.block.BlockState explodedBlockState; // Paper
-
-+ @Deprecated @io.papermc.paper.annotation.DoNotUse // Paper
- public BlockExplodeEvent(@NotNull final Block what, @NotNull final List<Block> blocks, final float yield) {
-+ // Paper start
-+ this(what, blocks, yield, null);
-+ }
-+ @org.jetbrains.annotations.ApiStatus.Internal
-+ public BlockExplodeEvent(@NotNull final Block what, @NotNull final List<Block> blocks, final float yield, @org.jetbrains.annotations.Nullable org.bukkit.block.BlockState explodedBlockState) {
-+ // Paper end
- super(what);
- this.blocks = blocks;
- this.yield = yield;
+@@ -32,6 +32,7 @@ public class BlockExplodeEvent extends BlockEvent implements Cancellable {
this.cancel = false;
-+ this.explodedBlockState = explodedBlockState; // Paper
- }
-
- @Override
-@@ -34,6 +47,22 @@ public class BlockExplodeEvent extends BlockEvent implements Cancellable {
- this.cancel = cancel;
}
-+ // Paper start
-+ /**
-+ * Get a capture of the block that directly caused
-+ * the explosion, like a bed or respawn anchor. This
-+ * block state is not placed so {@link org.bukkit.block.BlockState#isPlaced}
-+ * will be false.
-+ * <p>
-+ * Can be null if no block directly caused the explosion.
-+ *
-+ * @return the exploded block state or null if not applicable
-+ */
-+ public @org.jetbrains.annotations.Nullable org.bukkit.block.BlockState getExplodedBlockState() {
-+ return this.explodedBlockState;
-+ }
-+ // Paper end
-+
- /**
- * Returns the list of blocks that would have been removed or were removed
- * from the explosion event.
++ @io.papermc.paper.annotation.DoNotUse // Paper
+ @Deprecated(forRemoval = true)
+ public BlockExplodeEvent(@NotNull final Block what, @NotNull final List<Block> blocks, final float yield) {
+ this(what, what.getState(), blocks, yield);
diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java
index 467a0d6cabc5e860628be3b1e62de773efde5d2e..1fb15e2ade8ff3c4d662eca87b078b4577f786e1 100644
--- a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java
diff --git a/patches/server/0001-Setup-Gradle-project.patch b/patches/server/0001-Setup-Gradle-project.patch
index 0305c825b8..6b5a62cd37 100644
--- a/patches/server/0001-Setup-Gradle-project.patch
+++ b/patches/server/0001-Setup-Gradle-project.patch
@@ -160,7 +160,7 @@ index 0000000000000000000000000000000000000000..a457cf30d37037ce09fbe5d26e051b95
+}
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
-index 37928a37028bb7ee4843d42f256675e000823774..0000000000000000000000000000000000000000
+index 4fabd6c37587aa6a9af11566d64c6b49f5bfadaa..0000000000000000000000000000000000000000
--- a/pom.xml
+++ /dev/null
@@ -1,604 +0,0 @@
@@ -170,7 +170,7 @@ index 37928a37028bb7ee4843d42f256675e000823774..00000000000000000000000000000000
- <groupId>org.spigotmc</groupId>
- <artifactId>spigot</artifactId>
- <packaging>jar</packaging>
-- <version>1.20.5-R0.1-SNAPSHOT</version>
+- <version>1.20.6-R0.1-SNAPSHOT</version>
- <name>Spigot</name>
- <url>https://www.spigotmc.org/</url>
-
diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch
index eb822ff0c4..57c76efb81 100644
--- a/patches/server/0009-MC-Utils.patch
+++ b/patches/server/0009-MC-Utils.patch
@@ -7111,7 +7111,7 @@ index f73604d762efbac400d40f536ec1782fca584efa..4701bf9ee203f2f15b0b68e84bbfa2c4
super(type, world);
this.xpReward = 5;
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index a5d1cd1966ad85ad0a241bee9caa8fd7b7424017..2b8b220bf1e132b230abe14770da53de84db9818 100644
+index 7442e2b880f6410d3ca57a563f3ad77158a4c8ba..bf19e8e8aa96d646f057b8727f2f01ad2e2497cd 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -952,6 +952,25 @@ public final class ItemStack implements DataComponentHolder {
@@ -8131,7 +8131,7 @@ index 0000000000000000000000000000000000000000..909b2c98e7a9117d2f737245e4661792
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 2ee0f83f18477fe2c759dc1ccc5ee18dbe791527..38d72d95b1f3ab23710f3335177c59ea6a25270e 100644
+index cbbb404a6966fc72d17d0ec735d08c1be52b2d4f..3f91fce6df9b87a6e84df21ed04f25be3729814b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -105,8 +105,17 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch
index 3ba9b0bbf2..a93bef8177 100644
--- a/patches/server/0010-Adventure.patch
+++ b/patches/server/0010-Adventure.patch
@@ -3255,7 +3255,7 @@ index ed54c81a3269360acce674aa4e1d54ccb2461841..c9c849534c3998cfcab7ddcb12a71ccb
}
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index 2b8b220bf1e132b230abe14770da53de84db9818..96da768f55ad835a1a55bf359f0d7278bc232304 100644
+index bf19e8e8aa96d646f057b8727f2f01ad2e2497cd..d6b02a946bd18ea71278a5026468ec49fabd3a3b 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -186,7 +186,15 @@ public final class ItemStack implements DataComponentHolder {
@@ -5141,10 +5141,10 @@ index 9c57b883783145ad4483481a2c2e7f0f188cd174..b653c2c80e8e8524ea6d7625c6a86f82
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index 7a5110efc5af1be6644b7afecd6ac025c20e6794..b79f29ccd512ec7d2a8f6a885c1a96dfd58e7dc5 100644
+index 64c039bd3b248bd508a2c298032fa9f984b37694..9a22459f15cff45a234c1d497aca27a5433570f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -843,6 +843,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -850,6 +850,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
}
@@ -5163,7 +5163,7 @@ index 7a5110efc5af1be6644b7afecd6ac025c20e6794..b79f29ccd512ec7d2a8f6a885c1a96df
@Override
public String getDisplayName() {
return CraftChatMessage.fromComponent(this.displayName);
-@@ -873,6 +885,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -880,6 +892,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return this.itemName != null;
}
@@ -5182,7 +5182,7 @@ index 7a5110efc5af1be6644b7afecd6ac025c20e6794..b79f29ccd512ec7d2a8f6a885c1a96df
@Override
public String getLocalizedName() {
return this.getDisplayName();
-@@ -892,6 +916,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -899,6 +923,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return this.lore != null && !this.lore.isEmpty();
}
@@ -5565,7 +5565,7 @@ index b963d471b33cacaeec385dba6b2bf369e3d4426f..51094fe6e37d3c0fad2682353f8de3d1
boolean hadFormat = false;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 38d72d95b1f3ab23710f3335177c59ea6a25270e..da97b4e91b7952f1459e59c74447a659842990bc 100644
+index 3f91fce6df9b87a6e84df21ed04f25be3729814b..e57ba8af99f0ac0151ec1d4c4279393ace6826e4 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -76,6 +76,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch
index 1e2b0376b9..13b4a47b8f 100644
--- a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch
+++ b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch
@@ -216,7 +216,7 @@ index 0000000000000000000000000000000000000000..8f07539a82f449ad217e316a7513a170
+
+}
diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
-index cb9f8567ba6aae41a6cde519ac0cff0169a7cea7..333d6d82584fb3bf4e0fce7b03bc2d9c4094deb9 100644
+index fc6e13e4f2408ccbfa645eae2d7ebf4dcfc21908..badd85a92f38caae257181f67a322fc79599d1ce 100644
--- a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
+++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java
@@ -31,6 +31,7 @@ import net.kyori.adventure.text.flattener.ComponentFlattener;
diff --git a/patches/server/0019-Paper-Plugins.patch b/patches/server/0019-Paper-Plugins.patch
index cd028c0ffb..7a19309b99 100644
--- a/patches/server/0019-Paper-Plugins.patch
+++ b/patches/server/0019-Paper-Plugins.patch
@@ -7326,7 +7326,7 @@ index 909b2c98e7a9117d2f737245e4661792ffafb744..d96399e9bf1a58db5a4a22e58abb99e7
@Override
public FileConfiguration getConfig() {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index da97b4e91b7952f1459e59c74447a659842990bc..fb8d14a2bdaaa25a2237fa4161388439ea8cfc0f 100644
+index e57ba8af99f0ac0151ec1d4c4279393ace6826e4..c8c66f78335868100adbb4d044037168872d5f94 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -421,6 +421,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0020-Plugin-remapping.patch b/patches/server/0020-Plugin-remapping.patch
index 2f0aa23fa7..1306de91cd 100644
--- a/patches/server/0020-Plugin-remapping.patch
+++ b/patches/server/0020-Plugin-remapping.patch
@@ -1916,7 +1916,7 @@ index 45160b93a24dc74f6368441e2a4fe659ceaf5bf5..6573e72d041714ccc2bf0e3c8734bc21
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index fb8d14a2bdaaa25a2237fa4161388439ea8cfc0f..fdeec67b7f71700f88714b8ad734a5525fb119fd 100644
+index c8c66f78335868100adbb4d044037168872d5f94..96f0c447354d8081c614e466b0c17bfdb43c6fe7 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -72,6 +72,7 @@ import org.bukkit.potion.PotionType;
diff --git a/patches/server/0023-Timings-v2.patch b/patches/server/0023-Timings-v2.patch
index 95b3510486..79cf655baa 100644
--- a/patches/server/0023-Timings-v2.patch
+++ b/patches/server/0023-Timings-v2.patch
@@ -1527,10 +1527,10 @@ index 991ebf07bc0608df0a12f1f26e581cc93255ae01..946001c57c326f2d2f0677bca954e855
private String descriptionId;
@Nullable
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index 09ae9c3398e77ee575636a4ebe9e31b447c9fb8e..6eef8da8ead8a044aac757693d719ceea431515e 100644
+index 099f85ec8b427392947e815e0b85d7ec49369bc3..fb495fcbf42be3825bfb785a9887148c54f5b00b 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -33,10 +33,12 @@ import org.bukkit.inventory.InventoryHolder;
+@@ -34,10 +34,12 @@ import org.bukkit.inventory.InventoryHolder;
// CraftBukkit end
import org.spigotmc.CustomTimingsHandler; // Spigot
@@ -2005,7 +2005,7 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222
+ } // Paper
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index fdeec67b7f71700f88714b8ad734a5525fb119fd..9ae089c6dbb1cc919b005fd9672a690f89ca2b42 100644
+index 96f0c447354d8081c614e466b0c17bfdb43c6fe7..71a3a506f92b6881602b2e77a9b5ecfb6930cb2a 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -213,6 +213,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0027-Support-components-in-ItemMeta.patch b/patches/server/0027-Support-components-in-ItemMeta.patch
index 8164a26fa7..c99655cebc 100644
--- a/patches/server/0027-Support-components-in-ItemMeta.patch
+++ b/patches/server/0027-Support-components-in-ItemMeta.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Support components in ItemMeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index 780b7e971a9d4fda1a9c78790c7969a0799f51ab..e663c996146986bc02efb05b4fb452913e4015d7 100644
+index 9a22459f15cff45a234c1d497aca27a5433570f7..9c139f25eaef3c1b93fbf254cb08c6a449288ec8 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -860,11 +860,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -867,11 +867,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return CraftChatMessage.fromComponent(this.displayName);
}
@@ -32,7 +32,7 @@ index 780b7e971a9d4fda1a9c78790c7969a0799f51ab..e663c996146986bc02efb05b4fb45291
@Override
public boolean hasDisplayName() {
return this.displayName != null;
-@@ -1038,6 +1050,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1045,6 +1057,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromComponent));
}
@@ -47,7 +47,7 @@ index 780b7e971a9d4fda1a9c78790c7969a0799f51ab..e663c996146986bc02efb05b4fb45291
@Override
public void setLore(List<String> lore) {
if (lore == null || lore.isEmpty()) {
-@@ -1052,6 +1072,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1059,6 +1079,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@@ -69,7 +69,7 @@ index 780b7e971a9d4fda1a9c78790c7969a0799f51ab..e663c996146986bc02efb05b4fb45291
@Override
public boolean hasCustomModelData() {
return this.customModelData != null;
-@@ -1675,6 +1710,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1682,6 +1717,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
for (Object object : addFrom) {
diff --git a/patches/server/0035-Implement-Paper-VersionChecker.patch b/patches/server/0035-Implement-Paper-VersionChecker.patch
index 484e0425d5..60bbc34484 100644
--- a/patches/server/0035-Implement-Paper-VersionChecker.patch
+++ b/patches/server/0035-Implement-Paper-VersionChecker.patch
@@ -140,7 +140,7 @@ index 0000000000000000000000000000000000000000..22a55be34fde453fedd987173d95b8b3
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 9ae089c6dbb1cc919b005fd9672a690f89ca2b42..2f21520106aa848a9108937474570a8c4e723cfb 100644
+index 71a3a506f92b6881602b2e77a9b5ecfb6930cb2a..2c1df47a3ef416b63ac26d7eb33fc85f5b760d23 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -474,6 +474,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0037-Player-affects-spawning-API.patch b/patches/server/0037-Player-affects-spawning-API.patch
index 63452c1938..5c8acbaed6 100644
--- a/patches/server/0037-Player-affects-spawning-API.patch
+++ b/patches/server/0037-Player-affects-spawning-API.patch
@@ -73,7 +73,7 @@ index 8256af275e468a5aa506f0af22428f4082204956..c71d4f91df7ec1cf26888b00fac444bc
entityzombie.finalizeSpawn(worldserver, this.level().getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.REINFORCEMENT, (SpawnGroupData) null);
worldserver.addFreshEntityWithPassengers(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index da52fdde1a17c230b4da2c58708fa69ebcf13431..81db0e4e4bced556d35978a10c9d9789ec527830 100644
+index 7a95aff16a973b7b7d00e8409a252d4a2f6c41bf..a1c5e5913430404838205bc4a04b2afcff9d9046 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -193,6 +193,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0040-Prevent-block-entity-and-entity-crashes.patch b/patches/server/0040-Prevent-block-entity-and-entity-crashes.patch
index ada6a4d53e..1b4eff07fa 100644
--- a/patches/server/0040-Prevent-block-entity-and-entity-crashes.patch
+++ b/patches/server/0040-Prevent-block-entity-and-entity-crashes.patch
@@ -26,10 +26,10 @@ index 5f881af95bd5ee94daadfd9e5d64ee6d411255c4..472df81e4aef21e0cf2684a9e04d6ce1
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index 6eef8da8ead8a044aac757693d719ceea431515e..0883e1755eae316faaeae8bf95763a0f80313c5a 100644
+index fb495fcbf42be3825bfb785a9887148c54f5b00b..8d281ce2a0e44b97957cea2992e273abc86bd157 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -262,7 +262,12 @@ public abstract class BlockEntity {
+@@ -263,7 +263,12 @@ public abstract class BlockEntity {
return s + " // " + this.getClass().getCanonicalName();
});
if (this.level != null) {
diff --git a/patches/server/0045-Fix-lag-from-explosions-processing-dead-entities.patch b/patches/server/0045-Fix-lag-from-explosions-processing-dead-entities.patch
index 7dd0adcea0..390dc10580 100644
--- a/patches/server/0045-Fix-lag-from-explosions-processing-dead-entities.patch
+++ b/patches/server/0045-Fix-lag-from-explosions-processing-dead-entities.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix lag from explosions processing dead entities
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index 73cc11cf4732ede545e924d07480cae14c3ef226..8307c3e77ddc80a02f420503d67ae06fb973dc09 100644
+index 296de8e9ae1284d4805932e746291d1148f7f8eb..b8b142f573b297ba72d45be3ae4c2729f3cffe1e 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -226,7 +226,7 @@ public class Explosion {
diff --git a/patches/server/0046-Optimize-explosions.patch b/patches/server/0046-Optimize-explosions.patch
index 09b16b2e38..50bb8f8a47 100644
--- a/patches/server/0046-Optimize-explosions.patch
+++ b/patches/server/0046-Optimize-explosions.patch
@@ -22,7 +22,7 @@ index fcb2d06f088a938b5bb76e6b42581d8f292d2eaf..231fba80a25601cdfba4f6f44ac7c288
this.profiler.popPush("connection");
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index 8307c3e77ddc80a02f420503d67ae06fb973dc09..c769da15f1d0bdbd2bce412aa9fae6d10d1177f7 100644
+index b8b142f573b297ba72d45be3ae4c2729f3cffe1e..157eac2a0a92f13ec191ee07774bdb3680e7e5b5 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -278,7 +278,7 @@ public class Explosion {
@@ -34,7 +34,7 @@ index 8307c3e77ddc80a02f420503d67ae06fb973dc09..c769da15f1d0bdbd2bce412aa9fae6d1
double d13;
if (entity instanceof LivingEntity) {
-@@ -532,4 +532,84 @@ public class Explosion {
+@@ -534,4 +534,84 @@ public class Explosion {
private BlockInteraction() {}
}
diff --git a/patches/server/0047-Disable-explosion-knockback.patch b/patches/server/0047-Disable-explosion-knockback.patch
index 5f8f4d41c0..aef7f59ef6 100644
--- a/patches/server/0047-Disable-explosion-knockback.patch
+++ b/patches/server/0047-Disable-explosion-knockback.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Disable explosion knockback
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index c769da15f1d0bdbd2bce412aa9fae6d10d1177f7..94f72ff58ac5206878a81e89d32e81c17b1bd1fb 100644
+index 157eac2a0a92f13ec191ee07774bdb3680e7e5b5..754ca46d11dfe0495aa3109b68b1032e6d7d76e9 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -284,7 +284,7 @@ public class Explosion {
diff --git a/patches/server/0052-Add-BeaconEffectEvent.patch b/patches/server/0052-Add-BeaconEffectEvent.patch
index 4273bf29eb..52b61d4284 100644
--- a/patches/server/0052-Add-BeaconEffectEvent.patch
+++ b/patches/server/0052-Add-BeaconEffectEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add BeaconEffectEvent
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
-index c731730abe50c521e5ce22b5fd8844ea1caed7ac..d3ef3d9a67bc54a4c82a39718f01201201dfc44c 100644
+index 2508e06ef33a4c219b330aec7d5311c5702b8e1b..cf48d4531821c2b1b031a63c8f007aa7d3fbef1d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -1,5 +1,6 @@
diff --git a/patches/server/0074-Handle-Item-Meta-Inconsistencies.patch b/patches/server/0074-Handle-Item-Meta-Inconsistencies.patch
index 17f9ccc1d9..69c778fc16 100644
--- a/patches/server/0074-Handle-Item-Meta-Inconsistencies.patch
+++ b/patches/server/0074-Handle-Item-Meta-Inconsistencies.patch
@@ -150,7 +150,7 @@ index b6521462d193bff83ace1dc694c6d957a7173969..d302767e8f01fdfcba9c22e2e35677af
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index e663c996146986bc02efb05b4fb452913e4015d7..954aa31f5890deacbf2004aed8722360a87da7f1 100644
+index 9c139f25eaef3c1b93fbf254cb08c6a449288ec8..0c385b713234a74ceba802f67f74e4ecab93e269 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
@@ -195,7 +195,7 @@ index e663c996146986bc02efb05b4fb452913e4015d7..954aa31f5890deacbf2004aed8722360
}
if (meta.hasAttributeModifiers()) {
-@@ -385,8 +388,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -391,8 +394,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@@ -206,7 +206,7 @@ index e663c996146986bc02efb05b4fb452913e4015d7..954aa31f5890deacbf2004aed8722360
tag.entrySet().forEach((entry) -> {
Holder<net.minecraft.world.item.enchantment.Enchantment> id = entry.getKey();
-@@ -640,13 +643,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -646,13 +649,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return modifiers;
}
@@ -222,7 +222,7 @@ index e663c996146986bc02efb05b4fb452913e4015d7..954aa31f5890deacbf2004aed8722360
for (Map.Entry<?, ?> entry : ench.entrySet()) {
// Doctor older enchants
String enchantKey = entry.getKey().toString();
-@@ -963,14 +966,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -970,14 +973,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public Map<Enchantment, Integer> getEnchants() {
@@ -239,7 +239,7 @@ index e663c996146986bc02efb05b4fb452913e4015d7..954aa31f5890deacbf2004aed8722360
}
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
-@@ -1506,7 +1509,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1513,7 +1516,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.customModelData = this.customModelData;
clone.blockData = this.blockData;
if (this.enchantments != null) {
@@ -248,7 +248,7 @@ index e663c996146986bc02efb05b4fb452913e4015d7..954aa31f5890deacbf2004aed8722360
}
if (this.hasAttributeModifiers()) {
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
-@@ -1826,4 +1829,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1833,4 +1836,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return (result != null) ? result : Optional.empty();
}
diff --git a/patches/server/0133-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/patches/server/0133-Add-option-to-make-parrots-stay-on-shoulders-despite.patch
index 26653206d0..869abf5e86 100644
--- a/patches/server/0133-Add-option-to-make-parrots-stay-on-shoulders-despite.patch
+++ b/patches/server/0133-Add-option-to-make-parrots-stay-on-shoulders-despite.patch
@@ -32,7 +32,7 @@ index 31ccca2a4e94cb1b3f43de38907634f7e6e18aa5..385dd65af8b526d128ac4c99cecdb69a
case RELEASE_SHIFT_KEY:
this.player.setShiftKeyDown(false);
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 81db0e4e4bced556d35978a10c9d9789ec527830..4ac2d47df8e805b4f895951e839a0af8df7127cc 100644
+index a1c5e5913430404838205bc4a04b2afcff9d9046..0654cca68acefccec82cc138acba30515a336cfb 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -588,6 +588,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0142-Shoulder-Entities-Release-API.patch b/patches/server/0142-Shoulder-Entities-Release-API.patch
index 5cffe32839..9db14c66fd 100644
--- a/patches/server/0142-Shoulder-Entities-Release-API.patch
+++ b/patches/server/0142-Shoulder-Entities-Release-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Shoulder Entities Release API
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 4ac2d47df8e805b4f895951e839a0af8df7127cc..e292c1ab45d2618c4e852875107ec1819dba85c4 100644
+index 0654cca68acefccec82cc138acba30515a336cfb..e81acc5c982cd14bc8a3aa5bf06e9636179b8555 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1982,20 +1982,45 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch
index 7d1fe2ef5f..cb530598f0 100644
--- a/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch
+++ b/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index e292c1ab45d2618c4e852875107ec1819dba85c4..259ec0dea938758f43560b1ed7f46c1042984774 100644
+index e81acc5c982cd14bc8a3aa5bf06e9636179b8555..c1c0df2f4cf032a004568ab0e8f21db91e9dc705 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1243,7 +1243,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch
index 2ca3917af8..7a3041007e 100644
--- a/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch
+++ b/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch
@@ -13,10 +13,10 @@ also Avoid NPE during CraftBlockEntityState load if could not get TE
If Tile Entity was null, correct Sign to return empty lines instead of null
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index 0883e1755eae316faaeae8bf95763a0f80313c5a..90b218ebc947a1d8a8c7dfc677fe145b6386654a 100644
+index 8d281ce2a0e44b97957cea2992e273abc86bd157..d22cc83725cee3df20bb6f99de23aceb62923eef 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -57,6 +57,7 @@ public abstract class BlockEntity {
+@@ -58,6 +58,7 @@ public abstract class BlockEntity {
this.type = type;
this.worldPosition = pos.immutable();
this.blockState = state;
@@ -24,7 +24,7 @@ index 0883e1755eae316faaeae8bf95763a0f80313c5a..90b218ebc947a1d8a8c7dfc677fe145b
}
public static BlockPos getPosFromTag(CompoundTag nbt) {
-@@ -78,7 +79,7 @@ public abstract class BlockEntity {
+@@ -79,7 +80,7 @@ public abstract class BlockEntity {
// CraftBukkit start - read container
protected void loadAdditional(CompoundTag nbt, HolderLookup.Provider registryLookup) {
@@ -33,7 +33,7 @@ index 0883e1755eae316faaeae8bf95763a0f80313c5a..90b218ebc947a1d8a8c7dfc677fe145b
net.minecraft.nbt.Tag persistentDataTag = nbt.get("PublicBukkitValues");
if (persistentDataTag instanceof CompoundTag) {
-@@ -342,8 +343,15 @@ public abstract class BlockEntity {
+@@ -353,8 +354,15 @@ public abstract class BlockEntity {
// CraftBukkit start - add method
public InventoryHolder getOwner() {
diff --git a/patches/server/0176-Toggleable-player-crits.patch b/patches/server/0176-Toggleable-player-crits.patch
index 5f23bbc174..df29b0135d 100644
--- a/patches/server/0176-Toggleable-player-crits.patch
+++ b/patches/server/0176-Toggleable-player-crits.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Toggleable player crits
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 259ec0dea938758f43560b1ed7f46c1042984774..fecb622cb33fd75b87b055fb40f127cda6a22a7d 100644
+index c1c0df2f4cf032a004568ab0e8f21db91e9dc705..715a66018afa8d67f6e078e1157886390a2ad5dd 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1251,6 +1251,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0187-Configurable-sprint-interruption-on-attack.patch b/patches/server/0187-Configurable-sprint-interruption-on-attack.patch
index 19fef02dc1..1b98985534 100644
--- a/patches/server/0187-Configurable-sprint-interruption-on-attack.patch
+++ b/patches/server/0187-Configurable-sprint-interruption-on-attack.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Configurable sprint interruption on attack
If the sprint interruption is disabled players continue sprinting when they attack entities.
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index fecb622cb33fd75b87b055fb40f127cda6a22a7d..0fa9cb53706482f5ea385ce4355273b67911b23a 100644
+index 715a66018afa8d67f6e078e1157886390a2ad5dd..c7865bb6fa7fbeee365a70a4858b0addb36d4165 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1299,8 +1299,12 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0205-PlayerReadyArrowEvent.patch b/patches/server/0205-PlayerReadyArrowEvent.patch
index 5675770a19..875fc3aa58 100644
--- a/patches/server/0205-PlayerReadyArrowEvent.patch
+++ b/patches/server/0205-PlayerReadyArrowEvent.patch
@@ -7,7 +7,7 @@ Called when a player is firing a bow and the server is choosing an arrow to use.
Plugins can skip selection of certain arrows and control which is used.
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 0fa9cb53706482f5ea385ce4355273b67911b23a..705a756522473681516d60946ddd917647650bd4 100644
+index c7865bb6fa7fbeee365a70a4858b0addb36d4165..338903091e43b71baa46157a95629c2e6b27b992 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -2219,18 +2219,29 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0206-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch b/patches/server/0206-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch
index 424865e8cf..16837a9f75 100644
--- a/patches/server/0206-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch
+++ b/patches/server/0206-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch
@@ -179,7 +179,7 @@ index 38c27b4aa37e8b046e3eccdde3f527eb555da6f8..05dee42941a842bf4bba9480a2c04a14
}
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 705a756522473681516d60946ddd917647650bd4..4e1c032c7cdca81021c280a15db89e63a90ffe42 100644
+index 338903091e43b71baa46157a95629c2e6b27b992..0efd7b3d748d90b3359560aa717a017092ae0e47 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1295,7 +1295,7 @@ public abstract class Player extends LivingEntity {
@@ -218,7 +218,7 @@ index 9f9b7373c9a714597858ddcd8932e31b902cf5a1..f7f26d595072372004143c4e26506ed5
public abstract void explode();
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index 94f72ff58ac5206878a81e89d32e81c17b1bd1fb..b5b29210d9a6125d98e7dd737ca25f40545e512b 100644
+index 754ca46d11dfe0495aa3109b68b1032e6d7d76e9..4c7795e1ba7bb3135fcf5bab1c8aa857b8e7417b 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -303,6 +303,16 @@ public class Explosion {
diff --git a/patches/server/0212-InventoryCloseEvent-Reason-API.patch b/patches/server/0212-InventoryCloseEvent-Reason-API.patch
index a1467b88e7..78d2e875de 100644
--- a/patches/server/0212-InventoryCloseEvent-Reason-API.patch
+++ b/patches/server/0212-InventoryCloseEvent-Reason-API.patch
@@ -109,7 +109,7 @@ index d25c762e449e2bce20487454ad52363b35b9af96..3273c3f06c142d4e3c947ca846459f4a
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(entityplayer.getDisplayName()))); // Paper - Adventure
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 4e1c032c7cdca81021c280a15db89e63a90ffe42..9cc9c6f7e211d9cf42a050f3a265d0bceaf7fd40 100644
+index 0efd7b3d748d90b3359560aa717a017092ae0e47..b27a6719edd47f7ecb3f8c5560a36fc201efea36 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -277,7 +277,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0229-Remove-unnecessary-itemmeta-handling.patch b/patches/server/0229-Remove-unnecessary-itemmeta-handling.patch
index ad3868499a..bf8b2dfd3b 100644
--- a/patches/server/0229-Remove-unnecessary-itemmeta-handling.patch
+++ b/patches/server/0229-Remove-unnecessary-itemmeta-handling.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Remove unnecessary itemmeta handling
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index 96da768f55ad835a1a55bf359f0d7278bc232304..fb345894fec5e81d3c35af9812927220a7d56cd1 100644
+index d6b02a946bd18ea71278a5026468ec49fabd3a3b..6dd441484dbae1818a927773a6e6c663c70ccd0e 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -168,7 +168,7 @@ public final class ItemStack implements DataComponentHolder {
diff --git a/patches/server/0248-Allow-chests-to-be-placed-with-NBT-data.patch b/patches/server/0248-Allow-chests-to-be-placed-with-NBT-data.patch
index 68138d557c..1a3e71696c 100644
--- a/patches/server/0248-Allow-chests-to-be-placed-with-NBT-data.patch
+++ b/patches/server/0248-Allow-chests-to-be-placed-with-NBT-data.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Allow chests to be placed with NBT data
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index fb345894fec5e81d3c35af9812927220a7d56cd1..bf3785e3b347ebc1ce1e044c9db1a9d23c80f880 100644
+index 6dd441484dbae1818a927773a6e6c663c70ccd0e..91f342912372326a6ced16c23550da7727d6d3ad 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -469,6 +469,7 @@ public final class ItemStack implements DataComponentHolder {
diff --git a/patches/server/0259-Catch-JsonParseException-in-block-entity-names.patch b/patches/server/0259-Catch-JsonParseException-in-block-entity-names.patch
new file mode 100644
index 0000000000..92699c4219
--- /dev/null
+++ b/patches/server/0259-Catch-JsonParseException-in-block-entity-names.patch
@@ -0,0 +1,27 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Noah van der Aa <[email protected]>
+Date: Mon, 29 Apr 2024 23:12:33 +0200
+Subject: [PATCH] Catch JsonParseException in block entity names
+
+As a result, data that no longer parses correctly will not crash the server
+instead just logging the exception and continuing (and in most cases should
+fix the data)
+
+Player data is fixed pretty much immediately but some block data (like
+Shulkers) may need to be changed in order for it to re-save properly
+
+No more crashing though.
+
+diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
+index 81d9a4e6bc1bc4f992ecb77b176daf89d645bbf2..e79b1ccbdf12006d72401b5be1ac25187033ec59 100644
+--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
++++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
+@@ -151,7 +151,7 @@ public class SkullBlockEntity extends BlockEntity {
+ }
+
+ if (nbt.contains("custom_name", 8)) {
+- this.customName = Component.Serializer.fromJson(nbt.getString("custom_name"), registryLookup);
++ this.customName = BlockEntity.parseCustomNameSafe(nbt.getString("custom_name"), registryLookup); // Paper
+ } else {
+ this.customName = null;
+ }
diff --git a/patches/server/0259-Catch-JsonParseException-in-entity-and-block-entity-.patch b/patches/server/0259-Catch-JsonParseException-in-entity-and-block-entity-.patch
deleted file mode 100644
index f96f0429bc..0000000000
--- a/patches/server/0259-Catch-JsonParseException-in-entity-and-block-entity-.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Zach Brown <[email protected]>
-Date: Sat, 22 Sep 2018 15:56:59 -0400
-Subject: [PATCH] Catch JsonParseException in entity and block entity names
-
-As a result, data that no longer parses correctly will not crash the server
-instead just logging the exception and continuing (and in most cases should
-fix the data)
-
-Player data is fixed pretty much immediately but some block data (like
-Shulkers) may need to be changed in order for it to re-save properly
-
-No more crashing though.
-
-diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
-index c95a0af32178fe24448a5ae7a229c86ec883e8de..5c401c7e30ed5f6f32b1ad6523537aa46173cff5 100644
---- a/src/main/java/io/papermc/paper/util/MCUtil.java
-+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
-@@ -558,4 +558,19 @@ public final class MCUtil {
-
- return builder.build();
- }
-+
-+ @Nullable
-+ public static net.minecraft.network.chat.Component getBaseComponentFromNbt(final String key, final net.minecraft.nbt.CompoundTag compound, final net.minecraft.core.HolderLookup.Provider lookupProvider) {
-+ if (!compound.contains(key)) {
-+ return null;
-+ }
-+ final String string = compound.getString(key);
-+ try {
-+ return net.minecraft.network.chat.Component.Serializer.fromJson(string, lookupProvider);
-+ } catch (com.google.gson.JsonParseException e) {
-+ org.bukkit.Bukkit.getLogger().warning("Unable to parse " + key + " from " + compound +": " + e.getMessage());
-+ }
-+
-+ return null;
-+ }
- }
-diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
-index 626e4fe03dea008907823b49f0dd936bbf7e4e04..2d0eac7a8aa94ed6c4ec024bc6024440cbeac702 100644
---- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
-+++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
-@@ -75,7 +75,7 @@ public abstract class BaseCommandBlock implements CommandSource {
- this.command = nbt.getString("Command");
- this.successCount = nbt.getInt("SuccessCount");
- if (nbt.contains("CustomName", 8)) {
-- this.setCustomName(Component.Serializer.fromJson(nbt.getString("CustomName"), registries));
-+ this.setCustomName(io.papermc.paper.util.MCUtil.getBaseComponentFromNbt("CustomName", nbt, registries)); // Paper - Catch ParseException
- } else {
- this.setCustomName((Component) null);
- }
-diff --git a/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java
-index df4cd333ecd5c90e910df0c7c5ab5aa44c182903..2656e06ab2269141a13011eaa906f601887ca3e2 100644
---- a/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java
-+++ b/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java
-@@ -77,7 +77,7 @@ public class BannerBlockEntity extends BlockEntity implements Nameable {
- protected void loadAdditional(CompoundTag nbt, HolderLookup.Provider registryLookup) {
- super.loadAdditional(nbt, registryLookup);
- if (nbt.contains("CustomName", 8)) {
-- this.name = Component.Serializer.fromJson(nbt.getString("CustomName"), registryLookup);
-+ this.name = io.papermc.paper.util.MCUtil.getBaseComponentFromNbt("CustomName", nbt, registryLookup); // Paper - Catch ParseException
- }
-
- if (nbt.contains("patterns")) {
-diff --git a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
-index ee3b370b6b36914146db33a3211b6bbd2f8f16b7..ff3f26c31bd11b48f48e354ea6b33aa55dcbff5d 100644
---- a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
-+++ b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
-@@ -39,7 +39,7 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co
- super.loadAdditional(nbt, registryLookup);
- this.lockKey = LockCode.fromTag(nbt);
- if (nbt.contains("CustomName", 8)) {
-- this.name = Component.Serializer.fromJson(nbt.getString("CustomName"), registryLookup);
-+ this.name = io.papermc.paper.util.MCUtil.getBaseComponentFromNbt("CustomName", nbt, registryLookup); // Paper - Catch ParseException
- }
-
- }
-diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
-index d3ef3d9a67bc54a4c82a39718f01201201dfc44c..18450017bc3df2f0b1a5715e6021e8e5defa24a1 100644
---- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
-+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
-@@ -391,7 +391,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
- this.secondaryPower = BeaconBlockEntity.loadEffect(nbt, "secondary_effect");
- this.levels = nbt.getInt("Levels"); // CraftBukkit - SPIGOT-5053, use where available
- if (nbt.contains("CustomName", 8)) {
-- this.name = Component.Serializer.fromJson(nbt.getString("CustomName"), registryLookup);
-+ this.name = io.papermc.paper.util.MCUtil.getBaseComponentFromNbt("CustomName", nbt, registryLookup); // Paper - Catch ParseException
- }
-
- this.lockKey = LockCode.fromTag(nbt);
-diff --git a/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java
-index 767994f493fb0a0e4bf097cd7cc178c10e79e937..c3503eaec5c5ece6e27a52fb703d06ec7c767383 100644
---- a/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java
-+++ b/src/main/java/net/minecraft/world/level/block/entity/EnchantingTableBlockEntity.java
-@@ -45,7 +45,7 @@ public class EnchantingTableBlockEntity extends BlockEntity implements Nameable
- protected void loadAdditional(CompoundTag nbt, HolderLookup.Provider registryLookup) {
- super.loadAdditional(nbt, registryLookup);
- if (nbt.contains("CustomName", 8)) {
-- this.name = Component.Serializer.fromJson(nbt.getString("CustomName"), registryLookup);
-+ this.name = io.papermc.paper.util.MCUtil.getBaseComponentFromNbt("CustomName", nbt, registryLookup); // Paper - Catch ParseException
- }
- }
-
-diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
-index 81d9a4e6bc1bc4f992ecb77b176daf89d645bbf2..40714cb145822b52cbc991a844486f87e46106d8 100644
---- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
-+++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java
-@@ -151,7 +151,7 @@ public class SkullBlockEntity extends BlockEntity {
- }
-
- if (nbt.contains("custom_name", 8)) {
-- this.customName = Component.Serializer.fromJson(nbt.getString("custom_name"), registryLookup);
-+ this.customName = io.papermc.paper.util.MCUtil.getBaseComponentFromNbt("custom_name", nbt, registryLookup); // Paper - Catch ParseException
- } else {
- this.customName = null;
- }
diff --git a/patches/server/0273-force-entity-dismount-during-teleportation.patch b/patches/server/0273-force-entity-dismount-during-teleportation.patch
index b68fcb14b3..e1f996b5ac 100644
--- a/patches/server/0273-force-entity-dismount-during-teleportation.patch
+++ b/patches/server/0273-force-entity-dismount-during-teleportation.patch
@@ -93,7 +93,7 @@ index bac78415e34d41e3a5de482b86185f2202ecf068..a4eee658ecfc0f25e854c17a7715cb16
this.dismountVehicle(entity);
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 9cc9c6f7e211d9cf42a050f3a265d0bceaf7fd40..42911a87a9028a7ba8c3f63f498e4f15bcd07f24 100644
+index b27a6719edd47f7ecb3f8c5560a36fc201efea36..bbafbeff99a7c1bd2d9e27982671a017071f829c 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1150,7 +1150,13 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0314-Optimize-call-to-getFluid-for-explosions.patch b/patches/server/0314-Optimize-call-to-getFluid-for-explosions.patch
index fae5cedf53..d9b979b49f 100644
--- a/patches/server/0314-Optimize-call-to-getFluid-for-explosions.patch
+++ b/patches/server/0314-Optimize-call-to-getFluid-for-explosions.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Optimize call to getFluid for explosions
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index b5b29210d9a6125d98e7dd737ca25f40545e512b..30109db978563fab1a33b450f0ca82e176539703 100644
+index 4c7795e1ba7bb3135fcf5bab1c8aa857b8e7417b..0f02361110143c839fde6ada38e9e0b512aef978 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -192,7 +192,7 @@ public class Explosion {
diff --git a/patches/server/0335-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/0335-Add-Raw-Byte-ItemStack-Serialization.patch
index 711b66b07b..2690624b47 100644
--- a/patches/server/0335-Add-Raw-Byte-ItemStack-Serialization.patch
+++ b/patches/server/0335-Add-Raw-Byte-ItemStack-Serialization.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
Serializes using NBT which is safer for server data migrations than bukkits format.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 2f21520106aa848a9108937474570a8c4e723cfb..13568d93bf9c0243a9505d1c0aa36fb912bf2bb7 100644
+index 2c1df47a3ef416b63ac26d7eb33fc85f5b760d23..488946dfe508d2d2a22b9dc4f687b2292d830260 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -479,6 +479,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0341-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0341-Dead-Player-s-shouldn-t-be-able-to-move.patch
index 91235fa7aa..6c42f020df 100644
--- a/patches/server/0341-Dead-Player-s-shouldn-t-be-able-to-move.patch
+++ b/patches/server/0341-Dead-Player-s-shouldn-t-be-able-to-move.patch
@@ -7,7 +7,7 @@ This fixes a lot of game state issues where packets were delayed for processing
due to 1.15's new queue but processed while dead.
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 42911a87a9028a7ba8c3f63f498e4f15bcd07f24..8fe41d4291736fd8c45d73429062a597d54ac30b 100644
+index bbafbeff99a7c1bd2d9e27982671a017071f829c..f07c2bd727a8e3e65bb2e6b1367a4bb392febe23 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1162,7 +1162,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0382-Add-permission-for-command-blocks.patch b/patches/server/0382-Add-permission-for-command-blocks.patch
index ee751febd7..f95c6d1035 100644
--- a/patches/server/0382-Add-permission-for-command-blocks.patch
+++ b/patches/server/0382-Add-permission-for-command-blocks.patch
@@ -40,10 +40,10 @@ index a6cd53e08a0770b93876f98efa7ebfe5b77a2f15..8011266f5fe082c0a81a7a828fe2cf74
} else {
BaseCommandBlock commandblocklistenerabstract = packet.getCommandBlock(this.player.level());
diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
-index 2d0eac7a8aa94ed6c4ec024bc6024440cbeac702..e40069d937de5fd00741ae6873abeecc46b93732 100644
+index efd6fcb0528d3c903e720edeb2f704347b34c18d..8c2dcc4134d96351cee75773214f3f47e71533e9 100644
--- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
+++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
-@@ -203,7 +203,7 @@ public abstract class BaseCommandBlock implements CommandSource {
+@@ -204,7 +204,7 @@ public abstract class BaseCommandBlock implements CommandSource {
}
public InteractionResult usedBy(Player player) {
diff --git a/patches/server/0389-Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/0389-Convert-legacy-attributes-in-Item-Meta.patch
index 56978470d7..0572745730 100644
--- a/patches/server/0389-Convert-legacy-attributes-in-Item-Meta.patch
+++ b/patches/server/0389-Convert-legacy-attributes-in-Item-Meta.patch
@@ -30,10 +30,10 @@ index de40e522960469b98f987bd688489740446d9f85..a0a34f680e21007ebf2c2497d2e6505e
public CraftAttributeMap(AttributeMap handle) {
this.handle = handle;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index e88364dfe067c605856390d2cce07ba320632df9..069666c797c39b5119e41a3c18727f89fcc3b8c5 100644
+index 0c385b713234a74ceba802f67f74e4ecab93e269..0464c7b6cc6cb523fa833c870e4028c3f599ea65 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -607,7 +607,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -613,7 +613,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier);
diff --git a/patches/server/0410-Prevent-headless-pistons-from-being-created.patch b/patches/server/0410-Prevent-headless-pistons-from-being-created.patch
index bc829f1c99..d5d5a474f6 100644
--- a/patches/server/0410-Prevent-headless-pistons-from-being-created.patch
+++ b/patches/server/0410-Prevent-headless-pistons-from-being-created.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Prevent headless pistons from being created
Prevent headless pistons from being created by explosions or tree/mushroom growth.
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index 30109db978563fab1a33b450f0ca82e176539703..d29b4268431472c6132efdfcd305e9616c57da21 100644
+index 0f02361110143c839fde6ada38e9e0b512aef978..414297ab9e953049b5f0b091e54d37c6e9edf861 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -206,6 +206,15 @@ public class Explosion {
diff --git a/patches/server/0415-PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/0415-PortalCreateEvent-needs-to-know-its-entity.patch
index 4f717a77b9..f4c4bfc8bb 100644
--- a/patches/server/0415-PortalCreateEvent-needs-to-know-its-entity.patch
+++ b/patches/server/0415-PortalCreateEvent-needs-to-know-its-entity.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] PortalCreateEvent needs to know its entity
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index bf3785e3b347ebc1ce1e044c9db1a9d23c80f880..1fe34b2b160569b41ce87910eff56d590731e708 100644
+index 91f342912372326a6ced16c23550da7727d6d3ad..b4cb9ff5553995dddfb99b6b3ac1250b92a65d9d 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -501,7 +501,7 @@ public final class ItemStack implements DataComponentHolder {
diff --git a/patches/server/0424-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0424-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
index a704a14645..1061e214b9 100644
--- a/patches/server/0424-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
+++ b/patches/server/0424-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
@@ -21,7 +21,7 @@ index c8e4e37b706bd8cb9698ac2d13d0d8668e2d1d14..909575a02bf5f7040eb9c8edb034e7b6
+ // Paper end - Expose entity id counter
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 13568d93bf9c0243a9505d1c0aa36fb912bf2bb7..b338b83d333b420c54c0362e2fc9839332fcc32e 100644
+index 488946dfe508d2d2a22b9dc4f687b2292d830260..05f073907538991cc74996cf5235351848bc03e1 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -526,6 +526,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0440-Fix-client-lag-on-advancement-loading.patch b/patches/server/0440-Fix-client-lag-on-advancement-loading.patch
index aca8035481..9fbe6595f6 100644
--- a/patches/server/0440-Fix-client-lag-on-advancement-loading.patch
+++ b/patches/server/0440-Fix-client-lag-on-advancement-loading.patch
@@ -15,7 +15,7 @@ manually reload the advancement data for all players, which
normally takes place as a part of the datapack reloading.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index b338b83d333b420c54c0362e2fc9839332fcc32e..07befa14f64c5ae097378023a5b352278df2731a 100644
+index 05f073907538991cc74996cf5235351848bc03e1..30bca0a9ead81055b1e7b8d9411c515e817e3a7b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -333,7 +333,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0442-Beacon-API-custom-effect-ranges.patch b/patches/server/0442-Beacon-API-custom-effect-ranges.patch
index 5ab714aeef..b8790eb9fa 100644
--- a/patches/server/0442-Beacon-API-custom-effect-ranges.patch
+++ b/patches/server/0442-Beacon-API-custom-effect-ranges.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Beacon API - custom effect ranges
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
-index 18450017bc3df2f0b1a5715e6021e8e5defa24a1..cdb6b89ad4c34be419f66f4f6e6a11068273765d 100644
+index cf48d4531821c2b1b031a63c8f007aa7d3fbef1d..dc39e7e3d166b0f7fb09e04b222b8db00d42b11b 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -86,6 +86,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
diff --git a/patches/server/0459-Expose-LivingEntity-hurt-direction.patch b/patches/server/0459-Expose-LivingEntity-hurt-direction.patch
index a2ec7481d3..35d1e83e02 100644
--- a/patches/server/0459-Expose-LivingEntity-hurt-direction.patch
+++ b/patches/server/0459-Expose-LivingEntity-hurt-direction.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Expose LivingEntity hurt direction
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 8fe41d4291736fd8c45d73429062a597d54ac30b..ecae1708feee507df1440ad2822e7af8c3c278de 100644
+index f07c2bd727a8e3e65bb2e6b1367a4bb392febe23..47ace2c3f395a86db3aa67d597686c8275a91323 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -187,7 +187,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0515-Expand-world-key-API.patch b/patches/server/0515-Expand-world-key-API.patch
index 74d0fe3827..b904c428b7 100644
--- a/patches/server/0515-Expand-world-key-API.patch
+++ b/patches/server/0515-Expand-world-key-API.patch
@@ -67,7 +67,7 @@ index 1460060f2ff42ebaa7b2418b375ce661c73bd17f..b9180b7552796331d09c3aef1e863a25
// Check if a World already exists with the UID.
if (this.getWorld(world.getUID()) != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 07befa14f64c5ae097378023a5b352278df2731a..c0592a85a1a0781b83232533b9ca1b30b116eb98 100644
+index 30bca0a9ead81055b1e7b8d9411c515e817e3a7b..a914618ddcca61f30316a97c73f88698d44bc301 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -537,6 +537,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0520-Expose-protocol-version.patch b/patches/server/0520-Expose-protocol-version.patch
index 86eecc86b6..d03986573e 100644
--- a/patches/server/0520-Expose-protocol-version.patch
+++ b/patches/server/0520-Expose-protocol-version.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Expose protocol version
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index c0592a85a1a0781b83232533b9ca1b30b116eb98..d11d0a9a2c6b13033437a22b7270e7d37bfe8046 100644
+index a914618ddcca61f30316a97c73f88698d44bc301..d27175bf9899b7ee79ab697eb2c20cd2e7ca6499 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -542,6 +542,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0530-Add-PlayerDeepSleepEvent.patch b/patches/server/0530-Add-PlayerDeepSleepEvent.patch
index 638530f645..b9ed97ec97 100644
--- a/patches/server/0530-Add-PlayerDeepSleepEvent.patch
+++ b/patches/server/0530-Add-PlayerDeepSleepEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerDeepSleepEvent
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index ecae1708feee507df1440ad2822e7af8c3c278de..1f4351c1701465a3b5dfcb8d61aa5035956bbd42 100644
+index 47ace2c3f395a86db3aa67d597686c8275a91323..bed2f9903378c16d630a08156f5c39047b613ad4 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -260,6 +260,13 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0532-Add-PlayerBedFailEnterEvent.patch b/patches/server/0532-Add-PlayerBedFailEnterEvent.patch
index aff72983ac..df053f1523 100644
--- a/patches/server/0532-Add-PlayerBedFailEnterEvent.patch
+++ b/patches/server/0532-Add-PlayerBedFailEnterEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerBedFailEnterEvent
diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java
-index 68326d7c3bd14e5a66971f34e6ec8ec8e93b728a..03035ed3df2f32e14a8eb9bc3d536ef64b5d87ba 100644
+index 28689e333bb2ddb3c22e793b5c3d379233034840..c353643a9c9b400d351ef49e1b7d4f516ed0b0eb 100644
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
@@ -118,14 +118,23 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
diff --git a/patches/server/0535-Introduce-beacon-activation-deactivation-events.patch b/patches/server/0535-Introduce-beacon-activation-deactivation-events.patch
index de6741ca2b..ba8abff209 100644
--- a/patches/server/0535-Introduce-beacon-activation-deactivation-events.patch
+++ b/patches/server/0535-Introduce-beacon-activation-deactivation-events.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Introduce beacon activation/deactivation events
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
-index cdb6b89ad4c34be419f66f4f6e6a11068273765d..00ce8c45d906d8a468d93f464638f367d77e40fb 100644
+index dc39e7e3d166b0f7fb09e04b222b8db00d42b11b..a11f487197274da7cf3217f24e1cae2a343a7331 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -225,6 +225,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
diff --git a/patches/server/0547-ItemStack-repair-check-API.patch b/patches/server/0547-ItemStack-repair-check-API.patch
index d72feae891..15db6d18c9 100644
--- a/patches/server/0547-ItemStack-repair-check-API.patch
+++ b/patches/server/0547-ItemStack-repair-check-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack repair check API
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index d11d0a9a2c6b13033437a22b7270e7d37bfe8046..c2a7801ee4f6642813778f5e8ae89db46a253a3d 100644
+index d27175bf9899b7ee79ab697eb2c20cd2e7ca6499..bb72e1180a354a41c2f268fec49efd98354d1395 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -547,6 +547,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0554-Fix-item-default-attributes-API.patch b/patches/server/0554-Fix-item-default-attributes-API.patch
index f23189a1ba..fd1ebe689f 100644
--- a/patches/server/0554-Fix-item-default-attributes-API.patch
+++ b/patches/server/0554-Fix-item-default-attributes-API.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Fix item default attributes API
(previously added this API but upstream also added it)
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index c2a7801ee4f6642813778f5e8ae89db46a253a3d..61686e63b2d1a98b9747e11058f450a51e2d4d01 100644
+index bb72e1180a354a41c2f268fec49efd98354d1395..0254b4e5146ee7e082a467812dc04a2d07094af7 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -396,9 +396,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0572-Fix-PlayerDropItemEvent-using-wrong-item.patch b/patches/server/0572-Fix-PlayerDropItemEvent-using-wrong-item.patch
index 7c8cf8059d..9880621068 100644
--- a/patches/server/0572-Fix-PlayerDropItemEvent-using-wrong-item.patch
+++ b/patches/server/0572-Fix-PlayerDropItemEvent-using-wrong-item.patch
@@ -44,7 +44,7 @@ index ef24112c5360ec329dc8a89546f64bad68d7fd8e..1ac19a789bee22fe512a019e618e2b99
this.awardStat(Stats.DROP);
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 1f4351c1701465a3b5dfcb8d61aa5035956bbd42..44e2a0f36359ab914c9328b633dd8a360591751d 100644
+index bed2f9903378c16d630a08156f5c39047b613ad4..40fb59c799850915c3ae71a4c4121e664c79d9b2 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -726,6 +726,11 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0579-Fix-kick-event-leave-message-not-being-sent.patch b/patches/server/0579-Fix-kick-event-leave-message-not-being-sent.patch
index 09377dd14d..2be09dd881 100644
--- a/patches/server/0579-Fix-kick-event-leave-message-not-being-sent.patch
+++ b/patches/server/0579-Fix-kick-event-leave-message-not-being-sent.patch
@@ -17,7 +17,7 @@ index 1ac19a789bee22fe512a019e618e2b99bb07f183..d3f3eed67557b362c0f51a83967f6027
public boolean isRealPlayer; // Paper
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
-index 0273998b72c9d8a1e7de4b1195c547001922cb8e..802ea97fe03028cfe911aa4052d9c82ad23058f2 100644
+index dde1d3850af610241e1f76a194efe1a58dc96bd5..8ac5d8ccf731100a1be690cb2ed1be82cadba8ed 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -109,6 +109,11 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
diff --git a/patches/server/0587-Add-PlayerSetSpawnEvent.patch b/patches/server/0587-Add-PlayerSetSpawnEvent.patch
index 2c3b96803d..1bc05bf134 100644
--- a/patches/server/0587-Add-PlayerSetSpawnEvent.patch
+++ b/patches/server/0587-Add-PlayerSetSpawnEvent.patch
@@ -167,7 +167,7 @@ index 2b7ad2b9cd525814c9f91d22606c42aa82ce9f94..d7bbdcc97745246718c92c9aba56d9f9
}
diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
-index e18726915d1491d74084827afd9978800aecb644..a4a90df0b500fb440226b07462faaa87594b12a5 100644
+index 3cfe325f14b6b184517de7c6982f54e0895b1eb8..be85535767bc79875c38da78a209d33d4be87c8a 100644
--- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
@@ -89,9 +89,14 @@ public class RespawnAnchorBlock extends Block {
diff --git a/patches/server/0591-Add-EntityDamageItemEvent.patch b/patches/server/0591-Add-EntityDamageItemEvent.patch
index 34c8cf7e74..e78be10457 100644
--- a/patches/server/0591-Add-EntityDamageItemEvent.patch
+++ b/patches/server/0591-Add-EntityDamageItemEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityDamageItemEvent
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index 1fe34b2b160569b41ce87910eff56d590731e708..f5547caeaeeb8fa37f2aa9bfea6f176b1cc3430a 100644
+index b4cb9ff5553995dddfb99b6b3ac1250b92a65d9d..2947a43a1d9e49273ed0242691273e50c657cd05 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -647,7 +647,7 @@ public final class ItemStack implements DataComponentHolder {
diff --git a/patches/server/0599-Add-missing-team-sidebar-display-slots.patch b/patches/server/0599-Add-missing-team-sidebar-display-slots.patch
index 8e253e2960..43027f57f3 100644
--- a/patches/server/0599-Add-missing-team-sidebar-display-slots.patch
+++ b/patches/server/0599-Add-missing-team-sidebar-display-slots.patch
@@ -9,7 +9,7 @@ public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations toBukkitSlo
public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations fromBukkitSlot(Lorg/bukkit/scoreboard/DisplaySlot;)Lnet/minecraft/world/scores/DisplaySlot;
diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java
-index 658f3962543a36bc8c16f306ccb3e254b5b3d0a8..a1510dfd4824c0e246543d770f0e74f0f97c4ace 100644
+index 9e1896199d10be606a6c6304d849c7c9eb3c9fa1..b8a5ff5702f5a504c5b3aa0d9c27eb15f99471b7 100644
--- a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java
+++ b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java
@@ -27,6 +27,7 @@ public class FieldRename {
diff --git a/patches/server/0602-Get-entity-default-attributes.patch b/patches/server/0602-Get-entity-default-attributes.patch
index b0c1f2f95c..243137354a 100644
--- a/patches/server/0602-Get-entity-default-attributes.patch
+++ b/patches/server/0602-Get-entity-default-attributes.patch
@@ -81,7 +81,7 @@ index 0000000000000000000000000000000000000000..ec9ebd2d539333293c51b7edfa18f18b
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 61686e63b2d1a98b9747e11058f450a51e2d4d01..5f460ab55025ff5dd66d7e52f92b4e7f36f2bb3f 100644
+index 0254b4e5146ee7e082a467812dc04a2d07094af7..5cb1da944f0040e7c5a21db201d41fda3c5bda83 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -560,6 +560,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0606-Add-critical-damage-API.patch b/patches/server/0606-Add-critical-damage-API.patch
index 862878dd06..b279a27b3e 100644
--- a/patches/server/0606-Add-critical-damage-API.patch
+++ b/patches/server/0606-Add-critical-damage-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add critical damage API
diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
-index 435490f2931dae9d4fc5adb713c47a962684eeb5..ec52c7a75d9988475fbb4fe12ef7f4489ef3d894 100644
+index 70e946483f09195c82d4b306c487ba22a8f8cf6f..ffb7c966617bdfa2c3f05ec4e753e32996493343 100644
--- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java
+++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
-@@ -238,4 +238,18 @@ public class DamageSource {
+@@ -240,4 +240,18 @@ public class DamageSource {
public Holder<DamageType> typeHolder() {
return this.type;
}
@@ -28,7 +28,7 @@ index 435490f2931dae9d4fc5adb713c47a962684eeb5..ec52c7a75d9988475fbb4fe12ef7f448
+ // Paper end - add critical damage API
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 44e2a0f36359ab914c9328b633dd8a360591751d..c3fc0adeafbebaaaab8c155df9829f488e41d8ab 100644
+index 40fb59c799850915c3ae71a4c4121e664c79d9b2..7cb10e9c8ba6d100f1ae4d949401cd83034f0f14 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1274,7 +1274,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0608-Add-isCollidable-methods-to-various-places.patch b/patches/server/0608-Add-isCollidable-methods-to-various-places.patch
index 226170159d..fd446708ab 100644
--- a/patches/server/0608-Add-isCollidable-methods-to-various-places.patch
+++ b/patches/server/0608-Add-isCollidable-methods-to-various-places.patch
@@ -39,7 +39,7 @@ index 1002123cd0c6f57cecc4e80f5f21cc6ff5886d37..e96023b71845526383288917e8d7c575
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 5f460ab55025ff5dd66d7e52f92b4e7f36f2bb3f..f0cbe0ae5123bebce82aa677f196f7e8e096dfc9 100644
+index 5cb1da944f0040e7c5a21db201d41fda3c5bda83..d8d13aca9a002f92b3af2bc67b86f4f9dd092603 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -572,6 +572,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0611-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0611-Add-Raw-Byte-Entity-Serialization.patch
index 5eeed3ba32..402954c84f 100644
--- a/patches/server/0611-Add-Raw-Byte-Entity-Serialization.patch
+++ b/patches/server/0611-Add-Raw-Byte-Entity-Serialization.patch
@@ -50,7 +50,7 @@ index 9edcdc71b28cf08e42fbe44723ba540e8d4f7808..a61638bc8200f6aa25d9c3254aea6c0c
@Override
public boolean isInvisible() { // Paper - moved up from LivingEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index f0cbe0ae5123bebce82aa677f196f7e8e096dfc9..365f7846d4c522811cf992ea1a2da67b025661b9 100644
+index d8d13aca9a002f92b3af2bc67b86f4f9dd092603..a14a316d63e34ac4ac7ee81a27a8fbdfcdb2b451 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -510,7 +510,33 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0613-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0613-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch
index cb9b1652bf..19d821b087 100644
--- a/patches/server/0613-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch
+++ b/patches/server/0613-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch
@@ -51,7 +51,7 @@ index 22f9b40e2c9a71f8944b1738e91ee2e189a77cec..c3e8efd58c191ac8f479f8a979e73cc3
@Override
public void doCloseContainer() {
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index c3fc0adeafbebaaaab8c155df9829f488e41d8ab..4003dfeae8b2486045a3dbe4c1adc65a882e70ba 100644
+index 7cb10e9c8ba6d100f1ae4d949401cd83034f0f14..f861a942807f8b8af36d6b70a124da7853eda053 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -509,6 +509,11 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0641-Fix-upstreams-block-state-factories.patch b/patches/server/0641-Fix-upstreams-block-state-factories.patch
index d5cf218ad2..55093f7e56 100644
--- a/patches/server/0641-Fix-upstreams-block-state-factories.patch
+++ b/patches/server/0641-Fix-upstreams-block-state-factories.patch
@@ -13,10 +13,10 @@ the material type of the block at that location.
public net.minecraft.world.level.block.entity.BlockEntityType validBlocks
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index 90b218ebc947a1d8a8c7dfc677fe145b6386654a..df945a152747bea0452ec18c09d59598903aa91f 100644
+index d22cc83725cee3df20bb6f99de23aceb62923eef..978125c69b2a9ea465595c7eef10a1aea7ccf26c 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -350,7 +350,7 @@ public abstract class BlockEntity {
+@@ -361,7 +361,7 @@ public abstract class BlockEntity {
// Paper end
if (this.level == null) return null;
org.bukkit.block.Block block = this.level.getWorld().getBlockAt(this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ());
diff --git a/patches/server/0680-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0680-Fix-cancelled-powdered-snow-bucket-placement.patch
index 57020bc01b..e46654952c 100644
--- a/patches/server/0680-Fix-cancelled-powdered-snow-bucket-placement.patch
+++ b/patches/server/0680-Fix-cancelled-powdered-snow-bucket-placement.patch
@@ -8,7 +8,7 @@ snow bucket didn't revert grass that became snowy because of the
placement.
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index f5547caeaeeb8fa37f2aa9bfea6f176b1cc3430a..2f60e67de38bb4b39deb505f23e35aeff9eded73 100644
+index 2947a43a1d9e49273ed0242691273e50c657cd05..51a7919b019f2fd5d2e2ab850ed512769b0b1685 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -401,7 +401,7 @@ public final class ItemStack implements DataComponentHolder {
diff --git a/patches/server/0712-Expand-PlayerItemDamageEvent.patch b/patches/server/0712-Expand-PlayerItemDamageEvent.patch
index 9163d3de01..bb07753eca 100644
--- a/patches/server/0712-Expand-PlayerItemDamageEvent.patch
+++ b/patches/server/0712-Expand-PlayerItemDamageEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Expand PlayerItemDamageEvent
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index 2f60e67de38bb4b39deb505f23e35aeff9eded73..0a883564b9dda4fa0e6a7174a6e46b98af8be3e6 100644
+index 51a7919b019f2fd5d2e2ab850ed512769b0b1685..acce1b72185d4687ef5a72dd4014d87149f4b092 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -661,10 +661,11 @@ public final class ItemStack implements DataComponentHolder {
diff --git a/patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch b/patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch
index 79bacba95c..4e53e16b15 100644
--- a/patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch
+++ b/patches/server/0725-Sanitize-sent-BlockEntity-NBT.patch
@@ -5,15 +5,15 @@ Subject: [PATCH] Sanitize sent BlockEntity NBT
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
-index 1970c0fa24764f6bbd0cc360b7d32d7906eaf808..db03254682b827d650160d6f2c1a18cf12c861d7 100644
+index 4f3ba61f13dbe5773034a19e749b7c4f5dc3d291..5d3e739d28d394ed59fe0003245cc55ac62e6087 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java
-@@ -23,7 +23,7 @@ public class ClientboundBlockEntityDataPacket implements Packet<ClientGamePacket
- public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity, BiFunction<BlockEntity, RegistryAccess, CompoundTag> nbtGetter) {
- RegistryAccess iregistrycustom = blockEntity.getLevel().registryAccess();
+@@ -29,7 +29,7 @@ public class ClientboundBlockEntityDataPacket implements Packet<ClientGamePacket
-- return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), (CompoundTag) nbtGetter.apply(blockEntity, iregistrycustom));
-+ return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), (CompoundTag) blockEntity.sanitizeSentNbt(nbtGetter.apply(blockEntity, iregistrycustom))); // Paper - Sanitize sent data
+ public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity, BiFunction<BlockEntity, RegistryAccess, CompoundTag> nbtGetter) {
+ RegistryAccess registryAccess = blockEntity.getLevel().registryAccess();
+- return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), nbtGetter.apply(blockEntity, registryAccess));
++ return new ClientboundBlockEntityDataPacket(blockEntity.getBlockPos(), blockEntity.getType(), blockEntity.sanitizeSentNbt(nbtGetter.apply(blockEntity, registryAccess))); // Paper - Sanitize sent data
}
public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity) {
@@ -30,10 +30,10 @@ index ac900dfdc5c90e9e60d47efa734be8f0a5b20dca..ec1cb034d840633240f2b379b09f7d2f
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index df945a152747bea0452ec18c09d59598903aa91f..a7dfad2696e7145af1355a5db132af14d09a6f30 100644
+index 978125c69b2a9ea465595c7eef10a1aea7ccf26c..30a75492a4b25450c194b4cc44deb665711db5af 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -357,6 +357,14 @@ public abstract class BlockEntity {
+@@ -368,6 +368,14 @@ public abstract class BlockEntity {
}
// CraftBukkit end
diff --git a/patches/server/0733-Nameable-Banner-API.patch b/patches/server/0733-Nameable-Banner-API.patch
index 823dd8a8c8..21ca7151b4 100644
--- a/patches/server/0733-Nameable-Banner-API.patch
+++ b/patches/server/0733-Nameable-Banner-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Nameable Banner API
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java
-index 2656e06ab2269141a13011eaa906f601887ca3e2..26d2f63d2add276a2f51c399f494a7219413d3e3 100644
+index 925608bfa9c848ed6285de5e35d60aa66e12004a..60c26076e7acf869fa0e20fdc14eeec341387d99 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BannerBlockEntity.java
@@ -29,7 +29,7 @@ public class BannerBlockEntity extends BlockEntity implements Nameable {
diff --git a/patches/server/0734-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0734-Don-t-broadcast-messages-to-command-blocks.patch
index 44292abef1..58912bb8af 100644
--- a/patches/server/0734-Don-t-broadcast-messages-to-command-blocks.patch
+++ b/patches/server/0734-Don-t-broadcast-messages-to-command-blocks.patch
@@ -8,10 +8,10 @@ in command blocks, and if called asynchronously, would throw
an error
diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
-index e40069d937de5fd00741ae6873abeecc46b93732..552f7ab11dc09fa69034f009235cb22429a9ed11 100644
+index 8c2dcc4134d96351cee75773214f3f47e71533e9..e6bfcc50cdf728216084bc00a5bb8b6b3b8f72e4 100644
--- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
+++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java
-@@ -177,6 +177,7 @@ public abstract class BaseCommandBlock implements CommandSource {
+@@ -178,6 +178,7 @@ public abstract class BaseCommandBlock implements CommandSource {
@Override
public void sendSystemMessage(Component message) {
if (this.trackOutput) {
diff --git a/patches/server/0753-Add-NamespacedKey-biome-methods.patch b/patches/server/0753-Add-NamespacedKey-biome-methods.patch
index b870c787cc..5367ba1df6 100644
--- a/patches/server/0753-Add-NamespacedKey-biome-methods.patch
+++ b/patches/server/0753-Add-NamespacedKey-biome-methods.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Add NamespacedKey biome methods
Co-authored-by: Thonk <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 365f7846d4c522811cf992ea1a2da67b025661b9..c4e517ef6cf5cd4975846459cf66ebd4db66a805 100644
+index a14a316d63e34ac4ac7ee81a27a8fbdfcdb2b451..6ab39cc723f0874c28def182eaada05c11d36678 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -604,6 +604,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0767-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0767-Fix-a-bunch-of-vanilla-bugs.patch
index 45f93faf5c..1848692372 100644
--- a/patches/server/0767-Fix-a-bunch-of-vanilla-bugs.patch
+++ b/patches/server/0767-Fix-a-bunch-of-vanilla-bugs.patch
@@ -408,7 +408,7 @@ index 614ddebb92aba91694951fc22900fed362b3426d..d19e799491f790ca967a0731ef95a069
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
-index 00ce8c45d906d8a468d93f464638f367d77e40fb..ac1547d4f45aa676ae174c6c80716db3437f2914 100644
+index a11f487197274da7cf3217f24e1cae2a343a7331..edb7d981bb443b5b395a1985fb7cfd96009d0b0a 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -295,7 +295,11 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
diff --git a/patches/server/0784-Add-PrePlayerAttackEntityEvent.patch b/patches/server/0784-Add-PrePlayerAttackEntityEvent.patch
index 6ea383ac09..2c7c8105ab 100644
--- a/patches/server/0784-Add-PrePlayerAttackEntityEvent.patch
+++ b/patches/server/0784-Add-PrePlayerAttackEntityEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add PrePlayerAttackEntityEvent
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 4003dfeae8b2486045a3dbe4c1adc65a882e70ba..761e8a0c4e1db465c18892999e86885f27ca8075 100644
+index f861a942807f8b8af36d6b70a124da7853eda053..90c9856dc16f83c762415aaeeb030bcd07b72d51 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1246,8 +1246,17 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0803-Add-BlockLockCheckEvent.patch b/patches/server/0803-Add-BlockLockCheckEvent.patch
index 91be1b9825..7e9746e1ed 100644
--- a/patches/server/0803-Add-BlockLockCheckEvent.patch
+++ b/patches/server/0803-Add-BlockLockCheckEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add BlockLockCheckEvent
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
-index ff3f26c31bd11b48f48e354ea6b33aa55dcbff5d..02675f15e157ce68506c813b19cf5472bf67bc00 100644
+index bf9ae460bdfb247456b895f026f6a7a2e162c5f5..15fd1fe1b55b6421d2c09e8385c9f69fa0152e56 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
@@ -73,17 +73,44 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co
@@ -56,7 +56,7 @@ index ff3f26c31bd11b48f48e354ea6b33aa55dcbff5d..02675f15e157ce68506c813b19cf5472
protected abstract NonNullList<ItemStack> getItems();
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
-index ac1547d4f45aa676ae174c6c80716db3437f2914..d575294924df6b970c5773a5cdd8b2a1a9cbce19 100644
+index edb7d981bb443b5b395a1985fb7cfd96009d0b0a..62b9b5f508462dd2257094cb48ce6123e29cb64d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -472,7 +472,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
diff --git a/patches/server/0810-Flying-Fall-Damage.patch b/patches/server/0810-Flying-Fall-Damage.patch
index 46bd6e117e..17c6c542fd 100644
--- a/patches/server/0810-Flying-Fall-Damage.patch
+++ b/patches/server/0810-Flying-Fall-Damage.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Flying Fall Damage
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 761e8a0c4e1db465c18892999e86885f27ca8075..230ffd3c4541ef8979605d733b6463e39cd00206 100644
+index 90c9856dc16f83c762415aaeeb030bcd07b72d51..96fc37c871566ec41c42bd0e0f4a147044c239b4 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -194,6 +194,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0811-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/server/0811-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
deleted file mode 100644
index 62b06bc717..0000000000
--- a/patches/server/0811-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jake Potrebic <[email protected]>
-Date: Fri, 22 Oct 2021 16:25:07 -0700
-Subject: [PATCH] Add exploded block state to BlockExplodeEvent and
- EntityDamageByBlockEvent
-
-
-diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
-index ec52c7a75d9988475fbb4fe12ef7f4489ef3d894..a78fd4f9ce97ebece45979908382de8f5fc14c1b 100644
---- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java
-+++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
-@@ -21,6 +21,7 @@ public class DamageSource {
- private final Entity directEntity;
- @Nullable
- private final Vec3 damageSourcePosition;
-+ public org.bukkit.block.BlockState explodedBlockState; // Paper - add exploded state
- // CraftBukkit start
- @Nullable
- private org.bukkit.block.Block directBlock; // The block that caused the damage. damageSourcePosition is not used for all block damages
-@@ -94,6 +95,7 @@ public class DamageSource {
-
- private DamageSource cloneInstance() {
- DamageSource damageSource = new DamageSource(this.type, this.directEntity, this.causingEntity, this.damageSourcePosition);
-+ damageSource.explodedBlockState = this.explodedBlockState; // Paper - Include explodedBlockState when clone this instance of DamageSource
- damageSource.directBlock = this.getDirectBlock();
- damageSource.withSweep = this.isSweep();
- damageSource.poison = this.isPoison();
-diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSources.java b/src/main/java/net/minecraft/world/damagesource/DamageSources.java
-index 2f5591aa232b834bb9b69a2a349ce93d1a9c63fa..8ba60de95845f4d56f299c5f1b2b5163461ba38d 100644
---- a/src/main/java/net/minecraft/world/damagesource/DamageSources.java
-+++ b/src/main/java/net/minecraft/world/damagesource/DamageSources.java
-@@ -265,8 +265,17 @@ public class DamageSources {
- return this.source(DamageTypes.SONIC_BOOM, attacker);
- }
-
-+ @Deprecated @io.papermc.paper.annotation.DoNotUse // Paper - add exploded state
- public DamageSource badRespawnPointExplosion(Vec3 position) {
-- return new DamageSource(this.damageTypes.getHolderOrThrow(DamageTypes.BAD_RESPAWN_POINT), position);
-+ // Paper start - add exploded state
-+ return this.badRespawnPointExplosion(position, null);
-+ }
-+
-+ public DamageSource badRespawnPointExplosion(Vec3 position, @Nullable org.bukkit.block.BlockState explodedBlockState) {
-+ DamageSource source = new DamageSource(this.damageTypes.getHolderOrThrow(DamageTypes.BAD_RESPAWN_POINT), position);
-+ source.explodedBlockState = explodedBlockState;
-+ return source;
-+ // Paper end - add exploded state
- }
-
- public DamageSource outOfBorder() {
-diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index d29b4268431472c6132efdfcd305e9616c57da21..0a8e46eef6df0bfda663758fc22b1eb4640aaf4e 100644
---- a/src/main/java/net/minecraft/world/level/Explosion.java
-+++ b/src/main/java/net/minecraft/world/level/Explosion.java
-@@ -389,7 +389,7 @@ public class Explosion {
- bukkitBlocks = event.blockList();
- this.yield = event.getYield();
- } else {
-- BlockExplodeEvent event = new BlockExplodeEvent(location.getBlock(), blockList, this.yield);
-+ BlockExplodeEvent event = new BlockExplodeEvent(location.getBlock(), blockList, this.yield, this.damageSource.explodedBlockState); // Paper - add exploded state
- this.level.getCraftServer().getPluginManager().callEvent(event);
- this.wasCanceled = event.isCancelled();
- bukkitBlocks = event.blockList();
-diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java
-index 03035ed3df2f32e14a8eb9bc3d536ef64b5d87ba..872bec4c366c86177334452315cc4a8097dae3c0 100644
---- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
-+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
-@@ -95,6 +95,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
-
- // CraftBukkit - moved world and biome check into EntityHuman
- if (false && !BedBlock.canSetSpawn(world)) {
-+ final org.bukkit.block.BlockState explodedBlockState = org.bukkit.craftbukkit.block.CraftBlockStates.getUnplacedBlockState(world, pos, state); // Paper - add exploded state (this won't be called due to the false, but it's good for reference)
- world.removeBlock(pos, false);
- BlockPos blockposition1 = pos.relative(((Direction) state.getValue(BedBlock.FACING)).getOpposite());
-
-@@ -104,7 +105,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
-
- Vec3 vec3d = pos.getCenter();
-
-- world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK);
-+ world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, explodedBlockState), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // Paper - add exploded state
- return InteractionResult.SUCCESS;
- } else if ((Boolean) state.getValue(BedBlock.OCCUPIED)) {
- if (!this.kickVillagerOutOfBed(world, pos)) {
-@@ -146,6 +147,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
- private InteractionResult explodeBed(BlockState iblockdata, Level world, BlockPos blockposition) {
- {
- {
-+ final org.bukkit.block.BlockState explodedBlockState = org.bukkit.craftbukkit.block.CraftBlockStates.getUnplacedBlockState(world, blockposition, iblockdata); // Paper - add exploded state
- world.removeBlock(blockposition, false);
- BlockPos blockposition1 = blockposition.relative(((Direction) iblockdata.getValue(BedBlock.FACING)).getOpposite());
-
-@@ -155,7 +157,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
-
- Vec3 vec3d = blockposition.getCenter();
-
-- world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK);
-+ world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, explodedBlockState), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // Paper - add exploded state
- return InteractionResult.SUCCESS;
- }
- }
-diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
-index a4a90df0b500fb440226b07462faaa87594b12a5..4e2fad1f234356ada6f29445038e43b9a8406cf9 100644
---- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
-+++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java
-@@ -133,6 +133,7 @@ public class RespawnAnchorBlock extends Block {
- }
-
- private void explode(BlockState state, Level world, final BlockPos explodedPos) {
-+ final org.bukkit.block.BlockState explodedBlockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, explodedPos, state, null); // Paper - add exploded state
- world.removeBlock(explodedPos, false);
- Stream<Direction> stream = Direction.Plane.HORIZONTAL.stream(); // CraftBukkit - decompile error
-
-@@ -149,7 +150,7 @@ public class RespawnAnchorBlock extends Block {
- };
- Vec3 vec3d = explodedPos.getCenter();
-
-- world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d), explosiondamagecalculator, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK);
-+ world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, explodedBlockState), explosiondamagecalculator, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // Paper - add exploded state
- }
-
- public static boolean canSetSpawn(Level world) {
-diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
-index 411c2de93c71e480f95229c882cdf43b8801edc8..489c17d002a5c3580637fda1c51f1bd63814bfa0 100644
---- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
-+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
-@@ -291,6 +291,12 @@ public final class CraftBlockStates {
- BlockEntity tileEntity = (blockEntityTag == null) ? null : BlockEntity.loadStatic(blockPosition, blockData, blockEntityTag, registry);
- return CraftBlockStates.getBlockState(null, blockPosition, blockData, tileEntity);
- }
-+ // Paper start - add exploded state
-+ public static BlockState getUnplacedBlockState(net.minecraft.world.level.BlockGetter levelAccessor, BlockPos blockPos, net.minecraft.world.level.block.state.BlockState blockData) {
-+ BlockEntity tileEntity = levelAccessor.getBlockEntity(blockPos);
-+ return CraftBlockStates.getBlockState(null, blockPos, blockData, tileEntity);
-+ }
-+ // Paper end - add exploded state
-
- // See BlockStateFactory#createBlockState(World, BlockPosition, IBlockData, TileEntity)
- private static CraftBlockState getBlockState(World world, BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData, BlockEntity tileEntity) {
-diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index c52cb55cd1da988ec646e4e1484ec1a72513291d..a226b7cdc9c63ef09d7d48269c287af1ab6dbdc4 100644
---- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1070,7 +1070,7 @@ public class CraftEventFactory {
- Entity damager = (bukkitDamageSource.isIndirect() && source.getDirectEntity() != null) ? source.getDirectEntity() : source.getCausingEntity();
- if (source.is(DamageTypeTags.IS_EXPLOSION)) {
- if (damager == null) {
-- return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
-+ return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.explodedBlockState); // Paper - Include BlockState for damage
- }
- DamageCause damageCause = (damager.getBukkitEntity() instanceof org.bukkit.entity.TNTPrimed) ? DamageCause.BLOCK_EXPLOSION : DamageCause.ENTITY_EXPLOSION;
- return CraftEventFactory.callEntityDamageEvent(damager, entity, damageCause, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API
-@@ -1117,7 +1117,7 @@ public class CraftEventFactory {
- } else {
- throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, source.getDirectBlock(), source.getMsgId()));
- }
-- return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
-+ return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.explodedBlockState); // Paper - Include BlockState for damage
- }
-
- DamageCause cause;
-@@ -1170,8 +1170,13 @@ public class CraftEventFactory {
- return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled);
- }
-
-- private static EntityDamageEvent callEntityDamageEvent(Block damager, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map<DamageModifier, Double> modifiers, Map<DamageModifier, Function<? super Double, Double>> modifierFunctions, boolean cancelled) {
-- EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(damager, damagee.getBukkitEntity(), cause, bukkitDamageSource, modifiers, modifierFunctions);
-+ // Paper start
-+ private static EntityDamageEvent callEntityDamageEvent(Block damager, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map<DamageModifier, Double> modifiers, Map<DamageModifier, Function<? super Double, Double>> modifierFunctions, boolean cancelled) { // Paper
-+ return callEntityDamageEvent(damager, damagee, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled, null);
-+ }
-+ private static EntityDamageEvent callEntityDamageEvent(Block damager, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map<DamageModifier, Double> modifiers, Map<DamageModifier, Function<? super Double, Double>> modifierFunctions, boolean cancelled, @Nullable org.bukkit.block.BlockState explodedBlockState) {
-+ EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(damager, damagee.getBukkitEntity(), cause, bukkitDamageSource, modifiers, modifierFunctions, explodedBlockState);
-+ // Paper end
- return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled);
- }
-
diff --git a/patches/server/0812-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/server/0811-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch
index 214bb65165..214bb65165 100644
--- a/patches/server/0812-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch
+++ b/patches/server/0811-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch
diff --git a/patches/server/0812-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch b/patches/server/0812-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch
new file mode 100644
index 0000000000..f880ce7d71
--- /dev/null
+++ b/patches/server/0812-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch
@@ -0,0 +1,67 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Fri, 22 Oct 2021 16:25:07 -0700
+Subject: [PATCH] Add exploded block state to EntityDamageByBlockEvent
+
+== AT ==
+public org.bukkit.craftbukkit.block.CraftBlockStates getBlockState(Lorg/bukkit/World;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/entity/BlockEntity;)Lorg/bukkit/craftbukkit/block/CraftBlockState;
+
+diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSources.java b/src/main/java/net/minecraft/world/damagesource/DamageSources.java
+index 89928dad3182a0131c3fba19c9c131d6997028eb..349d1683458ec5d641c9823aa7a68dec8820a664 100644
+--- a/src/main/java/net/minecraft/world/damagesource/DamageSources.java
++++ b/src/main/java/net/minecraft/world/damagesource/DamageSources.java
+@@ -265,6 +265,7 @@ public class DamageSources {
+ return this.source(DamageTypes.SONIC_BOOM, attacker);
+ }
+
++ @Deprecated @io.papermc.paper.annotation.DoNotUse // Paper - add exploded state
+ public DamageSource badRespawnPointExplosion(Vec3 position) {
+ // CraftBukkit start
+ return this.badRespawnPointExplosion(position, null, null, null);
+@@ -273,7 +274,7 @@ public class DamageSources {
+ public DamageSource badRespawnPointExplosion(Vec3 vec3d, net.minecraft.world.level.Level world, net.minecraft.world.level.block.state.BlockState blockData, net.minecraft.core.BlockPos position) {
+ DamageSource damageSource = new DamageSource(this.damageTypes.getHolderOrThrow(DamageTypes.BAD_RESPAWN_POINT), vec3d);
+ if (world != null && blockData != null && position != null) {
+- damageSource.blockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, position, blockData, null);
++ damageSource.blockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world.getWorld(), position, blockData, world.getBlockEntity(position)); // Paper
+ }
+ return damageSource;
+ // CraftBukkit end
+diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+index c52cb55cd1da988ec646e4e1484ec1a72513291d..0ab1cf162016422007426698dec60ffd875631a0 100644
+--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
++++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+@@ -1070,7 +1070,7 @@ public class CraftEventFactory {
+ Entity damager = (bukkitDamageSource.isIndirect() && source.getDirectEntity() != null) ? source.getDirectEntity() : source.getCausingEntity();
+ if (source.is(DamageTypeTags.IS_EXPLOSION)) {
+ if (damager == null) {
+- return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
++ return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.blockState); // Paper - Include BlockState for damage
+ }
+ DamageCause damageCause = (damager.getBukkitEntity() instanceof org.bukkit.entity.TNTPrimed) ? DamageCause.BLOCK_EXPLOSION : DamageCause.ENTITY_EXPLOSION;
+ return CraftEventFactory.callEntityDamageEvent(damager, entity, damageCause, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API
+@@ -1117,7 +1117,7 @@ public class CraftEventFactory {
+ } else {
+ throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, source.getDirectBlock(), source.getMsgId()));
+ }
+- return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
++ return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.blockState); // Paper - Include BlockState for damage
+ }
+
+ DamageCause cause;
+@@ -1170,8 +1170,13 @@ public class CraftEventFactory {
+ return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled);
+ }
+
+- private static EntityDamageEvent callEntityDamageEvent(Block damager, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map<DamageModifier, Double> modifiers, Map<DamageModifier, Function<? super Double, Double>> modifierFunctions, boolean cancelled) {
+- EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(damager, damagee.getBukkitEntity(), cause, bukkitDamageSource, modifiers, modifierFunctions);
++ // Paper start
++ private static EntityDamageEvent callEntityDamageEvent(Block damager, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map<DamageModifier, Double> modifiers, Map<DamageModifier, Function<? super Double, Double>> modifierFunctions, boolean cancelled) { // Paper
++ return callEntityDamageEvent(damager, damagee, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled, null);
++ }
++ private static EntityDamageEvent callEntityDamageEvent(Block damager, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map<DamageModifier, Double> modifiers, Map<DamageModifier, Function<? super Double, Double>> modifierFunctions, boolean cancelled, @Nullable org.bukkit.block.BlockState explodedBlockState) {
++ EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(damager, damagee.getBukkitEntity(), cause, bukkitDamageSource, modifiers, modifierFunctions, explodedBlockState);
++ // Paper end
+ return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled);
+ }
+
diff --git a/patches/server/0821-Add-EntityFertilizeEggEvent.patch b/patches/server/0821-Add-EntityFertilizeEggEvent.patch
index 4936a75506..9121d938b7 100644
--- a/patches/server/0821-Add-EntityFertilizeEggEvent.patch
+++ b/patches/server/0821-Add-EntityFertilizeEggEvent.patch
@@ -69,7 +69,7 @@ index a0c52ce65d4035d135b1536c7408a6867a553447..dc035bf94c5f6574ed8ad369b327b7f7
this.playSound(SoundEvents.SNIFFER_EGG_PLOP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 0.5F);
} // Paper - Call EntityDropItemEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index a226b7cdc9c63ef09d7d48269c287af1ab6dbdc4..e9a70547324dabd97dc90820515a11d2b630a704 100644
+index 0ab1cf162016422007426698dec60ffd875631a0..160ebf499b2f088a3fb1ca683e3d7b02acbd548f 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -2109,4 +2109,28 @@ public class CraftEventFactory {
diff --git a/patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch b/patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch
index b2cad9c8d3..c39d5850ee 100644
--- a/patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch
+++ b/patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch
@@ -10,18 +10,18 @@ but then replaced it with a bed, you could respawn
at the bed in that world.
diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java
-index 872bec4c366c86177334452315cc4a8097dae3c0..e9f8949267208b93f0c56c36ada38274ed4280f5 100644
+index c353643a9c9b400d351ef49e1b7d4f516ed0b0eb..f726c3839ab93cc81fee26bfeb821bead3533b5e 100644
--- a/src/main/java/net/minecraft/world/level/block/BedBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java
-@@ -108,6 +108,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
- world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, explodedBlockState), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // Paper - add exploded state
+@@ -107,6 +107,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
+ world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK);
return InteractionResult.SUCCESS;
} else if ((Boolean) state.getValue(BedBlock.OCCUPIED)) {
+ if (!BedBlock.canSetSpawn(world)) return this.explodeBed(state, world, pos); // Paper - check explode first
if (!this.kickVillagerOutOfBed(world, pos)) {
player.displayClientMessage(Component.translatable("block.minecraft.bed.occupied"), true);
}
-@@ -165,8 +166,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
+@@ -163,8 +164,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock
// CraftBukkit end
public static boolean canSetSpawn(Level world) {
diff --git a/patches/server/0842-Expand-PlayerItemMendEvent.patch b/patches/server/0842-Expand-PlayerItemMendEvent.patch
index 617b45a407..02f6324ef9 100644
--- a/patches/server/0842-Expand-PlayerItemMendEvent.patch
+++ b/patches/server/0842-Expand-PlayerItemMendEvent.patch
@@ -51,7 +51,7 @@ index 37c23923ebd4dfd6405d3c19fa42609fc683a42e..7c039d79b6fba3358daaaf8894e05d94
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index e9a70547324dabd97dc90820515a11d2b630a704..c1b5d9713cb301dc06b74d97dca4fd5562c539e2 100644
+index 160ebf499b2f088a3fb1ca683e3d7b02acbd548f..c8627846dc213f2230327e37ac1114d5cd7447ef 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1267,10 +1267,10 @@ public class CraftEventFactory {
diff --git a/patches/server/0845-Fix-block-place-logic.patch b/patches/server/0845-Fix-block-place-logic.patch
index 2e91a7ea75..6438856b91 100644
--- a/patches/server/0845-Fix-block-place-logic.patch
+++ b/patches/server/0845-Fix-block-place-logic.patch
@@ -22,7 +22,7 @@ index 7d76cdc59984b156628273c8357485eb10046007..7180996027f70aef7afe32fb2adfce64
itemstack.consume(1, entityhuman);
return InteractionResult.sidedSuccess(world.isClientSide);
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index 0a883564b9dda4fa0e6a7174a6e46b98af8be3e6..5ebd43bd4fa08df4531051fde606a9b2921692bf 100644
+index acce1b72185d4687ef5a72dd4014d87149f4b092..0f0d35955827ffa8cdc7d947b316704a42242ad3 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -515,13 +515,7 @@ public final class ItemStack implements DataComponentHolder {
diff --git a/patches/server/0846-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/0846-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
index a337cf6e29..c2c946f528 100644
--- a/patches/server/0846-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
+++ b/patches/server/0846-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix spigot sound playing for BlockItem ItemStacks
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index 5ebd43bd4fa08df4531051fde606a9b2921692bf..0d44469149ea1bd80bec6a45a104b63e41ac2d6b 100644
+index 0f0d35955827ffa8cdc7d947b316704a42242ad3..f099e677041daf795ffee35d3a4659274fc3f3d9 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -566,7 +566,11 @@ public final class ItemStack implements DataComponentHolder {
diff --git a/patches/server/0853-Add-event-for-player-editing-sign.patch b/patches/server/0853-Add-event-for-player-editing-sign.patch
index 30316e5cd7..ec1df39aea 100644
--- a/patches/server/0853-Add-event-for-player-editing-sign.patch
+++ b/patches/server/0853-Add-event-for-player-editing-sign.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add event for player editing sign
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index 0d44469149ea1bd80bec6a45a104b63e41ac2d6b..b065b2997a0be453a9cba932bcba8320ce80c283 100644
+index f099e677041daf795ffee35d3a4659274fc3f3d9..d7693f2551ee4c5c3be6d3e77b18b7ddfbd6e36c 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -545,7 +545,7 @@ public final class ItemStack implements DataComponentHolder {
diff --git a/patches/server/0857-Call-missing-BlockDispenseEvent.patch b/patches/server/0857-Call-missing-BlockDispenseEvent.patch
index f018b2ae74..11a27bb794 100644
--- a/patches/server/0857-Call-missing-BlockDispenseEvent.patch
+++ b/patches/server/0857-Call-missing-BlockDispenseEvent.patch
@@ -50,7 +50,7 @@ index 9507dbbb4b490149b9248c384be5adaccae40c41..5bbadc890a72f1cb22c6881ebcc163b0
for (int k = 0; k < 5; ++k) {
worldserver.sendParticles(ParticleTypes.SPLASH, (double) blockposition.getX() + worldserver.random.nextDouble(), (double) (blockposition.getY() + 1), (double) blockposition.getZ() + worldserver.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index c1b5d9713cb301dc06b74d97dca4fd5562c539e2..27bafd5349805171399dbd141f5c568ec35286f4 100644
+index c8627846dc213f2230327e37ac1114d5cd7447ef..3679bc4573346666088995903a3418c359444532 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -2110,6 +2110,32 @@ public class CraftEventFactory {
diff --git a/patches/server/0859-Optimize-player-lookups-for-beacons.patch b/patches/server/0859-Optimize-player-lookups-for-beacons.patch
index e5daf82675..c6e0cae5ab 100644
--- a/patches/server/0859-Optimize-player-lookups-for-beacons.patch
+++ b/patches/server/0859-Optimize-player-lookups-for-beacons.patch
@@ -7,7 +7,7 @@ For larger ranges, it's better to iterate over the player list
than the entity slices.
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
-index d575294924df6b970c5773a5cdd8b2a1a9cbce19..dd1fe8357ccf084880a7f3d4d9e499bde672c787 100644
+index 62b9b5f508462dd2257094cb48ce6123e29cb64d..a6ffbbc1b5021564864e42c0756342352c2b8290 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
@@ -333,7 +333,22 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name
diff --git a/patches/server/0866-ExperienceOrb-should-call-EntitySpawnEvent.patch b/patches/server/0866-ExperienceOrb-should-call-EntitySpawnEvent.patch
index 96941a19e5..e5768c83cb 100644
--- a/patches/server/0866-ExperienceOrb-should-call-EntitySpawnEvent.patch
+++ b/patches/server/0866-ExperienceOrb-should-call-EntitySpawnEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] ExperienceOrb should call EntitySpawnEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 27bafd5349805171399dbd141f5c568ec35286f4..5af62603415865068ca4b79a7e68d8eb813596b1 100644
+index 3679bc4573346666088995903a3418c359444532..d3b85371b014e462b3bd53ec179214c17640ef72 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -735,7 +735,8 @@ public class CraftEventFactory {
diff --git a/patches/server/0874-Only-capture-actual-tree-growth.patch b/patches/server/0874-Only-capture-actual-tree-growth.patch
index de9ee567ad..9f209c027a 100644
--- a/patches/server/0874-Only-capture-actual-tree-growth.patch
+++ b/patches/server/0874-Only-capture-actual-tree-growth.patch
@@ -17,7 +17,7 @@ index 5bbadc890a72f1cb22c6881ebcc163b0c06a367a..4fa838bf97ede6e1c893ba64f53aa7af
}
}
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index b065b2997a0be453a9cba932bcba8320ce80c283..f52e4ebd94a5b91689847be05b8e4bb02db97563 100644
+index d7693f2551ee4c5c3be6d3e77b18b7ddfbd6e36c..f309bd640dfac68b9a1cf59bb52d315285b91c2c 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -445,6 +445,7 @@ public final class ItemStack implements DataComponentHolder {
diff --git a/patches/server/0880-Fix-custom-statistic-criteria-creation.patch b/patches/server/0880-Fix-custom-statistic-criteria-creation.patch
index c15d703018..9588fffe75 100644
--- a/patches/server/0880-Fix-custom-statistic-criteria-creation.patch
+++ b/patches/server/0880-Fix-custom-statistic-criteria-creation.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix custom statistic criteria creation
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index c4e517ef6cf5cd4975846459cf66ebd4db66a805..6e19867f0c242a735801974a8b0332485f450017 100644
+index 6ab39cc723f0874c28def182eaada05c11d36678..e47db705f078245a2be8afc15dd081919188626e 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -617,6 +617,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0891-Add-BlockFace-to-BlockDamageEvent.patch b/patches/server/0891-Add-BlockFace-to-BlockDamageEvent.patch
index 3af304961a..cbd04c8454 100644
--- a/patches/server/0891-Add-BlockFace-to-BlockDamageEvent.patch
+++ b/patches/server/0891-Add-BlockFace-to-BlockDamageEvent.patch
@@ -18,7 +18,7 @@ index 7b4426ac0435d3f419d9ece29dc9eccdb8f99950..cef3a64b5e6c4d34ed079078420078a7
if (blockEvent.isCancelled()) {
// Let the client know the block still exists
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 5af62603415865068ca4b79a7e68d8eb813596b1..47a02b7786d284370d8019b07b8d85f895dc280a 100644
+index d3b85371b014e462b3bd53ec179214c17640ef72..f883781f88fdc00a8c9a789b135569ac805b6860 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -650,13 +650,13 @@ public class CraftEventFactory {
diff --git a/patches/server/0901-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/server/0901-Add-titleOverride-to-InventoryOpenEvent.patch
index 157d433e22..94d372fe34 100644
--- a/patches/server/0901-Add-titleOverride-to-InventoryOpenEvent.patch
+++ b/patches/server/0901-Add-titleOverride-to-InventoryOpenEvent.patch
@@ -79,7 +79,7 @@ index 3d36d79a4e7f16f6face3465cdf54656984f3ebc..41f3cdec7deabf34358b8087df77169f
if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper - Prevent opening inventories when frozen
player.containerMenu = container;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 47a02b7786d284370d8019b07b8d85f895dc280a..eefdb3da069d9615db7c663bcf8a72b78a0e6817 100644
+index f883781f88fdc00a8c9a789b135569ac805b6860..da89b73b08b27ec979545e825efe15aec5cf3af2 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1384,10 +1384,21 @@ public class CraftEventFactory {
diff --git a/patches/server/0918-Fix-UnsafeValues-loadAdvancement.patch b/patches/server/0918-Fix-UnsafeValues-loadAdvancement.patch
index 07ee09f53a..f6e0f5f883 100644
--- a/patches/server/0918-Fix-UnsafeValues-loadAdvancement.patch
+++ b/patches/server/0918-Fix-UnsafeValues-loadAdvancement.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix UnsafeValues#loadAdvancement
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 6e19867f0c242a735801974a8b0332485f450017..bedd75d4bce73f317618da4cc22ef5bdce20a38f 100644
+index e47db705f078245a2be8afc15dd081919188626e..c45e2e29cade6bb8fabc19c5818d5da64a9093c3 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -320,7 +320,27 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0936-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch b/patches/server/0936-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch
index 3541a8efc4..dd807faaf3 100644
--- a/patches/server/0936-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch
+++ b/patches/server/0936-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix CraftMetaItem#getAttributeModifier duplication check
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index 796f7e5ce2661339081214369497318fb32d2743..f24f911bed23016e9e8d17c777481b7af45a5400 100644
+index 0464c7b6cc6cb523fa833c870e4028c3f599ea65..72f60a1308d93eefe73ab8a5a509c08d3ddd1521 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -1267,7 +1267,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1274,7 +1274,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null");
this.checkAttributeList();
for (Map.Entry<Attribute, AttributeModifier> entry : this.attributeModifiers.entries()) {
diff --git a/patches/server/0937-Restore-vanilla-entity-drops-behavior.patch b/patches/server/0937-Restore-vanilla-entity-drops-behavior.patch
index 1b3e74a14f..0360231caf 100644
--- a/patches/server/0937-Restore-vanilla-entity-drops-behavior.patch
+++ b/patches/server/0937-Restore-vanilla-entity-drops-behavior.patch
@@ -165,7 +165,7 @@ index b1b0b0554e0ad035463fd53aa440d9c079b7cfb4..2ed6845f16fab175e2e9e96e76391e63
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index eefdb3da069d9615db7c663bcf8a72b78a0e6817..822bfebc779646dde655239ac217bad011a9eee4 100644
+index da89b73b08b27ec979545e825efe15aec5cf3af2..fe2fd48e8e8c7d5aed409605dda969d9017889d0 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -964,17 +964,23 @@ public class CraftEventFactory {
diff --git a/patches/server/0938-Dont-resend-blocks-on-interactions.patch b/patches/server/0938-Dont-resend-blocks-on-interactions.patch
index a08da77332..9afb1ffa5b 100644
--- a/patches/server/0938-Dont-resend-blocks-on-interactions.patch
+++ b/patches/server/0938-Dont-resend-blocks-on-interactions.patch
@@ -149,7 +149,7 @@ index 6d494b80ae002aea00afa44adf83dad1ae5bbbc1..49557d6f22c5725c663a231deab019d4
return false;
}
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index f52e4ebd94a5b91689847be05b8e4bb02db97563..f444e5b96c1a768690afadec56e17ba67b2f36f2 100644
+index f309bd640dfac68b9a1cf59bb52d315285b91c2c..3e9caee7322d7ffdb93fd7d063675dddc4c71226 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -479,10 +479,12 @@ public final class ItemStack implements DataComponentHolder {
diff --git a/patches/server/0942-Add-experience-points-API.patch b/patches/server/0942-Add-experience-points-API.patch
index cdd4f08f67..84a3db0a12 100644
--- a/patches/server/0942-Add-experience-points-API.patch
+++ b/patches/server/0942-Add-experience-points-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add experience points API
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 230ffd3c4541ef8979605d733b6463e39cd00206..446556028028b25c35dbf3d099bf14a59e32a266 100644
+index 96fc37c871566ec41c42bd0e0f4a147044c239b4..10b62625323e24aa4e9e01e7c0c02d8c49f96a60 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -1855,7 +1855,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0943-Add-drops-to-shear-events.patch b/patches/server/0943-Add-drops-to-shear-events.patch
index 2c756b4953..40a0413a25 100644
--- a/patches/server/0943-Add-drops-to-shear-events.patch
+++ b/patches/server/0943-Add-drops-to-shear-events.patch
@@ -271,7 +271,7 @@ index 9c0bfddd479eef688d2509ad700371c3c860ff1a..754eb747179d9318bc5a3883e5622cc4
public boolean readyForShearing() {
return !this.isSheared() && this.isAlive();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 822bfebc779646dde655239ac217bad011a9eee4..444287fea080182df533198f5c659533de86c5dc 100644
+index fe2fd48e8e8c7d5aed409605dda969d9017889d0..31bc4a0408da3bf3b0d8eb56b045e9742a898a39 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1669,20 +1669,20 @@ public class CraftEventFactory {
diff --git a/patches/server/0944-Add-PlayerShieldDisableEvent.patch b/patches/server/0944-Add-PlayerShieldDisableEvent.patch
index a4316fd237..e4fddcc8e5 100644
--- a/patches/server/0944-Add-PlayerShieldDisableEvent.patch
+++ b/patches/server/0944-Add-PlayerShieldDisableEvent.patch
@@ -16,7 +16,7 @@ sideeffects, meaning the disable event cannot share a handlerlist with
the cooldown event
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 446556028028b25c35dbf3d099bf14a59e32a266..70d225dbf5649e6a3fa658291de734f54a6f73dc 100644
+index 10b62625323e24aa4e9e01e7c0c02d8c49f96a60..18a83c189e50f68d3aa2982d828c9d6d94c13c1c 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -989,7 +989,7 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0952-Add-api-for-spawn-egg-texture-colors.patch b/patches/server/0952-Add-api-for-spawn-egg-texture-colors.patch
index d937011392..3e80b5f5cc 100644
--- a/patches/server/0952-Add-api-for-spawn-egg-texture-colors.patch
+++ b/patches/server/0952-Add-api-for-spawn-egg-texture-colors.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add api for spawn egg texture colors
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index bedd75d4bce73f317618da4cc22ef5bdce20a38f..20502685bad7dc04477308078597ef452f6458fa 100644
+index c45e2e29cade6bb8fabc19c5818d5da64a9093c3..283e306d43152eeb6897ad30a30550af8a6f9ac0 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -645,6 +645,15 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0953-Add-Lifecycle-Event-system.patch b/patches/server/0953-Add-Lifecycle-Event-system.patch
index 4d36afb58d..f4da4cb532 100644
--- a/patches/server/0953-Add-Lifecycle-Event-system.patch
+++ b/patches/server/0953-Add-Lifecycle-Event-system.patch
@@ -739,7 +739,7 @@ index d96399e9bf1a58db5a4a22e58abb99e7660e0694..66bdac50130f523f9dc4379b103b7a46
+ // Paper end - lifecycle events
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 20502685bad7dc04477308078597ef452f6458fa..ef580d02d3d1e46bb6a378ab29b351ad62e18743 100644
+index 283e306d43152eeb6897ad30a30550af8a6f9ac0..d7beec81ab50d1d060d7063b9ab942577b3ba311 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -654,6 +654,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0954-ItemStack-Tooltip-API.patch b/patches/server/0954-ItemStack-Tooltip-API.patch
index d55aff4e5d..95322e2766 100644
--- a/patches/server/0954-ItemStack-Tooltip-API.patch
+++ b/patches/server/0954-ItemStack-Tooltip-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] ItemStack Tooltip API
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index ef580d02d3d1e46bb6a378ab29b351ad62e18743..0b7187b59b6419d015e36a91c1f3b915d3d19d28 100644
+index d7beec81ab50d1d060d7063b9ab942577b3ba311..350abcd717e9bb2973f7470f3c529a6dee715898 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -644,6 +644,20 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0969-Fix-DamageSource-API.patch b/patches/server/0969-Fix-DamageSource-API.patch
index 2f3c828816..5cb5829aa4 100644
--- a/patches/server/0969-Fix-DamageSource-API.patch
+++ b/patches/server/0969-Fix-DamageSource-API.patch
@@ -7,10 +7,10 @@ Uses the correct entity in the EntityDamageByEntity event
Returns the correct entity for API's DamageSource#getCausingEntity
diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
-index a78fd4f9ce97ebece45979908382de8f5fc14c1b..160dc3216e8f5db5f9b3cce5e2d655f2b35b208a 100644
+index ffb7c966617bdfa2c3f05ec4e753e32996493343..359a2f0492a9b938a4f015c546e100e0092ae1d4 100644
--- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java
+++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java
-@@ -28,7 +28,8 @@ public class DamageSource {
+@@ -29,7 +29,8 @@ public class DamageSource {
private boolean withSweep = false;
private boolean melting = false;
private boolean poison = false;
@@ -20,7 +20,7 @@ index a78fd4f9ce97ebece45979908382de8f5fc14c1b..160dc3216e8f5db5f9b3cce5e2d655f2
public DamageSource sweep() {
this.withSweep = true;
-@@ -57,18 +58,18 @@ public class DamageSource {
+@@ -58,18 +59,18 @@ public class DamageSource {
return this.poison;
}
@@ -139,7 +139,7 @@ index 02931861de955352e71d6f5ffc720a17304815fe..55b4b5ad5f084c9a271a716d07667247
if (flag && entity instanceof LivingEntity) {
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index 0a8e46eef6df0bfda663758fc22b1eb4640aaf4e..67c7458619227961e065615853f4ed02559a0723 100644
+index 414297ab9e953049b5f0b091e54d37c6e9edf861..2f9be855815d8db0098f969c2d1bd0c3c25f0892 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -104,7 +104,7 @@ public class Explosion {
@@ -190,7 +190,7 @@ index 4c6e15535fa40aad8cf1920f392589404f9ba79c..35eb95ef6fb6a0f7ea63351e90741c48
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 444287fea080182df533198f5c659533de86c5dc..544567e576023709f86abf57963c37a5490ab9f0 100644
+index 31bc4a0408da3bf3b0d8eb56b045e9742a898a39..92a9643a31d3b753c997854a0db0ceabe883fd29 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1082,7 +1082,7 @@ public class CraftEventFactory {
@@ -201,4 +201,4 @@ index 444287fea080182df533198f5c659533de86c5dc..544567e576023709f86abf57963c37a5
+ final Entity damager = source.getCustomEventDamager(); // Paper - fix DamageSource API
if (source.is(DamageTypeTags.IS_EXPLOSION)) {
if (damager == null) {
- return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.explodedBlockState); // Paper - Include BlockState for damage
+ return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.blockState); // Paper - Include BlockState for damage
diff --git a/patches/server/0976-Rewrite-dataconverter-system.patch b/patches/server/0976-Rewrite-dataconverter-system.patch
index 290aeebd76..e39ee702d3 100644
--- a/patches/server/0976-Rewrite-dataconverter-system.patch
+++ b/patches/server/0976-Rewrite-dataconverter-system.patch
@@ -28906,7 +28906,7 @@ index 1d287dd7379e56f7fd4b425880b850cd843f5789..8ab7ca373a885fbe658013c9c6a2e38d
return nbttagcompound;
});
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 0b7187b59b6419d015e36a91c1f3b915d3d19d28..573b93fc4e392456af2f2cf3900a9d7014f67a22 100644
+index 350abcd717e9bb2973f7470f3c529a6dee715898..2afd0335334fc2392503e598919b3eec95c73961 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -526,7 +526,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
diff --git a/patches/server/0981-Rewrite-chunk-system.patch b/patches/server/0981-Rewrite-chunk-system.patch
index f1d58b1206..b655a09a35 100644
--- a/patches/server/0981-Rewrite-chunk-system.patch
+++ b/patches/server/0981-Rewrite-chunk-system.patch
@@ -14776,7 +14776,7 @@ index cea9c098ade00ee87b8efc8164ab72f5279758f0..197224e31175252d8438a8df585bbb65
+ }
}
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
-index 5c401c7e30ed5f6f32b1ad6523537aa46173cff5..e5c2e53388ff61e4aeae22a74b525d9a26ea0200 100644
+index c95a0af32178fe24448a5ae7a229c86ec883e8de..1d6b3fe2ce240af4ede61588795456b046eee6c9 100644
--- a/src/main/java/io/papermc/paper/util/MCUtil.java
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
@@ -7,17 +7,30 @@ import com.google.common.util.concurrent.ThreadFactoryBuilder;
diff --git a/patches/server/0984-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/patches/server/0984-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
index 73b3fa9e9c..639ebbd6a2 100644
--- a/patches/server/0984-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
+++ b/patches/server/0984-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
@@ -25,7 +25,7 @@ index afc1639c96c01197c6c11873fcd5d779e4ed93a9..7106f388aed2ef2ce14a2228eb85b510
}
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 70d225dbf5649e6a3fa658291de734f54a6f73dc..72b3e64cf6d184e90a6e2c0d822b83312312d67d 100644
+index 18a83c189e50f68d3aa2982d828c9d6d94c13c1c..093d1388ff90ad59110a37536b6639f939549068 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -789,6 +789,14 @@ public abstract class Player extends LivingEntity {
diff --git a/patches/server/0999-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/0999-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch
index 87c5ae2763..3604b1e125 100644
--- a/patches/server/0999-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch
+++ b/patches/server/0999-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch
@@ -13,7 +13,7 @@ A config is provided if you rather let players use these exploits, and let
them destroy the worlds End Portals and get on top of the nether easy.
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index 67c7458619227961e065615853f4ed02559a0723..2826160f3dd951884f17d48c1b3d8f95c90e5856 100644
+index 2f9be855815d8db0098f969c2d1bd0c3c25f0892..a896b9242b0cbe74f4b39fb43beb6d7dbb667d78 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -192,6 +192,7 @@ public class Explosion {
diff --git a/patches/server/1020-Optimize-Hoppers.patch b/patches/server/1020-Optimize-Hoppers.patch
index a73804d96d..bc710d764f 100644
--- a/patches/server/1020-Optimize-Hoppers.patch
+++ b/patches/server/1020-Optimize-Hoppers.patch
@@ -62,7 +62,7 @@ index 2cd2e260e9a958c8aee7b2fb4e010ef8fc600f53..b21daeeb043df885fba5e6a7572d311f
this.profiler.push(() -> {
String s = String.valueOf(worldserver);
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index f444e5b96c1a768690afadec56e17ba67b2f36f2..36e3415b9312d3a80c9f5e1c36b42b7ea30c31c5 100644
+index 3e9caee7322d7ffdb93fd7d063675dddc4c71226..8e2b3dd109dca3089cbce82cd3788874613a3230 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -794,10 +794,16 @@ public final class ItemStack implements DataComponentHolder {
@@ -85,10 +85,10 @@ index f444e5b96c1a768690afadec56e17ba67b2f36f2..36e3415b9312d3a80c9f5e1c36b42b7e
itemstack.setPopTime(this.getPopTime());
return itemstack;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index a7dfad2696e7145af1355a5db132af14d09a6f30..b0421823684ff6b9474b81675742d2ee3b17edf7 100644
+index 30a75492a4b25450c194b4cc44deb665711db5af..f37858eb18defbf11b2f4fe825ab9416ebbc7210 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -37,6 +37,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
+@@ -38,6 +38,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
import co.aikar.timings.Timing; // Paper
public abstract class BlockEntity {
@@ -96,7 +96,7 @@ index a7dfad2696e7145af1355a5db132af14d09a6f30..b0421823684ff6b9474b81675742d2ee
public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper
// CraftBukkit start - data containers
-@@ -210,6 +211,7 @@ public abstract class BlockEntity {
+@@ -211,6 +212,7 @@ public abstract class BlockEntity {
public void setChanged() {
if (this.level != null) {
diff --git a/patches/server/1022-Actually-optimise-explosions.patch b/patches/server/1022-Actually-optimise-explosions.patch
index 6f9813b4fc..1814b2a132 100644
--- a/patches/server/1022-Actually-optimise-explosions.patch
+++ b/patches/server/1022-Actually-optimise-explosions.patch
@@ -34,7 +34,7 @@ The results indicate that this logic is 5 times faster than Vanilla
and 2.3 times faster than Lithium.
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index 2826160f3dd951884f17d48c1b3d8f95c90e5856..feb470e8036ecfcd838cff05a0dc1d43cc96ae3c 100644
+index a896b9242b0cbe74f4b39fb43beb6d7dbb667d78..dc88014c4d9f172cc54e5d77b488128f9ffbc73d 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -112,6 +112,271 @@ public class Explosion {
@@ -478,7 +478,7 @@ index 2826160f3dd951884f17d48c1b3d8f95c90e5856..feb470e8036ecfcd838cff05a0dc1d43
}
public void finalizeExplosion(boolean particles) {
-@@ -553,14 +872,14 @@ public class Explosion {
+@@ -555,14 +874,14 @@ public class Explosion {
private BlockInteraction() {}
}
// Paper start - Optimize explosions
diff --git a/patches/server/1031-Properly-handle-pdc-and-custom-tags-in-ItemMeta.patch b/patches/server/1031-Properly-handle-pdc-and-custom-tags-in-ItemMeta.patch
deleted file mode 100644
index f7ac79e2e0..0000000000
--- a/patches/server/1031-Properly-handle-pdc-and-custom-tags-in-ItemMeta.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jake Potrebic <[email protected]>
-Date: Fri, 26 Apr 2024 11:38:28 -0700
-Subject: [PATCH] Properly handle pdc and custom tags in ItemMeta
-
-
-diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index fac6f3aa00b209e6090f4cb0207e53a994e51cac..c6886ddaebe6a393e079fed18bb0784cff8eb9dc 100644
---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -369,6 +369,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
- this.customTag = customData.copyTag();
- if (this.customTag.contains(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT)) {
- CompoundTag compound = this.customTag.getCompound(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT);
-+ this.customTag.remove(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT); // Paper - remove PDC from custom tag
-+ if (this.customTag.isEmpty()) this.customTag = null; // Paper - remove PDC from custom tag
- Set<String> keys = compound.getAllKeys();
- for (String key : keys) {
- this.persistentDataContainer.put(key, compound.get(key).copy());
-@@ -573,6 +575,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
- ByteArrayInputStream buf = new ByteArrayInputStream(Base64.getDecoder().decode(custom));
- try {
- this.customTag = NbtIo.readCompressed(buf, NbtAccounter.unlimitedHeap());
-+ this.customTag.remove(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT); // Paper - ensure PDC isn't in custom tag
-+ if (this.customTag.isEmpty()) this.customTag = null; // Paper - ensure PDC isn't in custom tag
- } catch (IOException ex) {
- Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
- }
-@@ -795,6 +799,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
-
- if (this.customTag != null) {
- itemTag.put(CraftMetaItem.CUSTOM_DATA, CustomData.of(this.customTag));
-+ this.customTag.remove(CraftMetaItem.BUKKIT_CUSTOM_TAG.BUKKIT); // Paper - remove PDC from custom tag
-+ if (this.customTag.isEmpty()) this.customTag = null; // Paper - reset custom tag if empty
- }
- }
-
diff --git a/patches/server/1032-handle-converting-old-serialized-names-to-new-names.patch b/patches/server/1031-handle-converting-old-serialized-names-to-new-names.patch
index ea703343ed..beb171fe27 100644
--- a/patches/server/1032-handle-converting-old-serialized-names-to-new-names.patch
+++ b/patches/server/1031-handle-converting-old-serialized-names-to-new-names.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] handle converting old serialized names to new names
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index c6886ddaebe6a393e079fed18bb0784cff8eb9dc..7626ccaec65acbda22738296b4dd4423ee535aa8 100644
+index 72f60a1308d93eefe73ab8a5a509c08d3ddd1521..cfb40d9bf093a83c8ae38ffe5c1d17f79528e0c3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -490,7 +490,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -494,7 +494,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
for (Object hideFlagObject : hideFlags) {
String hideFlagString = (String) hideFlagObject;
try {
@@ -17,7 +17,7 @@ index c6886ddaebe6a393e079fed18bb0784cff8eb9dc..7626ccaec65acbda22738296b4dd4423
this.addItemFlags(hideFlatEnum);
} catch (IllegalArgumentException ex) {
// Ignore when we got a old String which does not map to a Enum value anymore
-@@ -661,7 +661,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -663,7 +663,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
enchantKey = "SWEEPING_EDGE";
}
@@ -26,7 +26,7 @@ index c6886ddaebe6a393e079fed18bb0784cff8eb9dc..7626ccaec65acbda22738296b4dd4423
if ((enchantment != null) && (entry.getValue() instanceof Integer)) {
enchantments.put(enchantment, (Integer) entry.getValue());
}
-@@ -695,7 +695,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -697,7 +697,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
continue;
}
AttributeModifier modifier = (AttributeModifier) o;
diff --git a/patches/server/1033-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch
index 7bf145751f..7bf145751f 100644
--- a/patches/server/1033-Add-config-for-mobs-immune-to-default-effects.patch
+++ b/patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch
diff --git a/patches/server/1034-Deep-clone-nbt-tags-in-PDC.patch b/patches/server/1033-Deep-clone-nbt-tags-in-PDC.patch
index ee5dc2335c..fa529a5265 100644
--- a/patches/server/1034-Deep-clone-nbt-tags-in-PDC.patch
+++ b/patches/server/1033-Deep-clone-nbt-tags-in-PDC.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Deep clone nbt tags in PDC
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index feea880d29ca7019bcdfa5232bea2b8ca8c3f644..2c4e7cfe71a9a960e7ac84b19ce32b478b9da3c3 100644
+index cfb40d9bf093a83c8ae38ffe5c1d17f79528e0c3..a1faf7906f8734149538d52173fcb3401200e594 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -284,7 +284,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -17,7 +17,7 @@ index feea880d29ca7019bcdfa5232bea2b8ca8c3f644..2c4e7cfe71a9a960e7ac84b19ce32b47
this.customTag = meta.customTag;
-@@ -1523,7 +1523,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1524,7 +1524,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
if (this.customTag != null) {
clone.customTag = this.customTag.copy();
}
diff --git a/patches/server/1035-Support-old-UUID-format-for-NBT.patch b/patches/server/1034-Support-old-UUID-format-for-NBT.patch
index a38c2a7f7b..a38c2a7f7b 100644
--- a/patches/server/1035-Support-old-UUID-format-for-NBT.patch
+++ b/patches/server/1034-Support-old-UUID-format-for-NBT.patch
diff --git a/patches/server/1036-Fix-shield-disable-inconsistency.patch b/patches/server/1035-Fix-shield-disable-inconsistency.patch
index 61f593ff71..61f593ff71 100644
--- a/patches/server/1036-Fix-shield-disable-inconsistency.patch
+++ b/patches/server/1035-Fix-shield-disable-inconsistency.patch
diff --git a/patches/server/1037-Write-SavedData-IO-async.patch b/patches/server/1036-Write-SavedData-IO-async.patch
index 932cd936fb..932cd936fb 100644
--- a/patches/server/1037-Write-SavedData-IO-async.patch
+++ b/patches/server/1036-Write-SavedData-IO-async.patch
diff --git a/patches/server/1038-Don-t-lose-removed-data-components-in-ItemMeta.patch b/patches/server/1037-Don-t-lose-removed-data-components-in-ItemMeta.patch
index a74a67e381..156a09cd69 100644
--- a/patches/server/1038-Don-t-lose-removed-data-components-in-ItemMeta.patch
+++ b/patches/server/1037-Don-t-lose-removed-data-components-in-ItemMeta.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Don't lose removed data components in ItemMeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index ca41754a8224ad0fe959c982a4b6adfd8b346b05..ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63 100644
+index a1faf7906f8734149538d52173fcb3401200e594..dd17d7d88ad43e0c426a7a508709fc8993d3a5c9 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -174,6 +174,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -22,7 +22,7 @@ index ca41754a8224ad0fe959c982a4b6adfd8b346b05..ba58f0f2f4f9cb99fb6cecfe772ae578
DataComponentPatch build() {
return this.builder.build();
}
-@@ -380,7 +387,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -384,7 +391,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
Set<Map.Entry<DataComponentType<?>, Optional<?>>> keys = tag.entrySet();
for (Map.Entry<DataComponentType<?>, Optional<?>> key : keys) {
@@ -33,7 +33,7 @@ index ca41754a8224ad0fe959c982a4b6adfd8b346b05..ba58f0f2f4f9cb99fb6cecfe772ae578
key.getValue().ifPresentOrElse((value) -> {
this.unhandledTags.set((DataComponentType) key.getKey(), value);
}, () -> {
-@@ -778,9 +787,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -780,9 +789,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
for (Map.Entry<DataComponentType<?>, Optional<?>> e : this.unhandledTags.build().entrySet()) {
@@ -44,4 +44,4 @@ index ca41754a8224ad0fe959c982a4b6adfd8b346b05..ba58f0f2f4f9cb99fb6cecfe772ae578
+ }, () -> itemTag.remove(e.getKey()));
}
- if (!this.persistentDataContainer.isEmpty()) {
+ CompoundTag customTag = (this.customTag != null) ? this.customTag.copy() : null;
diff --git a/patches/server/1039-Add-experimental-improved-give-command.patch b/patches/server/1038-Add-experimental-improved-give-command.patch
index 4ff1984b05..4ff1984b05 100644
--- a/patches/server/1039-Add-experimental-improved-give-command.patch
+++ b/patches/server/1038-Add-experimental-improved-give-command.patch
diff --git a/patches/server/1040-Handle-Large-Packets-disconnecting-client.patch b/patches/server/1039-Handle-Large-Packets-disconnecting-client.patch
index 49f2553189..49f2553189 100644
--- a/patches/server/1040-Handle-Large-Packets-disconnecting-client.patch
+++ b/patches/server/1039-Handle-Large-Packets-disconnecting-client.patch
diff --git a/patches/server/1041-Fix-ItemFlags.patch b/patches/server/1040-Fix-ItemFlags.patch
index c72ef1a1d0..0e894f8bc2 100644
--- a/patches/server/1041-Fix-ItemFlags.patch
+++ b/patches/server/1040-Fix-ItemFlags.patch
@@ -33,7 +33,7 @@ index fca0cfba14dd2cc6f24b56eaf269594b2d87fd04..8734f0b777432cd8639094b75a3da1b9
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63..04a0f63411ed95bcf5bac1689d29bbe52f345bac 100644
+index dd17d7d88ad43e0c426a7a508709fc8993d3a5c9..58de351fd2a4008296aa87f231396d272a1362c3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -224,6 +224,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -60,8 +60,8 @@ index ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63..04a0f63411ed95bcf5bac1689d29bbe5
}
CraftMetaItem(DataComponentPatch tag) {
-@@ -384,6 +394,20 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
- }
+@@ -388,6 +398,20 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+ this.customTag = null;
}
});
+ // Paper start - fix ItemFlags
@@ -81,7 +81,7 @@ index ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63..04a0f63411ed95bcf5bac1689d29bbe5
Set<Map.Entry<DataComponentType<?>, Optional<?>>> keys = tag.entrySet();
for (Map.Entry<DataComponentType<?>, Optional<?>> key : keys) {
-@@ -565,10 +589,19 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -569,10 +593,19 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
String unhandled = SerializableMeta.getString(map, "unhandled", true);
if (unhandled != null) {
@@ -103,7 +103,7 @@ index ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63..04a0f63411ed95bcf5bac1689d29bbe5
} catch (IOException ex) {
Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
}
-@@ -786,6 +819,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -788,6 +821,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
itemTag.put(CraftMetaItem.MAX_DAMAGE, this.maxDamage);
}
@@ -119,7 +119,7 @@ index ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63..04a0f63411ed95bcf5bac1689d29bbe5
for (Map.Entry<DataComponentType<?>, Optional<?>> e : this.unhandledTags.build().entrySet()) {
e.getValue().ifPresentOrElse((value) -> {
itemTag.builder.set((DataComponentType) e.getKey(), value);
-@@ -858,7 +900,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -859,7 +901,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Overridden
boolean isEmpty() {
@@ -128,7 +128,7 @@ index ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63..04a0f63411ed95bcf5bac1689d29bbe5
}
// Paper start
-@@ -1467,6 +1509,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1468,6 +1510,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
&& (this.hasFood() ? that.hasFood() && this.food.equals(that.food) : !that.hasFood())
&& (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage())
&& (this.hasMaxDamage() ? that.hasMaxDamage() && this.maxDamage.equals(that.maxDamage) : !that.hasMaxDamage())
@@ -137,7 +137,7 @@ index ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63..04a0f63411ed95bcf5bac1689d29bbe5
&& (this.version == that.version);
}
-@@ -1509,6 +1553,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1510,6 +1554,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
hash = 61 * hash + (this.hasDamage() ? this.damage : 0);
hash = 61 * hash + (this.hasMaxDamage() ? 1231 : 1237);
hash = 61 * hash + (this.hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0);
@@ -146,7 +146,7 @@ index ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63..04a0f63411ed95bcf5bac1689d29bbe5
hash = 61 * hash + this.version;
return hash;
}
-@@ -1546,6 +1592,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1547,6 +1593,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.damage = this.damage;
clone.maxDamage = this.maxDamage;
clone.version = this.version;
@@ -161,7 +161,7 @@ index ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63..04a0f63411ed95bcf5bac1689d29bbe5
return clone;
} catch (CloneNotSupportedException e) {
throw new Error(e);
-@@ -1655,6 +1709,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1656,6 +1710,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@@ -178,7 +178,7 @@ index ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63..04a0f63411ed95bcf5bac1689d29bbe5
if (!this.unhandledTags.isEmpty()) {
Tag unhandled = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), this.unhandledTags.build()).getOrThrow(IllegalStateException::new);
try {
-@@ -1665,6 +1729,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1666,6 +1730,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
}
}
@@ -193,7 +193,7 @@ index ba58f0f2f4f9cb99fb6cecfe772ae5781f976b63..04a0f63411ed95bcf5bac1689d29bbe5
if (!this.persistentDataContainer.isEmpty()) { // Store custom tags, wrapped in their compound
builder.put(CraftMetaItem.BUKKIT_CUSTOM_TAG.BUKKIT, this.persistentDataContainer.serialize());
-@@ -1806,6 +1878,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1807,6 +1879,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaItem.MAX_DAMAGE.TYPE,
CraftMetaItem.CUSTOM_DATA.TYPE,
CraftMetaItem.ATTRIBUTES.TYPE,
diff --git a/patches/server/1042-Fix-helmet-damage-reduction-inconsistencies.patch b/patches/server/1041-Fix-helmet-damage-reduction-inconsistencies.patch
index 38d5a20724..f5b5797303 100644
--- a/patches/server/1042-Fix-helmet-damage-reduction-inconsistencies.patch
+++ b/patches/server/1041-Fix-helmet-damage-reduction-inconsistencies.patch
@@ -7,7 +7,7 @@ Affect the falling stalactite damage type where the
reduction is not applied like in Vanilla
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 544567e576023709f86abf57963c37a5490ab9f0..5a9c68b60cf3bf694fe1fcd3b095516b6481f8a2 100644
+index 92a9643a31d3b753c997854a0db0ceabe883fd29..547ab158cd0cbf51da06ea97740cfce34bca651b 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1215,7 +1215,7 @@ public class CraftEventFactory {
diff --git a/patches/server/1043-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch b/patches/server/1042-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch
index 736542f8cc..736542f8cc 100644
--- a/patches/server/1043-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch
+++ b/patches/server/1042-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch
diff --git a/patches/server/1044-improve-checking-handled-tags-in-itemmeta.patch b/patches/server/1043-improve-checking-handled-tags-in-itemmeta.patch
index bef86d842e..89ffd06489 100644
--- a/patches/server/1044-improve-checking-handled-tags-in-itemmeta.patch
+++ b/patches/server/1043-improve-checking-handled-tags-in-itemmeta.patch
@@ -404,7 +404,7 @@ index b444bd26d6c3def3494d3cc0520e462408272be3..8e0dd4b7a7a25a8beb27b507047bc48d
getOrEmpty(tag, CraftMetaFirework.FIREWORKS).ifPresent((fireworks) -> {
this.power = fireworks.flightDuration();
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index f41ce4d2184aeb3c6b852d28073bb7ae265d03c3..7c5f9c711c2364ec3a47aed1203df370ed85a3c8 100644
+index 58de351fd2a4008296aa87f231396d272a1362c3..b351ee556b732e7081a7a6157460ade219829f17 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -308,7 +308,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -416,7 +416,7 @@ index f41ce4d2184aeb3c6b852d28073bb7ae265d03c3..7c5f9c711c2364ec3a47aed1203df370
CraftMetaItem.getOrEmpty(tag, CraftMetaItem.NAME).ifPresent((component) -> {
this.displayName = component;
});
-@@ -409,11 +409,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -413,11 +413,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
});
// Paper end - fix ItemFlags
@@ -436,7 +436,7 @@ index f41ce4d2184aeb3c6b852d28073bb7ae265d03c3..7c5f9c711c2364ec3a47aed1203df370
key.getValue().ifPresentOrElse((value) -> {
this.unhandledTags.set((DataComponentType) key.getKey(), value);
}, () -> {
-@@ -1855,63 +1862,73 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1856,63 +1863,73 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
this.version = version;
}
diff --git a/patches/server/1045-General-ItemMeta-fixes.patch b/patches/server/1044-General-ItemMeta-fixes.patch
index 9338f6fe7d..c8b54df4ad 100644
--- a/patches/server/1045-General-ItemMeta-fixes.patch
+++ b/patches/server/1044-General-ItemMeta-fixes.patch
@@ -23,10 +23,10 @@ index 8e2b3dd109dca3089cbce82cd3788874613a3230..a45389d64c04cd4c2a35fbc511595be0
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-index b0421823684ff6b9474b81675742d2ee3b17edf7..285257421a6958b854ecaa468ed275d33990db3d 100644
+index f37858eb18defbf11b2f4fe825ab9416ebbc7210..7963afff4b32a0e46be9bdeb413657718cfc14f5 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
-@@ -139,6 +139,11 @@ public abstract class BlockEntity {
+@@ -140,6 +140,11 @@ public abstract class BlockEntity {
CompoundTag nbttagcompound = new CompoundTag();
this.saveAdditional(nbttagcompound, registryLookup);
@@ -234,7 +234,7 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..cf5d27ccc2225bac3aa57912f444f95d
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index 7765f774bfdbead492ad6427873b8bc94ef64a4b..c2517ad00b6efba47e792a46e591038d79cb3a82 100644
+index b351ee556b732e7081a7a6157460ade219829f17..38454fdc978a24a35e685e65e9b41323781c3ead 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -165,9 +165,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -249,7 +249,7 @@ index 7765f774bfdbead492ad6427873b8bc94ef64a4b..c2517ad00b6efba47e792a46e591038d
<T> Applicator put(ItemMetaKeyType<T> key, T value) {
this.builder.set(key.TYPE, value);
-@@ -1003,6 +1004,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1004,6 +1005,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public void lore(final List<? extends net.kyori.adventure.text.Component> lore) {
@@ -257,7 +257,7 @@ index 7765f774bfdbead492ad6427873b8bc94ef64a4b..c2517ad00b6efba47e792a46e591038d
this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(lore) : null;
}
// Paper end
-@@ -1127,6 +1129,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1128,6 +1130,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
// Paper end
@Override
public void setLore(List<String> lore) {
@@ -265,7 +265,7 @@ index 7765f774bfdbead492ad6427873b8bc94ef64a4b..c2517ad00b6efba47e792a46e591038d
if (lore == null || lore.isEmpty()) {
this.lore = null;
} else {
-@@ -1142,6 +1145,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1143,6 +1146,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
// Paper start
@Override
public void setLoreComponents(List<net.md_5.bungee.api.chat.BaseComponent[]> lore) {
@@ -273,7 +273,7 @@ index 7765f774bfdbead492ad6427873b8bc94ef64a4b..c2517ad00b6efba47e792a46e591038d
if (lore == null) {
this.lore = null;
} else {
-@@ -1409,7 +1413,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1410,7 +1414,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public String getAsString() {
diff --git a/work/BuildData b/work/BuildData
-Subproject a7f7c2118b877fde4cf0f32f1f730ffcdee8e9e
+Subproject 32d1baf2f4e0e7cd1ac22c7b2f6eb4c387e8a34
diff --git a/work/Bukkit b/work/Bukkit
-Subproject 304e83eb384c338546aa96eea51388e0e8407e2
+Subproject ac72b19b01bcb3aef5710677b0b942e09847966
diff --git a/work/CraftBukkit b/work/CraftBukkit
-Subproject 91b1fc3f1cf89e2591367dca1fa7362fe376f28
+Subproject 079901346673010c8eafe4b1e651b0c05d2e2f4
diff --git a/work/Spigot b/work/Spigot
-Subproject b698b49caf14f97a717afd67e13fd7ac59f5108
+Subproject e2c1eee02c2e00f71d78c56d6439dafc3af7dfa