summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--patches/api/0001-Convert-project-to-Gradle.patch12
-rw-r--r--patches/api/0003-Test-changes.patch6
-rw-r--r--patches/api/0004-Code-Generation.patch4
-rw-r--r--patches/api/0006-Adventure.patch40
-rw-r--r--patches/api/0008-Use-ASM-for-event-executors.patch6
-rw-r--r--patches/api/0009-Paper-Plugins.patch8
-rw-r--r--patches/api/0053-Fix-upstream-javadocs.patch4
-rw-r--r--patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch6
-rw-r--r--patches/api/0146-Material-API-additions.patch8
-rw-r--r--patches/api/0166-Fix-Spigot-annotation-mistakes.patch40
-rw-r--r--patches/api/0188-Add-villager-reputation-API.patch4
-rw-r--r--patches/api/0202-Add-methods-to-get-translation-keys.patch40
-rw-r--r--patches/api/0236-Add-RegistryAccess-for-managing-registries.patch44
-rw-r--r--patches/api/0254-Improve-Item-Rarity-API.patch10
-rw-r--r--patches/api/0270-Add-basic-Datapack-API.patch4
-rw-r--r--patches/api/0273-More-Enchantment-API.patch6
-rw-r--r--patches/api/0277-Improve-item-default-attribute-API.patch10
-rw-r--r--patches/api/0287-Missing-Entity-API.patch4
-rw-r--r--patches/api/0299-Option-to-prevent-data-components-copy-in-smithing-r.patch22
-rw-r--r--patches/api/0309-Add-hasCollision-methods-to-various-places.patch8
-rw-r--r--patches/api/0329-More-PotionEffectType-API.patch28
-rw-r--r--patches/api/0346-Add-EntityDyeEvent-and-CollarColorable-interface.patch10
-rw-r--r--patches/api/0361-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch4
-rw-r--r--patches/api/0428-Experimental-annotations-change.patch6
-rw-r--r--patches/api/0430-Improve-Registry.patch28
-rw-r--r--patches/api/0463-Add-missing-wind-charge-damage-type.patch18
-rw-r--r--patches/api/0463-Added-API-to-get-player-ha-proxy-address.patch (renamed from patches/api/0464-Added-API-to-get-player-ha-proxy-address.patch)0
-rw-r--r--patches/api/0464-More-Chest-Block-API.patch (renamed from patches/api/0465-More-Chest-Block-API.patch)0
-rw-r--r--patches/api/0465-Brigadier-based-command-API.patch (renamed from patches/api/0466-Brigadier-based-command-API.patch)2
-rw-r--r--patches/api/0466-Fix-issues-with-recipe-API.patch (renamed from patches/api/0467-Fix-issues-with-recipe-API.patch)76
-rw-r--r--patches/api/0467-Fix-equipment-slot-and-group-API.patch (renamed from patches/api/0468-Fix-equipment-slot-and-group-API.patch)0
-rw-r--r--patches/api/0468-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch (renamed from patches/api/0469-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch)0
-rw-r--r--patches/api/0469-General-ItemMeta-fixes.patch (renamed from patches/api/0470-General-ItemMeta-fixes.patch)21
-rw-r--r--patches/api/0470-Add-missing-fishing-event-state.patch (renamed from patches/api/0471-Add-missing-fishing-event-state.patch)0
-rw-r--r--patches/api/0471-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch (renamed from patches/api/0472-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch)0
-rw-r--r--patches/api/0472-Registry-Modification-API.patch (renamed from patches/api/0473-Registry-Modification-API.patch)10
-rw-r--r--patches/api/0473-Introduce-registry-entry-and-builders.patch (renamed from patches/api/0474-Introduce-registry-entry-and-builders.patch)12
-rw-r--r--patches/api/0474-Proxy-ItemStack-to-CraftItemStack.patch (renamed from patches/api/0475-Proxy-ItemStack-to-CraftItemStack.patch)2
-rw-r--r--patches/api/0475-Make-a-PDC-view-accessible-directly-from-ItemStack.patch (renamed from patches/api/0476-Make-a-PDC-view-accessible-directly-from-ItemStack.patch)0
-rw-r--r--patches/api/0476-Fix-HelpCommand-searching.patch (renamed from patches/api/0477-Fix-HelpCommand-searching.patch)0
-rw-r--r--patches/api/0477-add-Plugin-getDataPath.patch (renamed from patches/api/0478-add-Plugin-getDataPath.patch)0
-rw-r--r--patches/api/0478-Fix-PickupStatus-getting-reset.patch (renamed from patches/api/0479-Fix-PickupStatus-getting-reset.patch)0
-rw-r--r--patches/api/0479-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch (renamed from patches/api/0480-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch)0
-rw-r--r--patches/api/0480-Improve-StandardMessenger-exception-messages.patch (renamed from patches/api/0481-Improve-StandardMessenger-exception-messages.patch)0
-rw-r--r--patches/api/0481-Add-even-more-Enchantment-API.patch (renamed from patches/api/0482-Add-even-more-Enchantment-API.patch)4
-rw-r--r--patches/api/0482-Leashable-API.patch (renamed from patches/api/0483-Leashable-API.patch)0
-rw-r--r--patches/api/0483-Add-enchantment-seed-update-API.patch (renamed from patches/api/0484-Add-enchantment-seed-update-API.patch)4
-rw-r--r--patches/api/0484-Deprecate-for-removal-all-OldEnum-related-methods.patch (renamed from patches/api/0485-Deprecate-for-removal-all-OldEnum-related-methods.patch)34
-rw-r--r--patches/api/0485-Add-FeatureFlag-API.patch (renamed from patches/api/0486-Add-FeatureFlag-API.patch)16
-rw-r--r--patches/api/0486-Tag-Lifecycle-Events.patch (renamed from patches/api/0487-Tag-Lifecycle-Events.patch)0
-rw-r--r--patches/api/0487-Item-serialization-as-json.patch (renamed from patches/api/0488-Item-serialization-as-json.patch)0
-rw-r--r--patches/api/0488-create-TileStateInventoryHolder.patch (renamed from patches/api/0489-create-TileStateInventoryHolder.patch)0
-rw-r--r--patches/api/0489-Add-enchantWithLevels-with-enchantment-registry-set.patch (renamed from patches/api/0490-Add-enchantWithLevels-with-enchantment-registry-set.patch)0
-rw-r--r--patches/api/0490-Improve-entity-effect-API.patch (renamed from patches/api/0491-Improve-entity-effect-API.patch)0
-rw-r--r--patches/api/0491-Add-recipeBrewTime.patch (renamed from patches/api/0492-Add-recipeBrewTime.patch)4
-rw-r--r--patches/api/0492-Add-PlayerInsertLecternBookEvent.patch (renamed from patches/api/0493-Add-PlayerInsertLecternBookEvent.patch)0
-rw-r--r--patches/api/0493-Void-damage-configuration-API.patch (renamed from patches/api/0494-Void-damage-configuration-API.patch)0
-rw-r--r--patches/api/0494-Add-Offline-PDC-API.patch (renamed from patches/api/0495-Add-Offline-PDC-API.patch)0
-rw-r--r--patches/api/0495-Add-AnvilView-bypassEnchantmentLevelRestriction.patch (renamed from patches/api/0496-Add-AnvilView-bypassEnchantmentLevelRestriction.patch)4
-rw-r--r--patches/server/0001-Setup-Gradle-project.patch43
-rw-r--r--patches/server/0002-Remap-fixes.patch34
-rw-r--r--patches/server/0003-Build-system-changes.patch38
-rw-r--r--patches/server/0004-Test-changes.patch160
-rw-r--r--patches/server/0005-Paper-config-files.patch32
-rw-r--r--patches/server/0008-CB-fixes.patch6
-rw-r--r--patches/server/0009-MC-Utils.patch20
-rw-r--r--patches/server/0010-Adventure.patch60
-rw-r--r--patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch14
-rw-r--r--patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch8
-rw-r--r--patches/server/0017-Paper-command.patch6
-rw-r--r--patches/server/0019-Paper-Plugins.patch73
-rw-r--r--patches/server/0020-Plugin-remapping.patch12
-rw-r--r--patches/server/0021-Hook-into-CB-plugin-rewrites.patch24
-rw-r--r--patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch24
-rw-r--r--patches/server/0023-Timings-v2.patch10
-rw-r--r--patches/server/0024-Further-improve-server-tick-loop.patch4
-rw-r--r--patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch6
-rw-r--r--patches/server/0026-Support-components-in-ItemMeta.patch10
-rw-r--r--patches/server/0033-Expose-server-build-information.patch16
-rw-r--r--patches/server/0055-Improve-Player-chat-API-handling.patch8
-rw-r--r--patches/server/0057-Expose-server-CommandMap.patch4
-rw-r--r--patches/server/0058-Be-a-bit-more-informative-in-maxHealth-exception.patch4
-rw-r--r--patches/server/0064-Add-methods-for-working-with-arrows-stuck-in-living-.patch6
-rw-r--r--patches/server/0067-Default-loading-permissions.yml-before-plugins.patch6
-rw-r--r--patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch4
-rw-r--r--patches/server/0069-Remove-Metadata-on-reload.patch4
-rw-r--r--patches/server/0070-Handle-Item-Meta-Inconsistencies.patch8
-rw-r--r--patches/server/0104-Add-setting-for-proxy-online-mode-status.patch4
-rw-r--r--patches/server/0111-Allow-Reloading-of-Command-Aliases.patch4
-rw-r--r--patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch4
-rw-r--r--patches/server/0136-Basic-PlayerProfile-API.patch4
-rw-r--r--patches/server/0137-Add-UnknownCommandEvent.patch4
-rw-r--r--patches/server/0146-Fix-this-stupid-bullshit.patch4
-rw-r--r--patches/server/0147-LivingEntity-setKiller.patch4
-rw-r--r--patches/server/0156-Add-PlayerArmorChangeEvent.patch11
-rw-r--r--patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch4
-rw-r--r--patches/server/0161-AsyncTabCompleteEvent.patch4
-rw-r--r--patches/server/0169-Add-ArmorStand-Item-Meta.patch4
-rw-r--r--patches/server/0176-Player.setPlayerProfile-API.patch6
-rw-r--r--patches/server/0177-getPlayerUniqueId-API.patch4
-rw-r--r--patches/server/0199-Make-shield-blocking-delay-configurable.patch4
-rw-r--r--patches/server/0204-LivingEntity-Active-Item-API.patch4
-rw-r--r--patches/server/0226-Add-Early-Warning-Feature-to-WatchDog.patch6
-rw-r--r--patches/server/0240-Add-ray-tracing-methods-to-LivingEntity.patch4
-rw-r--r--patches/server/0252-Add-LivingEntity-getTargetEntity.patch4
-rw-r--r--patches/server/0266-Make-the-default-permission-message-configurable.patch4
-rw-r--r--patches/server/0290-Expose-the-internal-current-tick.patch4
-rw-r--r--patches/server/0314-Improve-java-version-check.patch6
-rw-r--r--patches/server/0316-Entity-Jump-API.patch4
-rw-r--r--patches/server/0325-Add-tick-times-API-and-mspt-command.patch4
-rw-r--r--patches/server/0326-Expose-MinecraftServer-isRunning.patch4
-rw-r--r--patches/server/0327-Add-Raw-Byte-ItemStack-Serialization.patch4
-rw-r--r--patches/server/0341-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch4
-rw-r--r--patches/server/0351-misc-debugging-dumps.patch4
-rw-r--r--patches/server/0353-Implement-Mob-Goal-API.patch8
-rw-r--r--patches/server/0356-Fix-PotionEffect-ignores-icon-flag.patch8
-rw-r--r--patches/server/0358-Wait-for-Async-Tasks-during-shutdown.patch4
-rw-r--r--patches/server/0373-Fix-Per-World-Difficulty-Remembering-Difficulty.patch6
-rw-r--r--patches/server/0376-Add-Plugin-Tickets-to-API-Chunk-Methods.patch6
-rw-r--r--patches/server/0377-Add-BlockStateMeta-clearBlockState.patch4
-rw-r--r--patches/server/0393-Add-playPickupItemAnimation-to-LivingEntity.patch4
-rw-r--r--patches/server/0404-Add-methods-to-get-translation-keys.patch16
-rw-r--r--patches/server/0407-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch4
-rw-r--r--patches/server/0411-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch4
-rw-r--r--patches/server/0424-Add-getOfflinePlayerIfCached-String.patch4
-rw-r--r--patches/server/0425-Add-ignore-discounts-API.patch10
-rw-r--r--patches/server/0427-Fix-client-lag-on-advancement-loading.patch4
-rw-r--r--patches/server/0432-Add-Destroy-Speed-API.patch9
-rw-r--r--patches/server/0434-Add-LivingEntity-clearActiveItem.patch4
-rw-r--r--patches/server/0439-Add-missing-default-perms-for-commands.patch25
-rw-r--r--patches/server/0445-Expose-LivingEntity-hurt-direction.patch4
-rw-r--r--patches/server/0471-Add-RegistryAccess-for-managing-Registries.patch165
-rw-r--r--patches/server/0489-living-entity-allow-attribute-registration.patch4
-rw-r--r--patches/server/0500-Expand-world-key-API.patch12
-rw-r--r--patches/server/0505-Expose-protocol-version.patch4
-rw-r--r--patches/server/0529-Add-basic-Datapack-API.patch6
-rw-r--r--patches/server/0532-ItemStack-repair-check-API.patch12
-rw-r--r--patches/server/0539-Improve-item-default-attribute-API.patch4
-rw-r--r--patches/server/0552-Line-Of-Sight-Changes.patch4
-rw-r--r--patches/server/0557-Missing-Entity-API.patch6
-rw-r--r--patches/server/0566-Stinger-API.patch6
-rw-r--r--patches/server/0574-Add-EntityDamageItemEvent.patch6
-rw-r--r--patches/server/0579-Option-to-prevent-data-components-copy-in-smithing-r.patch12
-rw-r--r--patches/server/0581-Add-missing-team-sidebar-display-slots.patch6
-rw-r--r--patches/server/0584-Get-entity-default-attributes.patch15
-rw-r--r--patches/server/0586-Add-more-advancement-API.patch10
-rw-r--r--patches/server/0587-Add-ItemFactory-getSpawnEgg-API.patch4
-rw-r--r--patches/server/0593-Add-Raw-Byte-Entity-Serialization.patch6
-rw-r--r--patches/server/0597-Improve-and-expand-AsyncCatcher.patch6
-rw-r--r--patches/server/0598-Add-paper-mobcaps-and-paper-playermobcaps.patch12
-rw-r--r--patches/server/0613-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch9
-rw-r--r--patches/server/0623-Fix-upstreams-block-state-factories.patch10
-rw-r--r--patches/server/0646-Expose-vanilla-BiomeProvider-from-WorldInfo.patch8
-rw-r--r--patches/server/0656-More-PotionEffectType-API.patch6
-rw-r--r--patches/server/0658-API-for-creating-command-sender-which-forwards-feedb.patch4
-rw-r--r--patches/server/0659-Add-missing-structure-set-seed-configs.patch12
-rw-r--r--patches/server/0661-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch4
-rw-r--r--patches/server/0662-Add-GameEvent-tags.patch6
-rw-r--r--patches/server/0668-Put-world-into-worldlist-before-initing-the-world.patch4
-rw-r--r--patches/server/0669-Custom-Potion-Mixes.patch8
-rw-r--r--patches/server/0674-More-Projectile-API.patch169
-rw-r--r--patches/server/0680-Fix-saving-in-unloadWorld.patch4
-rw-r--r--patches/server/0692-WorldCreator-keepSpawnLoaded.patch4
-rw-r--r--patches/server/0701-Add-support-for-Proxy-Protocol.patch4
-rw-r--r--patches/server/0707-Throw-exception-on-world-create-while-being-ticked.patch8
-rw-r--r--patches/server/0713-Don-t-broadcast-messages-to-command-blocks.patch4
-rw-r--r--patches/server/0731-Add-Velocity-IP-Forwarding-Support.patch4
-rw-r--r--patches/server/0732-Add-NamespacedKey-biome-methods.patch4
-rw-r--r--patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch4
-rw-r--r--patches/server/0775-fix-Instruments.patch9
-rw-r--r--patches/server/0802-Add-Shearable-API.patch6
-rw-r--r--patches/server/0824-Add-method-to-remove-all-active-potion-effects.patch4
-rw-r--r--patches/server/0834-fix-item-meta-for-tadpole-buckets.patch4
-rw-r--r--patches/server/0845-API-for-updating-recipes-on-clients.patch10
-rw-r--r--patches/server/0850-Use-correct-seed-on-api-world-load.patch4
-rw-r--r--patches/server/0853-Fix-custom-statistic-criteria-creation.patch4
-rw-r--r--patches/server/0857-Deprecate-and-replace-methods-with-old-StructureType.patch6
-rw-r--r--patches/server/0859-Properly-handle-BlockBreakEvent-isDropItems.patch9
-rw-r--r--patches/server/0881-Fix-silent-equipment-change-for-mobs.patch9
-rw-r--r--patches/server/0891-Fix-UnsafeValues-loadAdvancement.patch4
-rw-r--r--patches/server/0909-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch4
-rw-r--r--patches/server/0913-Improve-Registry.patch10
-rw-r--r--patches/server/0916-Add-drops-to-shear-events.patch9
-rw-r--r--patches/server/0925-Add-api-for-spawn-egg-texture-colors.patch4
-rw-r--r--patches/server/0926-Add-Lifecycle-Event-system.patch8
-rw-r--r--patches/server/0927-ItemStack-Tooltip-API.patch4
-rw-r--r--patches/server/0931-improve-BanList-types.patch4
-rw-r--r--patches/server/0952-Deep-clone-nbt-tags-in-PDC.patch4
-rw-r--r--patches/server/0956-Fix-ItemFlags.patch20
-rw-r--r--patches/server/0959-improve-checking-handled-tags-in-itemmeta.patch35
-rw-r--r--patches/server/0960-General-ItemMeta-fixes.patch195
-rw-r--r--patches/server/0965-Brigadier-based-command-API.patch67
-rw-r--r--patches/server/0966-Fix-issues-with-Recipe-API.patch52
-rw-r--r--patches/server/0967-Fix-equipment-slot-and-group-API.patch14
-rw-r--r--patches/server/0975-Adopt-MaterialRerouting.patch10
-rw-r--r--patches/server/0981-Moonrise-optimisation-patches.patch67
-rw-r--r--patches/server/0982-Rewrite-dataconverter-system.patch6
-rw-r--r--patches/server/0992-Anti-Xray.patch12
-rw-r--r--patches/server/1014-Registry-Modification-API.patch93
-rw-r--r--patches/server/1015-Add-registry-entry-and-builders.patch17
-rw-r--r--patches/server/1017-Proxy-ItemStack-to-CraftItemStack.patch18
-rw-r--r--patches/server/1032-Bundle-spark.patch12
-rw-r--r--patches/server/1037-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch4
-rw-r--r--patches/server/1046-Properly-destroy-placed-blocks-on-the-end-platform.patch16
-rw-r--r--patches/server/1047-Add-enchantment-seed-update-API.patch4
-rw-r--r--patches/server/1052-Add-FeatureFlag-API.patch19
-rw-r--r--patches/server/1054-Item-serialization-as-json.patch4
-rw-r--r--patches/server/1060-Improve-entity-effect-API.patch6
-rw-r--r--patches/server/1061-Add-recipeBrewTime.patch4
-rw-r--r--patches/server/1066-Add-AnvilView-bypassEnchantmentLevelRestriction.patch4
m---------work/Bukkit0
m---------work/CraftBukkit0
212 files changed, 1501 insertions, 1328 deletions
diff --git a/patches/api/0001-Convert-project-to-Gradle.patch b/patches/api/0001-Convert-project-to-Gradle.patch
index 339ca372f0..2f36dea1d5 100644
--- a/patches/api/0001-Convert-project-to-Gradle.patch
+++ b/patches/api/0001-Convert-project-to-Gradle.patch
@@ -27,7 +27,7 @@ index 5dd700a956e915c00b25d91dea8d6f285ddab72b..97e78e27ee0eea2c8b24886eeb19164d
+/.factorypath
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
-index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c46b0b620e
+index 0000000000000000000000000000000000000000..7ac6af074d76b782ef14fe4690bb5b630ededa32
--- /dev/null
+++ b/build.gradle.kts
@@ -0,0 +1,91 @@
@@ -63,8 +63,8 @@ index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c4
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
+ testImplementation("org.hamcrest:hamcrest:2.2")
-+ testImplementation("org.mockito:mockito-core:5.11.0")
-+ testImplementation("org.ow2.asm:asm-tree:9.7")
++ testImplementation("org.mockito:mockito-core:5.14.1")
++ testImplementation("org.ow2.asm:asm-tree:9.7.1")
+}
+
+configure<PublishingExtension> {
@@ -124,7 +124,7 @@ index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c4
+}
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
-index 2c5ac393cffbe61330c5aa95115e7e906c0775d3..0000000000000000000000000000000000000000
+index 19c192e313d48ae35622a032e2b0911ea9fb8aa1..0000000000000000000000000000000000000000
--- a/pom.xml
+++ /dev/null
@@ -1,267 +0,0 @@
@@ -236,13 +236,13 @@ index 2c5ac393cffbe61330c5aa95115e7e906c0775d3..00000000000000000000000000000000
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
-- <version>5.11.0</version>
+- <version>5.14.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm-tree</artifactId>
-- <version>9.7</version>
+- <version>9.7.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
diff --git a/patches/api/0003-Test-changes.patch b/patches/api/0003-Test-changes.patch
index f712825f8b..4339385ed5 100644
--- a/patches/api/0003-Test-changes.patch
+++ b/patches/api/0003-Test-changes.patch
@@ -12,7 +12,7 @@ Co-authored-by: Riley Park <[email protected]>
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index 78aadebda145fe83327ceb430c4b38f9a8e45a2b..8c7a5be5193ae397ec324d78566edce90608ed57 100644
+index 665ad8b7d2728b836f26c2344111144728e00fb6..35480b9f7bb14217130b1b3a0638365a98c7a9d5 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -107,6 +107,12 @@ tasks.test {
@@ -266,10 +266,10 @@ index 89ca06ebecdaadd5dfc7bc74473ca15ad36f6eff..5974ceea58940e1799f3589eac0e39b9
public static Stream<Arguments> data() {
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
-index 5709d52ed4ac4ce8dd8b0569281279f7305c5fb9..a47ee3ce660ec4467b5ed6a4b41fb2d19179a189 100644
+index c67e0784c043ed194f6acde32411e156412a9b24..eb1fd4b911c4af76cdd3eac85d5365e7941a4a2e 100644
--- a/src/test/java/org/bukkit/support/TestServer.java
+++ b/src/test/java/org/bukkit/support/TestServer.java
-@@ -72,6 +72,11 @@ public final class TestServer {
+@@ -83,6 +83,11 @@ public final class TestServer {
UnsafeValues unsafeValues = mock(withSettings().stubOnly());
when(instance.getUnsafe()).thenReturn(unsafeValues);
diff --git a/patches/api/0004-Code-Generation.patch b/patches/api/0004-Code-Generation.patch
index 68c36e0524..56d1a8f094 100644
--- a/patches/api/0004-Code-Generation.patch
+++ b/patches/api/0004-Code-Generation.patch
@@ -7,7 +7,7 @@ Currently includes generated key holder classes for types
used in the Registry Modification API
diff --git a/build.gradle.kts b/build.gradle.kts
-index 8c7a5be5193ae397ec324d78566edce90608ed57..877ea06c0ea8c8c0c73d23fbb996f6692c100d98 100644
+index 35480b9f7bb14217130b1b3a0638365a98c7a9d5..f7aa3f53e119b756b4645ca88cf9642d0f549d2c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,6 +1,7 @@
@@ -19,7 +19,7 @@ index 8c7a5be5193ae397ec324d78566edce90608ed57..877ea06c0ea8c8c0c73d23fbb996f669
java {
@@ -46,6 +47,22 @@ dependencies {
- testImplementation("org.ow2.asm:asm-tree:9.7")
+ testImplementation("org.ow2.asm:asm-tree:9.7.1")
}
+// Paper start
diff --git a/patches/api/0006-Adventure.patch b/patches/api/0006-Adventure.patch
index 2cfdebf791..e464b2a6e6 100644
--- a/patches/api/0006-Adventure.patch
+++ b/patches/api/0006-Adventure.patch
@@ -8,7 +8,7 @@ Co-authored-by: Jake Potrebic <[email protected]>
Co-authored-by: Yannick Lamprecht <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index 3383fb91249ea53740326b538abd905f84ff0e3c..74f0e2b812c1e2e922b136fefe505fc8cbe33e83 100644
+index b2e0bb305d015a19a4cb1e81e1b3b983c979d56d..562f8ae2d9cd2a1238bde1e5cfbf546c4f56bd6e 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -11,12 +11,28 @@ java {
@@ -1008,12 +1008,12 @@ index e3f185dc982d1c38195a4e01ddd485c13ffa58c0..918a045165cdcde264bc24082b7afebb
/**
* Represents black
diff --git a/src/main/java/org/bukkit/JukeboxSong.java b/src/main/java/org/bukkit/JukeboxSong.java
-index 3bf2743fbf123af981d03f0eee6fafd68786ace5..bf487bd9a9fb627c15c7f5e0c623441d367e7c80 100644
+index 5872188c2f3c610ab220a30cf60f45c1eba1b372..c6feb13c735fabbd08676fa8828ce0b9fd54da32 100644
--- a/src/main/java/org/bukkit/JukeboxSong.java
+++ b/src/main/java/org/bukkit/JukeboxSong.java
-@@ -34,4 +34,14 @@ public interface JukeboxSong extends Keyed, Translatable {
- private static JukeboxSong get(@NotNull String s) {
- return Objects.requireNonNull(Registry.JUKEBOX_SONG.get(NamespacedKey.minecraft(s)), "Missing song " + s);
+@@ -33,4 +33,14 @@ public interface JukeboxSong extends Keyed, Translatable {
+ private static JukeboxSong get(@NotNull String key) {
+ return Registry.JUKEBOX_SONG.getOrThrow(NamespacedKey.minecraft(key));
}
+
+ // Paper start - adventure
@@ -2246,10 +2246,10 @@ index b7d8dd30360a38dbdc7bbce40c8e6ced7261f833..0817f2395c2b18828565435568ce651f
public void sendRawMessage(@Nullable UUID sender, @NotNull String message);
}
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
-index 80fb27d6c54988e53857fb330f45bbf32227aee8..c7a901707048e9dc82b8f17f3285727460173c72 100644
+index 241bc2ea6157c29d6d5428c413ea14ac3822e3f7..378ef178bdcf0d71b5d80fc5028ce738437f9391 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
-@@ -316,6 +316,19 @@ public abstract class Enchantment implements Keyed, Translatable {
+@@ -310,6 +310,19 @@ public abstract class Enchantment implements Keyed, Translatable {
* @return True if the enchantment may be applied, otherwise False
*/
public abstract boolean canEnchantItem(@NotNull ItemStack item);
@@ -4422,10 +4422,10 @@ index eade62328895133c026e7e678e648e1fc846f5ee..730c42eddd38acec1cdbb19dfc8c6757
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/MenuType.java b/src/main/java/org/bukkit/inventory/MenuType.java
-index ee39bf9019fa0377beb895a22db0b2a0934a4d84..29dfad691cbdd09d043f6171defc8a7fabbc2b75 100644
+index 45d3889206fb3b7a7303490b8d4e67ede2aae7a4..34d45a105da72481a7c4f2e3831f5d2a676c91c6 100644
--- a/src/main/java/org/bukkit/inventory/MenuType.java
+++ b/src/main/java/org/bukkit/inventory/MenuType.java
-@@ -146,11 +146,45 @@ public interface MenuType extends Keyed {
+@@ -145,11 +145,45 @@ public interface MenuType extends Keyed {
* @param player the player the view belongs to
* @param title the title of the view
* @return the created {@link InventoryView}
@@ -4878,13 +4878,13 @@ index 12595536080ffe09df2b6ecdb83d846f50100d38..9fc47c879ee6b8edf2503f20e4736c29
public interface WritableBookMeta extends ItemMeta {
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
-index eb80f24da65918a21a2fa6691eeb64b621febaf4..941fac4eee338870d8c30cb1f64cab572cf54548 100644
+index 5fc9aaac8baaf185d8e0d4fa7012dc4e13e485b3..804cb7162b34225d5dd84aada283de568d7d6592 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
-@@ -51,4 +51,21 @@ public interface TrimMaterial extends Keyed, Translatable {
- * {@link Material#AMETHYST_SHARD}.
- */
- public static final TrimMaterial AMETHYST = Registry.TRIM_MATERIAL.get(NamespacedKey.minecraft("amethyst"));
+@@ -57,4 +57,21 @@ public interface TrimMaterial extends Keyed, Translatable {
+ private static TrimMaterial getTrimMaterial(@NotNull String key) {
+ return Registry.TRIM_MATERIAL.getOrThrow(NamespacedKey.minecraft(key));
+ }
+
+ // Paper start - adventure
+ /**
@@ -4904,13 +4904,13 @@ index eb80f24da65918a21a2fa6691eeb64b621febaf4..941fac4eee338870d8c30cb1f64cab57
+ // Paper end - adventure
}
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
-index bd512a7840d4686759097ee4cbd8b375c530956b..f2242ddc4085f7e7cdd748d860857822e3d9b007 100644
+index e8e0786467bfcea14d30b352489b7bfb1a06addc..56cfe665daba1754e41f633d7c18172bebf87028 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
-@@ -83,4 +83,21 @@ public interface TrimPattern extends Keyed, Translatable {
- * {@link Material#BOLT_ARMOR_TRIM_SMITHING_TEMPLATE}.
- */
- public static final TrimPattern BOLT = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("bolt"));
+@@ -89,4 +89,21 @@ public interface TrimPattern extends Keyed, Translatable {
+ private static TrimPattern getTrimPattern(@NotNull String key) {
+ return Registry.TRIM_PATTERN.getOrThrow(NamespacedKey.minecraft(key));
+ }
+
+ // Paper start - adventure
+ /**
@@ -4930,7 +4930,7 @@ index bd512a7840d4686759097ee4cbd8b375c530956b..f2242ddc4085f7e7cdd748d860857822
+ // Paper end - adventure
}
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
-index 8250821fe7be7987c92edbc36911f88875c470fc..2aadb995ab512086ac41b48df4c724722697e166 100644
+index a37e6419fcb116afbbfe8c5895b9c226a3a010dc..871adbf2f9015dffac9edc3ce35aa6acd3b75526 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java
+++ b/src/main/java/org/bukkit/map/MapCursor.java
@@ -17,7 +17,7 @@ public final class MapCursor {
diff --git a/patches/api/0008-Use-ASM-for-event-executors.patch b/patches/api/0008-Use-ASM-for-event-executors.patch
index 964f911f67..b16393a72e 100644
--- a/patches/api/0008-Use-ASM-for-event-executors.patch
+++ b/patches/api/0008-Use-ASM-for-event-executors.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors.
Uses method handles for private or static methods.
diff --git a/build.gradle.kts b/build.gradle.kts
-index 74f0e2b812c1e2e922b136fefe505fc8cbe33e83..1f627e81622e77b81b1228a467fbb9e6fd979e7a 100644
+index 562f8ae2d9cd2a1238bde1e5cfbf546c4f56bd6e..65783c7a3711fa147a4e090a9715f7e218a312ac 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -47,6 +47,9 @@ dependencies {
@@ -14,8 +14,8 @@ index 74f0e2b812c1e2e922b136fefe505fc8cbe33e83..1f627e81622e77b81b1228a467fbb9e6
apiAndDocs("net.kyori:adventure-text-serializer-plain")
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
+
-+ implementation("org.ow2.asm:asm:9.7")
-+ implementation("org.ow2.asm:asm-commons:9.7")
++ implementation("org.ow2.asm:asm:9.7.1")
++ implementation("org.ow2.asm:asm-commons:9.7.1")
// Paper end
compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
diff --git a/patches/api/0009-Paper-Plugins.patch b/patches/api/0009-Paper-Plugins.patch
index bf7455aa11..175cbd40eb 100644
--- a/patches/api/0009-Paper-Plugins.patch
+++ b/patches/api/0009-Paper-Plugins.patch
@@ -5,11 +5,11 @@ Subject: [PATCH] Paper Plugins
diff --git a/build.gradle.kts b/build.gradle.kts
-index 1f627e81622e77b81b1228a467fbb9e6fd979e7a..3c50362de25617d878ef58f14f67c240005ff624 100644
+index 65783c7a3711fa147a4e090a9715f7e218a312ac..c55223e0d0c30b7575bc5322e993d0205cbda85f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -52,7 +52,7 @@ dependencies {
- implementation("org.ow2.asm:asm-commons:9.7")
+ implementation("org.ow2.asm:asm-commons:9.7.1")
// Paper end
- compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
@@ -2535,10 +2535,10 @@ index a8be3e23e3e280ad301d9530de50028515612966..43b58e920e739bb949ac0673e9ef73ba
@Override
public FileConfiguration getConfig() {
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
-index a47ee3ce660ec4467b5ed6a4b41fb2d19179a189..c79faf4197f9c0a7256cefe2b001182102d2b796 100644
+index eb1fd4b911c4af76cdd3eac85d5365e7941a4a2e..2a3ae4afef2716a5fdcefbb6d5e0e011d1db9934 100644
--- a/src/test/java/org/bukkit/support/TestServer.java
+++ b/src/test/java/org/bukkit/support/TestServer.java
-@@ -26,8 +26,7 @@ public final class TestServer {
+@@ -27,8 +27,7 @@ public final class TestServer {
Thread creatingThread = Thread.currentThread();
when(instance.isPrimaryThread()).then(mock -> Thread.currentThread().equals(creatingThread));
diff --git a/patches/api/0053-Fix-upstream-javadocs.patch b/patches/api/0053-Fix-upstream-javadocs.patch
index af0d852bfe..135849142c 100644
--- a/patches/api/0053-Fix-upstream-javadocs.patch
+++ b/patches/api/0053-Fix-upstream-javadocs.patch
@@ -634,10 +634,10 @@ index af5110b4160979c39cc1e5de6fa3bd7957b21403..15a0a733b0e5804655b5957cbf208312
* @param location the location to remove
* @see #getExploredLocations()
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
-index 45dd54afa6d6f3d9895ef52f13076d3351036e4b..cfa0d4809f9bb4ac150251efa85ba4d1808ab1b2 100644
+index c48f13cc8ece0fa9913450e4402e496ce01a03fb..af4582f3e4687933dac6ccd43667a373f8daedb6 100644
--- a/src/main/java/org/bukkit/entity/Villager.java
+++ b/src/main/java/org/bukkit/entity/Villager.java
-@@ -228,7 +228,7 @@ public interface Villager extends AbstractVillager {
+@@ -224,7 +224,7 @@ public interface Villager extends AbstractVillager {
*/
Profession NITWIT = getProfession("nitwit");
/**
diff --git a/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch b/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch
index 1b451c151b..dae4f69251 100644
--- a/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch
+++ b/patches/api/0067-Allow-plugins-to-use-SLF4J-for-logging.patch
@@ -14,7 +14,7 @@ it without having to shade it in the plugin and going through
several layers of logging abstraction.
diff --git a/build.gradle.kts b/build.gradle.kts
-index 3c50362de25617d878ef58f14f67c240005ff624..76aa23da778b0fe8a093429c56cb29b044359b40 100644
+index c55223e0d0c30b7575bc5322e993d0205cbda85f..33e4635dbe6afabecfaaaeff57495e5b3ca5f891 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -12,6 +12,8 @@ java {
@@ -33,8 +33,8 @@ index 3c50362de25617d878ef58f14f67c240005ff624..76aa23da778b0fe8a093429c56cb29b0
+ api("org.apache.logging.log4j:log4j-api:$log4jVersion")
+ api("org.slf4j:slf4j-api:$slf4jVersion")
- implementation("org.ow2.asm:asm:9.7")
- implementation("org.ow2.asm:asm-commons:9.7")
+ implementation("org.ow2.asm:asm:9.7.1")
+ implementation("org.ow2.asm:asm-commons:9.7.1")
@@ -140,6 +144,8 @@ tasks.withType<Javadoc> {
"https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
diff --git a/patches/api/0146-Material-API-additions.patch b/patches/api/0146-Material-API-additions.patch
index 6867aebfcd..bfae3f8d2b 100644
--- a/patches/api/0146-Material-API-additions.patch
+++ b/patches/api/0146-Material-API-additions.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Material API additions
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index 111c9a6be1f3d095cf8e82b118371986b6cc0fc7..c407bc264ab6c2e5aa7122d4caec63f9b482d76d 100644
+index 625fed5709d8dd814f4143d30ddb43bc57644fe6..28f2192f8a2748dfc631ce4b33599e23e6e68c62 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
-@@ -129,6 +129,7 @@ import org.jetbrains.annotations.Nullable;
+@@ -131,6 +131,7 @@ import org.jetbrains.annotations.Nullable;
/**
* An enum of all material IDs accepted by the official server and client
*/
@@ -16,8 +16,8 @@ index 111c9a6be1f3d095cf8e82b118371986b6cc0fc7..c407bc264ab6c2e5aa7122d4caec63f9
public enum Material implements Keyed, Translatable {
//<editor-fold desc="Materials" defaultstate="collapsed">
AIR(9648, 0),
-@@ -4662,6 +4663,22 @@ public enum Material implements Keyed, Translatable {
- }
+@@ -4681,6 +4682,22 @@ public enum Material implements Keyed, Translatable {
+ });
}
+ // Paper start
diff --git a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch
index 47e2270732..7797491404 100644
--- a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch
+++ b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch
@@ -269,7 +269,7 @@ index f9c9ae463aacd593e3aa9caf037ea1e23d56c780..38ccfd0a1b38e7a87185e668d3c02081
/**
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
-index c30600666e7b32b8b4ba1e20ede04fd5ebd5a692..eec6c9cd7da6938351905129bb5a66f49a257d01 100644
+index b02efba048be00e42502111fcdd2297529926666..fb4b6f0e908ffa50c3b2f8d04d9f3810898b8d5e 100644
--- a/src/main/java/org/bukkit/Location.java
+++ b/src/main/java/org/bukkit/Location.java
@@ -46,7 +46,7 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
@@ -300,10 +300,10 @@ index c30600666e7b32b8b4ba1e20ede04fd5ebd5a692..eec6c9cd7da6938351905129bb5a66f4
if (this.world == null) {
return null;
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index c407bc264ab6c2e5aa7122d4caec63f9b482d76d..a432e1c776cd5bda7ba9da8a1b608cb30495e647 100644
+index 28f2192f8a2748dfc631ce4b33599e23e6e68c62..bddfc295bb1247097cb5fdae6e13585a45c18e1c 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
-@@ -4683,20 +4683,20 @@ public enum Material implements Keyed, Translatable {
+@@ -4702,20 +4702,20 @@ public enum Material implements Keyed, Translatable {
* Do not use for any reason.
*
* @return ID of this material
@@ -328,7 +328,7 @@ index c407bc264ab6c2e5aa7122d4caec63f9b482d76d..a432e1c776cd5bda7ba9da8a1b608cb3
public boolean isLegacy() {
return legacy;
}
-@@ -4772,8 +4772,10 @@ public enum Material implements Keyed, Translatable {
+@@ -4791,8 +4791,10 @@ public enum Material implements Keyed, Translatable {
* Gets the MaterialData class associated with this Material
*
* @return MaterialData associated with this Material
@@ -339,7 +339,7 @@ index c407bc264ab6c2e5aa7122d4caec63f9b482d76d..a432e1c776cd5bda7ba9da8a1b608cb3
public Class<? extends MaterialData> getData() {
Preconditions.checkArgument(legacy, "Cannot get data class of Modern Material");
return ctor.getDeclaringClass();
-@@ -5229,7 +5231,11 @@ public enum Material implements Keyed, Translatable {
+@@ -5248,7 +5250,11 @@ public enum Material implements Keyed, Translatable {
* material.
*
* @return true if this material can be interacted with.
@@ -453,25 +453,25 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f
return note;
}
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
-index 883338632b81f6eebc03c95d5883536a5d87fc59..fbede496b05c4b9b1ecd12e711a100586776d469 100644
+index 30ba3daba730c2994b589cc321d66b503da2fe8b..4e67b944351ec3743e5eeaba3f5de99e0df15154 100644
--- a/src/main/java/org/bukkit/Registry.java
+++ b/src/main/java/org/bukkit/Registry.java
-@@ -228,14 +228,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -248,14 +248,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*
* @see TrimMaterial
*/
- @ApiStatus.Experimental
- Registry<TrimMaterial> TRIM_MATERIAL = Bukkit.getRegistry(TrimMaterial.class);
+ Registry<TrimMaterial> TRIM_MATERIAL = Objects.requireNonNull(Bukkit.getRegistry(TrimMaterial.class), "No registry present for TrimMaterial. This is a bug.");
/**
* Trim patterns.
*
* @see TrimPattern
*/
- @ApiStatus.Experimental
- Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
+ Registry<TrimPattern> TRIM_PATTERN = Objects.requireNonNull(Bukkit.getRegistry(TrimPattern.class), "No registry present for TrimPattern. This is a bug.");
/**
* Damage types.
-@@ -343,8 +341,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -385,8 +383,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*
* @param input non-null input
* @return registered object or null if does not exist
@@ -715,10 +715,10 @@ index 3e07fc1bc0e08d0cfd998711c7fd547b2b7b6b73..f4a739d8022d19a7ae0ee9bf93eb5c48
/**
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
-index dfd8187ef941e8afe9cb28a26bf0d2cf2e4c4bc5..d285a1df492d2155f179e8abc17d0bf7527e6d38 100644
+index 6c745f4db620870d7e74ead2e846df34832a9e8e..eb6b330763931b55d73537153dbdb5cc96d3e94f 100644
--- a/src/main/java/org/bukkit/block/BlockType.java
+++ b/src/main/java/org/bukkit/block/BlockType.java
-@@ -3433,9 +3433,14 @@ public interface BlockType extends Keyed, Translatable {
+@@ -3437,9 +3437,14 @@ public interface BlockType extends Keyed, Translatable {
* state as well. This method will return true if there is at least one
* state in which additional interact handling is performed for the
* block type.
@@ -787,10 +787,10 @@ index a7c4e4baf14dd64e454028002c1c5d4f83ec1659..53c61cfa4c2cdc3adfe1c5b43fb15eeb
public interface SuspiciousSand extends BrushableBlock {
}
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
-index c7a901707048e9dc82b8f17f3285727460173c72..64675a3641acb50676ca0122f8473ce94de8fba7 100644
+index 378ef178bdcf0d71b5d80fc5028ce738437f9391..25985a3872ac142c0a3b2fb2dc5387ecdd3ff5b3 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
-@@ -269,7 +269,7 @@ public abstract class Enchantment implements Keyed, Translatable {
+@@ -263,7 +263,7 @@ public abstract class Enchantment implements Keyed, Translatable {
* @deprecated enchantment groupings are now managed by tags, not categories
*/
@NotNull
@@ -1875,7 +1875,7 @@ index edef478786bb7456af29ca960009873095830050..e8ac449e6280827beb6d2699df75b1d5
/**
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
-index 2aadb995ab512086ac41b48df4c724722697e166..4d96cf385fa5c6d80097bdf6282be5f0eed73307 100644
+index 871adbf2f9015dffac9edc3ce35aa6acd3b75526..0899981b9ab1f98dacc617156d12779421e4c275 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java
+++ b/src/main/java/org/bukkit/map/MapCursor.java
@@ -163,9 +163,9 @@ public final class MapCursor {
@@ -1902,7 +1902,7 @@ index 2aadb995ab512086ac41b48df4c724722697e166..4d96cf385fa5c6d80097bdf6282be5f0
public void setRawType(byte type) {
Type enumType = Type.byValue(type);
Preconditions.checkArgument(enumType != null, "Unknown type by id %s", type);
-@@ -336,9 +336,9 @@ public final class MapCursor {
+@@ -332,9 +332,9 @@ public final class MapCursor {
* Gets the internal value of the cursor.
*
* @return the value
@@ -1914,7 +1914,7 @@ index 2aadb995ab512086ac41b48df4c724722697e166..4d96cf385fa5c6d80097bdf6282be5f0
byte getValue();
/**
-@@ -346,9 +346,9 @@ public final class MapCursor {
+@@ -342,9 +342,9 @@ public final class MapCursor {
*
* @param value the value
* @return the matching type
@@ -2836,10 +2836,10 @@ index 0ea9c6b2420a0f990bd1fdf50fc015e37a7060d8..e99644eae1c662b117aa19060d2484ac
/**
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
-index 6bbfebab2ee2b59b3f3213789ecb59e2e7f2680a..42d893ce75a75fe46a4e52b17dc405f5b609ab86 100644
+index bd9ea2fe16b81f5ef5e83427e49c898db69cd4dc..e2d1d26b9debbe1ef852f0260180200a916a7db7 100644
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
-@@ -279,9 +279,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
+@@ -278,9 +278,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
* Returns the unique ID of this type.
*
* @return Unique ID
@@ -2851,7 +2851,7 @@ index 6bbfebab2ee2b59b3f3213789ecb59e2e7f2680a..42d893ce75a75fe46a4e52b17dc405f5
public abstract int getId();
/**
-@@ -317,9 +317,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
+@@ -316,9 +316,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
*
* @param id Unique ID to fetch
* @return Resulting type, or null if not found.
diff --git a/patches/api/0188-Add-villager-reputation-API.patch b/patches/api/0188-Add-villager-reputation-API.patch
index 4a5414e548..b9fa646f28 100644
--- a/patches/api/0188-Add-villager-reputation-API.patch
+++ b/patches/api/0188-Add-villager-reputation-API.patch
@@ -109,7 +109,7 @@ index 0000000000000000000000000000000000000000..5600fcdc9795a9f49091db48d73bbd49
+ TRADING,
+}
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
-index ecb0f32a4449f8000248c4bebf89a56df186899f..d839630d7b2e51629e52edf24e7c6dd86b5f58f6 100644
+index 5a61175ccfe67c0a3c55cc2b84772fa8f6e6a6cb..98a7c5c549e797100f6aaf440606ef31a2be1e3b 100644
--- a/src/main/java/org/bukkit/entity/Villager.java
+++ b/src/main/java/org/bukkit/entity/Villager.java
@@ -3,6 +3,8 @@ package org.bukkit.entity;
@@ -121,7 +121,7 @@ index ecb0f32a4449f8000248c4bebf89a56df186899f..d839630d7b2e51629e52edf24e7c6dd8
import org.bukkit.Keyed;
import org.bukkit.Location;
import org.bukkit.NamespacedKey;
-@@ -289,4 +291,50 @@ public interface Villager extends AbstractVillager {
+@@ -281,4 +283,50 @@ public interface Villager extends AbstractVillager {
return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(new Profession[0]);
}
}
diff --git a/patches/api/0202-Add-methods-to-get-translation-keys.patch b/patches/api/0202-Add-methods-to-get-translation-keys.patch
index b1d2db8661..fe71b1056a 100644
--- a/patches/api/0202-Add-methods-to-get-translation-keys.patch
+++ b/patches/api/0202-Add-methods-to-get-translation-keys.patch
@@ -144,10 +144,10 @@ index dc66bd69646ac949d1386ce8f6ff913e9475439d..4482e8f2c617c2f51b2b53762e775d11
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index a432e1c776cd5bda7ba9da8a1b608cb30495e647..c2552d37295443f79abfe58f91c8261ce06661e8 100644
+index bddfc295bb1247097cb5fdae6e13585a45c18e1c..39bf5b2e93f45000d2e894b5c3d059b889068aae 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
-@@ -130,7 +130,7 @@ import org.jetbrains.annotations.Nullable;
+@@ -132,7 +132,7 @@ import org.jetbrains.annotations.Nullable;
* An enum of all material IDs accepted by the official server and client
*/
@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
@@ -156,7 +156,7 @@ index a432e1c776cd5bda7ba9da8a1b608cb30495e647..c2552d37295443f79abfe58f91c8261c
//<editor-fold desc="Materials" defaultstate="collapsed">
AIR(9648, 0),
STONE(22948),
-@@ -4679,6 +4679,17 @@ public enum Material implements Keyed, Translatable {
+@@ -4698,6 +4698,17 @@ public enum Material implements Keyed, Translatable {
}
// Paper end
@@ -174,7 +174,7 @@ index a432e1c776cd5bda7ba9da8a1b608cb30495e647..c2552d37295443f79abfe58f91c8261c
/**
* Do not use for any reason.
*
-@@ -5428,9 +5439,11 @@ public enum Material implements Keyed, Translatable {
+@@ -5447,9 +5458,11 @@ public enum Material implements Keyed, Translatable {
* material
* @see #getBlockTranslationKey()
* @see #getItemTranslationKey()
@@ -187,10 +187,10 @@ index a432e1c776cd5bda7ba9da8a1b608cb30495e647..c2552d37295443f79abfe58f91c8261c
if (this.isItem()) {
return asItemType().getTranslationKey();
diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java
-index eae90e72b1dff5ab3b1a4fdcfe57187e85fe4d49..62d2b3f950860dee0898d77b0a29635c3f9a7e23 100644
+index 807e89d026bffae521ead39c514a872ae4d406b3..c9f02466a04d20579fe2258bb02acf98e163ca81 100644
--- a/src/main/java/org/bukkit/MusicInstrument.java
+++ b/src/main/java/org/bukkit/MusicInstrument.java
-@@ -7,7 +7,7 @@ import java.util.Collections;
+@@ -6,7 +6,7 @@ import java.util.Collections;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -199,9 +199,9 @@ index eae90e72b1dff5ab3b1a4fdcfe57187e85fe4d49..62d2b3f950860dee0898d77b0a29635c
public static final MusicInstrument PONDER_GOAT_HORN = getInstrument("ponder_goat_horn");
public static final MusicInstrument SING_GOAT_HORN = getInstrument("sing_goat_horn");
-@@ -52,4 +52,11 @@ public abstract class MusicInstrument implements Keyed {
-
- return instrument;
+@@ -46,4 +46,11 @@ public abstract class MusicInstrument implements Keyed {
+ private static MusicInstrument getInstrument(@NotNull String key) {
+ return Registry.INSTRUMENT.getOrThrow(NamespacedKey.minecraft(key));
}
+
+ // Paper start - translation key
@@ -312,7 +312,7 @@ index 745413357506fa7399f8ba44dfe222d1f0c919f1..25db31b2e9a6d75f0c59f75237842f9a
// Paper end
}
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
-index d285a1df492d2155f179e8abc17d0bf7527e6d38..fc21405a18bac88678653674f9d42a08b3d7cb9b 100644
+index eb6b330763931b55d73537153dbdb5cc96d3e94f..5bfa98695265cdfd246411f93ab670d2c9e64ef1 100644
--- a/src/main/java/org/bukkit/block/BlockType.java
+++ b/src/main/java/org/bukkit/block/BlockType.java
@@ -125,7 +125,7 @@ import org.jetbrains.annotations.Nullable;
@@ -324,7 +324,7 @@ index d285a1df492d2155f179e8abc17d0bf7527e6d38..fc21405a18bac88678653674f9d42a08
/**
* Typed represents a subtype of {@link BlockType}s that have a known block
-@@ -3498,4 +3498,13 @@ public interface BlockType extends Keyed, Translatable {
+@@ -3502,4 +3502,13 @@ public interface BlockType extends Keyed, Translatable {
@Nullable
@Deprecated
Material asMaterial();
@@ -339,10 +339,10 @@ index d285a1df492d2155f179e8abc17d0bf7527e6d38..fc21405a18bac88678653674f9d42a08
+ // Paper end - add Translatable
}
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
-index 64675a3641acb50676ca0122f8473ce94de8fba7..daae9bb234d2e10530b2bed35fada98652514e0e 100644
+index 25985a3872ac142c0a3b2fb2dc5387ecdd3ff5b3..269a7b42479c053e3320b6a0f9ca2013cfe4bdad 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
-@@ -15,7 +15,7 @@ import org.jetbrains.annotations.Nullable;
+@@ -14,7 +14,7 @@ import org.jetbrains.annotations.Nullable;
/**
* The various type of enchantments that may be added to armour or weapons
*/
@@ -351,7 +351,7 @@ index 64675a3641acb50676ca0122f8473ce94de8fba7..daae9bb234d2e10530b2bed35fada986
/**
* Provides protection against environmental damage
*/
-@@ -330,6 +330,16 @@ public abstract class Enchantment implements Keyed, Translatable {
+@@ -324,6 +324,16 @@ public abstract class Enchantment implements Keyed, Translatable {
public abstract net.kyori.adventure.text.@NotNull Component displayName(int level);
// Paper end
@@ -420,10 +420,10 @@ index d248069adfc67eb840951f7ab4a1fa5d30214dec..976f701ed9b9873945a5628173c580e2
* Gets if this EntityType is enabled by feature in a world.
*
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
-index d839630d7b2e51629e52edf24e7c6dd86b5f58f6..0759f66986cec2c7e3f765aaa5b1654b5ed9f4b5 100644
+index 98a7c5c549e797100f6aaf440606ef31a2be1e3b..163f1afde2e04fdf4dddb894da62b301b52ed539 100644
--- a/src/main/java/org/bukkit/entity/Villager.java
+++ b/src/main/java/org/bukkit/entity/Villager.java
-@@ -185,7 +185,7 @@ public interface Villager extends AbstractVillager {
+@@ -181,7 +181,7 @@ public interface Villager extends AbstractVillager {
* Represents the various different Villager professions there may be.
* Villagers have different trading options depending on their profession,
*/
@@ -432,7 +432,7 @@ index d839630d7b2e51629e52edf24e7c6dd86b5f58f6..0759f66986cec2c7e3f765aaa5b1654b
Profession NONE = getProfession("none");
/**
-@@ -290,6 +290,13 @@ public interface Villager extends AbstractVillager {
+@@ -282,6 +282,13 @@ public interface Villager extends AbstractVillager {
static Profession[] values() {
return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(new Profession[0]);
}
@@ -526,7 +526,7 @@ index 5bd252c0ae3b09fe141d131360c67bb9bfbf5422..78587d9fabe6371a23a7963917b054db
+
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
-index 5707d038bdc41448bca7d6ebf4ef5b378809f5a8..69e7cbe49ff2388dea0214f6cb26f36f29ec1453 100644
+index af09398e0864d338da530495bfd577db8adbe65a..60eec8a12f01562678732bcf38ac407e70d74965 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
@@ -564,7 +564,7 @@ index 5707d038bdc41448bca7d6ebf4ef5b378809f5a8..69e7cbe49ff2388dea0214f6cb26f36f
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
-index 270f85e99084ddf029bef076c335fe6b9bbddbb5..5dd1c084e42ee93f3a358f58ed76b0a7d36f0713 100644
+index 1db9c6bd6e44ddd3d8550a2906422c97d45eb9ea..2b1a1ad04212651ad5a43edecca12b495ce61fd5 100644
--- a/src/main/java/org/bukkit/inventory/ItemType.java
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
@@ -576,7 +576,7 @@ index 270f85e99084ddf029bef076c335fe6b9bbddbb5..5dd1c084e42ee93f3a358f58ed76b0a7
/**
* Typed represents a subtype of {@link ItemType}s that have a known item meta type
-@@ -2302,4 +2302,13 @@ public interface ItemType extends Keyed, Translatable {
+@@ -2297,4 +2297,13 @@ public interface ItemType extends Keyed, Translatable {
@Nullable
@Deprecated
Material asMaterial();
diff --git a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch
index f08dfa8fde..275ee68a7c 100644
--- a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch
+++ b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch
@@ -207,10 +207,10 @@ index e0f652117e585882693736de8165ae9c689e1d68..fbe14c327ee9c1ac07893853ca7c699e
return server.getRegistry(tClass);
}
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
-index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f2125babf61c 100644
+index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e23d273ebd 100644
--- a/src/main/java/org/bukkit/Registry.java
+++ b/src/main/java/org/bukkit/Registry.java
-@@ -88,8 +88,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -98,8 +98,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* Server banner patterns.
*
* @see PatternType
@@ -222,7 +222,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
/**
* Server biomes.
*
-@@ -103,7 +105,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -113,7 +115,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* @apiNote BlockType is not ready for public usage yet
*/
@ApiStatus.Internal
@@ -231,7 +231,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
/**
* Custom boss bars.
*
-@@ -135,13 +137,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -155,13 +157,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*
* @see Cat.Type
*/
@@ -249,7 +249,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
/**
* Server entity types.
*
-@@ -153,7 +157,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -173,7 +177,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*
* @see MusicInstrument
*/
@@ -258,7 +258,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
/**
* Server item types.
*
-@@ -161,7 +165,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -181,7 +185,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* @apiNote ItemType is not ready for public usage yet
*/
@ApiStatus.Internal
@@ -267,7 +267,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
/**
* Default server loot tables.
*
-@@ -180,13 +184,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -200,13 +204,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* @see MenuType
*/
@ApiStatus.Experimental
@@ -283,13 +283,13 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
/**
* Server particles.
*
-@@ -209,14 +213,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -229,14 +233,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* Server structures.
*
* @see Structure
+ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#STRUCTURE}
*/
-- Registry<Structure> STRUCTURE = Bukkit.getRegistry(Structure.class);
+- Registry<Structure> STRUCTURE = Objects.requireNonNull(Bukkit.getRegistry(Structure.class), "No registry present for Structure. This is a bug.");
+ @Deprecated(since = "1.20.6") // Paper
+ Registry<Structure> STRUCTURE = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(Structure.class), "No registry present for Structure. This is a bug."); // Paper
/**
@@ -297,18 +297,18 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
*
* @see StructureType
*/
-- Registry<StructureType> STRUCTURE_TYPE = Bukkit.getRegistry(StructureType.class);
-+ Registry<StructureType> STRUCTURE_TYPE = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.STRUCTURE_TYPE); // Paper
+- Registry<StructureType> STRUCTURE_TYPE = Objects.requireNonNull(Bukkit.getRegistry(StructureType.class), "No registry present for StructureType. This is a bug.");
++ Registry<StructureType> STRUCTURE_TYPE = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.STRUCTURE_TYPE), "No registry present for StructureType. This is a bug."); // Paper
/**
* Sound keys.
*
-@@ -227,40 +233,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -247,40 +253,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* Trim materials.
*
* @see TrimMaterial
+ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#TRIM_MATERIAL}
*/
-- Registry<TrimMaterial> TRIM_MATERIAL = Bukkit.getRegistry(TrimMaterial.class);
+- Registry<TrimMaterial> TRIM_MATERIAL = Objects.requireNonNull(Bukkit.getRegistry(TrimMaterial.class), "No registry present for TrimMaterial. This is a bug.");
+ @Deprecated(since = "1.20.6") // Paper
+ Registry<TrimMaterial> TRIM_MATERIAL = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(TrimMaterial.class), "No registry present for TrimMaterial. This is a bug."); // Paper
/**
@@ -317,7 +317,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
* @see TrimPattern
+ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#TRIM_PATTERN}
*/
-- Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
+- Registry<TrimPattern> TRIM_PATTERN = Objects.requireNonNull(Bukkit.getRegistry(TrimPattern.class), "No registry present for TrimPattern. This is a bug.");
+ @Deprecated(since = "1.20.6")
+ Registry<TrimPattern> TRIM_PATTERN = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(TrimPattern.class), "No registry present for TrimPattern. This is a bug."); // Paper
/**
@@ -357,7 +357,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
/**
* Memory Keys.
*
-@@ -297,25 +310,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -327,25 +340,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*
* @see Frog.Variant
*/
@@ -432,10 +432,10 @@ index 0000000000000000000000000000000000000000..f5ece852f97017f71bc129e194cb2129
+ }
+}
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
-index c79faf4197f9c0a7256cefe2b001182102d2b796..55f1bc7d01e5184172559c43b8327ac86d58041b 100644
+index 2a3ae4afef2716a5fdcefbb6d5e0e011d1db9934..494419922f11e494c9de6f757bb76f0cfe5d7c81 100644
--- a/src/test/java/org/bukkit/support/TestServer.java
+++ b/src/test/java/org/bukkit/support/TestServer.java
-@@ -37,36 +37,11 @@ public final class TestServer {
+@@ -38,46 +38,11 @@ public final class TestServer {
when(instance.getBukkitVersion()).thenReturn("BukkitVersion_" + TestServer.class.getPackage().getImplementationVersion());
@@ -460,6 +460,16 @@ index c79faf4197f9c0a7256cefe2b001182102d2b796..55f1bc7d01e5184172559c43b8327ac8
-
- @NotNull
- @Override
+- public Keyed getOrThrow(@NotNull NamespacedKey key) {
+- Keyed keyed = get(key);
+-
+- Preconditions.checkArgument(keyed != null, "No %s registry entry found for key %s.", aClass, key);
+-
+- return keyed;
+- }
+-
+- @NotNull
+- @Override
- public Stream<Keyed> stream() {
- throw new UnsupportedOperationException("Not supported");
- }
diff --git a/patches/api/0254-Improve-Item-Rarity-API.patch b/patches/api/0254-Improve-Item-Rarity-API.patch
index 30bc1e6e14..7a78a33aec 100644
--- a/patches/api/0254-Improve-Item-Rarity-API.patch
+++ b/patches/api/0254-Improve-Item-Rarity-API.patch
@@ -43,10 +43,10 @@ index 0000000000000000000000000000000000000000..f1cd5a4f37eee8975ac3d0421b524afc
+ }
+}
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index c2552d37295443f79abfe58f91c8261ce06661e8..7f6cb6471c5f324e2bcdf47d6c7628c2231d7727 100644
+index 39bf5b2e93f45000d2e894b5c3d059b889068aae..4ceb90598e4060678c2382568d4a691769efe126 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
-@@ -4690,6 +4690,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
+@@ -4709,6 +4709,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
}
// Paper end - add Translatable
@@ -110,7 +110,7 @@ index e7931f73f10fe35ebd5fe4a04b036d53bb117ebd..cbce835ed6d44e5b8c9aaae4e36a77f8
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
-index 69e7cbe49ff2388dea0214f6cb26f36f29ec1453..d2af613c56010f3b0dd0d3ff7b438193127353d0 100644
+index 60eec8a12f01562678732bcf38ac407e70d74965..45fc5fab3817a8d9e1c83bcfb0add9eba023abfe 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -994,5 +994,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
@@ -132,10 +132,10 @@ index 69e7cbe49ff2388dea0214f6cb26f36f29ec1453..d2af613c56010f3b0dd0d3ff7b438193
// Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
-index 5dd1c084e42ee93f3a358f58ed76b0a7d36f0713..2b5a18fe7e885fa9b581c0afb299e31f3db2690c 100644
+index 2b1a1ad04212651ad5a43edecca12b495ce61fd5..9077257ed935a26af057b9d090f7d819956ebbce 100644
--- a/src/main/java/org/bukkit/inventory/ItemType.java
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
-@@ -2311,4 +2311,13 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
+@@ -2306,4 +2306,13 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
@Override
@NotNull String getTranslationKey();
// Paper end - add Translatable
diff --git a/patches/api/0270-Add-basic-Datapack-API.patch b/patches/api/0270-Add-basic-Datapack-API.patch
index ee03cb3350..5535058f12 100644
--- a/patches/api/0270-Add-basic-Datapack-API.patch
+++ b/patches/api/0270-Add-basic-Datapack-API.patch
@@ -237,10 +237,10 @@ index b558fa73dbcf3747690933e6aadf7061a0de2630..be68351555bde59a4e55bf1bad261e9f
@NotNull
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index 7f6cb6471c5f324e2bcdf47d6c7628c2231d7727..d0aaf145cf34e0c02d5c7b842c203d0630b04b53 100644
+index 4ceb90598e4060678c2382568d4a691769efe126..052d319e69f22277cb6e379e47380c7dc466d120 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
-@@ -5499,6 +5499,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
+@@ -5518,6 +5518,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
* @param world the world to check
* @return true if this material can be used in this World.
*/
diff --git a/patches/api/0273-More-Enchantment-API.patch b/patches/api/0273-More-Enchantment-API.patch
index 1119346aaa..4acfd23dc8 100644
--- a/patches/api/0273-More-Enchantment-API.patch
+++ b/patches/api/0273-More-Enchantment-API.patch
@@ -41,10 +41,10 @@ index 0000000000000000000000000000000000000000..aec3b41d7c3388e26fa203e3c062f1e6
+ }
+}
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
-index daae9bb234d2e10530b2bed35fada98652514e0e..53dbb852d6a34f0814b81852c7f10f55c38299e7 100644
+index 269a7b42479c053e3320b6a0f9ca2013cfe4bdad..ddd44191c67c1926e615edabb82ed0b592fbee09 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
-@@ -290,11 +290,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
+@@ -284,11 +284,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
* Cursed enchantments are found the same way treasure enchantments are
*
* @return true if the enchantment is cursed
@@ -56,7 +56,7 @@ index daae9bb234d2e10530b2bed35fada98652514e0e..53dbb852d6a34f0814b81852c7f10f55
public abstract boolean isCursed();
/**
-@@ -330,6 +326,118 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
+@@ -324,6 +320,118 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
public abstract net.kyori.adventure.text.@NotNull Component displayName(int level);
// Paper end
diff --git a/patches/api/0277-Improve-item-default-attribute-API.patch b/patches/api/0277-Improve-item-default-attribute-API.patch
index 4f60142e56..cba247deeb 100644
--- a/patches/api/0277-Improve-item-default-attribute-API.patch
+++ b/patches/api/0277-Improve-item-default-attribute-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Improve item default attribute API
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index d0aaf145cf34e0c02d5c7b842c203d0630b04b53..5c869feaecd95dbdd658e16f5739bb41540f18bd 100644
+index 052d319e69f22277cb6e379e47380c7dc466d120..eec1e53ce607d36a2e72f16a4a351869fd2f609f 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
-@@ -4705,6 +4705,23 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
+@@ -4724,6 +4724,23 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
}
// Paper end - item rarity API
@@ -32,7 +32,7 @@ index d0aaf145cf34e0c02d5c7b842c203d0630b04b53..5c869feaecd95dbdd658e16f5739bb41
/**
* Do not use for any reason.
*
-@@ -5412,13 +5429,34 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
+@@ -5431,13 +5448,34 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
}
}
@@ -72,10 +72,10 @@ index d0aaf145cf34e0c02d5c7b842c203d0630b04b53..5c869feaecd95dbdd658e16f5739bb41
*
* @param slot the {@link EquipmentSlot} to check
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
-index 2b5a18fe7e885fa9b581c0afb299e31f3db2690c..a6d1dde422de98f178c0c9add99e01203a35e5cb 100644
+index 9077257ed935a26af057b9d090f7d819956ebbce..c42cfa76ff73a3ce8a164cb94a9c3f553b005ea5 100644
--- a/src/main/java/org/bukkit/inventory/ItemType.java
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
-@@ -2261,6 +2261,21 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
+@@ -2256,6 +2256,21 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
// @NotNull
// EquipmentSlot getEquipmentSlot();
diff --git a/patches/api/0287-Missing-Entity-API.patch b/patches/api/0287-Missing-Entity-API.patch
index cb796c7184..94f2d56efe 100644
--- a/patches/api/0287-Missing-Entity-API.patch
+++ b/patches/api/0287-Missing-Entity-API.patch
@@ -258,10 +258,10 @@ index adb20a9abba33c32d553f620fa82b27dff64ab5f..1f6702b0de00b87dbed7f6d93e911655
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
-index 117e3e8c63e56247213b2a9cf9908915d4c65665..70cc76f0c1f4ba23bfa78591e8144bbf8d3f0868 100644
+index 104b9c8a28ddbab8f47dbf3a0ac06bec35d7c003..5101553bb71d60fee7ac234f7ef2863781dd7742 100644
--- a/src/main/java/org/bukkit/entity/Cat.java
+++ b/src/main/java/org/bukkit/entity/Cat.java
-@@ -94,4 +94,36 @@ public interface Cat extends Tameable, Sittable {
+@@ -90,4 +90,36 @@ public interface Cat extends Tameable, Sittable {
return Lists.newArrayList(Registry.CAT_VARIANT).toArray(new Type[0]);
}
}
diff --git a/patches/api/0299-Option-to-prevent-data-components-copy-in-smithing-r.patch b/patches/api/0299-Option-to-prevent-data-components-copy-in-smithing-r.patch
index fa4ad55705..425b15cca4 100644
--- a/patches/api/0299-Option-to-prevent-data-components-copy-in-smithing-r.patch
+++ b/patches/api/0299-Option-to-prevent-data-components-copy-in-smithing-r.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Option to prevent data components copy in smithing recipes
diff --git a/src/main/java/org/bukkit/inventory/SmithingRecipe.java b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
-index 0235f4aa50eb69f87068005c669bd486899025d6..1ef9a715a2736e88a16083c6873803a8bd6bcf29 100644
+index 717878019aa78bc3ab1acadd2908567b70614320..ee462ca9fd3e0ddcdb0fffd5dba91d82fa6ad08f 100644
--- a/src/main/java/org/bukkit/inventory/SmithingRecipe.java
+++ b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
-@@ -13,6 +13,7 @@ public class SmithingRecipe implements Recipe, Keyed {
+@@ -14,6 +14,7 @@ public class SmithingRecipe implements Recipe, Keyed {
private final ItemStack result;
private final RecipeChoice base;
private final RecipeChoice addition;
@@ -16,10 +16,10 @@ index 0235f4aa50eb69f87068005c669bd486899025d6..1ef9a715a2736e88a16083c6873803a8
/**
* Create a smithing recipe to produce the specified result ItemStack.
-@@ -28,6 +29,23 @@ public class SmithingRecipe implements Recipe, Keyed {
+@@ -29,6 +30,23 @@ public class SmithingRecipe implements Recipe, Keyed {
*/
@Deprecated
- public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
+ public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition) {
+ // Paper start
+ this(key, result, base, addition, true);
+ }
@@ -34,13 +34,13 @@ index 0235f4aa50eb69f87068005c669bd486899025d6..1ef9a715a2736e88a16083c6873803a8
+ * @deprecated use {@link SmithingTrimRecipe} or {@link SmithingTransformRecipe}
+ */
+ @Deprecated
-+ public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
++ public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition, boolean copyDataComponents) {
+ this.copyDataComponents = copyDataComponents;
+ // Paper end
this.key = key;
this.result = result;
this.base = base;
-@@ -65,4 +83,26 @@ public class SmithingRecipe implements Recipe, Keyed {
+@@ -66,4 +84,26 @@ public class SmithingRecipe implements Recipe, Keyed {
public NamespacedKey getKey() {
return this.key;
}
@@ -68,10 +68,10 @@ index 0235f4aa50eb69f87068005c669bd486899025d6..1ef9a715a2736e88a16083c6873803a8
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java b/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
-index 08fd3eca8383cdc2d06c3ce973e8c402d279077e..68e7132d77151b7b8312638d8bb79ea59e2fa5a6 100644
+index 7a9d77a0cd1c287a3f940f94d4398f84720488aa..e5726da0507ee70cb9dd76c57da6a8442e771307 100644
--- a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
+++ b/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
-@@ -23,6 +23,22 @@ public class SmithingTransformRecipe extends SmithingRecipe {
+@@ -24,6 +24,22 @@ public class SmithingTransformRecipe extends SmithingRecipe {
super(key, result, base, addition);
this.template = template;
}
@@ -86,7 +86,7 @@ index 08fd3eca8383cdc2d06c3ce973e8c402d279077e..68e7132d77151b7b8312638d8bb79ea5
+ * @param addition The addition ingredient
+ * @param copyDataComponents whether to copy the data components from the input base item to the output
+ */
-+ public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
++ public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice template, @Nullable RecipeChoice base, @Nullable RecipeChoice addition, boolean copyDataComponents) {
+ super(key, result, base, addition, copyDataComponents);
+ this.template = template;
+ }
@@ -95,10 +95,10 @@ index 08fd3eca8383cdc2d06c3ce973e8c402d279077e..68e7132d77151b7b8312638d8bb79ea5
/**
* Get the template recipe item.
diff --git a/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java b/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
-index 32cbdc342615e76ff7a896e67cb0736b0bdf1978..ce36bb5b030f17e11f74e987235be143c1925aa7 100644
+index 4271c54cfbb0fabd241794d8aea31374d7efe45a..232aa8aeef9e34146e413e56b3681919c8850687 100644
--- a/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
+++ b/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
-@@ -23,6 +23,21 @@ public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe
+@@ -24,6 +24,21 @@ public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe
super(key, new ItemStack(Material.AIR), base, addition);
this.template = template;
}
diff --git a/patches/api/0309-Add-hasCollision-methods-to-various-places.patch b/patches/api/0309-Add-hasCollision-methods-to-various-places.patch
index 133a8b3a9a..59e7c03a1f 100644
--- a/patches/api/0309-Add-hasCollision-methods-to-various-places.patch
+++ b/patches/api/0309-Add-hasCollision-methods-to-various-places.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add hasCollision methods to various places
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index 5c869feaecd95dbdd658e16f5739bb41540f18bd..6959f36023b12ec2dece9b91a3b8a5d07b635430 100644
+index eec1e53ce607d36a2e72f16a4a351869fd2f609f..23fff8ee71b99aab8e650f3916511b7f34b5eb4e 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
-@@ -4722,6 +4722,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
+@@ -4741,6 +4741,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
}
// Paper end - item default attributes API
@@ -67,10 +67,10 @@ index f4a739d8022d19a7ae0ee9bf93eb5c4846b4bd40..94e1278340c0d9d2be9edc68f6454143
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
-index fc21405a18bac88678653674f9d42a08b3d7cb9b..0fa0fa4aaf55710030a2220dee98e11764d8d27a 100644
+index 5bfa98695265cdfd246411f93ab670d2c9e64ef1..a58ef2238208fbb55341f4532eaa288577ed8c0e 100644
--- a/src/main/java/org/bukkit/block/BlockType.java
+++ b/src/main/java/org/bukkit/block/BlockType.java
-@@ -3507,4 +3507,13 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
+@@ -3511,4 +3511,13 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
@Override
@NotNull String getTranslationKey();
// Paper end - add Translatable
diff --git a/patches/api/0329-More-PotionEffectType-API.patch b/patches/api/0329-More-PotionEffectType-API.patch
index 580e9eceb4..c23d878a4d 100644
--- a/patches/api/0329-More-PotionEffectType-API.patch
+++ b/patches/api/0329-More-PotionEffectType-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] More PotionEffectType API
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
-index c1f46c27f0571ce54f35ee0fab9b586ea62ee832..7870a796e719148a42d18f1497b56c0d8f651a43 100644
+index 39997047be9f3796d8d5d8934eb361e23d273ebd..6112db5d1153d045f2271038bada6b46d1a6a051 100644
--- a/src/main/java/org/bukkit/Registry.java
+++ b/src/main/java/org/bukkit/Registry.java
-@@ -331,6 +331,33 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -361,6 +361,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
* @see GameEvent
*/
Registry<GameEvent> GAME_EVENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.GAME_EVENT); // Paper
@@ -19,31 +19,13 @@ index c1f46c27f0571ce54f35ee0fab9b586ea62ee832..7870a796e719148a42d18f1497b56c0d
+ *
+ * @see org.bukkit.potion.PotionEffectType
+ */
-+ Registry<org.bukkit.potion.PotionEffectType> POTION_EFFECT_TYPE = new Registry<org.bukkit.potion.PotionEffectType>() {
-+
-+ @Nullable
-+ @Override
-+ public org.bukkit.potion.PotionEffectType get(@NotNull NamespacedKey key) {
-+ return org.bukkit.potion.PotionEffectType.getByKey(key);
-+ }
-+
-+ @NotNull
-+ @Override
-+ public Iterator<org.bukkit.potion.PotionEffectType> iterator() {
-+ return java.util.Arrays.stream(org.bukkit.potion.PotionEffectType.values()).iterator();
-+ }
-+
-+ @Override
-+ public @NotNull Stream<org.bukkit.potion.PotionEffectType> stream() {
-+ return StreamSupport.stream(this.spliterator(), false);
-+ }
-+ };
++ Registry<org.bukkit.potion.PotionEffectType> POTION_EFFECT_TYPE = EFFECT;
+ // Paper end - potion effect type registry
/**
* Get the object by its key.
*
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
-index 42d893ce75a75fe46a4e52b17dc405f5b609ab86..10fa51d116b40450b51af9110d5637f3505ebf65 100644
+index e2d1d26b9debbe1ef852f0260180200a916a7db7..d02bb37768404422969d8b93e009960d0a693a93 100644
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable;
@@ -55,7 +37,7 @@ index 42d893ce75a75fe46a4e52b17dc405f5b609ab86..10fa51d116b40450b51af9110d5637f3
private static final BiMap<Integer, PotionEffectType> ID_MAP = HashBiMap.create();
/**
-@@ -361,4 +361,57 @@ public abstract class PotionEffectType implements Keyed, Translatable {
+@@ -360,4 +360,57 @@ public abstract class PotionEffectType implements Keyed, Translatable {
public static PotionEffectType[] values() {
return Lists.newArrayList(Registry.EFFECT).toArray(new PotionEffectType[0]);
}
diff --git a/patches/api/0346-Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/api/0346-Add-EntityDyeEvent-and-CollarColorable-interface.patch
index cef3e66464..1abc6221da 100644
--- a/patches/api/0346-Add-EntityDyeEvent-and-CollarColorable-interface.patch
+++ b/patches/api/0346-Add-EntityDyeEvent-and-CollarColorable-interface.patch
@@ -125,7 +125,7 @@ index 0000000000000000000000000000000000000000..049471bac6c9b830fe7717c129173a72
+ }
+}
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
-index 70cc76f0c1f4ba23bfa78591e8144bbf8d3f0868..60cf07bff0898176c8d7af84b3e65d7a1ee8cf2e 100644
+index 5101553bb71d60fee7ac234f7ef2863781dd7742..de422f00f8fd1975669ee5431c466c9c16d699af 100644
--- a/src/main/java/org/bukkit/entity/Cat.java
+++ b/src/main/java/org/bukkit/entity/Cat.java
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
@@ -154,10 +154,10 @@ index 70cc76f0c1f4ba23bfa78591e8144bbf8d3f0868..60cf07bff0898176c8d7af84b3e65d7a
/**
diff --git a/src/main/java/org/bukkit/entity/Wolf.java b/src/main/java/org/bukkit/entity/Wolf.java
-index 03c4a3dedf97e06734f1ec975055214809f1fe61..4b84c04675775e2a606630b00de8afe51665cebc 100644
+index 91e96ee5362fd71d28deef1687ebeb0d8dfa05b9..c73489f4b745bc84501ce94f0227b034d9768eae 100644
--- a/src/main/java/org/bukkit/entity/Wolf.java
+++ b/src/main/java/org/bukkit/entity/Wolf.java
-@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
+@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Represents a Wolf
*/
@@ -166,7 +166,7 @@ index 03c4a3dedf97e06734f1ec975055214809f1fe61..4b84c04675775e2a606630b00de8afe5
/**
* Checks if this wolf is angry
-@@ -35,6 +35,7 @@ public interface Wolf extends Tameable, Sittable {
+@@ -34,6 +34,7 @@ public interface Wolf extends Tameable, Sittable {
* @return the color of the collar
*/
@NotNull
@@ -174,7 +174,7 @@ index 03c4a3dedf97e06734f1ec975055214809f1fe61..4b84c04675775e2a606630b00de8afe5
public DyeColor getCollarColor();
/**
-@@ -42,6 +43,7 @@ public interface Wolf extends Tameable, Sittable {
+@@ -41,6 +42,7 @@ public interface Wolf extends Tameable, Sittable {
*
* @param color the color to apply
*/
diff --git a/patches/api/0361-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch b/patches/api/0361-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch
index 9b5ef25cf4..2f0f5483e8 100644
--- a/patches/api/0361-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch
+++ b/patches/api/0361-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Expose codepoint limit in YamlConfigOptions, and increase
diff --git a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
-index a090ef390dddd546ebf323aee4545cbe9950e098..488e4931006d12700782c76766876e3863308775 100644
+index 9ae41b2bd454274a15abbd557ac397724e58d184..018c20fefeee43970c8c5b5d5f2ad9c297eeccb3 100644
--- a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
+++ b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
-@@ -97,6 +97,7 @@ public class YamlConfiguration extends FileConfiguration {
+@@ -98,6 +98,7 @@ public class YamlConfiguration extends FileConfiguration {
public void loadFromString(@NotNull String contents) throws InvalidConfigurationException {
Preconditions.checkArgument(contents != null, "Contents cannot be null");
yamlLoaderOptions.setProcessComments(options().parseComments());
diff --git a/patches/api/0428-Experimental-annotations-change.patch b/patches/api/0428-Experimental-annotations-change.patch
index 1b4b1cf589..010af408d2 100644
--- a/patches/api/0428-Experimental-annotations-change.patch
+++ b/patches/api/0428-Experimental-annotations-change.patch
@@ -25,10 +25,10 @@ index 7522c611b5214dd09867c434d5f7cf161f5c04ca..026b1832bcd163ab89668c991bf002e6
/**
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
-index 6959f36023b12ec2dece9b91a3b8a5d07b635430..de469f32dd9a01e0e2fde016044a783dde0c5b98 100644
+index 23fff8ee71b99aab8e650f3916511b7f34b5eb4e..77a15a99e441bd81650806142581bd5b24f30e10 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
-@@ -2499,6 +2499,8 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
+@@ -2501,6 +2501,8 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
EGG(21603, 16),
COMPASS(24139),
RECOVERY_COMPASS(12710),
@@ -196,7 +196,7 @@ index e404cd1e2ba44e4c2d09524bc7cf730d8ffbdabd..cea0ebf50876dd32ab7fba6025b30f29
public interface BundleMeta extends ItemMeta {
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
-index 4d96cf385fa5c6d80097bdf6282be5f0eed73307..fb6b1491202bbc1ea0d5475c9c6574b0c16943b4 100644
+index 0899981b9ab1f98dacc617156d12779421e4c275..6c33fbf720a2e11655e254aeb516e08831c2adf4 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java
+++ b/src/main/java/org/bukkit/map/MapCursor.java
@@ -314,12 +314,26 @@ public final class MapCursor {
diff --git a/patches/api/0430-Improve-Registry.patch b/patches/api/0430-Improve-Registry.patch
index d0b19a0df5..453d8c9488 100644
--- a/patches/api/0430-Improve-Registry.patch
+++ b/patches/api/0430-Improve-Registry.patch
@@ -28,11 +28,11 @@ index 042d1d932a33022e4fc873652f70dc6ed342d46a..e57e34064262b90221b0621f1d13e970
@Override
public NamespacedKey getKey() {
diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java
-index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..98fdfc8978fea1937e31a7427433a1927d42ec7d 100644
+index c9f02466a04d20579fe2258bb02acf98e163ca81..bffd4ab2d08e5c3f83a49a31e1e55cc1eab7b319 100644
--- a/src/main/java/org/bukkit/MusicInstrument.java
+++ b/src/main/java/org/bukkit/MusicInstrument.java
-@@ -53,6 +53,16 @@ public abstract class MusicInstrument implements Keyed, net.kyori.adventure.tran
- return instrument;
+@@ -47,6 +47,16 @@ public abstract class MusicInstrument implements Keyed, net.kyori.adventure.tran
+ return Registry.INSTRUMENT.getOrThrow(NamespacedKey.minecraft(key));
}
+ // Paper start - deprecate getKey
@@ -49,10 +49,10 @@ index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..98fdfc8978fea1937e31a7427433a192
@Override
public @NotNull String translationKey() {
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
-index 04dfab3fb9a9a3bc7e69cb0c1f5346f3c7d87d72..82381ea98af1c9216a2989ea83ba4aa90ba69741 100644
+index 6112db5d1153d045f2271038bada6b46d1a6a051..67cf3fcad21a8977d6fad172cc776b628ab68f25 100644
--- a/src/main/java/org/bukkit/Registry.java
+++ b/src/main/java/org/bukkit/Registry.java
-@@ -367,6 +367,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -379,6 +379,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
@Nullable
T get(@NotNull NamespacedKey key);
@@ -130,9 +130,9 @@ index 04dfab3fb9a9a3bc7e69cb0c1f5346f3c7d87d72..82381ea98af1c9216a2989ea83ba4aa9
+ // Paper end - improve Registry
+
/**
- * Returns a new stream, which contains all registry items, which are registered to the registry.
+ * Get the object by its key.
*
-@@ -441,5 +514,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -475,5 +548,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
public Class<T> getType() {
return this.type;
}
@@ -164,7 +164,7 @@ index 8c7b50906fc5b84c5570408f357410810bbfbded..7a35120c82b88774de777d3c3176ef55
@Override
public NamespacedKey getKey() {
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
-index 9e90572745909538e942b7fbe788b5286c6cc9a3..8f651d3ebd5907836b5d09363a8b60f55e4afa38 100644
+index eaf6cd758344eeba29f00f822a50c93704af8bda..eb192030832e1741850871bec9bf999f014b6fc1 100644
--- a/src/main/java/org/bukkit/block/banner/PatternType.java
+++ b/src/main/java/org/bukkit/block/banner/PatternType.java
@@ -56,6 +56,13 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
@@ -182,10 +182,10 @@ index 9e90572745909538e942b7fbe788b5286c6cc9a3..8f651d3ebd5907836b5d09363a8b60f5
@NotNull
public NamespacedKey getKey();
diff --git a/src/main/java/org/bukkit/generator/structure/Structure.java b/src/main/java/org/bukkit/generator/structure/Structure.java
-index 1a766e68713d4014783b3224b9395644116784fa..978054ee364f9a3330525b9b50da5325ebb6ef57 100644
+index 20a7fd27ba3a029d58dd18ad9b470ffaed8c9578..a773550549b4093a5fb4ef47284c438dcddd99ab 100644
--- a/src/main/java/org/bukkit/generator/structure/Structure.java
+++ b/src/main/java/org/bukkit/generator/structure/Structure.java
-@@ -60,4 +60,13 @@ public abstract class Structure implements Keyed {
+@@ -61,4 +61,13 @@ public abstract class Structure implements Keyed {
*/
@NotNull
public abstract StructureType getStructureType();
@@ -200,10 +200,10 @@ index 1a766e68713d4014783b3224b9395644116784fa..978054ee364f9a3330525b9b50da5325
+ // Paper end - deprecate getKey
}
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
-index 941fac4eee338870d8c30cb1f64cab572cf54548..9e98625d42199c169f79335bb6231ec355c3b930 100644
+index 804cb7162b34225d5dd84aada283de568d7d6592..2a7bedf850896e358213c2a201ca3d611cb9ea67 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
-@@ -68,4 +68,14 @@ public interface TrimMaterial extends Keyed, Translatable {
+@@ -74,4 +74,14 @@ public interface TrimMaterial extends Keyed, Translatable {
@Deprecated(forRemoval = true)
@org.jetbrains.annotations.NotNull String getTranslationKey();
// Paper end - adventure
@@ -219,10 +219,10 @@ index 941fac4eee338870d8c30cb1f64cab572cf54548..9e98625d42199c169f79335bb6231ec3
+ // Paper end - Registry#getKey
}
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
-index f2242ddc4085f7e7cdd748d860857822e3d9b007..b84e495cb4bb4f833b6193c72ae241f0c69d491c 100644
+index 56cfe665daba1754e41f633d7c18172bebf87028..db657206c158e755227e8ef8e102a2ee2cc3bf0a 100644
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
-@@ -100,4 +100,14 @@ public interface TrimPattern extends Keyed, Translatable {
+@@ -106,4 +106,14 @@ public interface TrimPattern extends Keyed, Translatable {
@Deprecated(forRemoval = true)
@org.jetbrains.annotations.NotNull String getTranslationKey();
// Paper end - adventure
diff --git a/patches/api/0463-Add-missing-wind-charge-damage-type.patch b/patches/api/0463-Add-missing-wind-charge-damage-type.patch
deleted file mode 100644
index a2cd416d60..0000000000
--- a/patches/api/0463-Add-missing-wind-charge-damage-type.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Lulu13022002 <[email protected]>
-Date: Fri, 3 May 2024 22:56:12 +0200
-Subject: [PATCH] Add missing wind charge damage type
-
-
-diff --git a/src/main/java/org/bukkit/damage/DamageType.java b/src/main/java/org/bukkit/damage/DamageType.java
-index 69abda41ef3a1d8948982d16b193a9a565fafa38..387f04a8201d62ab86450de043772049212a8bce 100644
---- a/src/main/java/org/bukkit/damage/DamageType.java
-+++ b/src/main/java/org/bukkit/damage/DamageType.java
-@@ -66,6 +66,7 @@ public interface DamageType extends Keyed, Translatable {
- public static final DamageType BAD_RESPAWN_POINT = getDamageType("bad_respawn_point");
- public static final DamageType OUTSIDE_BORDER = getDamageType("outside_border");
- public static final DamageType GENERIC_KILL = getDamageType("generic_kill");
-+ DamageType WIND_CHARGE = getDamageType("wind_charge"); // Paper
-
- @NotNull
- private static DamageType getDamageType(@NotNull String key) {
diff --git a/patches/api/0464-Added-API-to-get-player-ha-proxy-address.patch b/patches/api/0463-Added-API-to-get-player-ha-proxy-address.patch
index b1702bee61..b1702bee61 100644
--- a/patches/api/0464-Added-API-to-get-player-ha-proxy-address.patch
+++ b/patches/api/0463-Added-API-to-get-player-ha-proxy-address.patch
diff --git a/patches/api/0465-More-Chest-Block-API.patch b/patches/api/0464-More-Chest-Block-API.patch
index 1fc3614c74..1fc3614c74 100644
--- a/patches/api/0465-More-Chest-Block-API.patch
+++ b/patches/api/0464-More-Chest-Block-API.patch
diff --git a/patches/api/0466-Brigadier-based-command-API.patch b/patches/api/0465-Brigadier-based-command-API.patch
index 701eb760a5..88ce5b7aab 100644
--- a/patches/api/0466-Brigadier-based-command-API.patch
+++ b/patches/api/0465-Brigadier-based-command-API.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Brigadier based command API
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index 76aa23da778b0fe8a093429c56cb29b044359b40..ab84a1405acc1f0d5f267892243b82b8dab03e21 100644
+index be8492b23d10332d046150a4ff18c67cc1b0f5d2..6c1cba3e87d2e3cb3eec65345ed7dcc56fd96363 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -27,6 +27,7 @@ configurations.api {
diff --git a/patches/api/0467-Fix-issues-with-recipe-API.patch b/patches/api/0466-Fix-issues-with-recipe-API.patch
index 7ca3015001..646143b638 100644
--- a/patches/api/0467-Fix-issues-with-recipe-API.patch
+++ b/patches/api/0466-Fix-issues-with-recipe-API.patch
@@ -275,13 +275,13 @@ index 3bf5064cd6ceb05ea98b18993da46c67be140115..79db6dbc0367de2eaa397674624c765d
ingredients.add(new RecipeChoice.ExactChoice(item));
}
diff --git a/src/main/java/org/bukkit/inventory/SmithingRecipe.java b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
-index 1ef9a715a2736e88a16083c6873803a8bd6bcf29..3072858dd4413129ec1737572838c2ea5ffd84bc 100644
+index ee462ca9fd3e0ddcdb0fffd5dba91d82fa6ad08f..0fb110a995bddcdf09b1902784e43cbe67510fba 100644
--- a/src/main/java/org/bukkit/inventory/SmithingRecipe.java
+++ b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
-@@ -44,12 +44,13 @@ public class SmithingRecipe implements Recipe, Keyed {
+@@ -45,12 +45,13 @@ public class SmithingRecipe implements Recipe, Keyed {
*/
@Deprecated
- public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
+ public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition, boolean copyDataComponents) {
+ com.google.common.base.Preconditions.checkArgument(!result.isEmpty() || this instanceof ComplexRecipe, "Recipe cannot have an empty result."); // Paper
this.copyDataComponents = copyDataComponents;
// Paper end
@@ -289,16 +289,34 @@ index 1ef9a715a2736e88a16083c6873803a8bd6bcf29..3072858dd4413129ec1737572838c2ea
this.result = result;
- this.base = base;
- this.addition = addition;
-+ this.base = base.validate(true).clone(); // Paper
-+ this.addition = addition.validate(true).clone(); // Paper
++ this.base = base == null ? RecipeChoice.empty() : base.validate(true).clone(); // Paper
++ this.addition = addition == null ? RecipeChoice.empty() : addition.validate(true).clone(); // Paper
}
/**
+@@ -58,7 +59,7 @@ public class SmithingRecipe implements Recipe, Keyed {
+ *
+ * @return base choice
+ */
+- @Nullable
++ @NotNull // Paper - fix issues with recipe api
+ public RecipeChoice getBase() {
+ return (base != null) ? base.clone() : null;
+ }
+@@ -68,7 +69,7 @@ public class SmithingRecipe implements Recipe, Keyed {
+ *
+ * @return addition choice
+ */
+- @Nullable
++ @NotNull // Paper - fix issues with recipe api
+ public RecipeChoice getAddition() {
+ return (addition != null) ? addition.clone() : null;
+ }
diff --git a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java b/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
-index 68e7132d77151b7b8312638d8bb79ea59e2fa5a6..60bfdd6b8814be8e3ffdfaef8a5ac7eeff9a5830 100644
+index e5726da0507ee70cb9dd76c57da6a8442e771307..1ca5058ee3bf75e1f70c8bc33842b466f65a6240 100644
--- a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
+++ b/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
-@@ -15,13 +15,13 @@ public class SmithingTransformRecipe extends SmithingRecipe {
+@@ -16,13 +16,13 @@ public class SmithingTransformRecipe extends SmithingRecipe {
*
* @param key The unique recipe key
* @param result The item you want the recipe to create.
@@ -309,14 +327,15 @@ index 68e7132d77151b7b8312638d8bb79ea59e2fa5a6..60bfdd6b8814be8e3ffdfaef8a5ac7ee
+ * @param base The base ingredient ({@link RecipeChoice#empty()} can be used)
+ * @param addition The addition ingredient ({@link RecipeChoice#empty()} can be used)
*/
- public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
+- public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice template, @Nullable RecipeChoice base, @Nullable RecipeChoice addition) {
++ public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) { // Paper - fix issues with recipe api - prevent null choices
super(key, result, base, addition);
- this.template = template;
-+ this.template = template.validate(true).clone(); // Paper
++ this.template = template == null ? RecipeChoice.empty() : template.validate(true).clone(); // Paper - fix issues with recipe api - prevent null choices
}
// Paper start
/**
-@@ -29,14 +29,14 @@ public class SmithingTransformRecipe extends SmithingRecipe {
+@@ -30,14 +30,14 @@ public class SmithingTransformRecipe extends SmithingRecipe {
*
* @param key The unique recipe key
* @param result The item you want the recipe to create.
@@ -328,18 +347,28 @@ index 68e7132d77151b7b8312638d8bb79ea59e2fa5a6..60bfdd6b8814be8e3ffdfaef8a5ac7ee
+ * @param addition The addition ingredient ({@link RecipeChoice#empty()} can be used)
* @param copyDataComponents whether to copy the data components from the input base item to the output
*/
- public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
+- public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice template, @Nullable RecipeChoice base, @Nullable RecipeChoice addition, boolean copyDataComponents) {
++ public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
super(key, result, base, addition, copyDataComponents);
- this.template = template;
-+ this.template = template.validate(true).clone();
++ this.template = template == null ? RecipeChoice.empty() : template.validate(true).clone(); // Paper - fix issues with recipe api - prevent null choices
}
// Paper end
+@@ -46,7 +46,7 @@ public class SmithingTransformRecipe extends SmithingRecipe {
+ *
+ * @return template choice
+ */
+- @Nullable
++ @NotNull // Paper - fix issues with recipe api - prevent null choices
+ public RecipeChoice getTemplate() {
+ return (template != null) ? template.clone() : null;
+ }
diff --git a/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java b/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
-index ce36bb5b030f17e11f74e987235be143c1925aa7..9ac27cbe7dcff0403ef34727d0461b8201aca6f1 100644
+index 232aa8aeef9e34146e413e56b3681919c8850687..a8e125ef6dd9e8d6af74b68088df91d4c2ea7a8a 100644
--- a/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
+++ b/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
-@@ -15,27 +15,27 @@ public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe
+@@ -16,27 +16,27 @@ public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe
* Create a smithing recipe to produce the specified result ItemStack.
*
* @param key The unique recipe key
@@ -350,10 +379,11 @@ index ce36bb5b030f17e11f74e987235be143c1925aa7..9ac27cbe7dcff0403ef34727d0461b82
+ * @param base The base ingredient ({@link RecipeChoice#empty()} can be used)
+ * @param addition The addition ingredient ({@link RecipeChoice#empty()} can be used)
*/
- public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
+- public SmithingTrimRecipe(@NotNull NamespacedKey key, @Nullable RecipeChoice template, @Nullable RecipeChoice base, @Nullable RecipeChoice addition) {
++ public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) { // Paper - fix issues with recipe api - prevent null choices
super(key, new ItemStack(Material.AIR), base, addition);
- this.template = template;
-+ this.template = template.validate(true).clone(); // Paper
++ this.template = template == null ? RecipeChoice.empty() : template.validate(true).clone(); // Paper
}
// Paper start
/**
@@ -368,13 +398,23 @@ index ce36bb5b030f17e11f74e987235be143c1925aa7..9ac27cbe7dcff0403ef34727d0461b82
+ * @param addition The addition ingredient ({@link RecipeChoice#empty()} can be used)
* @param copyDataComponents whether to copy the data components from the input base item to the output
*/
- public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
+- public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
++ public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) { // Paper - fix issues with recipe api - prevent null choices
super(key, new ItemStack(Material.AIR), base, addition, copyDataComponents);
- this.template = template;
-+ this.template = template.validate(true).clone(); // Paper
++ this.template = template == null ? RecipeChoice.empty() : template.validate(true).clone(); // Paper
}
// Paper end
+@@ -45,7 +45,7 @@ public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe
+ *
+ * @return template choice
+ */
+- @Nullable
++ @NotNull // Paper - fix issues with recipe api - prevent null choices
+ public RecipeChoice getTemplate() {
+ return (template != null) ? template.clone() : null;
+ }
diff --git a/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java b/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java
index bc3440eb72127824b3961fbdae583bb61385f65e..17b33f8e6e3dc6a22686a498fa944382e8767077 100644
--- a/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java
diff --git a/patches/api/0468-Fix-equipment-slot-and-group-API.patch b/patches/api/0467-Fix-equipment-slot-and-group-API.patch
index 81d91485d7..81d91485d7 100644
--- a/patches/api/0468-Fix-equipment-slot-and-group-API.patch
+++ b/patches/api/0467-Fix-equipment-slot-and-group-API.patch
diff --git a/patches/api/0469-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch b/patches/api/0468-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch
index 8a0f6e9468..8a0f6e9468 100644
--- a/patches/api/0469-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch
+++ b/patches/api/0468-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch
diff --git a/patches/api/0470-General-ItemMeta-fixes.patch b/patches/api/0469-General-ItemMeta-fixes.patch
index e5a4527859..f74fb26a35 100644
--- a/patches/api/0470-General-ItemMeta-fixes.patch
+++ b/patches/api/0469-General-ItemMeta-fixes.patch
@@ -19,27 +19,6 @@ index 637fa73d4366c2d88e2716e5c8d3465706d788a7..0f03c546ecdd6383fb36a362d18d6fb5
this.flicker = flicker;
this.trail = trail;
this.colors = colors;
-diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
-index a6d1dde422de98f178c0c9add99e01203a35e5cb..01ec84248a681180088fb1d7d22b80f8572b0305 100644
---- a/src/main/java/org/bukkit/inventory/ItemType.java
-+++ b/src/main/java/org/bukkit/inventory/ItemType.java
-@@ -31,6 +31,7 @@ import org.bukkit.inventory.meta.MapMeta;
- import org.bukkit.inventory.meta.MusicInstrumentMeta;
- import org.bukkit.inventory.meta.OminousBottleMeta;
- import org.bukkit.inventory.meta.PotionMeta;
-+import org.bukkit.inventory.meta.ShieldMeta;
- import org.bukkit.inventory.meta.SkullMeta;
- import org.bukkit.inventory.meta.SpawnEggMeta;
- import org.bukkit.inventory.meta.SuspiciousStewMeta;
-@@ -1893,7 +1894,7 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
- /**
- * ItemMeta: {@link BlockStateMeta}
- */
-- ItemType.Typed<BlockStateMeta> SHIELD = getItemType("shield");
-+ ItemType.Typed<ShieldMeta> SHIELD = getItemType("shield"); // Paper - update shield to its new meta
- ItemType.Typed<ItemMeta> TOTEM_OF_UNDYING = getItemType("totem_of_undying");
- ItemType.Typed<ItemMeta> SHULKER_SHELL = getItemType("shulker_shell");
- ItemType.Typed<ItemMeta> IRON_NUGGET = getItemType("iron_nugget");
diff --git a/src/main/java/org/bukkit/inventory/meta/CompassMeta.java b/src/main/java/org/bukkit/inventory/meta/CompassMeta.java
index 5040ab6190b41442986d2a734a8e782df0eab2f6..48bac38469ce3c5b2e59ad115375e7e5a2417da7 100644
--- a/src/main/java/org/bukkit/inventory/meta/CompassMeta.java
diff --git a/patches/api/0471-Add-missing-fishing-event-state.patch b/patches/api/0470-Add-missing-fishing-event-state.patch
index 94cba543ec..94cba543ec 100644
--- a/patches/api/0471-Add-missing-fishing-event-state.patch
+++ b/patches/api/0470-Add-missing-fishing-event-state.patch
diff --git a/patches/api/0472-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch b/patches/api/0471-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch
index 3efcc02654..3efcc02654 100644
--- a/patches/api/0472-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch
+++ b/patches/api/0471-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch
diff --git a/patches/api/0473-Registry-Modification-API.patch b/patches/api/0472-Registry-Modification-API.patch
index e6bdf1c69d..6eca654483 100644
--- a/patches/api/0473-Registry-Modification-API.patch
+++ b/patches/api/0472-Registry-Modification-API.patch
@@ -809,10 +809,10 @@ index 0000000000000000000000000000000000000000..bf49125acc8a0508bf59674bba3ed350
+ }
+}
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
-index 82381ea98af1c9216a2989ea83ba4aa90ba69741..d81f687cba38ec930c555b001afc0df93c21731b 100644
+index 67cf3fcad21a8977d6fad172cc776b628ab68f25..b4ef3133fdd9d79a3381cf8f659ff561ab2b4fad 100644
--- a/src/main/java/org/bukkit/Registry.java
+++ b/src/main/java/org/bukkit/Registry.java
-@@ -366,6 +366,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -378,6 +378,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
*/
@Nullable
T get(@NotNull NamespacedKey key);
@@ -840,7 +840,7 @@ index 82381ea98af1c9216a2989ea83ba4aa90ba69741..d81f687cba38ec930c555b001afc0df9
// Paper start - improve Registry
/**
-@@ -440,6 +461,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -452,6 +473,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
}
// Paper end - improve Registry
@@ -873,9 +873,9 @@ index 82381ea98af1c9216a2989ea83ba4aa90ba69741..d81f687cba38ec930c555b001afc0df9
+ // Paper end - RegistrySet API
+
/**
- * Returns a new stream, which contains all registry items, which are registered to the registry.
+ * Get the object by its key.
*
-@@ -521,5 +570,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
+@@ -555,5 +604,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
return value.getKey();
}
// Paper end - improve Registry
diff --git a/patches/api/0474-Introduce-registry-entry-and-builders.patch b/patches/api/0473-Introduce-registry-entry-and-builders.patch
index 446b1f78f2..2731a371af 100644
--- a/patches/api/0474-Introduce-registry-entry-and-builders.patch
+++ b/patches/api/0473-Introduce-registry-entry-and-builders.patch
@@ -460,12 +460,12 @@ index 91ae9c0d3ec55ce417d4b447bf3d1b0d0c174b5e..1c8e77c7243cfedef6c4d1491cf98e6e
}
}
diff --git a/src/main/java/org/bukkit/GameEvent.java b/src/main/java/org/bukkit/GameEvent.java
-index 6c9689baca1763e2ef79495d38618d587e792434..4583092c2d1ffe95be2831c5d5f0e904283ab762 100644
+index cb5f7dfcdbbb548d93ad21c215ba35a9e142a7b2..e2c632afdf555418dd1dc6ad6c5d197670e2211a 100644
--- a/src/main/java/org/bukkit/GameEvent.java
+++ b/src/main/java/org/bukkit/GameEvent.java
-@@ -147,4 +147,22 @@ public abstract class GameEvent implements Keyed {
-
- return gameEvent;
+@@ -141,4 +141,22 @@ public abstract class GameEvent implements Keyed {
+ private static GameEvent getEvent(@NotNull String key) {
+ return Registry.GAME_EVENT.getOrThrow(NamespacedKey.minecraft(key));
}
+ // Paper start
+ /**
@@ -487,10 +487,10 @@ index 6c9689baca1763e2ef79495d38618d587e792434..4583092c2d1ffe95be2831c5d5f0e904
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
-index 01ec84248a681180088fb1d7d22b80f8572b0305..0168f0a14a3e899e84c5e36963ff79950ab580fb 100644
+index c42cfa76ff73a3ce8a164cb94a9c3f553b005ea5..15d68c4997f739c39675ef8ffa5ab7967dac59f2 100644
--- a/src/main/java/org/bukkit/inventory/ItemType.java
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
-@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
+@@ -46,7 +46,7 @@ import org.jetbrains.annotations.Nullable;
* official replacement for the aforementioned enum. Entirely incompatible
* changes may occur. Do not use this API in plugins.
*/
diff --git a/patches/api/0475-Proxy-ItemStack-to-CraftItemStack.patch b/patches/api/0474-Proxy-ItemStack-to-CraftItemStack.patch
index 86591d4e30..246fa425d8 100644
--- a/patches/api/0475-Proxy-ItemStack-to-CraftItemStack.patch
+++ b/patches/api/0474-Proxy-ItemStack-to-CraftItemStack.patch
@@ -16,7 +16,7 @@ index 9bdba60fa96edbc4be5dcf54a815579db887048b..330e3013eda204aa9b33d5e1c3104e0b
+ ItemStack createEmptyStack(); // Paper - proxy ItemStack
}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
-index e80261e0e66e6d3969513593dbbf3d890158676c..9464c27fe536fc5765d945631215cbe90fd5fa47 100644
+index 77edc2e1c5c865db7e101aaa186657ac85edfed9..6fc8bddfcabca8c363e0d9f958f0ce7bc39099f1 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -28,10 +28,38 @@ import org.jetbrains.annotations.Nullable;
diff --git a/patches/api/0476-Make-a-PDC-view-accessible-directly-from-ItemStack.patch b/patches/api/0475-Make-a-PDC-view-accessible-directly-from-ItemStack.patch
index 0c48106249..0c48106249 100644
--- a/patches/api/0476-Make-a-PDC-view-accessible-directly-from-ItemStack.patch
+++ b/patches/api/0475-Make-a-PDC-view-accessible-directly-from-ItemStack.patch
diff --git a/patches/api/0477-Fix-HelpCommand-searching.patch b/patches/api/0476-Fix-HelpCommand-searching.patch
index beac489e87..beac489e87 100644
--- a/patches/api/0477-Fix-HelpCommand-searching.patch
+++ b/patches/api/0476-Fix-HelpCommand-searching.patch
diff --git a/patches/api/0478-add-Plugin-getDataPath.patch b/patches/api/0477-add-Plugin-getDataPath.patch
index 5085e262a9..5085e262a9 100644
--- a/patches/api/0478-add-Plugin-getDataPath.patch
+++ b/patches/api/0477-add-Plugin-getDataPath.patch
diff --git a/patches/api/0479-Fix-PickupStatus-getting-reset.patch b/patches/api/0478-Fix-PickupStatus-getting-reset.patch
index 6473947708..6473947708 100644
--- a/patches/api/0479-Fix-PickupStatus-getting-reset.patch
+++ b/patches/api/0478-Fix-PickupStatus-getting-reset.patch
diff --git a/patches/api/0480-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch b/patches/api/0479-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch
index 3dd2df1411..3dd2df1411 100644
--- a/patches/api/0480-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch
+++ b/patches/api/0479-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch
diff --git a/patches/api/0481-Improve-StandardMessenger-exception-messages.patch b/patches/api/0480-Improve-StandardMessenger-exception-messages.patch
index db8286512a..db8286512a 100644
--- a/patches/api/0481-Improve-StandardMessenger-exception-messages.patch
+++ b/patches/api/0480-Improve-StandardMessenger-exception-messages.patch
diff --git a/patches/api/0482-Add-even-more-Enchantment-API.patch b/patches/api/0481-Add-even-more-Enchantment-API.patch
index c9813d353e..7da290c673 100644
--- a/patches/api/0482-Add-even-more-Enchantment-API.patch
+++ b/patches/api/0481-Add-even-more-Enchantment-API.patch
@@ -7,10 +7,10 @@ In a separate patch because it uses RegistryKeySet which
is after the previous "more enchant api" patch.
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
-index 53dbb852d6a34f0814b81852c7f10f55c38299e7..f38321c437b19125d57d25419e3cb564e3928d89 100644
+index ddd44191c67c1926e615edabb82ed0b592fbee09..43e306584988e39a6daca78c621a937acdce48a1 100644
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
-@@ -438,6 +438,56 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
+@@ -432,6 +432,56 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
public abstract java.util.Set<org.bukkit.inventory.EquipmentSlotGroup> getActiveSlotGroups();
// Paper end - more Enchantment API
diff --git a/patches/api/0483-Leashable-API.patch b/patches/api/0482-Leashable-API.patch
index e37174d499..e37174d499 100644
--- a/patches/api/0483-Leashable-API.patch
+++ b/patches/api/0482-Leashable-API.patch
diff --git a/patches/api/0484-Add-enchantment-seed-update-API.patch b/patches/api/0483-Add-enchantment-seed-update-API.patch
index 64bb3259ac..3b9ef102cd 100644
--- a/patches/api/0484-Add-enchantment-seed-update-API.patch
+++ b/patches/api/0483-Add-enchantment-seed-update-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add enchantment seed update API
diff --git a/src/main/java/org/bukkit/inventory/view/EnchantmentView.java b/src/main/java/org/bukkit/inventory/view/EnchantmentView.java
-index e3471d50673f55e0012f73695f845a71cf188d65..3812a540941337c56f3d4e89bb6a4eb8c914b903 100644
+index 18014f3aa0cb1aab7d8ca5d9257a3a5b5c54eff2..73740c2f570dd149bf3f00766cdfa9a25098de1a 100644
--- a/src/main/java/org/bukkit/inventory/view/EnchantmentView.java
+++ b/src/main/java/org/bukkit/inventory/view/EnchantmentView.java
-@@ -17,6 +17,15 @@ public interface EnchantmentView extends InventoryView {
+@@ -22,6 +22,15 @@ public interface EnchantmentView extends InventoryView {
*/
int getEnchantmentSeed();
diff --git a/patches/api/0485-Deprecate-for-removal-all-OldEnum-related-methods.patch b/patches/api/0484-Deprecate-for-removal-all-OldEnum-related-methods.patch
index 00540ebb8d..bac872611c 100644
--- a/patches/api/0485-Deprecate-for-removal-all-OldEnum-related-methods.patch
+++ b/patches/api/0484-Deprecate-for-removal-all-OldEnum-related-methods.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate for removal all OldEnum-related methods
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
-index e2afb2582a27b94a922754115dbb6b4ca35e0154..b726cebe9abb7195ab6558609a56f9fd18ef2a00 100644
+index eb192030832e1741850871bec9bf999f014b6fc1..70904d6c43b93cb7b9d74d20666fac93a6b4996c 100644
--- a/src/main/java/org/bukkit/block/banner/PatternType.java
+++ b/src/main/java/org/bukkit/block/banner/PatternType.java
-@@ -120,7 +120,7 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
+@@ -116,7 +116,7 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
*/
@NotNull
@@ -17,7 +17,7 @@ index e2afb2582a27b94a922754115dbb6b4ca35e0154..b726cebe9abb7195ab6558609a56f9fd
static PatternType valueOf(@NotNull String name) {
PatternType type = Registry.BANNER_PATTERN.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
Preconditions.checkArgument(type != null, "No pattern type found with the name %s", name);
-@@ -132,7 +132,7 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
+@@ -128,7 +128,7 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
* @deprecated use {@link Registry#iterator()}.
*/
@NotNull
@@ -27,10 +27,10 @@ index e2afb2582a27b94a922754115dbb6b4ca35e0154..b726cebe9abb7195ab6558609a56f9fd
return Lists.newArrayList(Registry.BANNER_PATTERN).toArray(new PatternType[0]);
}
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
-index 60cf07bff0898176c8d7af84b3e65d7a1ee8cf2e..22b7f9c2450698b0cf0807880a3d779a0b4f1c37 100644
+index de422f00f8fd1975669ee5431c466c9c16d699af..fca4671c6976aee9e981ef344244f9322651d0c9 100644
--- a/src/main/java/org/bukkit/entity/Cat.java
+++ b/src/main/java/org/bukkit/entity/Cat.java
-@@ -79,7 +79,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
+@@ -75,7 +75,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
*/
@NotNull
@@ -39,7 +39,7 @@ index 60cf07bff0898176c8d7af84b3e65d7a1ee8cf2e..22b7f9c2450698b0cf0807880a3d779a
static Type valueOf(@NotNull String name) {
Type type = Registry.CAT_VARIANT.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
Preconditions.checkArgument(type != null, "No cat type found with the name %s", name);
-@@ -91,7 +91,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
+@@ -87,7 +87,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
* @deprecated use {@link Registry#iterator()}.
*/
@NotNull
@@ -49,10 +49,10 @@ index 60cf07bff0898176c8d7af84b3e65d7a1ee8cf2e..22b7f9c2450698b0cf0807880a3d779a
return Lists.newArrayList(Registry.CAT_VARIANT).toArray(new Type[0]);
}
diff --git a/src/main/java/org/bukkit/entity/Frog.java b/src/main/java/org/bukkit/entity/Frog.java
-index 7cf8ae63eb7a7f6c09510a4ad9e20336863aefc1..28a255f3a906c3988c7463a9469288fe586073a8 100644
+index db34a6241d63ae986bcb048fa53f6b9e4438e206..f661a6b4797dd814a197e9245bcb2ddf2fca773f 100644
--- a/src/main/java/org/bukkit/entity/Frog.java
+++ b/src/main/java/org/bukkit/entity/Frog.java
-@@ -78,7 +78,7 @@ public interface Frog extends Animals {
+@@ -74,7 +74,7 @@ public interface Frog extends Animals {
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
*/
@NotNull
@@ -61,7 +61,7 @@ index 7cf8ae63eb7a7f6c09510a4ad9e20336863aefc1..28a255f3a906c3988c7463a9469288fe
static Variant valueOf(@NotNull String name) {
Variant variant = Registry.FROG_VARIANT.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
Preconditions.checkArgument(variant != null, "No frog variant found with the name %s", name);
-@@ -90,7 +90,7 @@ public interface Frog extends Animals {
+@@ -86,7 +86,7 @@ public interface Frog extends Animals {
* @deprecated use {@link Registry#iterator()}.
*/
@NotNull
@@ -71,10 +71,10 @@ index 7cf8ae63eb7a7f6c09510a4ad9e20336863aefc1..28a255f3a906c3988c7463a9469288fe
return Lists.newArrayList(Registry.FROG_VARIANT).toArray(new Variant[0]);
}
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
-index 444744ea6f5921b0ae229995f8b15ea9d980c402..db5c7434a7e529727b556f314d5cd8e0534114fe 100644
+index bc7137eb802d4613d042fba5fd97eca54a6eea29..1db3742024e9cd1b70af2d52b4b756a544c019df 100644
--- a/src/main/java/org/bukkit/entity/Villager.java
+++ b/src/main/java/org/bukkit/entity/Villager.java
-@@ -194,7 +194,7 @@ public interface Villager extends AbstractVillager {
+@@ -190,7 +190,7 @@ public interface Villager extends AbstractVillager {
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
*/
@NotNull
@@ -83,7 +83,7 @@ index 444744ea6f5921b0ae229995f8b15ea9d980c402..db5c7434a7e529727b556f314d5cd8e0
static Type valueOf(@NotNull String name) {
Type type = Registry.VILLAGER_TYPE.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
Preconditions.checkArgument(type != null, "No villager type found with the name %s", name);
-@@ -206,7 +206,7 @@ public interface Villager extends AbstractVillager {
+@@ -202,7 +202,7 @@ public interface Villager extends AbstractVillager {
* @deprecated use {@link Registry#iterator()}.
*/
@NotNull
@@ -92,7 +92,7 @@ index 444744ea6f5921b0ae229995f8b15ea9d980c402..db5c7434a7e529727b556f314d5cd8e0
static Type[] values() {
return Lists.newArrayList(Registry.VILLAGER_TYPE).toArray(new Type[0]);
}
-@@ -305,7 +305,7 @@ public interface Villager extends AbstractVillager {
+@@ -297,7 +297,7 @@ public interface Villager extends AbstractVillager {
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
*/
@NotNull
@@ -101,7 +101,7 @@ index 444744ea6f5921b0ae229995f8b15ea9d980c402..db5c7434a7e529727b556f314d5cd8e0
static Profession valueOf(@NotNull String name) {
Profession profession = Registry.VILLAGER_PROFESSION.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
Preconditions.checkArgument(profession != null, "No villager profession found with the name %s", name);
-@@ -317,7 +317,7 @@ public interface Villager extends AbstractVillager {
+@@ -309,7 +309,7 @@ public interface Villager extends AbstractVillager {
* @deprecated use {@link Registry#iterator()}.
*/
@NotNull
@@ -111,10 +111,10 @@ index 444744ea6f5921b0ae229995f8b15ea9d980c402..db5c7434a7e529727b556f314d5cd8e0
return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(new Profession[0]);
}
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
-index fb6b1491202bbc1ea0d5475c9c6574b0c16943b4..a5efc52e68c602d84dc0948246a1665448344930 100644
+index 6c33fbf720a2e11655e254aeb516e08831c2adf4..eb73f3224e7d2314c4209a3743a37bdae2395670 100644
--- a/src/main/java/org/bukkit/map/MapCursor.java
+++ b/src/main/java/org/bukkit/map/MapCursor.java
-@@ -377,7 +377,7 @@ public final class MapCursor {
+@@ -373,7 +373,7 @@ public final class MapCursor {
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
*/
@NotNull
@@ -123,7 +123,7 @@ index fb6b1491202bbc1ea0d5475c9c6574b0c16943b4..a5efc52e68c602d84dc0948246a16654
static Type valueOf(@NotNull String name) {
Type type = Registry.MAP_DECORATION_TYPE.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
Preconditions.checkArgument(type != null, "No Type found with the name %s", name);
-@@ -389,7 +389,7 @@ public final class MapCursor {
+@@ -385,7 +385,7 @@ public final class MapCursor {
* @deprecated use {@link Registry#iterator()}.
*/
@NotNull
diff --git a/patches/api/0486-Add-FeatureFlag-API.patch b/patches/api/0485-Add-FeatureFlag-API.patch
index af03d9a748..ae5e00b283 100644
--- a/patches/api/0486-Add-FeatureFlag-API.patch
+++ b/patches/api/0485-Add-FeatureFlag-API.patch
@@ -244,7 +244,7 @@ index 330e3013eda204aa9b33d5e1c3104e0b595abdbc..c80e0ef587a001ee6de3f5c182cc9696
/**
* Do not use, method will get removed, and the plugin won't run
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
-index 0fa0fa4aaf55710030a2220dee98e11764d8d27a..e85bdd92466ee9bfcf8a82614ad09c1e2963731b 100644
+index a58ef2238208fbb55341f4532eaa288577ed8c0e..fb2b373c1822e7248a30e610d11e2c2bd438c19a 100644
--- a/src/main/java/org/bukkit/block/BlockType.java
+++ b/src/main/java/org/bukkit/block/BlockType.java
@@ -125,7 +125,7 @@ import org.jetbrains.annotations.Nullable;
@@ -256,7 +256,7 @@ index 0fa0fa4aaf55710030a2220dee98e11764d8d27a..e85bdd92466ee9bfcf8a82614ad09c1e
/**
* Typed represents a subtype of {@link BlockType}s that have a known block
-@@ -3486,7 +3486,9 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
+@@ -3490,7 +3490,9 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
*
* @param world the world to check
* @return true if this BlockType can be used in this World.
@@ -293,10 +293,10 @@ index 5067f1371433cccd3287af7f03e152f2c3c1ece3..e0cb282541548ac3bd24cce86b3413f5
/**
* Gets the unique name of this world
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
-index 0168f0a14a3e899e84c5e36963ff79950ab580fb..5b4449f63595193efcd1329b9df0558cfaa2c7b2 100644
+index 15d68c4997f739c39675ef8ffa5ab7967dac59f2..f96ced6ae8a969319728efb4fc4fe545923e32be 100644
--- a/src/main/java/org/bukkit/inventory/ItemType.java
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
-@@ -48,7 +48,7 @@ import org.jetbrains.annotations.Nullable;
+@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
* changes may occur. Do not use this API in plugins.
*/
@ApiStatus.Experimental // Paper - already required for registry builders
@@ -305,7 +305,7 @@ index 0168f0a14a3e899e84c5e36963ff79950ab580fb..5b4449f63595193efcd1329b9df0558c
/**
* Typed represents a subtype of {@link ItemType}s that have a known item meta type
-@@ -2306,7 +2306,9 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
+@@ -2300,7 +2300,9 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
*
* @param world the world to check
* @return true if this ItemType can be used in this World.
@@ -316,10 +316,10 @@ index 0168f0a14a3e899e84c5e36963ff79950ab580fb..5b4449f63595193efcd1329b9df0558c
/**
diff --git a/src/main/java/org/bukkit/inventory/MenuType.java b/src/main/java/org/bukkit/inventory/MenuType.java
-index 29dfad691cbdd09d043f6171defc8a7fabbc2b75..5ddc24df90c3a4b9f92a49437e1aa90e3961daf3 100644
+index 34d45a105da72481a7c4f2e3831f5d2a676c91c6..529143c9007d6da4f671576f9934933f2e5d6f23 100644
--- a/src/main/java/org/bukkit/inventory/MenuType.java
+++ b/src/main/java/org/bukkit/inventory/MenuType.java
-@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
+@@ -22,7 +22,7 @@ import org.jetbrains.annotations.NotNull;
* created and viewed by the player.
*/
@ApiStatus.Experimental
@@ -329,7 +329,7 @@ index 29dfad691cbdd09d043f6171defc8a7fabbc2b75..5ddc24df90c3a4b9f92a49437e1aa90e
/**
* A MenuType which represents a chest with 1 row.
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
-index 10fa51d116b40450b51af9110d5637f3505ebf65..647452f16e4bf7e5a61520123e62d9408ec9adfb 100644
+index d02bb37768404422969d8b93e009960d0a693a93..294ba70f1e446ec8d502e5c14f82ae52547aeb21 100644
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable;
diff --git a/patches/api/0487-Tag-Lifecycle-Events.patch b/patches/api/0486-Tag-Lifecycle-Events.patch
index 29aaad5c34..29aaad5c34 100644
--- a/patches/api/0487-Tag-Lifecycle-Events.patch
+++ b/patches/api/0486-Tag-Lifecycle-Events.patch
diff --git a/patches/api/0488-Item-serialization-as-json.patch b/patches/api/0487-Item-serialization-as-json.patch
index d2951870a1..d2951870a1 100644
--- a/patches/api/0488-Item-serialization-as-json.patch
+++ b/patches/api/0487-Item-serialization-as-json.patch
diff --git a/patches/api/0489-create-TileStateInventoryHolder.patch b/patches/api/0488-create-TileStateInventoryHolder.patch
index eafc877be4..eafc877be4 100644
--- a/patches/api/0489-create-TileStateInventoryHolder.patch
+++ b/patches/api/0488-create-TileStateInventoryHolder.patch
diff --git a/patches/api/0490-Add-enchantWithLevels-with-enchantment-registry-set.patch b/patches/api/0489-Add-enchantWithLevels-with-enchantment-registry-set.patch
index 41f106e80f..41f106e80f 100644
--- a/patches/api/0490-Add-enchantWithLevels-with-enchantment-registry-set.patch
+++ b/patches/api/0489-Add-enchantWithLevels-with-enchantment-registry-set.patch
diff --git a/patches/api/0491-Improve-entity-effect-API.patch b/patches/api/0490-Improve-entity-effect-API.patch
index 912d051f49..912d051f49 100644
--- a/patches/api/0491-Improve-entity-effect-API.patch
+++ b/patches/api/0490-Improve-entity-effect-API.patch
diff --git a/patches/api/0492-Add-recipeBrewTime.patch b/patches/api/0491-Add-recipeBrewTime.patch
index f6b6f5b0ca..16819bfe93 100644
--- a/patches/api/0492-Add-recipeBrewTime.patch
+++ b/patches/api/0491-Add-recipeBrewTime.patch
@@ -125,10 +125,10 @@ index 43eac972f45d1cbb6278b048f8e6d7882c0aabeb..f193ab698edc548ec7fad89a82d03f39
+ // Paper end - add recipeBrewTime
}
diff --git a/src/main/java/org/bukkit/inventory/view/BrewingStandView.java b/src/main/java/org/bukkit/inventory/view/BrewingStandView.java
-index 206e9befae9863f99f44ac0e1629c2af1905787a..bb7de0b1c602e96f5b34d44a9ffa8c04e4ab5e0e 100644
+index f76db2757f6388265b7fed0f3d1c363ea4f01052..ff7227bfa13cba497ba404cdd7493f911377fab6 100644
--- a/src/main/java/org/bukkit/inventory/view/BrewingStandView.java
+++ b/src/main/java/org/bukkit/inventory/view/BrewingStandView.java
-@@ -39,4 +39,27 @@ public interface BrewingStandView extends InventoryView {
+@@ -45,4 +45,27 @@ public interface BrewingStandView extends InventoryView {
* @throws IllegalArgumentException if the ticks are less than 0
*/
void setBrewingTicks(final int ticks) throws IllegalArgumentException;
diff --git a/patches/api/0493-Add-PlayerInsertLecternBookEvent.patch b/patches/api/0492-Add-PlayerInsertLecternBookEvent.patch
index 55cbd91d4a..55cbd91d4a 100644
--- a/patches/api/0493-Add-PlayerInsertLecternBookEvent.patch
+++ b/patches/api/0492-Add-PlayerInsertLecternBookEvent.patch
diff --git a/patches/api/0494-Void-damage-configuration-API.patch b/patches/api/0493-Void-damage-configuration-API.patch
index 26cbd83b18..26cbd83b18 100644
--- a/patches/api/0494-Void-damage-configuration-API.patch
+++ b/patches/api/0493-Void-damage-configuration-API.patch
diff --git a/patches/api/0495-Add-Offline-PDC-API.patch b/patches/api/0494-Add-Offline-PDC-API.patch
index 32bafdb4b3..32bafdb4b3 100644
--- a/patches/api/0495-Add-Offline-PDC-API.patch
+++ b/patches/api/0494-Add-Offline-PDC-API.patch
diff --git a/patches/api/0496-Add-AnvilView-bypassEnchantmentLevelRestriction.patch b/patches/api/0495-Add-AnvilView-bypassEnchantmentLevelRestriction.patch
index f236c650cf..61af6b9321 100644
--- a/patches/api/0496-Add-AnvilView-bypassEnchantmentLevelRestriction.patch
+++ b/patches/api/0495-Add-AnvilView-bypassEnchantmentLevelRestriction.patch
@@ -8,10 +8,10 @@ maximum level. The added API enables plugins to disable this behaviour,
allowing enchantments that are overleveled to be applied via the anvil.
diff --git a/src/main/java/org/bukkit/inventory/view/AnvilView.java b/src/main/java/org/bukkit/inventory/view/AnvilView.java
-index 0344b3db789baf1da0b59f2d2cd66154b69b38a9..cc5ffd28a6d6244b99a94e52c6f5a0f73a64aed7 100644
+index 8963fefac4ce14d0239b92380ca6d3e6b5e5bb25..3c1aa1e036bee08304c1cdca59f6a5bc0ba306c0 100644
--- a/src/main/java/org/bukkit/inventory/view/AnvilView.java
+++ b/src/main/java/org/bukkit/inventory/view/AnvilView.java
-@@ -59,4 +59,28 @@ public interface AnvilView extends InventoryView {
+@@ -65,4 +65,28 @@ public interface AnvilView extends InventoryView {
* @param levels the levels to set
*/
void setMaximumRepairCost(int levels);
diff --git a/patches/server/0001-Setup-Gradle-project.patch b/patches/server/0001-Setup-Gradle-project.patch
index d8dace80ea..baefb46a2d 100644
--- a/patches/server/0001-Setup-Gradle-project.patch
+++ b/patches/server/0001-Setup-Gradle-project.patch
@@ -28,10 +28,10 @@ index 37dab9e868dbfb019c271a547d975a48ad1cb571..3811c0d849a3eb028ed1a6b7a2d4747f
+/.factorypath
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
-index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043c9290964
+index 0000000000000000000000000000000000000000..82b298d454dee6a6d996aa7822dd745e70a8da74
--- /dev/null
+++ b/build.gradle.kts
-@@ -0,0 +1,126 @@
+@@ -0,0 +1,131 @@
+import io.papermc.paperweight.util.*
+
+plugins {
@@ -45,7 +45,7 @@ index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") {
+ exclude(group = "org.apache.logging.log4j", module = "log4j-api")
+ }
-+ implementation("org.ow2.asm:asm-commons:9.7")
++ implementation("org.ow2.asm:asm-commons:9.7.1")
+ implementation("commons-lang:commons-lang:2.6")
+ runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
+ runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
@@ -55,9 +55,10 @@ index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
+
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
++ testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0")
+ testImplementation("org.hamcrest:hamcrest:2.2")
-+ testImplementation("org.mockito:mockito-core:5.11.0")
-+ testImplementation("org.ow2.asm:asm-tree:9.7")
++ testImplementation("org.mockito:mockito-core:5.14.1")
++ testImplementation("org.ow2.asm:asm-tree:9.7.1")
+}
+
+paperweight {
@@ -93,8 +94,12 @@ index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043
+}
+
+tasks.test {
-+ exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
-+ useJUnitPlatform()
++ include("**/**TestSuite.class")
++ workingDir = temporaryDir
++ useJUnitPlatform {
++ forkEvery = 1
++ excludeTags("Slow")
++ }
+}
+
+fun TaskContainer.registerRunTask(
@@ -160,10 +165,10 @@ index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043
+}
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
-index 5abcca1894a0d7795d394834f56c189c0bbeb82f..0000000000000000000000000000000000000000
+index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..0000000000000000000000000000000000000000
--- a/pom.xml
+++ /dev/null
-@@ -1,604 +0,0 @@
+@@ -1,612 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
@@ -183,6 +188,7 @@ index 5abcca1894a0d7795d394834f56c189c0bbeb82f..00000000000000000000000000000000
-
- <properties>
- <skipTests>true</skipTests>
+- <groups>AllFeatures,Bundle,Legacy,Normal,VanillaFeature</groups>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <api.version>unknown</api.version>
- <bt.name>git</bt.name>
@@ -226,7 +232,7 @@ index 5abcca1894a0d7795d394834f56c189c0bbeb82f..00000000000000000000000000000000
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm-commons</artifactId>
-- <version>9.7</version>
+- <version>9.7.1</version>
- <scope>compile</scope>
- </dependency>
- <!-- Mojang depends -->
@@ -448,6 +454,12 @@ index 5abcca1894a0d7795d394834f56c189c0bbeb82f..00000000000000000000000000000000
- <scope>test</scope>
- </dependency>
- <dependency>
+- <groupId>org.junit.platform</groupId>
+- <artifactId>junit-platform-suite-engine</artifactId>
+- <version>1.10.0</version>
+- <scope>test</scope>
+- </dependency>
+- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest</artifactId>
- <version>2.2</version>
@@ -456,13 +468,13 @@ index 5abcca1894a0d7795d394834f56c189c0bbeb82f..00000000000000000000000000000000
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
-- <version>5.11.0</version>
+- <version>5.14.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.ow2.asm</groupId>
- <artifactId>asm-tree</artifactId>
-- <version>9.7</version>
+- <version>9.7.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
@@ -675,9 +687,10 @@ index 5abcca1894a0d7795d394834f56c189c0bbeb82f..00000000000000000000000000000000
- <version>3.2.5</version>
- <configuration>
- <workingDirectory>${basedir}/target/test-server</workingDirectory>
-- <excludes>
-- <exclude>org/bukkit/craftbukkit/inventory/ItemStack*Test.java</exclude>
-- </excludes>
+- <reuseForks>false</reuseForks>
+- <includes>
+- <include>**/*TestSuite.java</include>
+- </includes>
- </configuration>
- </plugin>
- </plugins>
diff --git a/patches/server/0002-Remap-fixes.patch b/patches/server/0002-Remap-fixes.patch
index 684c2c5fcb..d128af05d7 100644
--- a/patches/server/0002-Remap-fixes.patch
+++ b/patches/server/0002-Remap-fixes.patch
@@ -74,7 +74,7 @@ index 9051f0186c09eeb8ecccf62b0116f6da1800a1df..b231f90317fe7df9133674b12d478735
private Optional<ResourceLocation> randomSequence;
diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java
-index dfc3e4f5a5cfee0456097a44d579587719a231a7..9342abe7853a611776684c1eb0b24164148cb5f2 100644
+index e96d821da0698dd42651500fb97a0856a9e9ce02..fb7d40181abdaa5b2ce607db47c09d0d0a19c86d 100644
--- a/src/test/java/org/bukkit/DyeColorsTest.java
+++ b/src/test/java/org/bukkit/DyeColorsTest.java
@@ -3,7 +3,6 @@ package org.bukkit;
@@ -82,10 +82,10 @@ index dfc3e4f5a5cfee0456097a44d579587719a231a7..9342abe7853a611776684c1eb0b24164
import static org.hamcrest.Matchers.*;
-import net.minecraft.world.item.DyeColor;
- import org.bukkit.support.AbstractTestingBase;
+ import org.bukkit.support.environment.Normal;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.EnumSource;
-@@ -14,7 +13,7 @@ public class DyeColorsTest extends AbstractTestingBase {
+@@ -15,7 +14,7 @@ public class DyeColorsTest {
@EnumSource(DyeColor.class)
public void checkColor(DyeColor dye) {
Color color = dye.getColor();
@@ -94,7 +94,7 @@ index dfc3e4f5a5cfee0456097a44d579587719a231a7..9342abe7853a611776684c1eb0b24164
Color nmsColor = Color.fromARGB(nmsColorArray);
assertThat(color, is(nmsColor));
}
-@@ -23,7 +22,7 @@ public class DyeColorsTest extends AbstractTestingBase {
+@@ -24,7 +23,7 @@ public class DyeColorsTest {
@EnumSource(org.bukkit.DyeColor.class)
public void checkFireworkColor(org.bukkit.DyeColor dye) {
Color color = dye.getFireworkColor();
@@ -104,10 +104,10 @@ index dfc3e4f5a5cfee0456097a44d579587719a231a7..9342abe7853a611776684c1eb0b24164
}
}
diff --git a/src/test/java/org/bukkit/ParticleTest.java b/src/test/java/org/bukkit/ParticleTest.java
-index 9c9f5dd2351b3067b54d6cc5bdb572c46b12aaa8..307e8a3694c6f0b48d2df9792c3e5fdbaae1fd8e 100644
+index 688c5bae8146f6fc8cddb2632e9cbf304f0745fb..1b0df6220682328b8f1d03416cb8df2f6662a1cf 100644
--- a/src/test/java/org/bukkit/ParticleTest.java
+++ b/src/test/java/org/bukkit/ParticleTest.java
-@@ -250,7 +250,7 @@ public class ParticleTest extends AbstractTestingBase {
+@@ -251,7 +251,7 @@ public class ParticleTest {
Check in CraftParticle if the conversion is still correct.
""", bukkit.getKey()));
@@ -117,7 +117,7 @@ index 9c9f5dd2351b3067b54d6cc5bdb572c46b12aaa8..307e8a3694c6f0b48d2df9792c3e5fdb
Could not encoded particle param for particle %s.
This can indicated, that the wrong particle param is created in CraftParticle.
diff --git a/src/test/java/org/bukkit/entity/EntityTypesTest.java b/src/test/java/org/bukkit/entity/EntityTypesTest.java
-index 32df0090aab65b551b524603cce0b96e461cc358..952924abae79cc504342bbdb6f6953ab8a6cc295 100644
+index 9df52ab0f04758dd04f45f6029fe120ac1a933af..d513d926ddabd61a03172adb846afb7674ed402e 100644
--- a/src/test/java/org/bukkit/entity/EntityTypesTest.java
+++ b/src/test/java/org/bukkit/entity/EntityTypesTest.java
@@ -6,7 +6,6 @@ import java.util.Set;
@@ -125,10 +125,10 @@ index 32df0090aab65b551b524603cce0b96e461cc358..952924abae79cc504342bbdb6f6953ab
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.resources.ResourceLocation;
-import net.minecraft.world.entity.EntityType;
- import org.bukkit.support.AbstractTestingBase;
+ import org.bukkit.support.environment.AllFeatures;
import org.junit.jupiter.api.Test;
-@@ -16,8 +15,8 @@ public class EntityTypesTest extends AbstractTestingBase {
+@@ -17,8 +16,8 @@ public class EntityTypesTest {
public void testMaps() {
Set<EntityType> allBukkit = Arrays.stream(EntityType.values()).filter((b) -> b.getName() != null).collect(Collectors.toSet());
@@ -140,7 +140,7 @@ index 32df0090aab65b551b524603cce0b96e461cc358..952924abae79cc504342bbdb6f6953ab
org.bukkit.entity.EntityType bukkit = org.bukkit.entity.EntityType.fromName(key.getPath());
assertNotNull(bukkit, "Missing nms->bukkit " + key);
diff --git a/src/test/java/org/bukkit/entity/PandaGeneTest.java b/src/test/java/org/bukkit/entity/PandaGeneTest.java
-index 5818bfa69a8573a2a8f350066f829d587cbc546b..8e421a1bee0c526e3024eab9ba4cc0b320842de2 100644
+index 4a3ac959f0dcc35f80371443383be1f8b42b6d95..e8520f541fda2d1cd9677f3fc7d7d295743f88b2 100644
--- a/src/test/java/org/bukkit/entity/PandaGeneTest.java
+++ b/src/test/java/org/bukkit/entity/PandaGeneTest.java
@@ -2,7 +2,6 @@ package org.bukkit.entity;
@@ -149,9 +149,9 @@ index 5818bfa69a8573a2a8f350066f829d587cbc546b..8e421a1bee0c526e3024eab9ba4cc0b3
-import net.minecraft.world.entity.animal.Panda;
import org.bukkit.craftbukkit.entity.CraftPanda;
+ import org.bukkit.support.environment.Normal;
import org.junit.jupiter.api.Test;
-
-@@ -10,8 +9,8 @@ public class PandaGeneTest {
+@@ -12,8 +11,8 @@ public class PandaGeneTest {
@Test
public void testBukkit() {
@@ -162,7 +162,7 @@ index 5818bfa69a8573a2a8f350066f829d587cbc546b..8e421a1bee0c526e3024eab9ba4cc0b3
assertNotNull(nms, "NMS gene null for " + gene);
assertEquals(gene.isRecessive(), nms.isRecessive(), "Recessive status did not match " + gene);
-@@ -21,7 +20,7 @@ public class PandaGeneTest {
+@@ -23,7 +22,7 @@ public class PandaGeneTest {
@Test
public void testNMS() {
@@ -172,10 +172,10 @@ index 5818bfa69a8573a2a8f350066f829d587cbc546b..8e421a1bee0c526e3024eab9ba4cc0b3
assertNotNull(bukkit, "Bukkit gene null for " + gene);
diff --git a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
-index 6c84f1289c84d0aca1935c473ffa63dae1b52598..ebcb65cb74acdb9d1bcf2b4b3551a2dc6d809bc9 100644
+index a382ca7c6e0f96e5d8be37fa8139360db13f9c2f..8fb906c77070eedec8cde263154eaf4610ad3197 100644
--- a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
+++ b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
-@@ -29,17 +29,17 @@ public class RegistryConstantsTest extends AbstractTestingBase {
+@@ -31,17 +31,17 @@ public class RegistryConstantsTest {
@Test
public void testTrimMaterial() {
@@ -197,10 +197,10 @@ index 6c84f1289c84d0aca1935c473ffa63dae1b52598..ebcb65cb74acdb9d1bcf2b4b3551a2dc
for (Field field : clazz.getFields()) {
diff --git a/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java b/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
-index 31062b6d9ad685ea3750c6b5ddc6b295bb263e0a..5842cb5a6f3da42b8c40e6cbd5c5366572bf7684 100644
+index 52f057a3b81ae798a8ff354a90e2cc64264c0398..0c704fb9e73229f5632f1f48e59fccc0daf9ec26 100644
--- a/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
+++ b/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
-@@ -24,7 +24,7 @@ public class RegistryLoadOrderTest extends AbstractTestingBase {
+@@ -25,7 +25,7 @@ public class RegistryLoadOrderTest {
private static boolean initInterface = false;
private static boolean initAbstract = false;
diff --git a/patches/server/0003-Build-system-changes.patch b/patches/server/0003-Build-system-changes.patch
index 3e04e97c06..4e78b9dbf6 100644
--- a/patches/server/0003-Build-system-changes.patch
+++ b/patches/server/0003-Build-system-changes.patch
@@ -9,7 +9,7 @@ public net.minecraft.server.packs.VanillaPackResourcesBuilder safeGetPath(Ljava/
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index 9ea079d14a92367629dc8fb30d1be043c9290964..f276414e9e81abf8f1f80991ebd5ab43472e07b1 100644
+index 82b298d454dee6a6d996aa7822dd745e70a8da74..ef88afa5fe914ae3fef9ffb1a971dabf568f75f3 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,9 +8,7 @@ plugins {
@@ -20,10 +20,10 @@ index 9ea079d14a92367629dc8fb30d1be043c9290964..f276414e9e81abf8f1f80991ebd5ab43
- exclude(group = "org.apache.logging.log4j", module = "log4j-api")
- }
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
- implementation("org.ow2.asm:asm-commons:9.7")
+ implementation("org.ow2.asm:asm-commons:9.7.1")
implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
-@@ -38,6 +36,7 @@ tasks.jar {
+@@ -39,6 +37,7 @@ tasks.jar {
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
@@ -31,7 +31,7 @@ index 9ea079d14a92367629dc8fb30d1be043c9290964..f276414e9e81abf8f1f80991ebd5ab43
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
"Implementation-Title" to "CraftBukkit",
-@@ -46,6 +45,9 @@ tasks.jar {
+@@ -47,6 +46,9 @@ tasks.jar {
"Specification-Title" to "Bukkit",
"Specification-Version" to project.version,
"Specification-Vendor" to "Bukkit Team",
@@ -41,7 +41,7 @@ index 9ea079d14a92367629dc8fb30d1be043c9290964..f276414e9e81abf8f1f80991ebd5ab43
)
for (tld in setOf("net", "com", "org")) {
attributes("$tld/bukkit", "Sealed" to true)
-@@ -58,6 +60,17 @@ publishing {
+@@ -59,6 +61,17 @@ publishing {
}
}
@@ -57,9 +57,9 @@ index 9ea079d14a92367629dc8fb30d1be043c9290964..f276414e9e81abf8f1f80991ebd5ab43
+// Paper end
+
tasks.test {
- exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
- useJUnitPlatform()
-@@ -123,4 +136,5 @@ tasks.registerRunTask("runReobf") {
+ include("**/**TestSuite.class")
+ workingDir = temporaryDir
+@@ -128,4 +141,5 @@ tasks.registerRunTask("runReobf") {
tasks.registerRunTask("runDev") {
description = "Spin up a non-relocated Mojang-mapped test server"
classpath(sourceSets.main.map { it.runtimeClasspath })
@@ -131,7 +131,7 @@ index feca36209fd2405fab70f564f63e627b8b78ac18..396ec10a76bdadbf5be2f0e15e88eed4
public static PackRepository createPackRepository(Path dataPacksPath, DirectoryValidator symlinkFinder) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 9bae4835882a7c1b5a623d57330c36cc61b9b6d1..273a6658deacbf00f6cc498cf3fcd20d144bd9e4 100644
+index dd64f5c16560d2ce6255c8319ddd0f5157237f0f..4566237fa1d49a559b2df806f9a318be46a6eade 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -199,7 +199,7 @@ public class Main {
@@ -142,7 +142,7 @@ index 9bae4835882a7c1b5a623d57330c36cc61b9b6d1..273a6658deacbf00f6cc498cf3fcd20d
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
Calendar deadline = Calendar.getInstance();
- deadline.add(Calendar.DAY_OF_YEAR, -14);
+ deadline.add(Calendar.DAY_OF_YEAR, -28);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -171,15 +171,15 @@ index 0000000000000000000000000000000000000000..288fbe68c6053f40e72f0feedef0ae0f
+ "pack_format": 41
+ }
+}
-diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
-index 1bdf0b2b8f8e6dace403695fece80ebb3dc9e039..544307fe34cbcfa286a7d7b30900ebea127d189e 100644
---- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
-+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
-@@ -43,6 +43,7 @@ public abstract class AbstractTestingBase {
- public static final Registry<Biome> BIOMES;
+diff --git a/src/test/java/org/bukkit/support/RegistryHelper.java b/src/test/java/org/bukkit/support/RegistryHelper.java
+index e5dbcdcbd4187c724c3c6a3b8141a3796710c7a8..73645ea2e5c17e973ed3b888aab56f733f9c87a3 100644
+--- a/src/test/java/org/bukkit/support/RegistryHelper.java
++++ b/src/test/java/org/bukkit/support/RegistryHelper.java
+@@ -58,6 +58,7 @@ public final class RegistryHelper {
+ }
- static {
-+ System.setProperty("Paper.pushPaperAssetsRoot", "true"); // Paper
+ public static void setup(FeatureFlagSet featureFlagSet) {
++ System.setProperty("Paper.pushPaperAssetsRoot", "true"); // Paper - build system changes - push asset root
SharedConstants.tryDetectVersion();
Bootstrap.bootStrap();
- // Populate available packs
+
diff --git a/patches/server/0004-Test-changes.patch b/patches/server/0004-Test-changes.patch
index 97ddef9404..85407ece86 100644
--- a/patches/server/0004-Test-changes.patch
+++ b/patches/server/0004-Test-changes.patch
@@ -6,18 +6,18 @@ Subject: [PATCH] Test changes
Co-authored-by: yannnicklamprecht <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index f276414e9e81abf8f1f80991ebd5ab43472e07b1..7a0f2391a464eeebc5e57856300bc000b8d35e52 100644
+index ef88afa5fe914ae3fef9ffb1a971dabf568f75f3..3c1770864ab3e8708bab6cd50d6ffb5e19af5399 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
-@@ -22,6 +22,7 @@ dependencies {
+@@ -23,6 +23,7 @@ dependencies {
testImplementation("org.hamcrest:hamcrest:2.2")
- testImplementation("org.mockito:mockito-core:5.11.0")
- testImplementation("org.ow2.asm:asm-tree:9.7")
+ testImplementation("org.mockito:mockito-core:5.14.1")
+ testImplementation("org.ow2.asm:asm-tree:9.7.1")
+ testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
}
paperweight {
-@@ -55,6 +56,12 @@ tasks.jar {
+@@ -56,6 +57,12 @@ tasks.jar {
}
}
@@ -32,10 +32,10 @@ index f276414e9e81abf8f1f80991ebd5ab43472e07b1..7a0f2391a464eeebc5e57856300bc000
}
diff --git a/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java b/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..e1c14886064cde56be7fcd8f22a6ecb2d222a762
+index 0000000000000000000000000000000000000000..fe52d229c31526cc32f6422328efe92edf75a7ff
--- /dev/null
+++ b/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java
-@@ -0,0 +1,33 @@
+@@ -0,0 +1,34 @@
+package io.papermc.paper.registry;
+
+import java.util.Optional;
@@ -50,7 +50,8 @@ index 0000000000000000000000000000000000000000..e1c14886064cde56be7fcd8f22a6ecb2
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
-+class RegistryKeyTest extends AbstractTestingBase {
++@AllFeatures
++class RegistryKeyTest {
+
+ @BeforeAll
+ static void before() throws ClassNotFoundException {
@@ -64,7 +65,7 @@ index 0000000000000000000000000000000000000000..e1c14886064cde56be7fcd8f22a6ecb2
+ @ParameterizedTest
+ @MethodSource("data")
+ void testApiRegistryKeysExist(final RegistryKey<?> key) {
-+ final Optional<Registry<Object>> registry = AbstractTestingBase.REGISTRY_CUSTOM.registry(ResourceKey.createRegistryKey(ResourceLocation.parse(key.key().asString())));
++ final Optional<Registry<Object>> registry = RegistryHelper.getRegistry().registry(ResourceKey.createRegistryKey(ResourceLocation.parse(key.key().asString())));
+ assertTrue(registry.isPresent(), "Missing vanilla registry for " + key.key().asString());
+
+ }
@@ -338,11 +339,35 @@ index 0000000000000000000000000000000000000000..6cbf11c898439834cffb99ef84e5df14
+public @interface MethodParameterSource {
+ String[] value() default {};
+}
+diff --git a/src/test/java/org/bukkit/ExplosionResultTest.java b/src/test/java/org/bukkit/ExplosionResultTest.java
+index ee5ab15bb0bfeb0ff6fa0d720eeff086d92cb459..7419ea2f68607aad27929a608c402bd4c222f95d 100644
+--- a/src/test/java/org/bukkit/ExplosionResultTest.java
++++ b/src/test/java/org/bukkit/ExplosionResultTest.java
+@@ -5,6 +5,7 @@ import net.minecraft.world.level.Explosion;
+ import org.bukkit.craftbukkit.CraftExplosionResult;
+ import org.junit.jupiter.api.Test;
+
[email protected] // Paper - test changes - missing test suite annotation
+ public class ExplosionResultTest {
+
+ @Test
+diff --git a/src/test/java/org/bukkit/registry/RegistryClassTest.java b/src/test/java/org/bukkit/registry/RegistryClassTest.java
+index 740073ddd99b5e6aba056b99d5ed3e2a94a13b6c..575a06125e0b60b5bb8b6f85131f7d6cf86f5083 100644
+--- a/src/test/java/org/bukkit/registry/RegistryClassTest.java
++++ b/src/test/java/org/bukkit/registry/RegistryClassTest.java
+@@ -57,6 +57,7 @@ import org.objectweb.asm.Type;
+ * Note: This test class assumes that feature flags only enable more features and do not disable vanilla ones.
+ */
+ @AllFeatures
[email protected] // Paper - disabled for now as it constructs a second root registry, which is not supported on paper
+ public class RegistryClassTest {
+
+ private static final Map<Class<? extends Keyed>, Data> INIT_DATA = new HashMap<>();
diff --git a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
-index ebcb65cb74acdb9d1bcf2b4b3551a2dc6d809bc9..7d9dbed7281099b78d7f898885b37cdcfe8b099f 100644
+index 8fb906c77070eedec8cde263154eaf4610ad3197..8705ee2a28d5dba7bb579eae1436451502e1e3c2 100644
--- a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
+++ b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
-@@ -24,7 +24,7 @@ public class RegistryConstantsTest extends AbstractTestingBase {
+@@ -26,7 +26,7 @@ public class RegistryConstantsTest {
@Test
public void testDamageType() {
this.testExcessConstants(DamageType.class, Registry.DAMAGE_TYPE);
@@ -351,68 +376,67 @@ index ebcb65cb74acdb9d1bcf2b4b3551a2dc6d809bc9..7d9dbed7281099b78d7f898885b37cdc
}
@Test
-diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
-index 544307fe34cbcfa286a7d7b30900ebea127d189e..5bda0bc976920f224586f2c0e083b771c676e307 100644
---- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
-+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
-@@ -53,6 +53,11 @@ public abstract class AbstractTestingBase {
- MultiPackResourceManager resourceManager = new MultiPackResourceManager(PackType.SERVER_DATA, resourceRepository.getAvailablePacks().stream().map(Pack::open).toList());
+diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
+index 6ecafd167d4d8c79f2cbc43ea9da98a5d61d8751..f81f86cf05a8c6816d356185af6d0d84a0474dd2 100644
+--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
++++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
+@@ -47,7 +47,7 @@ public final class DummyServerHelper {
+ when(instance.getTag(any(), any(), any())).then(mock -> {
+ String registry = mock.getArgument(0);
+ Class<?> clazz = mock.getArgument(2);
+- MinecraftKey key = CraftNamespacedKey.toMinecraft(mock.getArgument(1));
++ net.minecraft.resources.ResourceLocation key = CraftNamespacedKey.toMinecraft(mock.getArgument(1)); // Paper - address remapping issues
+
+ switch (registry) {
+ case org.bukkit.Tag.REGISTRY_BLOCKS -> {
+@@ -66,24 +66,31 @@ public final class DummyServerHelper {
+ }
+ case org.bukkit.Tag.REGISTRY_FLUIDS -> {
+ Preconditions.checkArgument(clazz == org.bukkit.Fluid.class, "Fluid namespace must have fluid type");
+- TagKey<FluidType> fluidTagKey = TagKey.create(Registries.FLUID, key);
++ TagKey<net.minecraft.world.level.material.Fluid> fluidTagKey = TagKey.create(Registries.FLUID, key); // Paper - address remapping issues
+ if (BuiltInRegistries.FLUID.getTag(fluidTagKey).isPresent()) {
+ return new CraftFluidTag(BuiltInRegistries.FLUID, fluidTagKey);
+ }
+ }
+ case org.bukkit.Tag.REGISTRY_ENTITY_TYPES -> {
+ Preconditions.checkArgument(clazz == org.bukkit.entity.EntityType.class, "Entity type namespace must have entity type");
+- TagKey<EntityTypes<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key);
++ TagKey<net.minecraft.world.entity.EntityType<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key); // Paper - address remapping issues
+ if (BuiltInRegistries.ENTITY_TYPE.getTag(entityTagKey).isPresent()) {
+ return new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey);
+ }
+ }
+- default -> throw new IllegalArgumentException();
++ default -> new io.papermc.paper.util.EmptyTag(); // Paper - testing additions
+ }
+
+ return null;
+ });
+
++ // Paper start - testing additions
++ final Thread currentThread = Thread.currentThread();
++ when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
++ final org.bukkit.plugin.PluginManager pluginManager = new org.bukkit.plugin.SimplePluginManager(instance, new org.bukkit.command.SimpleCommandMap(instance));
++ when(instance.getPluginManager()).thenReturn(pluginManager);
++ // Paper end - testing additions
++
+ return instance;
+ }
+ }
+diff --git a/src/test/java/org/bukkit/support/RegistryHelper.java b/src/test/java/org/bukkit/support/RegistryHelper.java
+index 73645ea2e5c17e973ed3b888aab56f733f9c87a3..4d169ff3541044d447de519d2b0973da98b0bd53 100644
+--- a/src/test/java/org/bukkit/support/RegistryHelper.java
++++ b/src/test/java/org/bukkit/support/RegistryHelper.java
+@@ -98,6 +98,11 @@ public final class RegistryHelper {
+ private static LayeredRegistryAccess<RegistryLayer> createLayers(MultiPackResourceManager resourceManager) {
// add tags and loot tables for unit tests
LayeredRegistryAccess<RegistryLayer> layers = RegistryLayer.createRegistryAccess();
+ // Paper start - load registry here to ensure bukkit object registry are correctly delayed if needed
+ try {
+ Class.forName("org.bukkit.Registry");
-+ } catch (ClassNotFoundException ignored) {}
++ } catch (final ClassNotFoundException ignored) {}
+ // Paper end - load registry here to ensure bukkit object registry are correctly delayed if needed
layers = WorldLoader.loadAndReplaceLayer(resourceManager, layers, RegistryLayer.WORLDGEN, RegistryDataLoader.WORLDGEN_REGISTRIES);
- REGISTRY_CUSTOM = layers.compositeAccess().freeze();
- // Register vanilla pack
-diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
-index 1acdf5bc439c073c1777c2c4f5743ae082f4a621..183d30e3d3d413b05c762f374a964498d6ffdec4 100644
---- a/src/test/java/org/bukkit/support/DummyServer.java
-+++ b/src/test/java/org/bukkit/support/DummyServer.java
-@@ -62,7 +62,7 @@ public final class DummyServer {
- when(instance.getTag(any(), any(), any())).then(mock -> {
- String registry = mock.getArgument(0);
- Class<?> clazz = mock.getArgument(2);
-- MinecraftKey key = CraftNamespacedKey.toMinecraft(mock.getArgument(1));
-+ net.minecraft.resources.ResourceLocation key = CraftNamespacedKey.toMinecraft(mock.getArgument(1)); // Paper - address remapping issues
- switch (registry) {
- case org.bukkit.Tag.REGISTRY_BLOCKS -> {
-@@ -81,24 +81,32 @@ public final class DummyServer {
- }
- case org.bukkit.Tag.REGISTRY_FLUIDS -> {
- Preconditions.checkArgument(clazz == org.bukkit.Fluid.class, "Fluid namespace must have fluid type");
-- TagKey<FluidType> fluidTagKey = TagKey.create(Registries.FLUID, key);
-+ TagKey<net.minecraft.world.level.material.Fluid> fluidTagKey = TagKey.create(Registries.FLUID, key); // Paper - address remapping issues
- if (BuiltInRegistries.FLUID.getTag(fluidTagKey).isPresent()) {
- return new CraftFluidTag(BuiltInRegistries.FLUID, fluidTagKey);
- }
- }
- case org.bukkit.Tag.REGISTRY_ENTITY_TYPES -> {
- Preconditions.checkArgument(clazz == org.bukkit.entity.EntityType.class, "Entity type namespace must have entity type");
-- TagKey<EntityTypes<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key);
-+ TagKey<net.minecraft.world.entity.EntityType<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key); // Paper - address remapping issues
- if (BuiltInRegistries.ENTITY_TYPE.getTag(entityTagKey).isPresent()) {
- return new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey);
- }
- }
-- default -> throw new IllegalArgumentException();
-+ default -> new io.papermc.paper.util.EmptyTag(); // Paper - testing additions
- }
-
- return null;
- });
-
-+ // Paper start - testing additions
-+ final Thread currentThread = Thread.currentThread();
-+ when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
-+
-+ final org.bukkit.plugin.PluginManager pluginManager = new org.bukkit.plugin.SimplePluginManager(instance, new org.bukkit.command.SimpleCommandMap(instance));
-+ when(instance.getPluginManager()).thenReturn(pluginManager);
-+ // paper end - testing additions
-+
- Bukkit.setServer(instance);
- } catch (Throwable t) {
- throw new Error(t);
+ return layers;
diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch
index 4f4f48cb51..ecc645f206 100644
--- a/patches/server/0005-Paper-config-files.patch
+++ b/patches/server/0005-Paper-config-files.patch
@@ -15,13 +15,13 @@ public net.minecraft.server.dedicated.DedicatedServerProperties reload(Lnet/mine
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
diff --git a/build.gradle.kts b/build.gradle.kts
-index 7a0f2391a464eeebc5e57856300bc000b8d35e52..94dfc105b197c9eda481cbe90bb48b71c845e702 100644
+index 2233e51bfab4ac36977984e8fe7fddb04120dddd..7f7b7f0b29107375b2438e3af0bc0f40390db4fa 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -10,6 +10,7 @@ dependencies {
implementation("jline:jline:2.12.1")
implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
- implementation("org.ow2.asm:asm-commons:9.7")
+ implementation("org.ow2.asm:asm-commons:9.7.1")
+ implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
@@ -5226,10 +5226,10 @@ index e433037a03ffafabb952887ae3980e1d51411d4c..c061813d275fbc48d7629cc59d90dbb4
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 10f07a6eff8f738cefef11829dd774874259b8f4..4c5b6f8d63e4c60a1dc81e68117fa049b956819a 100644
+index 357c948dd66644497583996f211f25cbe5c78828..d0c41302478bd9b0ec65020e7ef520bd3ff1f347 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -962,6 +962,7 @@ public final class CraftServer implements Server {
+@@ -964,6 +964,7 @@ public final class CraftServer implements Server {
}
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
@@ -5238,7 +5238,7 @@ index 10f07a6eff8f738cefef11829dd774874259b8f4..4c5b6f8d63e4c60a1dc81e68117fa049
world.serverLevelData.setDifficulty(config.difficulty);
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 273a6658deacbf00f6cc498cf3fcd20d144bd9e4..cf06abf508fab734f5945e1d292c01512a50749e 100644
+index 4566237fa1d49a559b2df806f9a318be46a6eade..0ea2d13ab80559472513c6df362583b8371a9532 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -142,6 +142,19 @@ public class Main {
@@ -5362,15 +5362,15 @@ index 0000000000000000000000000000000000000000..0396589795da1f83ddf62426236dde9a
+ }
+ }
+}
-diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
-index 5bda0bc976920f224586f2c0e083b771c676e307..4e9612600822bc1b52b8528dff2783d43385ec73 100644
---- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
-+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
-@@ -68,6 +68,7 @@ public abstract class AbstractTestingBase {
- BIOMES = REGISTRY_CUSTOM.registryOrThrow(Registries.BIOME);
-
- DummyServer.setup();
-+ io.papermc.paper.configuration.GlobalConfigTestingBase.setupGlobalConfigForTest(); // Paper
-
- CraftRegistry.setMinecraftRegistry(REGISTRY_CUSTOM);
+diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
+index f81f86cf05a8c6816d356185af6d0d84a0474dd2..ba0a2ab9de34fa40dd90cecaeec4a5e54fe3e2d8 100644
+--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
++++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
+@@ -91,6 +91,7 @@ public final class DummyServerHelper {
+ when(instance.getPluginManager()).thenReturn(pluginManager);
+ // Paper end - testing additions
++ io.papermc.paper.configuration.GlobalConfigTestingBase.setupGlobalConfigForTest(); // Paper - configuration files - setup global configuration test base
+ return instance;
+ }
+ }
diff --git a/patches/server/0008-CB-fixes.patch b/patches/server/0008-CB-fixes.patch
index d2f68ddc07..50bdb07720 100644
--- a/patches/server/0008-CB-fixes.patch
+++ b/patches/server/0008-CB-fixes.patch
@@ -83,7 +83,7 @@ index 85c7f3027978b1d7d6c31b7ad21b3377cdda5925..e34deaf398dc6722c3128bdd6b9bc16d
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index cf06abf508fab734f5945e1d292c01512a50749e..42a1a0588e2b506082499ac9791d039089a64631 100644
+index 0ea2d13ab80559472513c6df362583b8371a9532..13c37384defda4475de584f33d1860a2d53ce05e 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -123,6 +123,7 @@ public class Main {
@@ -115,10 +115,10 @@ index 905adf97c0d1f0d1c774a6835a5dffcfea884e58..c017ce2ca1bc535795c958a2e509af2a
public class CraftScheduler implements BukkitScheduler {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index b0cc506f1b3eb53e8e2299787071de707a036df0..eeffc4be4ae7168c9f69edbbff6642fd4c214b3d 100644
+index a0f228ee83fd3a913666f88381c946f8a6340644..60dc550431fa4641f8c6d964329b0e2698d1fdd6 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -240,7 +240,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -246,7 +246,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
try {
nmsStack.applyComponents(new ItemParser(Commands.createValidationContext(MinecraftServer.getDefaultRegistryAccess())).parse(new StringReader(arguments)).components());
} catch (CommandSyntaxException ex) {
diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch
index f4ec305721..59c2e99b59 100644
--- a/patches/server/0009-MC-Utils.patch
+++ b/patches/server/0009-MC-Utils.patch
@@ -4438,7 +4438,7 @@ index 40adb6117b9e0d5f70103113202a07715e403e2a..c9cab509796599b13ca3422de1049aed
long j = Util.getNanos() - i;
int k = this.tickCount % 100;
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
-index f40a2f348c45a29168ca3d4eef07b5b628060bee..9a009a688c02e990723917766c51e1c0e71e338d 100644
+index 814e7fdf6c089b920825effaeeb0675695b2f3fa..43513325b7052d388a63d63bd3a4edff48cf23c2 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -37,9 +37,9 @@ public class ChunkHolder extends GenerationChunkHolder {
@@ -4463,7 +4463,7 @@ index f40a2f348c45a29168ca3d4eef07b5b628060bee..9a009a688c02e990723917766c51e1c0
return (LevelChunk) ((ChunkResult) this.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).orElse(null); // CraftBukkit - decompile error
}
-@@ -337,12 +337,28 @@ public class ChunkHolder extends GenerationChunkHolder {
+@@ -345,12 +345,28 @@ public class ChunkHolder extends GenerationChunkHolder {
this.wasAccessibleSinceLastSave |= flag1;
if (!flag && flag1) {
@@ -4492,7 +4492,7 @@ index f40a2f348c45a29168ca3d4eef07b5b628060bee..9a009a688c02e990723917766c51e1c0
this.fullChunkFuture.complete(ChunkHolder.UNLOADED_LEVEL_CHUNK);
this.fullChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
}
-@@ -353,11 +369,25 @@ public class ChunkHolder extends GenerationChunkHolder {
+@@ -361,11 +377,25 @@ public class ChunkHolder extends GenerationChunkHolder {
if (!flag2 && flag3) {
this.tickingChunkFuture = chunkLoadingManager.prepareTickingChunk(this);
this.scheduleFullChunkPromotion(chunkLoadingManager, this.tickingChunkFuture, executor, FullChunkStatus.BLOCK_TICKING);
@@ -4519,7 +4519,7 @@ index f40a2f348c45a29168ca3d4eef07b5b628060bee..9a009a688c02e990723917766c51e1c0
this.tickingChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
}
-@@ -371,11 +401,24 @@ public class ChunkHolder extends GenerationChunkHolder {
+@@ -379,11 +409,24 @@ public class ChunkHolder extends GenerationChunkHolder {
this.entityTickingChunkFuture = chunkLoadingManager.prepareEntityTickingChunk(this);
this.scheduleFullChunkPromotion(chunkLoadingManager, this.entityTickingChunkFuture, executor, FullChunkStatus.ENTITY_TICKING);
@@ -4719,10 +4719,10 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
protected ChunkDistanceManager(final Executor workerExecutor, final Executor mainThreadExecutor) {
super(workerExecutor, mainThreadExecutor);
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
-index b6cc33943fe7e4667944f3e6f868b3033ea9ca18..3d46412b307f08968bb9b96c0649e0405813462e 100644
+index d3769ad50ddb556cff515ea8cf853d28e490ca94..dfa0456f352ce25bc4edd1b0f04ca5a14434d7fa 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
-@@ -365,7 +365,7 @@ public abstract class DistanceManager {
+@@ -370,7 +370,7 @@ public abstract class DistanceManager {
}
public void removeTicketsOnClosing() {
@@ -5048,7 +5048,7 @@ index c1db114edd9e31273b76374cbd19710b01cada2b..26064174397dc95f9b117d901e22c55a
@Override
public float getBukkitYaw() {
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index 5fa5c6fa8c143e1aa1dacc7a6b63b11ad4b074ec..5025f7f5d66f2aedd57db137ae2dc69c723768b3 100644
+index 3e00b12d166c5a6a82e61574bfefd5973ffcbb59..142d762750b9745428ae27802f7a428147a74771 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -953,6 +953,25 @@ public final class ItemStack implements DataComponentHolder {
@@ -5547,10 +5547,10 @@ index 34933c5324126f9afdc5cba9dea997ace8f01806..1cfc906317f07a44f06a4adf021c44e3
return false;
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 4c5b6f8d63e4c60a1dc81e68117fa049b956819a..958925a980f50cc85b10d36bcc343947cec8f285 100644
+index d0c41302478bd9b0ec65020e7ef520bd3ff1f347..99178e22846c41f1d800b69d4fed064088bbe92c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2598,4 +2598,9 @@ public final class CraftServer implements Server {
+@@ -2600,4 +2600,9 @@ public final class CraftServer implements Server {
return this.spigot;
}
// Spigot end
@@ -5561,7 +5561,7 @@ index 4c5b6f8d63e4c60a1dc81e68117fa049b956819a..958925a980f50cc85b10d36bcc343947
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 508419378c88ba8688edbd5142d9d8ba52396507..69c62699e3412f2730e3db65f196099d77698980 100644
+index 07012c01e1d8eacf37b8a86a5e4e56fb0d81c989..ac6d4c8ac26696a0c6dfa471eee764b871dd2029 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -252,8 +252,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch
index e21440350a..d9da34e2e7 100644
--- a/patches/server/0010-Adventure.patch
+++ b/patches/server/0010-Adventure.patch
@@ -3242,7 +3242,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 5025f7f5d66f2aedd57db137ae2dc69c723768b3..1cc9078fa63da4f39ef4a551cd6a5ff207f58306 100644
+index 142d762750b9745428ae27802f7a428147a74771..d0c946b0383dbd8242a554a92bc70dcc2f5cccc6 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -183,7 +183,15 @@ public final class ItemStack implements DataComponentHolder {
@@ -3327,10 +3327,10 @@ index 49c037e961c5ca5ba8d6a870cb32ffe8719adc91..2772c19f58a35713d61aab24f6f0d6f5
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c54d426cb 100644
+index 99178e22846c41f1d800b69d4fed064088bbe92c..9f7634053ddfc4fc67f89cc99524e9ebd6096f46 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -644,8 +644,10 @@ public final class CraftServer implements Server {
+@@ -645,8 +645,10 @@ public final class CraftServer implements Server {
}
@Override
@@ -3341,7 +3341,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
}
@Override
-@@ -1621,7 +1623,15 @@ public final class CraftServer implements Server {
+@@ -1623,7 +1625,15 @@ public final class CraftServer implements Server {
return this.configuration.getInt("settings.spawn-radius", -1);
}
@@ -3357,7 +3357,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
public String getShutdownMessage() {
return this.configuration.getString("settings.shutdown-message");
}
-@@ -1795,7 +1805,20 @@ public final class CraftServer implements Server {
+@@ -1797,7 +1807,20 @@ public final class CraftServer implements Server {
}
@Override
@@ -3378,7 +3378,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
Set<CommandSender> recipients = new HashSet<>();
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
-@@ -1803,14 +1826,14 @@ public final class CraftServer implements Server {
+@@ -1805,14 +1828,14 @@ public final class CraftServer implements Server {
}
}
@@ -3395,7 +3395,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
for (CommandSender recipient : recipients) {
recipient.sendMessage(message);
-@@ -2072,6 +2095,14 @@ public final class CraftServer implements Server {
+@@ -2074,6 +2097,14 @@ public final class CraftServer implements Server {
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
}
@@ -3410,7 +3410,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
@Override
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
Preconditions.checkArgument(type != null, "InventoryType cannot be null");
-@@ -2086,13 +2117,28 @@ public final class CraftServer implements Server {
+@@ -2088,13 +2119,28 @@ public final class CraftServer implements Server {
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
}
@@ -3439,7 +3439,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
public Merchant createMerchant(String title) {
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
}
-@@ -2157,6 +2203,17 @@ public final class CraftServer implements Server {
+@@ -2159,6 +2205,17 @@ public final class CraftServer implements Server {
return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
}
@@ -3457,7 +3457,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
@Override
public String getMotd() {
return this.console.getMotd();
-@@ -2603,4 +2660,57 @@ public final class CraftServer implements Server {
+@@ -2605,4 +2662,57 @@ public final class CraftServer implements Server {
public double[] getTPS() {
return new double[]{0, 0, 0}; // TODO
}
@@ -3554,7 +3554,7 @@ index cbdb1a56a97150c164515a4ce6d3ba06428bf321..b214e7b302abbfe1641485a05f1371ac
public URI getUrl() {
return this.handle.link();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 69c62699e3412f2730e3db65f196099d77698980..4878a1b085a83dd4a8ffdc86250b8fb4fbac5192 100644
+index ac6d4c8ac26696a0c6dfa471eee764b871dd2029..85c99c3b23df1c4fd8721e7676d8e6b82f9e6abf 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -162,6 +162,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -3628,7 +3628,7 @@ index 69c62699e3412f2730e3db65f196099d77698980..4878a1b085a83dd4a8ffdc86250b8fb4
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 42a1a0588e2b506082499ac9791d039089a64631..9c1fab8db74757e1fb57d4f47099ba6e1536cd6d 100644
+index 13c37384defda4475de584f33d1860a2d53ce05e..3b0370256b4d8c96053b340a657c6bcc6be6c9de 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -20,6 +20,12 @@ public class Main {
@@ -4803,10 +4803,10 @@ index c9cc23757a9fcc58d30b2915d4c5cfbc7d1c767a..fc0e1212022d1aa3506699b60ef33819
return this.title;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
-index 07d406de7123593dc470af2723f2a9a2dc2157b0..01fbd8a55866af3e371c8a2eef23ef6e9ca3226d 100644
+index d89b178dc82c7e2ad6d586217c5a039688563e29..d674289b07748022b94cc6a7e6c6eb456d245c93 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
-@@ -73,6 +73,13 @@ public class CraftInventoryView<T extends AbstractContainerMenu> extends CraftAb
+@@ -73,6 +73,13 @@ public class CraftInventoryView<T extends AbstractContainerMenu, I extends Inven
return CraftItemStack.asCraftMirror(this.container.getSlot(slot).getItem());
}
@@ -5191,11 +5191,11 @@ index c71a4971f127fdfc753306019313ce1a31201120..fd3b12477c30d1eabdbe57ea77902793
+ // 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 1c5d63fb6a9ed5cc40d735793cf5889e189feadf..568d6fab743039b20715d8181555f52baa05f0f3 100644
+index 8bba749bce211814f51af8a33f2ed60ba7a8b52d..0c73854243f7fa21d1ffdb3b4c85ee0a69c9c5e4 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -959,6 +959,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.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
+@@ -961,6 +961,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.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
}
+ // Paper start
@@ -5213,7 +5213,7 @@ index 1c5d63fb6a9ed5cc40d735793cf5889e189feadf..568d6fab743039b20715d8181555f52b
@Override
public String getDisplayName() {
return CraftChatMessage.fromComponent(this.displayName);
-@@ -989,6 +1001,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -991,6 +1003,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return this.itemName != null;
}
@@ -5232,7 +5232,7 @@ index 1c5d63fb6a9ed5cc40d735793cf5889e189feadf..568d6fab743039b20715d8181555f52b
@Override
public String getLocalizedName() {
return this.getDisplayName();
-@@ -1008,6 +1032,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1010,6 +1034,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return this.lore != null && !this.lore.isEmpty();
}
@@ -5624,10 +5624,10 @@ index ff040613083c015d9c52c0995591b64305fd5018..95444fd9fecc5bda5462ca8dfeca82c5
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 eeffc4be4ae7168c9f69edbbff6642fd4c214b3d..b64be3f292d88fa60746a3fe542740ef8ad2b41c 100644
+index 60dc550431fa4641f8c6d964329b0e2698d1fdd6..655ceaa92b9979fe29725f9812507731bb0bb484 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -77,6 +77,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -79,6 +79,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
private CraftMagicNumbers() {}
@@ -5783,10 +5783,10 @@ index 0000000000000000000000000000000000000000..3aedd0bbc97edacc1ebf71264b310e55
+}
diff --git a/src/test/java/io/papermc/paper/adventure/AdventureCodecsTest.java b/src/test/java/io/papermc/paper/adventure/AdventureCodecsTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a4533ef00523
+index 0000000000000000000000000000000000000000..074e46aa4aca1a5154a0198279f60b38e05c1344
--- /dev/null
+++ b/src/test/java/io/papermc/paper/adventure/AdventureCodecsTest.java
-@@ -0,0 +1,403 @@
+@@ -0,0 +1,405 @@
+package io.papermc.paper.adventure;
+
+import com.mojang.datafixers.util.Pair;
@@ -5828,7 +5828,8 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453
+import net.minecraft.world.item.ItemStack;
+import net.minecraft.world.item.Items;
+import org.apache.commons.lang3.RandomStringUtils;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.RegistryHelper;
++import org.bukkit.support.environment.VanillaFeature;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.EnumSource;
@@ -5863,7 +5864,8 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
-+class AdventureCodecsTest extends AbstractTestingBase {
++@VanillaFeature
++class AdventureCodecsTest {
+
+ static final String PARAMETERIZED_NAME = "[{index}] {displayName}: {arguments}";
+
@@ -5995,7 +5997,7 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453
+ JavaOps.INSTANCE,
+ JsonOps.INSTANCE
+ )
-+ .map(ops -> AbstractTestingBase.REGISTRY_CUSTOM.createSerializationContext(ops))
++ .map(ops -> RegistryHelper.getRegistry().createSerializationContext(ops))
+ .toList();
+ }
+
@@ -6192,20 +6194,22 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453
+}
diff --git a/src/test/java/io/papermc/paper/adventure/ComponentServicesTest.java b/src/test/java/io/papermc/paper/adventure/ComponentServicesTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..98114b8fdc441f2a1642abf230457c2b5208bb5c
+index 0000000000000000000000000000000000000000..6ec088c79e3d727bc7e89d1c14b001345feb1f39
--- /dev/null
+++ b/src/test/java/io/papermc/paper/adventure/ComponentServicesTest.java
-@@ -0,0 +1,23 @@
+@@ -0,0 +1,25 @@
+package io.papermc.paper.adventure;
+
+import net.kyori.adventure.text.Component;
+import net.kyori.adventure.text.format.NamedTextColor;
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
+import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
++import org.bukkit.support.environment.AllFeatures;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
++@AllFeatures
+public class ComponentServicesTest {
+
+ @Test
diff --git a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch
index fa431c2e20..174dde5f4c 100644
--- a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch
+++ b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch
@@ -25,7 +25,7 @@ Other changes:
Co-Authored-By: Emilia Kond <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index 94dfc105b197c9eda481cbe90bb48b71c845e702..0a05e753ff5e7b1d741c7719524715d7364cac4f 100644
+index c4572c0a6d9695088613d158838f236fe64efb48..83daf789efc4ce90ff54420e040b783569eb5cab 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -5,9 +5,29 @@ plugins {
@@ -57,9 +57,9 @@ index 94dfc105b197c9eda481cbe90bb48b71c845e702..0a05e753ff5e7b1d741c7719524715d7
+ alsoShade(log4jPlugins.output)
+ // Paper end
implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
- implementation("org.ow2.asm:asm-commons:9.7")
+ implementation("org.ow2.asm:asm-commons:9.7.1")
implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
-@@ -78,6 +98,19 @@ tasks.check {
+@@ -79,6 +99,19 @@ tasks.check {
dependsOn(scanJar)
}
// Paper end
@@ -78,7 +78,7 @@ index 94dfc105b197c9eda481cbe90bb48b71c845e702..0a05e753ff5e7b1d741c7719524715d7
+// Paper end - use TCA for console improvements
tasks.test {
- exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
+ include("**/**TestSuite.class")
diff --git a/src/log4jPlugins/java/io/papermc/paper/console/StripANSIConverter.java b/src/log4jPlugins/java/io/papermc/paper/console/StripANSIConverter.java
new file mode 100644
index 0000000000000000000000000000000000000000..91547f6e6fe90006713beb2818da634304bdd236
@@ -396,7 +396,7 @@ index e9109526880159e2341cc97b53939ba2bcfaeaf9..9dcfcea63f57f45a5584bb80c34fe445
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index ee0fbba1ae29bb809303ccc09f64d48c54d426cb..c6cc48c955f052d8f98e3b28c80910b299467480 100644
+index 9f7634053ddfc4fc67f89cc99524e9ebd6096f46..752933ceabd7ebe7b1e9f7d41198128f6f2182a6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -43,7 +43,7 @@ import java.util.logging.Level;
@@ -408,7 +408,7 @@ index ee0fbba1ae29bb809303ccc09f64d48c54d426cb..c6cc48c955f052d8f98e3b28c80910b2
import net.minecraft.advancements.AdvancementHolder;
import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands;
-@@ -1354,9 +1354,13 @@ public final class CraftServer implements Server {
+@@ -1356,9 +1356,13 @@ public final class CraftServer implements Server {
return this.logger;
}
@@ -423,7 +423,7 @@ index ee0fbba1ae29bb809303ccc09f64d48c54d426cb..c6cc48c955f052d8f98e3b28c80910b2
@Override
public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 9c1fab8db74757e1fb57d4f47099ba6e1536cd6d..3eecea2e6df217ccf2c432d02022c53443a37014 100644
+index 3b0370256b4d8c96053b340a657c6bcc6be6c9de..bdb8e882ec1efbe5afec9ec5a5df57bf38d4ba2b 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
diff --git a/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch
index 7e2c824c7e..a6358b2bba 100644
--- a/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch
+++ b/patches/server/0015-Deobfuscate-stacktraces-in-log-messages-crash-report.patch
@@ -6,12 +6,12 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
diff --git a/build.gradle.kts b/build.gradle.kts
-index 3bd5c2a2add9b462523beb9dfaf2eb5a00d470b9..a2bb659ae3a502d4c181d1ccbd15eefc38e4823b 100644
+index 7c81605648c6ba1360936faae25ef5fc11f0bcb4..4838ca75b9536ce5fd30906b51bdab86789668ec 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
-@@ -45,6 +45,7 @@ dependencies {
- testImplementation("org.mockito:mockito-core:5.11.0")
- testImplementation("org.ow2.asm:asm-tree:9.7")
+@@ -46,6 +46,7 @@ dependencies {
+ testImplementation("org.mockito:mockito-core:5.14.1")
+ testImplementation("org.ow2.asm:asm-tree:9.7.1")
testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
+ implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling
}
diff --git a/patches/server/0017-Paper-command.patch b/patches/server/0017-Paper-command.patch
index 63333dfff9..4d47273f65 100644
--- a/patches/server/0017-Paper-command.patch
+++ b/patches/server/0017-Paper-command.patch
@@ -617,10 +617,10 @@ index bb59986c211f7d6ea50b1ad4bd5565227bec8a6c..9c950fc1de15b5039e34a9fdf893e97a
this.setPvpAllowed(dedicatedserverproperties.pvp);
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index c6cc48c955f052d8f98e3b28c80910b299467480..3ef43c8d39f6012e0b8e98fd216b34a20449cca0 100644
+index 752933ceabd7ebe7b1e9f7d41198128f6f2182a6..492af80bc4a252ad3b82aef0c46c3e6625ec9146 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -986,6 +986,7 @@ public final class CraftServer implements Server {
+@@ -988,6 +988,7 @@ public final class CraftServer implements Server {
this.commandMap.clearCommands();
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
@@ -628,7 +628,7 @@ index c6cc48c955f052d8f98e3b28c80910b299467480..3ef43c8d39f6012e0b8e98fd216b34a2
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
-@@ -2708,6 +2709,34 @@ public final class CraftServer implements Server {
+@@ -2710,6 +2711,34 @@ public final class CraftServer implements Server {
// Paper end
// Paper start
diff --git a/patches/server/0019-Paper-Plugins.patch b/patches/server/0019-Paper-Plugins.patch
index 11ab0c0b9a..1fdf462bb3 100644
--- a/patches/server/0019-Paper-Plugins.patch
+++ b/patches/server/0019-Paper-Plugins.patch
@@ -7257,7 +7257,7 @@ index 5b4ac7b4fd0077e900e9f788963f1613bbc9a5d0..6afede80c10503a261d0f735c351d943
Bootstrap.validate();
Util.startTimerHackThread();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9f9932416 100644
+index 492af80bc4a252ad3b82aef0c46c3e6625ec9146..3d98004af5c872f8a183476183d1cc89a2aac4b6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -277,7 +277,8 @@ public final class CraftServer implements Server {
@@ -7270,7 +7270,7 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
private final StructureManager structureManager;
protected final DedicatedServer console;
protected final DedicatedPlayerList playerList;
-@@ -454,24 +455,7 @@ public final class CraftServer implements Server {
+@@ -455,24 +456,7 @@ public final class CraftServer implements Server {
}
public void loadPlugins() {
@@ -7296,7 +7296,7 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
}
public void enablePlugins(PluginLoadOrder type) {
-@@ -560,15 +544,17 @@ public final class CraftServer implements Server {
+@@ -561,15 +545,17 @@ public final class CraftServer implements Server {
private void enablePlugin(Plugin plugin) {
try {
List<Permission> perms = plugin.getDescription().getPermissions();
@@ -7320,7 +7320,7 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
this.pluginManager.enablePlugin(plugin);
} catch (Throwable ex) {
-@@ -1010,6 +996,7 @@ public final class CraftServer implements Server {
+@@ -1012,6 +998,7 @@ public final class CraftServer implements Server {
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
));
}
@@ -7329,10 +7329,10 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 5a89b9ca6a62f0bfb5fe01ed4097870788cf5d83..a6de88625aeb2c5ababd476e804e9b45b1185efe 100644
+index 655ceaa92b9979fe29725f9812507731bb0bb484..a339a0aa6fd7cc7be810e93bc9eb192437519c75 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -395,6 +395,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -401,6 +401,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
return nmsItemStack.getItem().getDescriptionId(nmsItemStack);
}
@@ -7524,20 +7524,22 @@ index 0000000000000000000000000000000000000000..1d14f530ef888102e47eeeaf0d1a6076
+}
diff --git a/src/test/java/io/papermc/paper/plugin/PluginDependencyValidationTest.java b/src/test/java/io/papermc/paper/plugin/PluginDependencyValidationTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..83b1274ba56f03bec6cb69a35f33dc04f008cc1e
+index 0000000000000000000000000000000000000000..f4c6b799d80ea555b41396c4a8fd1e02f9197709
--- /dev/null
+++ b/src/test/java/io/papermc/paper/plugin/PluginDependencyValidationTest.java
-@@ -0,0 +1,60 @@
+@@ -0,0 +1,62 @@
+package io.papermc.paper.plugin;
+
+import io.papermc.paper.plugin.entrypoint.dependency.MetaDependencyTree;
+import io.papermc.paper.plugin.entrypoint.dependency.SimpleMetaDependencyTree;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Test;
+
+import java.util.List;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+
++@Normal
+public class PluginDependencyValidationTest {
+
+ private static final TestPluginMeta MAIN;
@@ -7590,10 +7592,10 @@ index 0000000000000000000000000000000000000000..83b1274ba56f03bec6cb69a35f33dc04
+}
diff --git a/src/test/java/io/papermc/paper/plugin/PluginLoadOrderTest.java b/src/test/java/io/papermc/paper/plugin/PluginLoadOrderTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08f4e5d288
+index 0000000000000000000000000000000000000000..caa6d514d2ffa2505e804878678d745b689e214d
--- /dev/null
+++ b/src/test/java/io/papermc/paper/plugin/PluginLoadOrderTest.java
-@@ -0,0 +1,148 @@
+@@ -0,0 +1,150 @@
+package io.papermc.paper.plugin;
+
+import com.google.common.graph.GraphBuilder;
@@ -7602,6 +7604,7 @@ index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08
+import io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy;
+import io.papermc.paper.plugin.entrypoint.strategy.ProviderConfiguration;
+import io.papermc.paper.plugin.provider.PluginProvider;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
@@ -7612,6 +7615,7 @@ index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
++@Normal
+public class PluginLoadOrderTest {
+
+ private static List<PluginProvider<PaperTestPlugin>> REGISTERED_PROVIDERS = new ArrayList<>();
@@ -7744,24 +7748,27 @@ index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08
+}
diff --git a/src/test/java/io/papermc/paper/plugin/PluginManagerTest.java b/src/test/java/io/papermc/paper/plugin/PluginManagerTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..b7d69dda2b88218221a3cca6db4445cb58aa0179
+index 0000000000000000000000000000000000000000..3052b32905c8102357b7b3a5ed2df103fea83ab8
--- /dev/null
+++ b/src/test/java/io/papermc/paper/plugin/PluginManagerTest.java
-@@ -0,0 +1,75 @@
+@@ -0,0 +1,78 @@
+package io.papermc.paper.plugin;
+
+import org.bukkit.Bukkit;
+import org.bukkit.event.Event;
+import org.bukkit.permissions.Permission;
+import org.bukkit.plugin.PluginManager;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+
+import static org.hamcrest.MatcherAssert.assertThat;
-+import static org.hamcrest.Matchers.*;
++import static org.hamcrest.Matchers.empty;
++import static org.hamcrest.Matchers.is;
++import static org.hamcrest.Matchers.nullValue;
+
-+public class PluginManagerTest extends AbstractTestingBase {
++@Normal
++public class PluginManagerTest {
+
+ private static final PluginManager pm = Bukkit.getPluginManager();
+
@@ -7825,16 +7832,18 @@ index 0000000000000000000000000000000000000000..b7d69dda2b88218221a3cca6db4445cb
+}
diff --git a/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java b/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..6c3be5b84ae245652261668a52ce49934ef200a9
+index 0000000000000000000000000000000000000000..9f4486f736bad41a6c8c9c86e57226a45ae29a61
--- /dev/null
+++ b/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java
-@@ -0,0 +1,28 @@
+@@ -0,0 +1,30 @@
+package io.papermc.paper.plugin;
+
+import io.papermc.paper.plugin.provider.configuration.PaperPluginMeta;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
++@Normal
+public class PluginNamingTest {
+ private static final String TEST_NAME = "Test_Plugin";
+ private static final String TEST_VERSION = "1.0";
@@ -7859,10 +7868,10 @@ index 0000000000000000000000000000000000000000..6c3be5b84ae245652261668a52ce4993
+}
diff --git a/src/test/java/io/papermc/paper/plugin/SyntheticEventTest.java b/src/test/java/io/papermc/paper/plugin/SyntheticEventTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..2a7408ed5d9a415333212cadd7fefcd03785afbf
+index 0000000000000000000000000000000000000000..0b7f1521f8bf4b18dfdf9403862b5dc6b394a4d9
--- /dev/null
+++ b/src/test/java/io/papermc/paper/plugin/SyntheticEventTest.java
-@@ -0,0 +1,42 @@
+@@ -0,0 +1,44 @@
+package io.papermc.paper.plugin;
+
+import io.papermc.paper.plugin.manager.PaperPluginManagerImpl;
@@ -7870,9 +7879,11 @@ index 0000000000000000000000000000000000000000..2a7408ed5d9a415333212cadd7fefcd0
+import org.bukkit.event.Event;
+import org.bukkit.event.EventHandler;
+import org.bukkit.event.Listener;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
++@Normal
+public class SyntheticEventTest {
+
+ @Test
@@ -8142,16 +8153,16 @@ index 0000000000000000000000000000000000000000..ba271c35eb2804f94cfc893bf94affb9
+ return "null";
+ }
+}
-diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
-index 183d30e3d3d413b05c762f374a964498d6ffdec4..bfbd80b60ac5df500d03c80de57e38aa7548dd46 100644
---- a/src/test/java/org/bukkit/support/DummyServer.java
-+++ b/src/test/java/org/bukkit/support/DummyServer.java
-@@ -103,7 +103,7 @@ public final class DummyServer {
- final Thread currentThread = Thread.currentThread();
- when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
-
-- final org.bukkit.plugin.PluginManager pluginManager = new org.bukkit.plugin.SimplePluginManager(instance, new org.bukkit.command.SimpleCommandMap(instance));
-+ final org.bukkit.plugin.PluginManager pluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(instance, new org.bukkit.command.SimpleCommandMap(instance), null);
- when(instance.getPluginManager()).thenReturn(pluginManager);
- // paper end - testing additions
+diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
+index ba0a2ab9de34fa40dd90cecaeec4a5e54fe3e2d8..5d24b95e3eec351ec1e9444533dd5f9d376ec4c6 100644
+--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
++++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
+@@ -87,7 +87,7 @@ public final class DummyServerHelper {
+ // Paper start - testing additions
+ final Thread currentThread = Thread.currentThread();
+ when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
+- final org.bukkit.plugin.PluginManager pluginManager = new org.bukkit.plugin.SimplePluginManager(instance, new org.bukkit.command.SimpleCommandMap(instance));
++ final org.bukkit.plugin.PluginManager pluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(instance, new org.bukkit.command.SimpleCommandMap(instance), null);
+ when(instance.getPluginManager()).thenReturn(pluginManager);
+ // Paper end - testing additions
diff --git a/patches/server/0020-Plugin-remapping.patch b/patches/server/0020-Plugin-remapping.patch
index cbc4da10c3..b3cdef4eca 100644
--- a/patches/server/0020-Plugin-remapping.patch
+++ b/patches/server/0020-Plugin-remapping.patch
@@ -6,18 +6,18 @@ Subject: [PATCH] Plugin remapping
Co-authored-by: Nassim Jahnke <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index a2bb659ae3a502d4c181d1ccbd15eefc38e4823b..8350fc099b68918fb03a21b6a5047ceee72dcbb4 100644
+index 3c9a9d2c44a3b177408ddfb3cad1e09169bf148b..ccf6e24f016991ac5987b5872037bf44d17e698f 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
-@@ -46,6 +46,7 @@ dependencies {
- testImplementation("org.ow2.asm:asm-tree:9.7")
+@@ -47,6 +47,7 @@ dependencies {
+ testImplementation("org.ow2.asm:asm-tree:9.7.1")
testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling
+ implementation("net.neoforged:AutoRenamingTool:2.0.3") // Paper - remap plugins
}
paperweight {
-@@ -164,20 +165,41 @@ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatM
+@@ -169,20 +170,41 @@ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatM
runtime.filterNot { it.asFile.absolutePath == vanilla }
}
@@ -1904,10 +1904,10 @@ index 0000000000000000000000000000000000000000..73b20a92f330311e3fef8f03b51a0985
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 69175337d14e0b14ddbc2a01a1deb860ae488d36..25a03307a576368f417f1ec3f44213ed469dcd71 100644
+index 3d98004af5c872f8a183476183d1cc89a2aac4b6..cd6b6109ea3844f7d78ad7a1cbd6cf5dc3d90b5c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1000,6 +1000,7 @@ public final class CraftServer implements Server {
+@@ -1002,6 +1002,7 @@ public final class CraftServer implements Server {
this.loadPlugins();
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
diff --git a/patches/server/0021-Hook-into-CB-plugin-rewrites.patch b/patches/server/0021-Hook-into-CB-plugin-rewrites.patch
index 8f4c15153f..036deead6e 100644
--- a/patches/server/0021-Hook-into-CB-plugin-rewrites.patch
+++ b/patches/server/0021-Hook-into-CB-plugin-rewrites.patch
@@ -8,10 +8,10 @@ our own relocation. Also lets us rewrite NMS calls for when we're
debugging in an IDE pre-relocate.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4f83c6f87 100644
+index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390cb9129cd 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -11,6 +11,7 @@ import java.util.Arrays;
+@@ -12,6 +12,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
@@ -19,7 +19,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-@@ -20,6 +21,7 @@ import java.util.jar.JarEntry;
+@@ -22,6 +23,7 @@ import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.JarOutputStream;
import java.util.zip.ZipEntry;
@@ -27,9 +27,9 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import joptsimple.OptionSpec;
-@@ -100,6 +102,40 @@ public class Commodore {
- private static final Map<String, RerouteMethodData> METHOD_REROUTE = Commodore.createReroutes(MethodRerouting.class);
- private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class);
+@@ -123,6 +125,40 @@ public class Commodore {
+ return this.reroutes;
+ }
+ // Paper start - Plugin rewrites
+ private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
@@ -68,7 +68,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
public static void main(String[] args) {
OptionParser parser = new OptionParser();
OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required();
-@@ -253,9 +289,49 @@ public class Commodore {
+@@ -278,9 +314,49 @@ public class Commodore {
}
return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
@@ -118,7 +118,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
name = FieldRename.rename(pluginVersion, owner, name);
if (modern) {
-@@ -375,6 +451,13 @@ public class Commodore {
+@@ -393,6 +469,13 @@ public class Commodore {
return;
}
@@ -132,7 +132,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
if (modern) {
if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
switch (name) {
-@@ -471,6 +554,13 @@ public class Commodore {
+@@ -489,6 +572,13 @@ public class Commodore {
@Override
public void visitLdcInsn(Object value) {
@@ -146,7 +146,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) {
super.visitLdcInsn("com.mysql.cj.jdbc.Driver");
return;
-@@ -481,6 +571,14 @@ public class Commodore {
+@@ -499,6 +589,14 @@ public class Commodore {
@Override
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) {
@@ -161,7 +161,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory")
&& bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) {
Type samMethodType = (Type) bootstrapMethodArguments[0];
-@@ -497,7 +595,7 @@ public class Commodore {
+@@ -515,7 +613,7 @@ public class Commodore {
methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf));
methodArgs.add(newInstantiated);
@@ -170,7 +170,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
}, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType);
return;
}
-@@ -548,6 +646,12 @@ public class Commodore {
+@@ -566,6 +664,12 @@ public class Commodore {
@Override
public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {
diff --git a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch
index a1af0e562f..bc1b44da42 100644
--- a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch
+++ b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Remap reflection calls in plugins using internals
Co-authored-by: Jason Penilla <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index 8350fc099b68918fb03a21b6a5047ceee72dcbb4..404c2eefa88319e0eaf7b0d1d2696c91dd0e0e0b 100644
+index 381a4885c4f52c1e094af350fcb7e04b590f849a..6d8f4c3b290609d60dbcabe3d2c8274b017246c8 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
-@@ -47,6 +47,12 @@ dependencies {
+@@ -48,6 +48,12 @@ dependencies {
testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling
implementation("net.neoforged:AutoRenamingTool:2.0.3") // Paper - remap plugins
@@ -645,11 +645,11 @@ index 242811578a786e3807a1a7019d472d5a68f87116..0b65fdf53124f3dd042b2363b1b8df8e
return traceElements;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index ebc160fd4c8aed95087130bb6fddc1d4f83c6f87..65f64de05a88844e62b5a0dd1e2f53edfb4e0c1f 100644
+index 2a29f60c3e82239ab7acd85242fc3390cb9129cd..91c6721201b095eb32c5fd5a1aaf2cbcf3ee196d 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -103,36 +103,26 @@ public class Commodore {
- private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class);
+@@ -126,36 +126,26 @@ public class Commodore {
+ }
// Paper start - Plugin rewrites
- private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
@@ -696,7 +696,7 @@ index ebc160fd4c8aed95087130bb6fddc1d4f83c6f87..65f64de05a88844e62b5a0dd1e2f53ed
}
// Paper end - Plugin rewrites
-@@ -215,6 +205,7 @@ public class Commodore {
+@@ -240,6 +230,7 @@ public class Commodore {
visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES));
}
@@ -705,18 +705,18 @@ index ebc160fd4c8aed95087130bb6fddc1d4f83c6f87..65f64de05a88844e62b5a0dd1e2f53ed
final Set<RerouteMethodData> rerouteMethodData = new HashSet<>();
String className;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index a6de88625aeb2c5ababd476e804e9b45b1185efe..fa2e43020fafc283a9c063d10a82280158c7f93d 100644
+index a339a0aa6fd7cc7be810e93bc9eb192437519c75..33d3085d0d44d748fcb1fc203dfd14c9e1b4aff0 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -74,6 +74,7 @@ import org.bukkit.potion.PotionType;
@SuppressWarnings("deprecation")
public final class CraftMagicNumbers implements UnsafeValues {
- public static final UnsafeValues INSTANCE = new CraftMagicNumbers();
+ public static final CraftMagicNumbers INSTANCE = new CraftMagicNumbers();
+ public static final boolean DISABLE_OLD_API_SUPPORT = Boolean.getBoolean("paper.disableOldApiSupport"); // Paper
- private CraftMagicNumbers() {}
+ private final Commodore commodore = new Commodore();
-@@ -340,7 +341,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -346,7 +347,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
throw new InvalidPluginException("Plugin API version " + pdf.getAPIVersion() + " is lower than the minimum allowed version. Please update or replace it.");
}
@@ -725,7 +725,7 @@ index a6de88625aeb2c5ababd476e804e9b45b1185efe..fa2e43020fafc283a9c063d10a822801
CraftLegacy.init();
}
-@@ -355,6 +356,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -361,6 +362,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz) {
@@ -736,5 +736,5 @@ index a6de88625aeb2c5ababd476e804e9b45b1185efe..fa2e43020fafc283a9c063d10a822801
+ }
+ // Paper end
try {
- clazz = Commodore.convert(clazz, pdf.getName(), ApiVersion.getOrCreateVersion(pdf.getAPIVersion()), ((CraftServer) Bukkit.getServer()).activeCompatibilities);
+ clazz = this.commodore.convert(clazz, pdf.getName(), ApiVersion.getOrCreateVersion(pdf.getAPIVersion()), ((CraftServer) Bukkit.getServer()).activeCompatibilities);
} catch (Exception ex) {
diff --git a/patches/server/0023-Timings-v2.patch b/patches/server/0023-Timings-v2.patch
index 3531e3add1..61ba53e722 100644
--- a/patches/server/0023-Timings-v2.patch
+++ b/patches/server/0023-Timings-v2.patch
@@ -1590,7 +1590,7 @@ index 46a090123e205394791cdbde2af84c58ce55f7e1..47f5f3d58bb3bf85cf35f9baae77df7f
};
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 25a03307a576368f417f1ec3f44213ed469dcd71..b3d4cb03f6d3951632fd15101aa68e130a43879b 100644
+index cd6b6109ea3844f7d78ad7a1cbd6cf5dc3d90b5c..0fda501dedcc1f3f7d35e3b66a4b40394c4b3cb5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -376,7 +376,7 @@ public final class CraftServer implements Server {
@@ -1602,7 +1602,7 @@ index 25a03307a576368f417f1ec3f44213ed469dcd71..b3d4cb03f6d3951632fd15101aa68e13
this.overrideSpawnLimits();
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
-@@ -2617,12 +2617,31 @@ public final class CraftServer implements Server {
+@@ -2619,12 +2619,31 @@ public final class CraftServer implements Server {
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
{
@@ -1985,10 +1985,10 @@ 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 6aa5b1e05893bcf61a91cb4de578d8996ca0a868..9383bf47404fca8d008d5c401ed37ddaa7bef4f7 100644
+index 33d3085d0d44d748fcb1fc203dfd14c9e1b4aff0..f7b80cf8c89ae5eb9d8f0893e05ffc753fdace19 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -197,6 +197,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -199,6 +199,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftNamespacedKey.toMinecraft(mat.getKey());
}
// ========================================================================
@@ -2001,7 +2001,7 @@ index 6aa5b1e05893bcf61a91cb4de578d8996ca0a868..9383bf47404fca8d008d5c401ed37dda
public static byte toLegacyData(BlockState data) {
return CraftLegacy.toLegacyData(data);
-@@ -442,6 +448,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -448,6 +454,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) {
return new CraftDamageSourceBuilder(damageType);
}
diff --git a/patches/server/0024-Further-improve-server-tick-loop.patch b/patches/server/0024-Further-improve-server-tick-loop.patch
index bd699ed3ce..6cd0eb9aee 100644
--- a/patches/server/0024-Further-improve-server-tick-loop.patch
+++ b/patches/server/0024-Further-improve-server-tick-loop.patch
@@ -146,10 +146,10 @@ index 49de4625c57689a3624ed421c0b03512507c97c3..46e03617bb32e4037d700c1b3698d397
this.startMetricsRecordingTick();
this.profiler.push("tick");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index b3d4cb03f6d3951632fd15101aa68e130a43879b..90da60f7cdfe809c2035c9cd242f748ec8bf5eb0 100644
+index 0fda501dedcc1f3f7d35e3b66a4b40394c4b3cb5..2c3efcf07f933278a8b897cf7b1f6f24b452a7c5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2670,7 +2670,11 @@ public final class CraftServer implements Server {
+@@ -2672,7 +2672,11 @@ public final class CraftServer implements Server {
@Override
public double[] getTPS() {
diff --git a/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch
index 5a00fc7547..3fce66b918 100644
--- a/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch
+++ b/patches/server/0025-Add-command-line-option-to-load-extra-plugin-jars-no.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 1056badff06575ef13907afac60af734ffa2b863..acab477a4a026799319054c2eb4d0f2c99ab3d83 100644
+index 2c3efcf07f933278a8b897cf7b1f6f24b452a7c5..b8b2e582115cc42a913b03a35861fa810d774cbb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -458,6 +458,35 @@ public final class CraftServer implements Server {
+@@ -459,6 +459,35 @@ public final class CraftServer implements Server {
io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.INSTANCE.enter(io.papermc.paper.plugin.entrypoint.Entrypoint.PLUGIN); // Paper - replace implementation
}
@@ -47,7 +47,7 @@ index 1056badff06575ef13907afac60af734ffa2b863..acab477a4a026799319054c2eb4d0f2c
if (type == PluginLoadOrder.STARTUP) {
this.helpMap.clear();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 26dfb02286e836cad0242c71f743265d55d9d032..1c8049bbc08be77673d375205bd42a346ff951b8 100644
+index bdb8e882ec1efbe5afec9ec5a5df57bf38d4ba2b..034d68c2715b6a90f31e56f949ff3d27235a26eb 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -160,6 +160,12 @@ public class Main {
diff --git a/patches/server/0026-Support-components-in-ItemMeta.patch b/patches/server/0026-Support-components-in-ItemMeta.patch
index 680fd5d70f..55e209aaed 100644
--- a/patches/server/0026-Support-components-in-ItemMeta.patch
+++ b/patches/server/0026-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 568d6fab743039b20715d8181555f52baa05f0f3..7ae3cdb80335cbeb0ff695eb719a170651586722 100644
+index 0c73854243f7fa21d1ffdb3b4c85ee0a69c9c5e4..f6ac13f91f08498a8adda7d34518a5cfe34c15b2 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -976,11 +976,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -978,11 +978,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return CraftChatMessage.fromComponent(this.displayName);
}
@@ -32,7 +32,7 @@ index 568d6fab743039b20715d8181555f52baa05f0f3..7ae3cdb80335cbeb0ff695eb719a1706
@Override
public boolean hasDisplayName() {
return this.displayName != null;
-@@ -1154,6 +1166,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1156,6 +1168,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 568d6fab743039b20715d8181555f52baa05f0f3..7ae3cdb80335cbeb0ff695eb719a1706
@Override
public void setLore(List<String> lore) {
if (lore == null || lore.isEmpty()) {
-@@ -1168,6 +1188,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1170,6 +1190,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@@ -69,7 +69,7 @@ index 568d6fab743039b20715d8181555f52baa05f0f3..7ae3cdb80335cbeb0ff695eb719a1706
@Override
public boolean hasCustomModelData() {
return this.customModelData != null;
-@@ -1880,6 +1915,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1882,6 +1917,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
for (Object object : addFrom) {
diff --git a/patches/server/0033-Expose-server-build-information.patch b/patches/server/0033-Expose-server-build-information.patch
index 41cd49383c..3dfb0b097f 100644
--- a/patches/server/0033-Expose-server-build-information.patch
+++ b/patches/server/0033-Expose-server-build-information.patch
@@ -11,7 +11,7 @@ Co-authored-by: Jake Potrebic <[email protected]>
Co-authored-by: masmc05 <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index 404c2eefa88319e0eaf7b0d1d2696c91dd0e0e0b..e7c00486bd831578008c02fcda13f3a555e6a2f1 100644
+index 6d8f4c3b290609d60dbcabe3d2c8274b017246c8..0c349354ba76dfd2c5f16fb232263b18e77a9a40 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,4 +1,5 @@
@@ -20,7 +20,7 @@ index 404c2eefa88319e0eaf7b0d1d2696c91dd0e0e0b..e7c00486bd831578008c02fcda13f3a5
plugins {
java
-@@ -64,18 +65,24 @@ tasks.jar {
+@@ -65,18 +66,24 @@ tasks.jar {
manifest {
val git = Git(rootProject.layout.projectDirectory.path)
@@ -590,7 +590,7 @@ index f077b8ff0bf0d96628db3569132696b68fd79921..5f11f5b16766f9d1d5640ae037e259be
value.append("\n Plugins: {");
for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 7d6d817f951811aad0f2ccea567e558bad1242fa..19d2b38cd4397cb53fc2ed3f0e5df5c66223fd5f 100644
+index b8b2e582115cc42a913b03a35861fa810d774cbb..8f79d7611c3ee1c817d5671152e459ec4f413418 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -11,8 +11,6 @@ import com.google.common.collect.MapMaker;
@@ -644,7 +644,7 @@ index 7d6d817f951811aad0f2ccea567e558bad1242fa..19d2b38cd4397cb53fc2ed3f0e5df5c6
this.structureManager = new CraftStructureManager(console.getStructureManager(), console.registryAccess());
this.dataPackManager = new CraftDataPackManager(this.getServer().getPackRepository());
this.serverTickManager = new CraftServerTickManager(console.tickRateManager());
-@@ -606,6 +601,13 @@ public final class CraftServer implements Server {
+@@ -607,6 +602,13 @@ public final class CraftServer implements Server {
return this.bukkitVersion;
}
@@ -659,7 +659,7 @@ index 7d6d817f951811aad0f2ccea567e558bad1242fa..19d2b38cd4397cb53fc2ed3f0e5df5c6
public List<CraftPlayer> getOnlinePlayers() {
return this.playerView;
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 8da38624b5867ce88bdb3036e1ed6d99fc626f31..2097be352dc585b805dc73194cec095627f311bc 100644
+index 034d68c2715b6a90f31e56f949ff3d27235a26eb..a7fbbe40f2382e7af185c4bfdd451fc1998b3636 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -15,6 +15,7 @@ import joptsimple.OptionSet;
@@ -671,7 +671,7 @@ index 8da38624b5867ce88bdb3036e1ed6d99fc626f31..2097be352dc585b805dc73194cec0956
public static boolean useConsole = true;
@@ -241,15 +242,17 @@ public class Main {
- deadline.add(Calendar.DAY_OF_YEAR, -14);
+ deadline.add(Calendar.DAY_OF_YEAR, -28);
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
@@ -692,10 +692,10 @@ index 8da38624b5867ce88bdb3036e1ed6d99fc626f31..2097be352dc585b805dc73194cec0956
t.printStackTrace();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 9383bf47404fca8d008d5c401ed37ddaa7bef4f7..d08b01fef9928f2239c8663cf90219dc7acad58c 100644
+index f7b80cf8c89ae5eb9d8f0893e05ffc753fdace19..432f019afff36aa6143c052f7387a6c275a09de8 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -453,6 +453,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -459,6 +459,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public String getTimingsServerName() {
return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
}
diff --git a/patches/server/0055-Improve-Player-chat-API-handling.patch b/patches/server/0055-Improve-Player-chat-API-handling.patch
index e91ed39415..05814e9ee5 100644
--- a/patches/server/0055-Improve-Player-chat-API-handling.patch
+++ b/patches/server/0055-Improve-Player-chat-API-handling.patch
@@ -17,7 +17,7 @@ Co-authored-by: Jake Potrebic <[email protected]>
Co-authored-by: SoSeDiK <[email protected]>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 47e1640cafc8087d94d0b88b8b3117591f9f238e..64db7e017b41bffcaac202ee4ecfd7df46d69331 100644
+index 3a67b2b6a6d3204b2a7bbe8adbf2b0ecf7898551..02b9e1ed57f5d65698c461387ff7d48450e6a70f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2013,7 +2013,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -40,10 +40,10 @@ index 47e1640cafc8087d94d0b88b8b3117591f9f238e..64db7e017b41bffcaac202ee4ecfd7df
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 2a36e562967ec6174efe456e489c50ca10ba47e5..b0371c51645da361b63dea02bf7633ae6191560f 100644
+index 8f79d7611c3ee1c817d5671152e459ec4f413418..441a8d3355e0db773a5da330bf9361234da1ca89 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -933,7 +933,7 @@ public final class CraftServer implements Server {
+@@ -934,7 +934,7 @@ public final class CraftServer implements Server {
public boolean dispatchCommand(CommandSender sender, String commandLine) {
Preconditions.checkArgument(sender != null, "sender cannot be null");
Preconditions.checkArgument(commandLine != null, "commandLine cannot be null");
@@ -53,7 +53,7 @@ index 2a36e562967ec6174efe456e489c50ca10ba47e5..b0371c51645da361b63dea02bf7633ae
if (this.commandMap.dispatch(sender, commandLine)) {
return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index fb5548b92a0fe7866cf98e25293c4b0702344c9b..52d48ad341c564f0f847e3aad09babee826ebf87 100644
+index 545da59af2436b9a4363ec459456c8f15650b79f..9751cace64d9ad2b8b55080b13834e8ccb056b42 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -546,7 +546,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
diff --git a/patches/server/0057-Expose-server-CommandMap.patch b/patches/server/0057-Expose-server-CommandMap.patch
index 7903e98889..3b09e09279 100644
--- a/patches/server/0057-Expose-server-CommandMap.patch
+++ b/patches/server/0057-Expose-server-CommandMap.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index b0371c51645da361b63dea02bf7633ae6191560f..527b3a7ae93ab288b119fe6bfa76cb0ea3ab2561 100644
+index 441a8d3355e0db773a5da330bf9361234da1ca89..32d1e4bc8279a9adb83501c99fc7ff33d4c7f81c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2177,6 +2177,7 @@ public final class CraftServer implements Server {
+@@ -2179,6 +2179,7 @@ public final class CraftServer implements Server {
return this.helpMap;
}
diff --git a/patches/server/0058-Be-a-bit-more-informative-in-maxHealth-exception.patch b/patches/server/0058-Be-a-bit-more-informative-in-maxHealth-exception.patch
index 489c881a1a..4490b5096c 100644
--- a/patches/server/0058-Be-a-bit-more-informative-in-maxHealth-exception.patch
+++ b/patches/server/0058-Be-a-bit-more-informative-in-maxHealth-exception.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index adeb3b9a3d65d2ef71ea4fd6f0f4679a88d0ba87..e6c68fd9a5fcd374cd7feca081189c9ba9225743 100644
+index 5ce03fa25e0a03025501a7f86a8f3c64f3fd7c77..ff2118fb463168e061ca9152183e19d593b476e9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -102,7 +102,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -103,7 +103,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public void setHealth(double health) {
health = (float) health;
diff --git a/patches/server/0064-Add-methods-for-working-with-arrows-stuck-in-living-.patch b/patches/server/0064-Add-methods-for-working-with-arrows-stuck-in-living-.patch
index 626a91f8db..dc2456c4af 100644
--- a/patches/server/0064-Add-methods-for-working-with-arrows-stuck-in-living-.patch
+++ b/patches/server/0064-Add-methods-for-working-with-arrows-stuck-in-living-.patch
@@ -7,10 +7,10 @@ Upstream added methods for this, original methods are now
deprecated
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 812a4db4a91b887ef61b3ead9fa781561e6039ce..238ec25cc3109659d524fcc1de48afcd5f59552b 100644
+index ff2118fb463168e061ca9152183e19d593b476e9..5ba4105356e4a4808293e86c679d08a3c4cdd245 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -283,10 +283,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -284,10 +284,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
@Override
@@ -41,7 +41,7 @@ index 812a4db4a91b887ef61b3ead9fa781561e6039ce..238ec25cc3109659d524fcc1de48afcd
@Override
public void damage(double amount) {
-@@ -807,4 +826,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -813,4 +832,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().persistentInvisibility = invisible;
this.getHandle().setSharedFlag(5, invisible);
}
diff --git a/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch b/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch
index 47ab27f740..09d4825620 100644
--- a/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch
+++ b/patches/server/0067-Default-loading-permissions.yml-before-plugins.patch
@@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
A config option has been added for those who depend on the previous behavior, but I don't expect that.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 2b665dafdfd002fbd87dca9d869ee8c2b945a4fb..da2e0bb591468e7940f057a583ce166abc79d399 100644
+index 3043ec179592606050deede2874b0e251b859892..dfd8776ff6cd8be750e77dc4c30f59c28ff1732a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -487,6 +487,7 @@ public final class CraftServer implements Server {
+@@ -488,6 +488,7 @@ public final class CraftServer implements Server {
if (type == PluginLoadOrder.STARTUP) {
this.helpMap.clear();
this.helpMap.initializeGeneralTopics();
@@ -27,7 +27,7 @@ index 2b665dafdfd002fbd87dca9d869ee8c2b945a4fb..da2e0bb591468e7940f057a583ce166a
}
Plugin[] plugins = this.pluginManager.getPlugins();
-@@ -506,7 +507,7 @@ public final class CraftServer implements Server {
+@@ -507,7 +508,7 @@ public final class CraftServer implements Server {
this.commandMap.registerServerAliases();
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();
diff --git a/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch b/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch
index fcc08616d6..c66e0d8e26 100644
--- a/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch
+++ b/patches/server/0068-Allow-Reloading-of-Custom-Permissions.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
https://github.com/PaperMC/Paper/issues/49
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index c8d8161bc8558be20583ca9e68611ea26e61deb0..ca2a17db0713fdb332549a76bee7e56502f96e56 100644
+index dfd8776ff6cd8be750e77dc4c30f59c28ff1732a..2b0f69b89d69258a1e9a6a81db5c9d4497417cd7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2790,5 +2790,23 @@ public final class CraftServer implements Server {
+@@ -2792,5 +2792,23 @@ public final class CraftServer implements Server {
}
return this.adventure$audiences;
}
diff --git a/patches/server/0069-Remove-Metadata-on-reload.patch b/patches/server/0069-Remove-Metadata-on-reload.patch
index 9a70a953e6..6754fe94ca 100644
--- a/patches/server/0069-Remove-Metadata-on-reload.patch
+++ b/patches/server/0069-Remove-Metadata-on-reload.patch
@@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive
This will remove metadata on reload so it does not crash everything if a plugin uses it.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 99571e69aabbbfb0e439a42d113c206decb1377b..5461e0a1ef7f342cbd9fb6f291e33e645b414058 100644
+index 2b0f69b89d69258a1e9a6a81db5c9d4497417cd7..b7539a5f7bc20f20f3cd7fb30d87ab7ffc1133c3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1001,8 +1001,16 @@ public final class CraftServer implements Server {
+@@ -1003,8 +1003,16 @@ public final class CraftServer implements Server {
world.spigotConfig.init(); // Spigot
}
diff --git a/patches/server/0070-Handle-Item-Meta-Inconsistencies.patch b/patches/server/0070-Handle-Item-Meta-Inconsistencies.patch
index 29c426b5db..b282519efe 100644
--- a/patches/server/0070-Handle-Item-Meta-Inconsistencies.patch
+++ b/patches/server/0070-Handle-Item-Meta-Inconsistencies.patch
@@ -149,7 +149,7 @@ index 17fa2d3db112762bcb8b941b69b8ddcc53f47224..6c76aeddb34239a5acc204a17b2aa2d8
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 7ae3cdb80335cbeb0ff695eb719a170651586722..97c40582bca095532fff9a81515f38ea4ac527e0 100644
+index f6ac13f91f08498a8adda7d34518a5cfe34c15b2..9ab1abd4414a0a40284e12dfebff37e21e7f150f 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;
@@ -213,7 +213,7 @@ index 7ae3cdb80335cbeb0ff695eb719a170651586722..97c40582bca095532fff9a81515f38ea
for (Map.Entry<?, ?> entry : ench.entrySet()) {
Enchantment enchantment = CraftEnchantment.stringToBukkit(entry.getKey().toString());
if ((enchantment != null) && (entry.getValue() instanceof Integer)) {
-@@ -1079,14 +1081,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1081,14 +1083,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public Map<Enchantment, Integer> getEnchants() {
@@ -230,7 +230,7 @@ index 7ae3cdb80335cbeb0ff695eb719a170651586722..97c40582bca095532fff9a81515f38ea
}
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
-@@ -1686,7 +1688,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1688,7 +1690,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.customModelData = this.customModelData;
clone.blockData = this.blockData;
if (this.enchantments != null) {
@@ -239,7 +239,7 @@ index 7ae3cdb80335cbeb0ff695eb719a170651586722..97c40582bca095532fff9a81515f38ea
}
if (this.hasAttributeModifiers()) {
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
-@@ -2036,4 +2038,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -2038,4 +2040,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return (result != null) ? result : Optional.empty();
}
diff --git a/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch b/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch
index 163d5b4d5a..e08249957a 100644
--- a/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch
+++ b/patches/server/0104-Add-setting-for-proxy-online-mode-status.patch
@@ -60,10 +60,10 @@ index a0b0614ac7d2009db5c6c10ab4a5f09dd447c635..653856d0b8dcf2baf4cc77a276f17c8c
} else {
String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 5461e0a1ef7f342cbd9fb6f291e33e645b414058..ff807bfe89708d9c680b84eda902b49f3167f3a4 100644
+index b7539a5f7bc20f20f3cd7fb30d87ab7ffc1133c3..b125872e57e15081d6f5a7b3e108f7633046b228 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1886,7 +1886,7 @@ public final class CraftServer implements Server {
+@@ -1888,7 +1888,7 @@ public final class CraftServer implements Server {
if (result == null) {
GameProfile profile = null;
// Only fetch an online UUID in online mode
diff --git a/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch b/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch
index c9a7a105f5..9bf9ad3da9 100644
--- a/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch
+++ b/patches/server/0111-Allow-Reloading-of-Command-Aliases.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 20076b59ed7433cc280e2574a09e8db1d58eb027..67805fe23d91961b036089674e4f6202fad3c505 100644
+index b125872e57e15081d6f5a7b3e108f7633046b228..8e951ed126453cf1ffa81e5c8aa6e6ea5db03089 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2816,5 +2816,24 @@ public final class CraftServer implements Server {
+@@ -2818,5 +2818,24 @@ public final class CraftServer implements Server {
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();
}
diff --git a/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch b/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch
index 1335654905..84c423eeac 100644
--- a/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch
+++ b/patches/server/0130-Add-configuration-option-to-prevent-player-names-fro.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 67805fe23d91961b036089674e4f6202fad3c505..16110e41480ad4508e56c196c551debdf0e96811 100644
+index 8e951ed126453cf1ffa81e5c8aa6e6ea5db03089..cfc59f1fb52dffb13fb214dd7c9cf71d40354ef0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2835,5 +2835,10 @@ public final class CraftServer implements Server {
+@@ -2837,5 +2837,10 @@ public final class CraftServer implements Server {
commandMap.registerServerAliases();
return true;
}
diff --git a/patches/server/0136-Basic-PlayerProfile-API.patch b/patches/server/0136-Basic-PlayerProfile-API.patch
index fd65e56d05..d0564f4df6 100644
--- a/patches/server/0136-Basic-PlayerProfile-API.patch
+++ b/patches/server/0136-Basic-PlayerProfile-API.patch
@@ -626,7 +626,7 @@ index 416b26c2ab62b29d640169166980e398d5824b14..774d81c702edb76a2f6184d4dc53687d
String s1 = name.toLowerCase(Locale.ROOT);
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 16110e41480ad4508e56c196c551debdf0e96811..c5618c1a773442c9c016b67ea64d83f8efcb3b89 100644
+index cfc59f1fb52dffb13fb214dd7c9cf71d40354ef0..f2b2a352cdc0301601ffd4b4fb7a99304ba526e5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -262,6 +262,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
@@ -647,7 +647,7 @@ index 16110e41480ad4508e56c196c551debdf0e96811..c5618c1a773442c9c016b67ea64d83f8
CraftItemFactory.instance();
CraftEntityFactory.instance();
}
-@@ -2840,5 +2844,39 @@ public final class CraftServer implements Server {
+@@ -2842,5 +2846,39 @@ public final class CraftServer implements Server {
public boolean suggestPlayerNamesWhenNullTabCompletions() {
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
}
diff --git a/patches/server/0137-Add-UnknownCommandEvent.patch b/patches/server/0137-Add-UnknownCommandEvent.patch
index a799524939..25a7aa2070 100644
--- a/patches/server/0137-Add-UnknownCommandEvent.patch
+++ b/patches/server/0137-Add-UnknownCommandEvent.patch
@@ -78,10 +78,10 @@ index f94c0106b44d614483184e372c01c1504cb886b0..72756ef14b8ec8afd80313b9f6aaf767
return null;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 5ab2836f14e1a7482e7136004507d66c4abb4bdd..4280bd6288ce9522d041ec2dc2105d3908514a2f 100644
+index f2b2a352cdc0301601ffd4b4fb7a99304ba526e5..31f87ce0865dd7560cd9ba634855a1defdc80df2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -947,7 +947,13 @@ public final class CraftServer implements Server {
+@@ -948,7 +948,13 @@ public final class CraftServer implements Server {
// Spigot start
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
diff --git a/patches/server/0146-Fix-this-stupid-bullshit.patch b/patches/server/0146-Fix-this-stupid-bullshit.patch
index 35f07c8aba..6b9e17c4d0 100644
--- a/patches/server/0146-Fix-this-stupid-bullshit.patch
+++ b/patches/server/0146-Fix-this-stupid-bullshit.patch
@@ -31,12 +31,12 @@ index 8f1992188f7fd9e735569e099b36a7eafed47aae..061c89b985dafc79c808dd5f0e296b9f
Bootstrap.isBootstrapped = true;
Instant instant = Instant.now();
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 837db57c19df3d5c986a52edf3d9d8105cc87cde..446403f73fb1b5687d587889e6f32dce464d05a6 100644
+index a41674e0965a13acd2ec2fcc431a2baa26fc4361..bcc9d3b1503b1be1841c9ab40e879a1cbb0549f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -249,10 +249,12 @@ public class Main {
Calendar deadline = Calendar.getInstance();
- deadline.add(Calendar.DAY_OF_YEAR, -14);
+ deadline.add(Calendar.DAY_OF_YEAR, -28);
if (buildDate.before(deadline.getTime())) {
- System.err.println("*** Error, this build is outdated ***");
+ // Paper start - This is some stupid bullshit
diff --git a/patches/server/0147-LivingEntity-setKiller.patch b/patches/server/0147-LivingEntity-setKiller.patch
index f1c2b7065a..a75578ad06 100644
--- a/patches/server/0147-LivingEntity-setKiller.patch
+++ b/patches/server/0147-LivingEntity-setKiller.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] LivingEntity#setKiller
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index c36e4c1802e304853320576e0521dbc53cd25425..fe631496aa551a0029eff7b4d4a5daf16dddac50 100644
+index 5ba4105356e4a4808293e86c679d08a3c4cdd245..7a01569f62b3b27a9eb6def0e2ec72e1d392258d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -406,6 +406,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -407,6 +407,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
}
diff --git a/patches/server/0156-Add-PlayerArmorChangeEvent.patch b/patches/server/0156-Add-PlayerArmorChangeEvent.patch
index d9478284f8..9eb204ce61 100644
--- a/patches/server/0156-Add-PlayerArmorChangeEvent.patch
+++ b/patches/server/0156-Add-PlayerArmorChangeEvent.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index f297b2227d0793f44cb5770aa24a474ec7283b15..21d00a73ad8287d61eda1ab91b88ea3264aff021 100644
+index 021c72410c7580d659bfaa1e327fae3727acabd2..7a7c404778757e6778305c9f8334a4fba1f466a6 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3168,6 +3168,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
@@ -24,10 +24,10 @@ index f297b2227d0793f44cb5770aa24a474ec7283b15..21d00a73ad8287d61eda1ab91b88ea32
}
diff --git a/src/test/java/io/papermc/paper/inventory/item/ArmorSlotTypeMaterialTest.java b/src/test/java/io/papermc/paper/inventory/item/ArmorSlotTypeMaterialTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..a706dcbabfe31bf54a552965fa5feb8be34213bf
+index 0000000000000000000000000000000000000000..8943cef5cdb8269080b9f0e2edbad5d5ea8b421d
--- /dev/null
+++ b/src/test/java/io/papermc/paper/inventory/item/ArmorSlotTypeMaterialTest.java
-@@ -0,0 +1,74 @@
+@@ -0,0 +1,75 @@
+package io.papermc.paper.inventory.item;
+
+import com.destroystokyo.paper.event.player.PlayerArmorChangeEvent;
@@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..a706dcbabfe31bf54a552965fa5feb8b
+import net.minecraft.world.item.ItemStack;
+import org.bukkit.Material;
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.AllFeatures;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+
@@ -48,7 +48,8 @@ index 0000000000000000000000000000000000000000..a706dcbabfe31bf54a552965fa5feb8b
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
-+public class ArmorSlotTypeMaterialTest extends AbstractTestingBase {
++@AllFeatures
++public class ArmorSlotTypeMaterialTest {
+
+ public static Stream<Object[]> slotTypeParams() {
+ final List<Object[]> parameters = new ArrayList<>();
diff --git a/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch
index 07ae928840..cd8d24869a 100644
--- a/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch
+++ b/patches/server/0160-API-to-get-a-BlockState-without-a-snapshot.patch
@@ -69,7 +69,7 @@ index a1c1a101aa424e74309f6f4c0a53a6a8db5df441..013298c424025cd88f15d61e50d196f7
public Biome getBiome() {
return this.getWorld().getBiome(this.getX(), this.getY(), this.getZ());
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
-index 9df2da091082071e3461b8900af4879e80cd4d93..1ca25dfdb9ec5c3a4d26b71484e1326e1f50b40d 100644
+index 483a89ba477506ae108f680e586b37c142119696..80418a05d53516d2c539383aa9994099c634b905 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -24,15 +24,26 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
@@ -101,7 +101,7 @@ index 9df2da091082071e3461b8900af4879e80cd4d93..1ca25dfdb9ec5c3a4d26b71484e1326e
}
protected CraftBlockEntityState(CraftBlockEntityState<T> state, Location location) {
-@@ -176,4 +187,11 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
+@@ -184,4 +195,11 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
public CraftBlockEntityState<T> copy(Location location) {
return new CraftBlockEntityState<>(this, location);
}
diff --git a/patches/server/0161-AsyncTabCompleteEvent.patch b/patches/server/0161-AsyncTabCompleteEvent.patch
index e29a54817a..ca24a4366f 100644
--- a/patches/server/0161-AsyncTabCompleteEvent.patch
+++ b/patches/server/0161-AsyncTabCompleteEvent.patch
@@ -80,10 +80,10 @@ index 87f56f9c14e3a827d0afc03591bfce8cbf61e307..6cdbd0281e38d7107f239e6e052c08e4
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 23e4bb2fe24fd9252df30fdaa3cd968d88ce71db..3db271261c02d2aa26a619f30775d505236955eb 100644
+index 31f87ce0865dd7560cd9ba634855a1defdc80df2..39e3730eae983c20522b97fcd547823cd192cb2d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2292,7 +2292,7 @@ public final class CraftServer implements Server {
+@@ -2294,7 +2294,7 @@ public final class CraftServer implements Server {
offers = this.tabCompleteChat(player, message);
}
diff --git a/patches/server/0169-Add-ArmorStand-Item-Meta.patch b/patches/server/0169-Add-ArmorStand-Item-Meta.patch
index 46624a41d4..490b0155ea 100644
--- a/patches/server/0169-Add-ArmorStand-Item-Meta.patch
+++ b/patches/server/0169-Add-ArmorStand-Item-Meta.patch
@@ -225,10 +225,10 @@ index c4f12f96e39cb6189799a796b4cb2cb4f0b92392..ecce5d0da946ca279c5608068442cc53
+ // Paper end
}
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
-index b46032190dbb0d47ee3c1a11959f6278ddf5eb5a..0715f43f3f8235d28a12b9d49d78c765a946c53f 100644
+index 46025e3ffdc21f14403186094f893dff6316ba5e..50faaaa48dffcaf53823caed1e3f7263cd5c441f 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
-@@ -364,6 +364,7 @@ public class ItemMetaTest extends AbstractTestingBase {
+@@ -365,6 +365,7 @@ public class ItemMetaTest {
final CraftMetaArmorStand meta = (CraftMetaArmorStand) cleanStack.getItemMeta();
meta.entityTag = new CompoundTag();
meta.entityTag.putBoolean("Small", true);
diff --git a/patches/server/0176-Player.setPlayerProfile-API.patch b/patches/server/0176-Player.setPlayerProfile-API.patch
index 89d168e8a4..b118853bc7 100644
--- a/patches/server/0176-Player.setPlayerProfile-API.patch
+++ b/patches/server/0176-Player.setPlayerProfile-API.patch
@@ -40,7 +40,7 @@ index 30e55f693b963496b85afa32da9c15cacb738836..636b8aef2348fa4cfe63a9b7d77a64b1
playerName = gameprofile.getName();
uniqueId = gameprofile.getId();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 768a5c6ebc4466aae4108a79e1564b2bfc93463a..26cee48ea3650aaf87fd2ba9c70d4ca9a88e2d87 100644
+index c08ffdbc9afb2fe7abbf5567dc1fb1e2bcb01b96..3ee00025eb9d936b9780b25fdc25d144acc496cd 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -831,10 +831,16 @@ public abstract class PlayerList {
@@ -220,10 +220,10 @@ index 8521f728088d16ecbaa0119983a9f12a649ac847..9136feac48244dc68bff92b52643f2ad
public void onEntityRemove(Entity entity) {
this.invertedVisibilityEntities.remove(entity.getUUID());
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index 65f64de05a88844e62b5a0dd1e2f53edfb4e0c1f..e1b86308f737b957b6d00bc902b91856694b7cbf 100644
+index 91c6721201b095eb32c5fd5a1aaf2cbcf3ee196d..b85223ebff4dbb8aa74b501663afc87ef11e2a96 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -449,6 +449,13 @@ public class Commodore {
+@@ -467,6 +467,13 @@ public class Commodore {
}
// Paper end - Rewrite plugins
diff --git a/patches/server/0177-getPlayerUniqueId-API.patch b/patches/server/0177-getPlayerUniqueId-API.patch
index 8bedc69a86..968566c3a4 100644
--- a/patches/server/0177-getPlayerUniqueId-API.patch
+++ b/patches/server/0177-getPlayerUniqueId-API.patch
@@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 5d8eb3b728359be5f92a255c9637d71713403cc8..745970d9f07ed7ca98a653bfff1b861dc4aaa177 100644
+index 39e3730eae983c20522b97fcd547823cd192cb2d..a94b972e328d2eff635de95847dc622c3a58fd9f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1886,6 +1886,25 @@ public final class CraftServer implements Server {
+@@ -1888,6 +1888,25 @@ public final class CraftServer implements Server {
return recipients.size();
}
diff --git a/patches/server/0199-Make-shield-blocking-delay-configurable.patch b/patches/server/0199-Make-shield-blocking-delay-configurable.patch
index aff86fa3d7..c9b6092f8f 100644
--- a/patches/server/0199-Make-shield-blocking-delay-configurable.patch
+++ b/patches/server/0199-Make-shield-blocking-delay-configurable.patch
@@ -35,10 +35,10 @@ index 7a7c404778757e6778305c9f8334a4fba1f466a6..d58439f85f4d3a9b863ecadb3b42b2ee
return this.isShiftKeyDown();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 475fcc2d1d61a94b81dc839ba0240f317afcfe56..5ca07b2cdc30f23632a23249c615ac9a8c7c96c7 100644
+index 7a01569f62b3b27a9eb6def0e2ec72e1d392258d..73c72b8cdece357193afb3c5f474e055086311ea 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -847,5 +847,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -853,5 +853,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public void setArrowsStuck(final int arrows) {
this.getHandle().setArrowCount(arrows);
}
diff --git a/patches/server/0204-LivingEntity-Active-Item-API.patch b/patches/server/0204-LivingEntity-Active-Item-API.patch
index 29cf3d86f5..aeca01c5eb 100644
--- a/patches/server/0204-LivingEntity-Active-Item-API.patch
+++ b/patches/server/0204-LivingEntity-Active-Item-API.patch
@@ -13,10 +13,10 @@ public net/minecraft/server/level/ServerPlayer completeUsingItem()V
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 5ca07b2cdc30f23632a23249c615ac9a8c7c96c7..4f0f21bb1f2d37a798065b7c5e0b2a77a8122823 100644
+index 73c72b8cdece357193afb3c5f474e055086311ea..2612e5016646591bb65ac255804b612b348a32fd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -858,4 +858,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -864,4 +864,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
getHandle().setShieldBlockingDelay(delay);
}
// Paper end
diff --git a/patches/server/0226-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0226-Add-Early-Warning-Feature-to-WatchDog.patch
index 3f5acbe5d8..babdb2e00b 100644
--- a/patches/server/0226-Add-Early-Warning-Feature-to-WatchDog.patch
+++ b/patches/server/0226-Add-Early-Warning-Feature-to-WatchDog.patch
@@ -33,10 +33,10 @@ index c466ec011d059b9960606ef2ee51ea3a3a65f8d0..baf93b5d5883d0a5c360f1a475949804
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 5478c159843a74ea90b2b1c4d5eb3c92a910a857..ffe53ca530da2b2a1b28c7ee59a7f5599949a0a1 100644
+index a94b972e328d2eff635de95847dc622c3a58fd9f..954b3725d4f702f284cd8712305a3f97fb90b9c1 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -962,6 +962,7 @@ public final class CraftServer implements Server {
+@@ -963,6 +963,7 @@ public final class CraftServer implements Server {
@Override
public void reload() {
@@ -44,7 +44,7 @@ index 5478c159843a74ea90b2b1c4d5eb3c92a910a857..ffe53ca530da2b2a1b28c7ee59a7f559
this.reloadCount++;
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
-@@ -1053,6 +1054,7 @@ public final class CraftServer implements Server {
+@@ -1055,6 +1056,7 @@ public final class CraftServer implements Server {
this.enablePlugins(PluginLoadOrder.POSTWORLD);
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
diff --git a/patches/server/0240-Add-ray-tracing-methods-to-LivingEntity.patch b/patches/server/0240-Add-ray-tracing-methods-to-LivingEntity.patch
index c84def987a..0962c2d288 100644
--- a/patches/server/0240-Add-ray-tracing-methods-to-LivingEntity.patch
+++ b/patches/server/0240-Add-ray-tracing-methods-to-LivingEntity.patch
@@ -29,10 +29,10 @@ index d90e74b7323a60e781d942baffe9b4bdb8ae2943..08f756b4fbb4732d73ca281b7006024b
public int getShieldBlockingDelay() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 4f0f21bb1f2d37a798065b7c5e0b2a77a8122823..aa5b67c704a1ae95f4b6e01696c1489c07625d16 100644
+index 2612e5016646591bb65ac255804b612b348a32fd..c8ac50351b7b1b2f4afc138570b8098a3c0ce1ba 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -201,6 +201,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -202,6 +202,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return blocks.get(0);
}
diff --git a/patches/server/0252-Add-LivingEntity-getTargetEntity.patch b/patches/server/0252-Add-LivingEntity-getTargetEntity.patch
index e8c8b04095..7b66e0ad75 100644
--- a/patches/server/0252-Add-LivingEntity-getTargetEntity.patch
+++ b/patches/server/0252-Add-LivingEntity-getTargetEntity.patch
@@ -56,7 +56,7 @@ index 64aa52c2d1fe50d304d75ebb197e8a834016c3cf..7bc0a66602d77902d83d6ca515da48e3
public int getShieldBlockingDelay() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index aa5b67c704a1ae95f4b6e01696c1489c07625d16..97e76c3701c5e58ff5c8cd0f243efd7998f1c93d 100644
+index c8ac50351b7b1b2f4afc138570b8098a3c0ce1ba..c0684f1864ece26b4f337ac615db04f615957c13 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1,5 +1,6 @@
@@ -66,7 +66,7 @@ index aa5b67c704a1ae95f4b6e01696c1489c07625d16..97e76c3701c5e58ff5c8cd0f243efd79
import com.google.common.base.Preconditions;
import com.google.common.collect.Sets;
import java.util.ArrayList;
-@@ -226,6 +227,39 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -227,6 +228,39 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
return null;
}
diff --git a/patches/server/0266-Make-the-default-permission-message-configurable.patch b/patches/server/0266-Make-the-default-permission-message-configurable.patch
index 9b2ee34d9e..a1ea906d4d 100644
--- a/patches/server/0266-Make-the-default-permission-message-configurable.patch
+++ b/patches/server/0266-Make-the-default-permission-message-configurable.patch
@@ -18,10 +18,10 @@ index 5b070d158760789bbcaa984426a55d20767abe4a..e1820a339452cd3388dd7cbb928c5f58
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index ffe53ca530da2b2a1b28c7ee59a7f5599949a0a1..6b63938514977f8fdfb019d55f8da28718f4cf1c 100644
+index 954b3725d4f702f284cd8712305a3f97fb90b9c1..7407d9f3480e0e44be44c84831864e511dfdebc2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2872,6 +2872,16 @@ public final class CraftServer implements Server {
+@@ -2874,6 +2874,16 @@ public final class CraftServer implements Server {
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
}
diff --git a/patches/server/0290-Expose-the-internal-current-tick.patch b/patches/server/0290-Expose-the-internal-current-tick.patch
index 1cedc35404..48e52995c4 100644
--- a/patches/server/0290-Expose-the-internal-current-tick.patch
+++ b/patches/server/0290-Expose-the-internal-current-tick.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 6b63938514977f8fdfb019d55f8da28718f4cf1c..ae4e3c137498ff390c8cae7315c7ebfe125efc35 100644
+index 7407d9f3480e0e44be44c84831864e511dfdebc2..9d07873c4a17549452ac8d9b6ac14d88cde185bc 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2915,5 +2915,10 @@ public final class CraftServer implements Server {
+@@ -2917,5 +2917,10 @@ public final class CraftServer implements Server {
profile.getGameProfile().getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties());
return profile;
}
diff --git a/patches/server/0314-Improve-java-version-check.patch b/patches/server/0314-Improve-java-version-check.patch
index 3d9eed5372..7814ffea5a 100644
--- a/patches/server/0314-Improve-java-version-check.patch
+++ b/patches/server/0314-Improve-java-version-check.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Improve java version check
Co-Authored-By: MiniDigger <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
-index 446403f73fb1b5687d587889e6f32dce464d05a6..ed167d0d399924d54d9ff99c10ab8ee093efc149 100644
+index bcc9d3b1503b1be1841c9ab40e879a1cbb0549f2..224b7f5394a568a3982f1e9a554e72af969fbe43 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -203,11 +203,20 @@ public class Main {
@@ -14,8 +14,8 @@ index 446403f73fb1b5687d587889e6f32dce464d05a6..ed167d0d399924d54d9ff99c10ab8ee0
}
- float javaVersion = Float.parseFloat(System.getProperty("java.class.version"));
-- if (javaVersion > 66.0) {
-- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 22 is supported.");
+- if (javaVersion > 67.0) {
+- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 23 is supported.");
- return;
+ // Paper start - Improve java version check
+ boolean skip = Boolean.getBoolean("Paper.IgnoreJavaVersion");
diff --git a/patches/server/0316-Entity-Jump-API.patch b/patches/server/0316-Entity-Jump-API.patch
index 1c521e9d99..9e2cba6a0a 100644
--- a/patches/server/0316-Entity-Jump-API.patch
+++ b/patches/server/0316-Entity-Jump-API.patch
@@ -50,10 +50,10 @@ index 4d91bc4b90a208fec789325dbcec8cc56d1a2a8b..aa4111eef22546f8aa630228c51ef576
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 97e76c3701c5e58ff5c8cd0f243efd7998f1c93d..b6238c327e91a52b77135290762feb8b1085fc7e 100644
+index c0684f1864ece26b4f337ac615db04f615957c13..05ba1654ec02ff2b518251c128661e3d8dfa4c6d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -968,4 +968,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -974,4 +974,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(this.getHandle().getUsedItemHand());
}
// Paper end - active item API
diff --git a/patches/server/0325-Add-tick-times-API-and-mspt-command.patch b/patches/server/0325-Add-tick-times-API-and-mspt-command.patch
index ab7f366958..b8fd4a8f65 100644
--- a/patches/server/0325-Add-tick-times-API-and-mspt-command.patch
+++ b/patches/server/0325-Add-tick-times-API-and-mspt-command.patch
@@ -184,10 +184,10 @@ index ddc3da84c5a55d2cd977fcdb18121351606a6b3c..53bb62c1dcb487be915759d22e06aea8
+ // Paper end - Add tick times API and /mspt command
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index ae4e3c137498ff390c8cae7315c7ebfe125efc35..55b11cb574d1fd634b4f445a0605249a296c6779 100644
+index 9d07873c4a17549452ac8d9b6ac14d88cde185bc..0078d999c132e56c6af242718fc1b983caa8b147 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2686,6 +2686,16 @@ public final class CraftServer implements Server {
+@@ -2688,6 +2688,16 @@ public final class CraftServer implements Server {
return CraftMagicNumbers.INSTANCE;
}
diff --git a/patches/server/0326-Expose-MinecraftServer-isRunning.patch b/patches/server/0326-Expose-MinecraftServer-isRunning.patch
index 38e7506126..4ee3eec408 100644
--- a/patches/server/0326-Expose-MinecraftServer-isRunning.patch
+++ b/patches/server/0326-Expose-MinecraftServer-isRunning.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 55b11cb574d1fd634b4f445a0605249a296c6779..01415a1523a783d8581e463dcea4f96ff8d0807e 100644
+index 0078d999c132e56c6af242718fc1b983caa8b147..7226c506c902fc94f27cc5d444e25882138759c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2930,5 +2930,10 @@ public final class CraftServer implements Server {
+@@ -2932,5 +2932,10 @@ public final class CraftServer implements Server {
public int getCurrentTick() {
return net.minecraft.server.MinecraftServer.currentTick;
}
diff --git a/patches/server/0327-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/0327-Add-Raw-Byte-ItemStack-Serialization.patch
index fe8bfe79ba..dfefad8f18 100644
--- a/patches/server/0327-Add-Raw-Byte-ItemStack-Serialization.patch
+++ b/patches/server/0327-Add-Raw-Byte-ItemStack-Serialization.patch
@@ -6,10 +6,10 @@ 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 d08b01fef9928f2239c8663cf90219dc7acad58c..af706146a26ede6b9f5a39c8deb490ff25334ae6 100644
+index 432f019afff36aa6143c052f7387a6c275a09de8..8b11f5f8cec74c57d614d73233a449c97cd56d18 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -458,6 +458,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -464,6 +464,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
return new com.destroystokyo.paper.PaperVersionFetcher();
}
diff --git a/patches/server/0341-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch b/patches/server/0341-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch
index 3e893aae8c..9d20799a09 100644
--- a/patches/server/0341-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch
+++ b/patches/server/0341-Don-t-crash-if-player-is-attempted-to-be-removed-fro.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Don't crash if player is attempted to be removed from
I suspect it deals with teleporting as it uses players current x/y/z
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
-index 3d46412b307f08968bb9b96c0649e0405813462e..56aa26bb8d0bfbd3c799163fa620259e6455c89b 100644
+index dfa0456f352ce25bc4edd1b0f04ca5a14434d7fa..1e7b440cc2c1bf53210069b38286f67a7b97041b 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
-@@ -270,8 +270,8 @@ public abstract class DistanceManager {
+@@ -275,8 +275,8 @@ public abstract class DistanceManager {
ObjectSet<ServerPlayer> objectset = (ObjectSet) this.playersPerChunk.get(i);
if (objectset == null) return; // CraftBukkit - SPIGOT-6208
diff --git a/patches/server/0351-misc-debugging-dumps.patch b/patches/server/0351-misc-debugging-dumps.patch
index ba40cf94e5..b339217a99 100644
--- a/patches/server/0351-misc-debugging-dumps.patch
+++ b/patches/server/0351-misc-debugging-dumps.patch
@@ -105,10 +105,10 @@ index 5457358bc76889153036818fdfd70a043ec4e40f..880e5c52746e9e3a9a1f42ec6461be54
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 01415a1523a783d8581e463dcea4f96ff8d0807e..6ea6e3280015a31a1679a874ca63c90be8252a86 100644
+index 7226c506c902fc94f27cc5d444e25882138759c2..75ea1d68c4be6f73ad05cd53b4e4c0182832395c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1047,6 +1047,7 @@ public final class CraftServer implements Server {
+@@ -1049,6 +1049,7 @@ public final class CraftServer implements Server {
plugin.getDescription().getFullName(),
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
));
diff --git a/patches/server/0353-Implement-Mob-Goal-API.patch b/patches/server/0353-Implement-Mob-Goal-API.patch
index a3f61fbfbf..5706a5b6b8 100644
--- a/patches/server/0353-Implement-Mob-Goal-API.patch
+++ b/patches/server/0353-Implement-Mob-Goal-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API
diff --git a/build.gradle.kts b/build.gradle.kts
-index e7c00486bd831578008c02fcda13f3a555e6a2f1..688e901b75e95941e0101cc7d0c4effa7993cf3f 100644
+index 0c349354ba76dfd2c5f16fb232263b18e77a9a40..6c3ed9e685473d7f555ae0e34fb9d4f3873f109a 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -41,6 +41,7 @@ dependencies {
@@ -14,8 +14,8 @@ index e7c00486bd831578008c02fcda13f3a555e6a2f1..688e901b75e95941e0101cc7d0c4effa
+ testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
+ testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0")
testImplementation("org.hamcrest:hamcrest:2.2")
- testImplementation("org.mockito:mockito-core:5.11.0")
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java
new file mode 100644
index 0000000000000000000000000000000000000000..c99eafab2103c7f5bca7ffba68a10bd853df055f
@@ -782,10 +782,10 @@ index 6667ecc4b7eded4e20a415cef1e1b1179e6710b8..16f9a98b8a939e5ca7e2dc04f87134a7
LOOK,
JUMP,
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 6ea6e3280015a31a1679a874ca63c90be8252a86..48c3d926682dd72ba476b4afc9e44e0113af0b46 100644
+index 75ea1d68c4be6f73ad05cd53b4e4c0182832395c..2b3eaeea881b12fe7e4c5150815ad00fe9f026e0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2936,5 +2936,11 @@ public final class CraftServer implements Server {
+@@ -2938,5 +2938,11 @@ public final class CraftServer implements Server {
public boolean isStopping() {
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
}
diff --git a/patches/server/0356-Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/0356-Fix-PotionEffect-ignores-icon-flag.patch
index db96543261..28f3888cb2 100644
--- a/patches/server/0356-Fix-PotionEffect-ignores-icon-flag.patch
+++ b/patches/server/0356-Fix-PotionEffect-ignores-icon-flag.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix PotionEffect ignores icon flag
Co-authored-by: Tamion <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index b6238c327e91a52b77135290762feb8b1085fc7e..b1c4970920ca8972f637c846106ae37822e495cf 100644
+index 05ba1654ec02ff2b518251c128661e3d8dfa4c6d..733c69a2cfa60fb8c920400e3d9acfc2465090e5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -484,7 +484,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -485,7 +485,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public boolean addPotionEffect(PotionEffect effect, boolean force) {
@@ -18,7 +18,7 @@ index b6238c327e91a52b77135290762feb8b1085fc7e..b1c4970920ca8972f637c846106ae378
return true;
}
-@@ -505,7 +505,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -506,7 +506,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public PotionEffect getPotionEffect(PotionEffectType type) {
MobEffectInstance handle = this.getHandle().getEffect(CraftPotionEffectType.bukkitToMinecraftHolder(type));
@@ -27,7 +27,7 @@ index b6238c327e91a52b77135290762feb8b1085fc7e..b1c4970920ca8972f637c846106ae378
}
@Override
-@@ -517,7 +517,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -518,7 +518,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public Collection<PotionEffect> getActivePotionEffects() {
List<PotionEffect> effects = new ArrayList<PotionEffect>();
for (MobEffectInstance handle : this.getHandle().activeEffects.values()) {
diff --git a/patches/server/0358-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0358-Wait-for-Async-Tasks-during-shutdown.patch
index 289e0129e9..fb2ca753f1 100644
--- a/patches/server/0358-Wait-for-Async-Tasks-during-shutdown.patch
+++ b/patches/server/0358-Wait-for-Async-Tasks-during-shutdown.patch
@@ -22,10 +22,10 @@ index 8b17df3d18fe9acc1a7b10c6809886da0143f8c5..0370d26bd1e1d2fe1d640b052aca8a9c
// CraftBukkit end
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.shutdown(); // Paper - Plugin remapping
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 48c3d926682dd72ba476b4afc9e44e0113af0b46..610661dec58b9170d2eb2093c7fab81585ff9a2c 100644
+index 2b3eaeea881b12fe7e4c5150815ad00fe9f026e0..e56f4b254af45311acb0b55195dcbd9f372cae98 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1058,6 +1058,32 @@ public final class CraftServer implements Server {
+@@ -1060,6 +1060,32 @@ public final class CraftServer implements Server {
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
}
diff --git a/patches/server/0373-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0373-Fix-Per-World-Difficulty-Remembering-Difficulty.patch
index cacf61907b..3fec1cd014 100644
--- a/patches/server/0373-Fix-Per-World-Difficulty-Remembering-Difficulty.patch
+++ b/patches/server/0373-Fix-Per-World-Difficulty-Remembering-Difficulty.patch
@@ -89,10 +89,10 @@ index e242ca5ec8c50bfd81b8ab1429e6e4e441025a75..d2eb8c619905d87a38820a4c1179ad93
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 610661dec58b9170d2eb2093c7fab81585ff9a2c..89c4763b990ca9e801ee16c4a50e806740d061d9 100644
+index e56f4b254af45311acb0b55195dcbd9f372cae98..ac3931f7d992d3675403e3b525f3cd9928cf7ed4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -996,8 +996,8 @@ public final class CraftServer implements Server {
+@@ -998,8 +998,8 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
for (ServerLevel world : this.console.getAllLevels()) {
@@ -104,7 +104,7 @@ index 610661dec58b9170d2eb2093c7fab81585ff9a2c..89c4763b990ca9e801ee16c4a50e8067
for (SpawnCategory spawnCategory : SpawnCategory.values()) {
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index c681b83ce59e6edfabd4d42da410f622747d9a6e..347016873354286ac3ec953049bca2cd21680911 100644
+index 2d6b24220057ea9a510dc86161cbaf909c061699..16e1ae8aaad143ee86f850e654de696dbbb84f30 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1167,7 +1167,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/server/0376-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0376-Add-Plugin-Tickets-to-API-Chunk-Methods.patch
index 1c53244eb5..57c7d2ca21 100644
--- a/patches/server/0376-Add-Plugin-Tickets-to-API-Chunk-Methods.patch
+++ b/patches/server/0376-Add-Plugin-Tickets-to-API-Chunk-Methods.patch
@@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 89c4763b990ca9e801ee16c4a50e806740d061d9..0b288cc080869efed42a28be682f7b68f8691416 100644
+index ac3931f7d992d3675403e3b525f3cd9928cf7ed4..42ec4aed187b41729a3c985ae440097db0388d3c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -380,7 +380,7 @@ public final class CraftServer implements Server {
@@ -34,7 +34,7 @@ index 89c4763b990ca9e801ee16c4a50e806740d061d9..0b288cc080869efed42a28be682f7b68
this.minimumAPI = ApiVersion.getOrCreateVersion(this.configuration.getString("settings.minimum-api"));
this.loadIcon();
this.loadCompatibilities();
-@@ -975,7 +975,7 @@ public final class CraftServer implements Server {
+@@ -976,7 +976,7 @@ public final class CraftServer implements Server {
this.console.setMotd(config.motd);
this.overrideSpawnLimits();
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
@@ -44,7 +44,7 @@ index 89c4763b990ca9e801ee16c4a50e806740d061d9..0b288cc080869efed42a28be682f7b68
this.printSaveWarning = false;
this.console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 347016873354286ac3ec953049bca2cd21680911..c35fd2fcb6ced6a16816637353d03c88f1d49d1b 100644
+index 16e1ae8aaad143ee86f850e654de696dbbb84f30..520867fa3d49e421ef5290976a9eed8f58ff7590 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -266,7 +266,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/server/0377-Add-BlockStateMeta-clearBlockState.patch b/patches/server/0377-Add-BlockStateMeta-clearBlockState.patch
index 680235a49a..426769212c 100644
--- a/patches/server/0377-Add-BlockStateMeta-clearBlockState.patch
+++ b/patches/server/0377-Add-BlockStateMeta-clearBlockState.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add BlockStateMeta#clearBlockState
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
-index 301d883a7626e3abd222517400367fc40d6fa2bd..23dbc56edf0d16cf07ced2899942abae28397694 100644
+index e70b917698b381918b0b30dca7b97d36df28c897..3985e5b4e2d65faa8eaea1d4a2acc6fb1e64f959 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
-@@ -198,6 +198,13 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
+@@ -239,6 +239,13 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
return this.blockEntityTag != null;
}
diff --git a/patches/server/0393-Add-playPickupItemAnimation-to-LivingEntity.patch b/patches/server/0393-Add-playPickupItemAnimation-to-LivingEntity.patch
index 7fe52b1b6a..e66408f814 100644
--- a/patches/server/0393-Add-playPickupItemAnimation-to-LivingEntity.patch
+++ b/patches/server/0393-Add-playPickupItemAnimation-to-LivingEntity.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index b1c4970920ca8972f637c846106ae37822e495cf..cf17328aef60e5c6a0d168d2ed4d181cf47ee0b4 100644
+index 733c69a2cfa60fb8c920400e3d9acfc2465090e5..fad7d8130f6db70c7bfca9d02027d8a41f5309c1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -984,4 +984,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -990,4 +990,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
}
// Paper end - entity jump API
diff --git a/patches/server/0404-Add-methods-to-get-translation-keys.patch b/patches/server/0404-Add-methods-to-get-translation-keys.patch
index 2aaeb8a7a6..00eaa98c22 100644
--- a/patches/server/0404-Add-methods-to-get-translation-keys.patch
+++ b/patches/server/0404-Add-methods-to-get-translation-keys.patch
@@ -93,10 +93,10 @@ index 4921fc085c9d60c74028ef390325e26c598e8df1..4941e0afff8df5f10f06c715b54bf58e
case BALL:
return FireworkExplosion.Shape.SMALL_BALL;
diff --git a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java b/src/test/java/io/papermc/paper/world/TranslationKeyTest.java
-index 7f8b6462d2a1bbd39a870d2543bebc135f7eb45b..b61b8b8e4fe1b5d905f218bf3b406b1e1af3f6b3 100644
+index 7f8b6462d2a1bbd39a870d2543bebc135f7eb45b..4001c73e833ebf17baa22463dd197cee8ad67266 100644
--- a/src/test/java/io/papermc/paper/world/TranslationKeyTest.java
+++ b/src/test/java/io/papermc/paper/world/TranslationKeyTest.java
-@@ -1,12 +1,28 @@
+@@ -1,11 +1,29 @@
package io.papermc.paper.world;
import com.destroystokyo.paper.ClientOption;
@@ -116,17 +116,17 @@ index 7f8b6462d2a1bbd39a870d2543bebc135f7eb45b..b61b8b8e4fe1b5d905f218bf3b406b1e
+import org.bukkit.MusicInstrument;
+import org.bukkit.attribute.Attribute;
+import org.bukkit.craftbukkit.util.CraftNamespacedKey;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.RegistryHelper;
++import org.bukkit.support.environment.AllFeatures;
import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
--public class TranslationKeyTest {
-+public class TranslationKeyTest extends AbstractTestingBase {
++@AllFeatures
+ public class TranslationKeyTest {
@Test
- public void testChatVisibilityKeys() {
-@@ -15,4 +31,69 @@ public class TranslationKeyTest {
+@@ -15,4 +33,69 @@ public class TranslationKeyTest {
Assertions.assertEquals(ChatVisiblity.valueOf(chatVisibility.name()).getKey(), chatVisibility.translationKey(), chatVisibility + "'s translation key doesn't match");
}
}
@@ -181,7 +181,7 @@ index 7f8b6462d2a1bbd39a870d2543bebc135f7eb45b..b61b8b8e4fe1b5d905f218bf3b406b1e
+
+ @Test
+ public void testBiome() {
-+ for (Map.Entry<ResourceKey<Biome>, Biome> nms : AbstractTestingBase.BIOMES.entrySet()) {
++ for (Map.Entry<ResourceKey<Biome>, Biome> nms : RegistryHelper.getBiomes().entrySet()) {
+ org.bukkit.block.Biome bukkit = org.bukkit.block.Biome.valueOf(nms.getKey().location().getPath().toUpperCase(Locale.ROOT));
+ Assertions.assertEquals(nms.getKey().location().toLanguageKey("biome"), bukkit.translationKey(), "translation key mismatch for " + bukkit);
+ }
diff --git a/patches/server/0407-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0407-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch
index b5f30283e1..a480b44af1 100644
--- a/patches/server/0407-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch
+++ b/patches/server/0407-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch
@@ -94,10 +94,10 @@ index 34321f095e12ea0cca34ff1ec00819c6350205a8..5f5788a502642463091fb76e98703aae
this.entity.setYHeadRot(location.getYaw());
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index cf17328aef60e5c6a0d168d2ed4d181cf47ee0b4..3cd21778018db5e05ee26ba35c34a89619b3d1d8 100644
+index fad7d8130f6db70c7bfca9d02027d8a41f5309c1..8a8189e8f2f201880748eb79805bb0b33688e814 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -590,6 +590,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -596,6 +596,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
((AbstractHurtingProjectile) launch).projectileSource = this;
diff --git a/patches/server/0411-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0411-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
index 7a0217f4f0..587ee1ed67 100644
--- a/patches/server/0411-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
+++ b/patches/server/0411-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
@@ -21,10 +21,10 @@ index f1383906dbd16e088f57c9c77c051c8501b155cc..c01a9305eb1c3e2ee5effab1e11980c2
+ // 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 af706146a26ede6b9f5a39c8deb490ff25334ae6..a557b40e1807933cf510ea489ebcab4a19c066c1 100644
+index 8b11f5f8cec74c57d614d73233a449c97cd56d18..d7e8663e21ade1b53d4b936147f57b632f67a156 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -505,6 +505,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -511,6 +511,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!");
return compound;
}
diff --git a/patches/server/0424-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0424-Add-getOfflinePlayerIfCached-String.patch
index 8b286c9c12..5eeace36f6 100644
--- a/patches/server/0424-Add-getOfflinePlayerIfCached-String.patch
+++ b/patches/server/0424-Add-getOfflinePlayerIfCached-String.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 0b288cc080869efed42a28be682f7b68f8691416..ae594610d1c5665aa142522a9cbb97cf6e4d10f2 100644
+index 42ec4aed187b41729a3c985ae440097db0388d3c..25bfb93568ea0a6c0b827c6d6a736f950981144e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1963,6 +1963,28 @@ public final class CraftServer implements Server {
+@@ -1965,6 +1965,28 @@ public final class CraftServer implements Server {
return result;
}
diff --git a/patches/server/0425-Add-ignore-discounts-API.patch b/patches/server/0425-Add-ignore-discounts-API.patch
index 65a552a605..b2ed91d9bf 100644
--- a/patches/server/0425-Add-ignore-discounts-API.patch
+++ b/patches/server/0425-Add-ignore-discounts-API.patch
@@ -87,10 +87,10 @@ index 89982d25f60c8b60ba91e559ef88278f338fe215..0efc8d997b34302c3e0a5d7ec73a11a9
public ItemStack getBaseCostA() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java
-index 86c5bc01d5b87b4301fb83d55cf3046985c45d0f..c9e23a71a35214c363318c48d38c49b695d1ffd4 100644
+index bc1a92707c65474c1464d6f7c3a3265df6195228..e86cee25703a3c02ef62e302816253c360d557f3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java
-@@ -22,11 +22,19 @@ public class CraftMerchantRecipe extends MerchantRecipe {
+@@ -24,11 +24,19 @@ public class CraftMerchantRecipe extends MerchantRecipe {
@Deprecated
public CraftMerchantRecipe(ItemStack result, int uses, int maxUses, boolean experienceReward, int experience, float priceMultiplier) {
@@ -112,7 +112,7 @@ index 86c5bc01d5b87b4301fb83d55cf3046985c45d0f..c9e23a71a35214c363318c48d38c49b6
this.handle = new net.minecraft.world.item.trading.MerchantOffer(
new ItemCost(Items.AIR),
Optional.empty(),
-@@ -36,6 +44,7 @@ public class CraftMerchantRecipe extends MerchantRecipe {
+@@ -38,6 +46,7 @@ public class CraftMerchantRecipe extends MerchantRecipe {
experience,
priceMultiplier,
demand,
@@ -120,7 +120,7 @@ index 86c5bc01d5b87b4301fb83d55cf3046985c45d0f..c9e23a71a35214c363318c48d38c49b6
this
);
this.setSpecialPrice(specialPrice);
-@@ -112,6 +121,18 @@ public class CraftMerchantRecipe extends MerchantRecipe {
+@@ -114,6 +123,18 @@ public class CraftMerchantRecipe extends MerchantRecipe {
this.handle.priceMultiplier = priceMultiplier;
}
@@ -139,7 +139,7 @@ index 86c5bc01d5b87b4301fb83d55cf3046985c45d0f..c9e23a71a35214c363318c48d38c49b6
public net.minecraft.world.item.trading.MerchantOffer toMinecraft() {
List<ItemStack> ingredients = this.getIngredients();
Preconditions.checkState(!ingredients.isEmpty(), "No offered ingredients");
-@@ -130,7 +151,7 @@ public class CraftMerchantRecipe extends MerchantRecipe {
+@@ -134,7 +155,7 @@ public class CraftMerchantRecipe extends MerchantRecipe {
if (recipe instanceof CraftMerchantRecipe) {
return (CraftMerchantRecipe) recipe;
} else {
diff --git a/patches/server/0427-Fix-client-lag-on-advancement-loading.patch b/patches/server/0427-Fix-client-lag-on-advancement-loading.patch
index 62630304af..5cc82219f2 100644
--- a/patches/server/0427-Fix-client-lag-on-advancement-loading.patch
+++ b/patches/server/0427-Fix-client-lag-on-advancement-loading.patch
@@ -15,10 +15,10 @@ 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 a557b40e1807933cf510ea489ebcab4a19c066c1..481aeb922952578ea68ce2425c84e1a93eff0cf9 100644
+index d7e8663e21ade1b53d4b936147f57b632f67a156..66249c5caefb0879e13c02d5553b09b4122418b9 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -317,7 +317,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -323,7 +323,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
Bukkit.getLogger().log(Level.SEVERE, "Error saving advancement " + key, ex);
}
diff --git a/patches/server/0432-Add-Destroy-Speed-API.patch b/patches/server/0432-Add-Destroy-Speed-API.patch
index 43e752ecb5..22e992d6a9 100644
--- a/patches/server/0432-Add-Destroy-Speed-API.patch
+++ b/patches/server/0432-Add-Destroy-Speed-API.patch
@@ -76,10 +76,10 @@ index 9953b6b36cbcbfd1756bac478b568ca5700fc898..33869e725c3b3f2120fa36ca468019a7
}
diff --git a/src/test/java/io/papermc/paper/block/CraftBlockDataDestroySpeedTest.java b/src/test/java/io/papermc/paper/block/CraftBlockDataDestroySpeedTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..62aef9abab896491f7806490184fc6899ec36c57
+index 0000000000000000000000000000000000000000..32d38205a5a72c3c1838ed28cb83bcea5ad59b6b
--- /dev/null
+++ b/src/test/java/io/papermc/paper/block/CraftBlockDataDestroySpeedTest.java
-@@ -0,0 +1,137 @@
+@@ -0,0 +1,138 @@
+package io.papermc.paper.block;
+
+import java.util.List;
@@ -106,7 +106,7 @@ index 0000000000000000000000000000000000000000..62aef9abab896491f7806490184fc689
+import org.bukkit.craftbukkit.block.data.CraftBlockData;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
+import org.bukkit.inventory.ItemStack;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.AllFeatures;
+import org.bukkit.util.Vector;
+import org.jetbrains.annotations.NotNull;
+import org.junit.jupiter.api.Assertions;
@@ -122,7 +122,8 @@ index 0000000000000000000000000000000000000000..62aef9abab896491f7806490184fc689
+ * This test is responsible for ensuring that said logic emits the expected destroy speed under heavy attribute
+ * modifier use.
+ */
-+public class CraftBlockDataDestroySpeedTest extends AbstractTestingBase {
++@AllFeatures
++public class CraftBlockDataDestroySpeedTest {
+
+ @Test
+ public void testCorrectEnchantmentDestroySpeedComputation() {
diff --git a/patches/server/0434-Add-LivingEntity-clearActiveItem.patch b/patches/server/0434-Add-LivingEntity-clearActiveItem.patch
index e3b86150d3..c22e85e858 100644
--- a/patches/server/0434-Add-LivingEntity-clearActiveItem.patch
+++ b/patches/server/0434-Add-LivingEntity-clearActiveItem.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 3cd21778018db5e05ee26ba35c34a89619b3d1d8..5e8225a6ae004795b4d44c4f88f262664f632589 100644
+index 8a8189e8f2f201880748eb79805bb0b33688e814..925c842fcf546ad270641b3be7e8a8c432571501 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -942,6 +942,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -948,6 +948,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().getUseItem().asBukkitMirror();
}
diff --git a/patches/server/0439-Add-missing-default-perms-for-commands.patch b/patches/server/0439-Add-missing-default-perms-for-commands.patch
index d49628ee32..0ff16975d2 100644
--- a/patches/server/0439-Add-missing-default-perms-for-commands.patch
+++ b/patches/server/0439-Add-missing-default-perms-for-commands.patch
@@ -88,14 +88,20 @@ index a9ea2e38e4673686c9994a58c94ad19e59fd423c..52649f82351ab4f675c3cc3cd6640956
diff --git a/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java b/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..ca71c688b37ce2c8b712a4f9216cf872c8edf78e
+index 0000000000000000000000000000000000000000..75ed5050f72c001d6eab117a2c0b352a413548bd
--- /dev/null
+++ b/src/test/java/io/papermc/paper/permissions/MinecraftCommandPermissionsTest.java
-@@ -0,0 +1,82 @@
+@@ -0,0 +1,83 @@
+package io.papermc.paper.permissions;
+
+import com.mojang.brigadier.tree.CommandNode;
+import com.mojang.brigadier.tree.RootCommandNode;
++import java.io.PrintStream;
++import java.util.HashSet;
++import java.util.LinkedHashSet;
++import java.util.List;
++import java.util.Set;
++import java.util.TreeSet;
+import net.minecraft.commands.CommandBuildContext;
+import net.minecraft.commands.CommandSourceStack;
+import net.minecraft.commands.Commands;
@@ -105,21 +111,16 @@ index 0000000000000000000000000000000000000000..ca71c688b37ce2c8b712a4f9216cf872
+import org.bukkit.craftbukkit.command.VanillaCommandWrapper;
+import org.bukkit.craftbukkit.util.permissions.CraftDefaultPermissions;
+import org.bukkit.permissions.Permission;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.RegistryHelper;
++import org.bukkit.support.environment.VanillaFeature;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
-+import java.io.PrintStream;
-+import java.util.HashSet;
-+import java.util.LinkedHashSet;
-+import java.util.List;
-+import java.util.Set;
-+import java.util.TreeSet;
-+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
-+public class MinecraftCommandPermissionsTest extends AbstractTestingBase {
++@VanillaFeature
++public class MinecraftCommandPermissionsTest {
+
+ private static PrintStream old;
+ @BeforeAll
@@ -133,7 +134,7 @@ index 0000000000000000000000000000000000000000..ca71c688b37ce2c8b712a4f9216cf872
+ CraftDefaultPermissions.registerCorePermissions();
+ Set<String> perms = collectMinecraftCommandPerms();
+
-+ Commands commands = new Commands(Commands.CommandSelection.DEDICATED, CommandBuildContext.simple(AbstractTestingBase.REGISTRY_CUSTOM, FeatureFlags.VANILLA_SET));
++ Commands commands = new Commands(Commands.CommandSelection.DEDICATED, CommandBuildContext.simple(RegistryHelper.getRegistry(), FeatureFlags.VANILLA_SET));
+ RootCommandNode<CommandSourceStack> root = commands.getDispatcher().getRoot();
+ Set<String> missing = new LinkedHashSet<>();
+ Set<String> foundPerms = new HashSet<>();
diff --git a/patches/server/0445-Expose-LivingEntity-hurt-direction.patch b/patches/server/0445-Expose-LivingEntity-hurt-direction.patch
index d0db144113..5df6e30894 100644
--- a/patches/server/0445-Expose-LivingEntity-hurt-direction.patch
+++ b/patches/server/0445-Expose-LivingEntity-hurt-direction.patch
@@ -36,10 +36,10 @@ index 6cda13df52ee4d56dd1d3c213307bfd38175584c..24aa891ffa9115c05439b06aece85df7
public int getSleepTicks() {
return this.getHandle().sleepCounter;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 5e8225a6ae004795b4d44c4f88f262664f632589..0e0c65534a782ce8d73d38efd5e2c847f685fb89 100644
+index 925c842fcf546ad270641b3be7e8a8c432571501..10f3defa8f4b57fb45cf7de06d415b72102e47d5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -999,4 +999,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -1005,4 +1005,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
this.getHandle().take(((CraftItem) item).getHandle(), quantity);
}
// Paper end - pickup animation API
diff --git a/patches/server/0471-Add-RegistryAccess-for-managing-Registries.patch b/patches/server/0471-Add-RegistryAccess-for-managing-Registries.patch
index 18d4a70174..54c9cc8744 100644
--- a/patches/server/0471-Add-RegistryAccess-for-managing-Registries.patch
+++ b/patches/server/0471-Add-RegistryAccess-for-managing-Registries.patch
@@ -559,15 +559,16 @@ index 0000000000000000000000000000000000000000..e4c94d6860e0f5b643cde1ded20b5503
+import org.checkerframework.framework.qual.DefaultQualifier;
diff --git a/src/main/java/io/papermc/paper/registry/legacy/DelayedRegistry.java b/src/main/java/io/papermc/paper/registry/legacy/DelayedRegistry.java
new file mode 100644
-index 0000000000000000000000000000000000000000..5562e8da5ebaef2a3add46e88d64358b7737b59e
+index 0000000000000000000000000000000000000000..9400fed345344a0a8e4fb301cca6a1867adf625b
--- /dev/null
+++ b/src/main/java/io/papermc/paper/registry/legacy/DelayedRegistry.java
-@@ -0,0 +1,55 @@
+@@ -0,0 +1,61 @@
+package io.papermc.paper.registry.legacy;
+
+import java.util.Iterator;
+import java.util.function.Supplier;
+import java.util.stream.Stream;
++import net.kyori.adventure.key.Key;
+import org.bukkit.Keyed;
+import org.bukkit.NamespacedKey;
+import org.bukkit.Registry;
@@ -604,6 +605,11 @@ index 0000000000000000000000000000000000000000..5562e8da5ebaef2a3add46e88d64358b
+ }
+
+ @Override
++ public @NotNull T getOrThrow(@NotNull final NamespacedKey key) {
++ return this.delegate().getOrThrow(key);
++ }
++
++ @Override
+ public Iterator<T> iterator() {
+ return this.delegate().iterator();
+ }
@@ -737,7 +743,7 @@ index 1dd22f11b7e2983a3069dea94c0f02b43ff1f736..397bdacab9517354875ebc0bc68d3505
String string = Registries.elementsDirPath(type.registryKey());
SimpleJsonResourceReloadListener.scanDirectory(resourceManager, string, GSON, map);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
-index 06c6342fad78d9c845e9987c460f5990505f5059..d1db491027a5e2d22a6c956b26a974a284d44c57 100644
+index 6216db1811565e0d25b0d63f579f0a5ba69876a7..3dbdfc2fb973c3c9aecc6582451071e8a939f5f0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
@@ -122,81 +122,12 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
@@ -855,7 +861,7 @@ index 06c6342fad78d9c845e9987c460f5990505f5059..d1db491027a5e2d22a6c956b26a974a2
@Override
public B get(NamespacedKey namespacedKey) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index ae594610d1c5665aa142522a9cbb97cf6e4d10f2..e4fab101b2d10759b9bd65d35715e377236a5989 100644
+index 25bfb93568ea0a6c0b827c6d6a736f950981144e..f402ef662779e096ee354b9edd66cca785b85f33 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -281,7 +281,7 @@ public final class CraftServer implements Server {
@@ -867,7 +873,7 @@ index ae594610d1c5665aa142522a9cbb97cf6e4d10f2..e4fab101b2d10759b9bd65d35715e377
private YamlConfiguration configuration;
private YamlConfiguration commandsConfiguration;
private final Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions()));
-@@ -428,6 +428,7 @@ public final class CraftServer implements Server {
+@@ -429,6 +429,7 @@ public final class CraftServer implements Server {
}
private void loadCompatibilities() {
@@ -875,7 +881,7 @@ index ae594610d1c5665aa142522a9cbb97cf6e4d10f2..e4fab101b2d10759b9bd65d35715e377
ConfigurationSection compatibilities = this.configuration.getConfigurationSection("settings.compatibility");
if (compatibilities == null) {
this.activeCompatibilities = Collections.emptySet();
-@@ -2726,7 +2727,7 @@ public final class CraftServer implements Server {
+@@ -2728,7 +2729,7 @@ public final class CraftServer implements Server {
@Override
public <T extends Keyed> Registry<T> getRegistry(Class<T> aClass) {
@@ -909,16 +915,16 @@ index 1f58b92c17d28e14621e8dc28042a5368f1f4a1f..ef80e6b4dff557daaab1b9fde4d8d401
// PatternType
private static final FieldRenameData PATTERN_TYPE_DATA = FieldRenameData.Builder.newBuilder()
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index e1b86308f737b957b6d00bc902b91856694b7cbf..0cb2b616e0fa060b7aae6c47502f75ee7647e917 100644
+index b85223ebff4dbb8aa74b501663afc87ef11e2a96..760f56d36f0e4a74b58628408a286a499d6664ec 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -190,20 +190,10 @@ public class Commodore {
+@@ -215,20 +215,10 @@ public class Commodore {
- public static byte[] convert(byte[] b, final String pluginName, final ApiVersion pluginVersion, final Set<String> activeCompatibilities) {
+ public byte[] convert(byte[] b, final String pluginName, final ApiVersion pluginVersion, final Set<String> activeCompatibilities) {
final boolean modern = pluginVersion.isNewerThanOrSameAs(ApiVersion.FLATTENING);
- final boolean enumCompatibility = pluginVersion.isOlderThanOrSameAs(ApiVersion.getOrCreateVersion("1.20.6")) && activeCompatibilities.contains("enum-compatibility-mode");
ClassReader cr = new ClassReader(b);
- ClassWriter cw = new ClassWriter(0); // TODO 2024-06-22: Open PR to ASM to included interface in handle hash
+ ClassWriter cw = new ClassWriter(cr, 0);
- List<String> methodEnumSignatures = Commodore.getMethodSignatures(b);
- Multimap<String, String> enumLessToEnum = HashMultimap.create();
@@ -933,7 +939,7 @@ index e1b86308f737b957b6d00bc902b91856694b7cbf..0cb2b616e0fa060b7aae6c47502f75ee
visitor = io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(visitor); // Paper
cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, visitor) {
-@@ -270,15 +260,6 @@ public class Commodore {
+@@ -295,15 +285,6 @@ public class Commodore {
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
@@ -972,22 +978,23 @@ index 543e37737bc6fdca23ed9ed0606805d345515a5a..eef7c125b2689f29cae5464659eacdf3
animals: 10
diff --git a/src/test/java/io/papermc/paper/registry/LegacyRegistryIdentifierTest.java b/src/test/java/io/papermc/paper/registry/LegacyRegistryIdentifierTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..b9d00e65639521eecd44bd2be3e012264c3785f5
+index 0000000000000000000000000000000000000000..a80b0ded74c0be657e734de61cbf5e32e16c26a8
--- /dev/null
+++ b/src/test/java/io/papermc/paper/registry/LegacyRegistryIdentifierTest.java
-@@ -0,0 +1,20 @@
+@@ -0,0 +1,21 @@
+package io.papermc.paper.registry;
+
+import org.bukkit.GameEvent;
+import org.bukkit.MusicInstrument;
+import org.bukkit.inventory.meta.trim.TrimPattern;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.VanillaFeature;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertSame;
+
+@Deprecated
-+class LegacyRegistryIdentifierTest extends AbstractTestingBase {
++@VanillaFeature
++class LegacyRegistryIdentifierTest {
+
+ @Test
+ void testSeveralConversions() {
@@ -997,7 +1004,7 @@ index 0000000000000000000000000000000000000000..b9d00e65639521eecd44bd2be3e01226
+ }
+}
diff --git a/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java b/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java
-index e1c14886064cde56be7fcd8f22a6ecb2d222a762..69cece1537bb558b80e1947fdb1fe25555e82628 100644
+index fe52d229c31526cc32f6422328efe92edf75a7ff..67dadb1765a5ef9a391a459224e233f38201f5d5 100644
--- a/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java
+++ b/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java
@@ -1,15 +1,19 @@
@@ -1009,8 +1016,9 @@ index e1c14886064cde56be7fcd8f22a6ecb2d222a762..69cece1537bb558b80e1947fdb1fe255
import net.minecraft.core.Registry;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
-+import org.bukkit.Keyed;
- import org.bukkit.support.AbstractTestingBase;
+-import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.RegistryHelper;
++import org.bukkit.support.environment.AllFeatures;
+import org.checkerframework.checker.nullness.qual.Nullable;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.params.ParameterizedTest;
@@ -1019,10 +1027,10 @@ index e1c14886064cde56be7fcd8f22a6ecb2d222a762..69cece1537bb558b80e1947fdb1fe255
+import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
- class RegistryKeyTest extends AbstractTestingBase {
-@@ -28,6 +32,12 @@ class RegistryKeyTest extends AbstractTestingBase {
+ @AllFeatures
+@@ -29,6 +33,12 @@ class RegistryKeyTest {
void testApiRegistryKeysExist(final RegistryKey<?> key) {
- final Optional<Registry<Object>> registry = AbstractTestingBase.REGISTRY_CUSTOM.registry(ResourceKey.createRegistryKey(ResourceLocation.parse(key.key().asString())));
+ final Optional<Registry<Object>> registry = RegistryHelper.getRegistry().registry(ResourceKey.createRegistryKey(ResourceLocation.parse(key.key().asString())));
assertTrue(registry.isPresent(), "Missing vanilla registry for " + key.key().asString());
+ }
@@ -1034,14 +1042,14 @@ index e1c14886064cde56be7fcd8f22a6ecb2d222a762..69cece1537bb558b80e1947fdb1fe255
}
}
diff --git a/src/test/java/org/bukkit/registry/RegistryArgumentAddedTest.java b/src/test/java/org/bukkit/registry/RegistryArgumentAddedTest.java
-index 4adaafafb7140e983a4e90f0ff0deaaf0887a9a5..0dd775ad1bd0bf9ba7ea05255d543a9df8b5fcfd 100644
+index b65a3ee68c177da7ef5a57608187dc1672257c7f..c1016e0eb00e952551370c874e8d678fef8ba3dc 100644
--- a/src/test/java/org/bukkit/registry/RegistryArgumentAddedTest.java
+++ b/src/test/java/org/bukkit/registry/RegistryArgumentAddedTest.java
-@@ -21,14 +21,17 @@ public class RegistryArgumentAddedTest extends AbstractTestingBase {
+@@ -22,14 +22,17 @@ public class RegistryArgumentAddedTest {
// Make sure every registry is created
Class.forName(Registry.class.getName());
-- Set<Class<?>> loadedRegistries = new HashSet<>(DummyServer.registers.keySet());
+- Set<Class<?>> loadedRegistries = new HashSet<>(AllFeaturesExtension.getRealRegistries().keySet());
- Set<Class<?>> notFound = new HashSet<>();
+ // Paper start
+ Set<io.papermc.paper.registry.RegistryKey<?>> loadedRegistries = java.util.Collections.newSetFromMap(new java.util.IdentityHashMap<>());
@@ -1059,10 +1067,10 @@ index 4adaafafb7140e983a4e90f0ff0deaaf0887a9a5..0dd775ad1bd0bf9ba7ea05255d543a9d
if (!loadedRegistries.remove(clazz)) {
notFound.add(clazz);
diff --git a/src/test/java/org/bukkit/registry/RegistryConversionTest.java b/src/test/java/org/bukkit/registry/RegistryConversionTest.java
-index e48536683889cdea197746c55b0e67e7e4b9dc68..3216a3549011659a91cc4a0c656a56cdf4e45504 100644
+index e97328b95973db52d44bc4d0aefd8eb69f2ebdea..01e351f4e292efe78fc1a1db0f31b2c0a313b101 100644
--- a/src/test/java/org/bukkit/registry/RegistryConversionTest.java
+++ b/src/test/java/org/bukkit/registry/RegistryConversionTest.java
-@@ -40,9 +40,9 @@ public class RegistryConversionTest extends AbstractTestingBase {
+@@ -41,9 +41,9 @@ public class RegistryConversionTest {
@Order(1)
@RegistriesTest
@@ -1074,7 +1082,7 @@ index e48536683889cdea197746c55b0e67e7e4b9dc68..3216a3549011659a91cc4a0c656a56cd
for (Keyed item : registry) {
if (!(item instanceof Handleable<?>)) {
-@@ -62,7 +62,7 @@ public class RegistryConversionTest extends AbstractTestingBase {
+@@ -63,7 +63,7 @@ public class RegistryConversionTest {
@Order(2)
@RegistriesTest
@@ -1083,7 +1091,7 @@ index e48536683889cdea197746c55b0e67e7e4b9dc68..3216a3549011659a91cc4a0c656a56cd
Class<? extends Keyed> craftClazz, Class<?> minecraftClazz, boolean newMethod) {
String methodName = (newMethod) ? RegistryConversionTest.MINECRAFT_TO_BUKKIT_NEW : RegistryConversionTest.MINECRAFT_TO_BUKKIT;
Method method = null;
-@@ -111,7 +111,7 @@ public class RegistryConversionTest extends AbstractTestingBase {
+@@ -112,7 +112,7 @@ public class RegistryConversionTest {
@Order(2)
@RegistriesTest
@@ -1092,7 +1100,7 @@ index e48536683889cdea197746c55b0e67e7e4b9dc68..3216a3549011659a91cc4a0c656a56cd
Class<? extends Keyed> craftClazz, Class<?> minecraftClazz, boolean newMethod) {
String methodName = (newMethod) ? RegistryConversionTest.BUKKIT_TO_MINECRAFT_NEW : RegistryConversionTest.BUKKIT_TO_MINECRAFT;
Method method = null;
-@@ -158,9 +158,9 @@ public class RegistryConversionTest extends AbstractTestingBase {
+@@ -159,9 +159,9 @@ public class RegistryConversionTest {
""", minecraftClazz.getName(), methodName, clazz.getSimpleName());
}
@@ -1104,7 +1112,7 @@ index e48536683889cdea197746c55b0e67e7e4b9dc68..3216a3549011659a91cc4a0c656a56cd
this.checkValidMinecraftToBukkit(clazz);
try {
-@@ -179,7 +179,7 @@ public class RegistryConversionTest extends AbstractTestingBase {
+@@ -180,7 +180,7 @@ public class RegistryConversionTest {
@Order(3)
@RegistriesTest
@@ -1113,7 +1121,7 @@ index e48536683889cdea197746c55b0e67e7e4b9dc68..3216a3549011659a91cc4a0c656a56cd
this.checkValidBukkitToMinecraft(clazz);
try {
-@@ -198,14 +198,14 @@ public class RegistryConversionTest extends AbstractTestingBase {
+@@ -199,14 +199,14 @@ public class RegistryConversionTest {
@Order(3)
@RegistriesTest
@@ -1130,7 +1138,7 @@ index e48536683889cdea197746c55b0e67e7e4b9dc68..3216a3549011659a91cc4a0c656a56cd
Keyed bukkit = (Keyed) arguments[0];
Object minecraft = arguments[1];
-@@ -229,14 +229,14 @@ public class RegistryConversionTest extends AbstractTestingBase {
+@@ -230,14 +230,14 @@ public class RegistryConversionTest {
@Order(3)
@RegistriesTest
@@ -1147,7 +1155,7 @@ index e48536683889cdea197746c55b0e67e7e4b9dc68..3216a3549011659a91cc4a0c656a56cd
Keyed bukkit = (Keyed) arguments[0];
Object minecraft = arguments[1];
-@@ -264,7 +264,7 @@ public class RegistryConversionTest extends AbstractTestingBase {
+@@ -265,7 +265,7 @@ public class RegistryConversionTest {
*/
@Order(3)
@RegistriesTest
@@ -1156,22 +1164,85 @@ index e48536683889cdea197746c55b0e67e7e4b9dc68..3216a3549011659a91cc4a0c656a56cd
Class<? extends Keyed> craftClazz, Class<?> minecraftClazz) throws IllegalAccessException {
this.checkValidMinecraftToBukkit(clazz);
-diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
-index bfbd80b60ac5df500d03c80de57e38aa7548dd46..cce9e2226ef554c10e1df1dbaa1791656d5d0799 100644
---- a/src/test/java/org/bukkit/support/DummyServer.java
-+++ b/src/test/java/org/bukkit/support/DummyServer.java
-@@ -54,10 +54,7 @@ public final class DummyServer {
- when(instance.getLootTable(any())).then(mock -> new CraftLootTable(mock.getArgument(0),
- AbstractTestingBase.DATA_PACK.fullRegistries().getLootTable(ResourceKey.create(Registries.LOOT_TABLE, CraftNamespacedKey.toMinecraft(mock.getArgument(0))))));
+diff --git a/src/test/java/org/bukkit/support/extension/AllFeaturesExtension.java b/src/test/java/org/bukkit/support/extension/AllFeaturesExtension.java
+index e9eb521419bbacb03d7000ace355f2a9f5a6a9c5..8fef8421e3cf87913746a314a477634bd3e99300 100644
+--- a/src/test/java/org/bukkit/support/extension/AllFeaturesExtension.java
++++ b/src/test/java/org/bukkit/support/extension/AllFeaturesExtension.java
+@@ -39,22 +39,7 @@ public class AllFeaturesExtension extends BaseExtension {
+
+ Bukkit.setServer(server);
+
+- when(server.getRegistry(any()))
+- .then(invocation -> {
+- Class<? extends Keyed> keyed = invocation.getArgument(0);
+- if (spyRegistries.containsKey(keyed)) {
+- return spyRegistries.get(keyed);
+- }
+-
+- Registry<?> registry = CraftRegistry.createRegistry(keyed, RegistryHelper.getRegistry());
+- realRegistries.put(keyed, registry);
+-
+- Registry<?> spy = mock(registry.getClass(), withSettings().stubOnly().spiedInstance(registry).defaultAnswer(CALLS_REAL_METHODS));
+-
+- spyRegistries.put(keyed, spy);
+-
+- return spy;
+- });
++ // Paper - Add RegistryAccess for managing registries - replaced with registry access
-- when(instance.getRegistry(any())).then((Answer<Registry<?>>) mock -> {
-- Class<? extends Keyed> aClass = mock.getArgument(0);
-- return registers.computeIfAbsent(aClass, key -> CraftRegistry.createRegistry(aClass, AbstractTestingBase.REGISTRY_CUSTOM));
-- });
-+ // Paper - RegistryAccess
+ CraftRegistry.setMinecraftRegistry(RegistryHelper.getRegistry());
+ }
+diff --git a/src/test/java/org/bukkit/support/extension/LegacyExtension.java b/src/test/java/org/bukkit/support/extension/LegacyExtension.java
+index 94cf52cf7603e6814682c92b26fcf03a8b927838..c9c3227c3b7fa36ed80f2dc828885a0128e1e3d0 100644
+--- a/src/test/java/org/bukkit/support/extension/LegacyExtension.java
++++ b/src/test/java/org/bukkit/support/extension/LegacyExtension.java
+@@ -30,11 +30,7 @@ public class LegacyExtension extends BaseExtension {
- when(instance.getTag(any(), any(), any())).then(mock -> {
- String registry = mock.getArgument(0);
+ Bukkit.setServer(server);
+
+- when(server.getRegistry(any()))
+- .then(invocation -> {
+- Class<? extends Keyed> keyed = invocation.getArgument(0);
+- return registries.computeIfAbsent(keyed, k -> CraftRegistry.createRegistry(keyed, RegistryHelper.getRegistry()));
+- });
++ // Paper - Add RegistryAccess for managing registries - replaced with registry access
+
+ CraftRegistry.setMinecraftRegistry(RegistryHelper.getRegistry());
+ }
+diff --git a/src/test/java/org/bukkit/support/extension/SlowExtension.java b/src/test/java/org/bukkit/support/extension/SlowExtension.java
+index e0ce6836d4365c36303f6c675a75ef6a9b047b92..87364f223fbd6185b041138550fcb6e3ed07d1ae 100644
+--- a/src/test/java/org/bukkit/support/extension/SlowExtension.java
++++ b/src/test/java/org/bukkit/support/extension/SlowExtension.java
+@@ -30,11 +30,7 @@ public class SlowExtension extends BaseExtension {
+
+ Bukkit.setServer(server);
+
+- when(server.getRegistry(any()))
+- .then(invocation -> {
+- Class<? extends Keyed> keyed = invocation.getArgument(0);
+- return registries.computeIfAbsent(keyed, k -> CraftRegistry.createRegistry(keyed, RegistryHelper.getRegistry()));
+- });
++ // Paper - Add RegistryAccess for managing registries - replaced with registry access
+
+ CraftRegistry.setMinecraftRegistry(RegistryHelper.getRegistry());
+ }
+diff --git a/src/test/java/org/bukkit/support/extension/VanillaFeatureExtension.java b/src/test/java/org/bukkit/support/extension/VanillaFeatureExtension.java
+index bbd5dd5b27937ddc3d8c57f2b604331495b0f311..626c3033e36897846fe84a77d05e2e91a15598e5 100644
+--- a/src/test/java/org/bukkit/support/extension/VanillaFeatureExtension.java
++++ b/src/test/java/org/bukkit/support/extension/VanillaFeatureExtension.java
+@@ -30,11 +30,7 @@ public class VanillaFeatureExtension extends BaseExtension {
+
+ Bukkit.setServer(server);
+
+- when(server.getRegistry(any()))
+- .then(invocation -> {
+- Class<? extends Keyed> keyed = invocation.getArgument(0);
+- return registries.computeIfAbsent(keyed, k -> CraftRegistry.createRegistry(keyed, RegistryHelper.getRegistry()));
+- });
++ // Paper - Add RegistryAccess for managing registries - replaced with registry access
+
+ CraftRegistry.setMinecraftRegistry(RegistryHelper.getRegistry());
+ }
diff --git a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java
index 185f219b23ac57e15f8d0167b0077b7103a2f3f9..f4ba15a1b4b43822bd81b513af56c6667237c327 100644
--- a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java
diff --git a/patches/server/0489-living-entity-allow-attribute-registration.patch b/patches/server/0489-living-entity-allow-attribute-registration.patch
index 365f0f8320..77576f8436 100644
--- a/patches/server/0489-living-entity-allow-attribute-registration.patch
+++ b/patches/server/0489-living-entity-allow-attribute-registration.patch
@@ -38,10 +38,10 @@ index 5678d2007d5adf45dec0638c5dd848b601801814..0a7ed5a4f1644a70d8f98ad7a6962b81
+ // Paper end - living entity allow attribute registration
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 0e0c65534a782ce8d73d38efd5e2c847f685fb89..6a4e5a08acbadf05f93bd663148a8d2400325da3 100644
+index 10f3defa8f4b57fb45cf7de06d415b72102e47d5..e56a0d8928e3c0e27b1acd171162e4a53b70d925 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -762,6 +762,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -768,6 +768,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().craftAttributes.getAttribute(attribute);
}
diff --git a/patches/server/0500-Expand-world-key-API.patch b/patches/server/0500-Expand-world-key-API.patch
index f2077e285b..d2ccfa3efb 100644
--- a/patches/server/0500-Expand-world-key-API.patch
+++ b/patches/server/0500-Expand-world-key-API.patch
@@ -20,10 +20,10 @@ index 1963e826548c5a8859c50f57654784c3aef50e44..04a39cb6c13c26e2cb1d73a9da98df5d
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index e4fab101b2d10759b9bd65d35715e377236a5989..99ff052c1935b9eba5fc519ae18c335893595337 100644
+index f402ef662779e096ee354b9edd66cca785b85f33..a9c6f53c7e828a4b7d0cefbaa98e50ff1db9354a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1181,9 +1181,15 @@ public final class CraftServer implements Server {
+@@ -1183,9 +1183,15 @@ public final class CraftServer implements Server {
File folder = new File(this.getWorldContainer(), name);
World world = this.getWorld(name);
@@ -41,7 +41,7 @@ index e4fab101b2d10759b9bd65d35715e377236a5989..99ff052c1935b9eba5fc519ae18c3358
if (folder.exists()) {
Preconditions.checkArgument(folder.isDirectory(), "File (%s) exists and isn't a folder", name);
-@@ -1309,7 +1315,7 @@ public final class CraftServer implements Server {
+@@ -1311,7 +1317,7 @@ public final class CraftServer implements Server {
} else if (name.equals(levelName + "_the_end")) {
worldKey = net.minecraft.world.level.Level.END;
} else {
@@ -50,7 +50,7 @@ index e4fab101b2d10759b9bd65d35715e377236a5989..99ff052c1935b9eba5fc519ae18c3358
}
// If set to not keep spawn in memory (changed from default) then adjust rule accordingly
-@@ -1405,6 +1411,15 @@ public final class CraftServer implements Server {
+@@ -1407,6 +1413,15 @@ public final class CraftServer implements Server {
return null;
}
@@ -67,10 +67,10 @@ index e4fab101b2d10759b9bd65d35715e377236a5989..99ff052c1935b9eba5fc519ae18c3358
// 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 481aeb922952578ea68ce2425c84e1a93eff0cf9..b075d4b21b53a3f39094444e4024556b23e399f2 100644
+index 66249c5caefb0879e13c02d5553b09b4122418b9..79915a93b36ddf2925444369a5df4e8f4fd5610e 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -516,6 +516,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -522,6 +522,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public int nextEntityId() {
return net.minecraft.world.entity.Entity.nextEntityId();
}
diff --git a/patches/server/0505-Expose-protocol-version.patch b/patches/server/0505-Expose-protocol-version.patch
index 293d2dd336..d47bd22bc7 100644
--- a/patches/server/0505-Expose-protocol-version.patch
+++ b/patches/server/0505-Expose-protocol-version.patch
@@ -5,10 +5,10 @@ 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 b075d4b21b53a3f39094444e4024556b23e399f2..f833fcead688180daf7039e09dce46fde924043c 100644
+index 79915a93b36ddf2925444369a5df4e8f4fd5610e..09fa524fa1155d53d988c15c1af551f73c96ede5 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -521,6 +521,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -527,6 +527,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public String getMainLevelName() {
return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName;
}
diff --git a/patches/server/0529-Add-basic-Datapack-API.patch b/patches/server/0529-Add-basic-Datapack-API.patch
index 9578a2cc2d..f34fd37d42 100644
--- a/patches/server/0529-Add-basic-Datapack-API.patch
+++ b/patches/server/0529-Add-basic-Datapack-API.patch
@@ -176,7 +176,7 @@ index 0000000000000000000000000000000000000000..caa41c525d2b36b5a9f9942380f06c97
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 99ff052c1935b9eba5fc519ae18c335893595337..1b320ab17379da9b82320e63babb0f395d4b85a8 100644
+index a9c6f53c7e828a4b7d0cefbaa98e50ff1db9354a..a142c62a51ddf59e968c3ddb401dc137c4c07ef6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -305,6 +305,7 @@ public final class CraftServer implements Server {
@@ -187,7 +187,7 @@ index 99ff052c1935b9eba5fc519ae18c335893595337..1b320ab17379da9b82320e63babb0f39
public static Exception excessiveVelEx; // Paper - Velocity warnings
static {
-@@ -389,6 +390,7 @@ public final class CraftServer implements Server {
+@@ -390,6 +391,7 @@ public final class CraftServer implements Server {
if (this.configuration.getBoolean("settings.use-map-color-cache")) {
MapPalette.setMapColorCache(new CraftMapColorCache(this.logger));
}
@@ -195,7 +195,7 @@ index 99ff052c1935b9eba5fc519ae18c335893595337..1b320ab17379da9b82320e63babb0f39
}
public boolean getCommandBlockOverride(String command) {
-@@ -3006,5 +3008,11 @@ public final class CraftServer implements Server {
+@@ -3008,5 +3010,11 @@ public final class CraftServer implements Server {
public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() {
return mobGoals;
}
diff --git a/patches/server/0532-ItemStack-repair-check-API.patch b/patches/server/0532-ItemStack-repair-check-API.patch
index ab9ccec1cd..75f490441e 100644
--- a/patches/server/0532-ItemStack-repair-check-API.patch
+++ b/patches/server/0532-ItemStack-repair-check-API.patch
@@ -5,10 +5,10 @@ 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 f833fcead688180daf7039e09dce46fde924043c..07de1316b65e71ab0a372f1a51ae3bc6953d6530 100644
+index 09fa524fa1155d53d988c15c1af551f73c96ede5..78d1b33a554ac8ca0f76585c6b97e35c2d337293 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -526,6 +526,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -532,6 +532,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
public int getProtocolVersion() {
return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
}
@@ -25,7 +25,7 @@ index f833fcead688180daf7039e09dce46fde924043c..07de1316b65e71ab0a372f1a51ae3bc6
@Override
diff --git a/src/test/java/io/papermc/paper/util/ItemStackRepairCheckTest.java b/src/test/java/io/papermc/paper/util/ItemStackRepairCheckTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..9f8abe2376f16aeffe4e9f90a2da04b7e3a55429
+index 0000000000000000000000000000000000000000..04e2568816f1fbe090b40e5a55d8d4effc045740
--- /dev/null
+++ b/src/test/java/io/papermc/paper/util/ItemStackRepairCheckTest.java
@@ -0,0 +1,41 @@
@@ -33,14 +33,14 @@ index 0000000000000000000000000000000000000000..9f8abe2376f16aeffe4e9f90a2da04b7
+
+import org.bukkit.Material;
+import org.bukkit.inventory.ItemStack;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.VanillaFeature;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
-+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
-+public class ItemStackRepairCheckTest extends AbstractTestingBase {
++@VanillaFeature
++public class ItemStackRepairCheckTest {
+
+ @Test
+ public void testIsRepariableBy() {
diff --git a/patches/server/0539-Improve-item-default-attribute-API.patch b/patches/server/0539-Improve-item-default-attribute-API.patch
index 359537fc19..9cb4f56ce3 100644
--- a/patches/server/0539-Improve-item-default-attribute-API.patch
+++ b/patches/server/0539-Improve-item-default-attribute-API.patch
@@ -65,10 +65,10 @@ index 66d773cadb74f9176e6cf68a565568034f52ec63..a1f2b9d40d374e8cdbaf916b25fa74b6
return defaultAttributes.build();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 07de1316b65e71ab0a372f1a51ae3bc6953d6530..c09c494ebe7a0c13b8bce4234a23a92c300153f9 100644
+index 78d1b33a554ac8ca0f76585c6b97e35c2d337293..5e8081350b2ec375373d8197bd1f3196652ec9d9 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -385,7 +385,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -391,7 +391,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
@Override
public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(Material material, EquipmentSlot slot) {
diff --git a/patches/server/0552-Line-Of-Sight-Changes.patch b/patches/server/0552-Line-Of-Sight-Changes.patch
index d2ab96a4d9..1cf3200c81 100644
--- a/patches/server/0552-Line-Of-Sight-Changes.patch
+++ b/patches/server/0552-Line-Of-Sight-Changes.patch
@@ -45,10 +45,10 @@ index 04a39cb6c13c26e2cb1d73a9da98df5d04df69bc..5d137f8c42356359701e1bea7525f82c
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 6a4e5a08acbadf05f93bd663148a8d2400325da3..9032f0d30a781ac142e9a3d3a07cc4d4d51fc92f 100644
+index e56a0d8928e3c0e27b1acd171162e4a53b70d925..637bac756a8f41ed4abd8e3828886c561513e384 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -630,6 +630,23 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -636,6 +636,23 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return this.getHandle().hasLineOfSight(((CraftEntity) other).getHandle());
}
diff --git a/patches/server/0557-Missing-Entity-API.patch b/patches/server/0557-Missing-Entity-API.patch
index 14e5128e24..971be97b63 100644
--- a/patches/server/0557-Missing-Entity-API.patch
+++ b/patches/server/0557-Missing-Entity-API.patch
@@ -828,10 +828,10 @@ index 2cec61a1bb050c1ef81c5fc3d0afafe9ff29d459..97fa4e1e70203194bd939618b2fad926
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 9032f0d30a781ac142e9a3d3a07cc4d4d51fc92f..73719d488d165ec66a0a1f0301a1bd1ba435259a 100644
+index 637bac756a8f41ed4abd8e3828886c561513e384..19fb8acf614da707f49d922e520e4be93237b2cc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -123,6 +123,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -124,6 +124,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
}
@@ -845,7 +845,7 @@ index 9032f0d30a781ac142e9a3d3a07cc4d4d51fc92f..73719d488d165ec66a0a1f0301a1bd1b
@Override
public double getAbsorptionAmount() {
return this.getHandle().getAbsorptionAmount();
-@@ -914,14 +921,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -920,14 +927,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public boolean isInvisible() {
diff --git a/patches/server/0566-Stinger-API.patch b/patches/server/0566-Stinger-API.patch
index 0ace28bb68..d19c93fe47 100644
--- a/patches/server/0566-Stinger-API.patch
+++ b/patches/server/0566-Stinger-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Stinger API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 73719d488d165ec66a0a1f0301a1bd1ba435259a..1f704ba3b67838718913f892d810364ae6a71d54 100644
+index 19fb8acf614da707f49d922e520e4be93237b2cc..efac0d3ed78c621a52f905b5d7f267b4fb180e65 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -361,6 +361,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -362,6 +362,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
// Paper end
}
@@ -20,7 +20,7 @@ index 73719d488d165ec66a0a1f0301a1bd1ba435259a..1f704ba3b67838718913f892d810364a
// Paper start - Add methods for working with arrows stuck in living entities
@Override
-@@ -375,6 +380,34 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -376,6 +381,34 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
// Paper end - Add methods for working with arrows stuck in living entities
diff --git a/patches/server/0574-Add-EntityDamageItemEvent.patch b/patches/server/0574-Add-EntityDamageItemEvent.patch
index 1adcd93580..fc8649b86d 100644
--- a/patches/server/0574-Add-EntityDamageItemEvent.patch
+++ b/patches/server/0574-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 7497471649bec04ab8b43dec06b31edd892a5cfb..ad1cb11245108b5cb187b686ed7e6bc769193b52 100644
+index d1eac70fbfe2d863d3a342ed0e83223c65c36c03..a98d76c90cd855e723e7a8d810eee88a882d8b5c 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -646,14 +646,14 @@ public final class ItemStack implements DataComponentHolder {
@@ -56,9 +56,9 @@ index 7497471649bec04ab8b43dec06b31edd892a5cfb..ad1cb11245108b5cb187b686ed7e6bc7
if (j >= this.getMaxDamage()) {
Item item = this.getItem();
// CraftBukkit start - Check for item breaking
-- if (this.count == 1) {
+- if (this.count == 1 && player != null) {
- org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent(player, this);
-+ if (this.count == 1 && player instanceof final ServerPlayer serverPlayer) { // Paper - Add EntityDamageItemEvent
++ if (this.count == 1 && player != null && player instanceof final ServerPlayer serverPlayer) { // Paper - Add EntityDamageItemEvent
+ org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent(serverPlayer, this); // Paper - Add EntityDamageItemEvent
}
// CraftBukkit end
diff --git a/patches/server/0579-Option-to-prevent-data-components-copy-in-smithing-r.patch b/patches/server/0579-Option-to-prevent-data-components-copy-in-smithing-r.patch
index 7246d24edd..b7f49fa1df 100644
--- a/patches/server/0579-Option-to-prevent-data-components-copy-in-smithing-r.patch
+++ b/patches/server/0579-Option-to-prevent-data-components-copy-in-smithing-r.patch
@@ -82,7 +82,7 @@ index 4ea43872f9da72ed959dd0709f959402d01d5fe0..f6f10da21a752e927409ea16076701c4
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
-index 8c381e2745e7d5b63e72a60c5541b549f0d1b9bf..38690b28b6f67624d68877c1e89ebe30b402b233 100644
+index 09f86aec08ec958b8e3015020e9ae213db27d85c..37b39a2c696a59b0f52324cc222b83c0c9f341e6 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
@@ -12,12 +12,17 @@ public class CraftSmithingTransformRecipe extends SmithingTransformRecipe implem
@@ -108,12 +108,12 @@ index 8c381e2745e7d5b63e72a60c5541b549f0d1b9bf..38690b28b6f67624d68877c1e89ebe30
public void addToCraftingManager() {
ItemStack result = this.getResult();
-- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMS(this.getTemplate(), true), this.toNMS(this.getBase(), true), this.toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result))));
-+ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMS(this.getTemplate(), true), this.toNMS(this.getBase(), true), this.toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy
+- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false), CraftItemStack.asNMSCopy(result))));
++ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false), CraftItemStack.asNMSCopy(result), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
-index 87f20a4811d082f217638768417c1c0feb84f741..5d7782b168138383c606a2c52fbdebe1732364ac 100644
+index 8245b728d341a64f25357edbd2c3c447b6c0a0cf..389fa313f811279091cace76faaabf8bdb0fc94c 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
@@ -12,17 +12,22 @@ public class CraftSmithingTrimRecipe extends SmithingTrimRecipe implements Craft
@@ -137,7 +137,7 @@ index 87f20a4811d082f217638768417c1c0feb84f741..5d7782b168138383c606a2c52fbdebe1
@Override
public void addToCraftingManager() {
-- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMS(this.getTemplate(), true), this.toNMS(this.getBase(), true), this.toNMS(this.getAddition(), true))));
-+ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMS(this.getTemplate(), true), this.toNMS(this.getBase(), true), this.toNMS(this.getAddition(), true), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy
+- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false))));
++ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy
}
}
diff --git a/patches/server/0581-Add-missing-team-sidebar-display-slots.patch b/patches/server/0581-Add-missing-team-sidebar-display-slots.patch
index 3b0dfacf08..b248d7c522 100644
--- a/patches/server/0581-Add-missing-team-sidebar-display-slots.patch
+++ b/patches/server/0581-Add-missing-team-sidebar-display-slots.patch
@@ -82,18 +82,20 @@ index 73c5ffff70605b32188a9bb5fb6c0ee04cb66efe..711d227f5ee6d63356a94a0567968da4
diff --git a/src/test/java/io/papermc/paper/scoreboard/DisplaySlotTest.java b/src/test/java/io/papermc/paper/scoreboard/DisplaySlotTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..69c9678f8218c240be1044eeabe1c6bef7747b1e
+index 0000000000000000000000000000000000000000..345c96bfb6c559b41c2b6682067198a74d35b440
--- /dev/null
+++ b/src/test/java/io/papermc/paper/scoreboard/DisplaySlotTest.java
-@@ -0,0 +1,24 @@
+@@ -0,0 +1,26 @@
+package io.papermc.paper.scoreboard;
+
+import org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations;
+import org.bukkit.scoreboard.DisplaySlot;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
++@Normal
+public class DisplaySlotTest {
+
+ @Test
diff --git a/patches/server/0584-Get-entity-default-attributes.patch b/patches/server/0584-Get-entity-default-attributes.patch
index 0364d2381c..fb93fa5806 100644
--- a/patches/server/0584-Get-entity-default-attributes.patch
+++ b/patches/server/0584-Get-entity-default-attributes.patch
@@ -81,10 +81,10 @@ 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 c09c494ebe7a0c13b8bce4234a23a92c300153f9..95a6f26f75efda7db41db9091107502e8d4e0453 100644
+index 5e8081350b2ec375373d8197bd1f3196652ec9d9..70c06eb6e743232d0e8243b12a927084c6c9414b 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -538,6 +538,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -544,6 +544,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
return CraftMagicNumbers.getItem(itemToBeRepaired.getType()).isValidRepairItem(CraftItemStack.asNMSCopy(itemToBeRepaired), CraftItemStack.asNMSCopy(repairMaterial));
}
@@ -105,10 +105,10 @@ index c09c494ebe7a0c13b8bce4234a23a92c300153f9..95a6f26f75efda7db41db9091107502e
@Override
diff --git a/src/test/java/io/papermc/paper/attribute/EntityTypeAttributesTest.java b/src/test/java/io/papermc/paper/attribute/EntityTypeAttributesTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..e8cdfa385230d3de202122e4df5e07f61f80ce75
+index 0000000000000000000000000000000000000000..f512d416df883036965ff6c802fd242a4c9c8079
--- /dev/null
+++ b/src/test/java/io/papermc/paper/attribute/EntityTypeAttributesTest.java
-@@ -0,0 +1,39 @@
+@@ -0,0 +1,40 @@
+package io.papermc.paper.attribute;
+
+import org.bukkit.attribute.Attributable;
@@ -116,7 +116,7 @@ index 0000000000000000000000000000000000000000..e8cdfa385230d3de202122e4df5e07f6
+import org.bukkit.attribute.AttributeInstance;
+import org.bukkit.attribute.AttributeModifier;
+import org.bukkit.entity.EntityType;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.AllFeatures;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -124,12 +124,13 @@ index 0000000000000000000000000000000000000000..e8cdfa385230d3de202122e4df5e07f6
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
-+public class EntityTypeAttributesTest extends AbstractTestingBase {
++@AllFeatures
++public class EntityTypeAttributesTest {
+
+ @Test
+ public void testIllegalEntity() {
+ assertFalse(EntityType.EGG.hasDefaultAttributes());
-+ assertThrows(IllegalArgumentException.class, () -> EntityType.EGG.getDefaultAttributes());
++ assertThrows(IllegalArgumentException.class, EntityType.EGG::getDefaultAttributes);
+ }
+
+ @Test
diff --git a/patches/server/0586-Add-more-advancement-API.patch b/patches/server/0586-Add-more-advancement-API.patch
index ed610abf5d..1d8e873a36 100644
--- a/patches/server/0586-Add-more-advancement-API.patch
+++ b/patches/server/0586-Add-more-advancement-API.patch
@@ -164,10 +164,10 @@ index 8ca86852319d7463f60832bc98b825b0b4325995..62ada73302c6b3ce3fb2dcc8c31a1d9c
private final DisplayInfo handle;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index 0cb2b616e0fa060b7aae6c47502f75ee7647e917..17d6a4cdd16d34f83e0752c3bdaee08288425a07 100644
+index 760f56d36f0e4a74b58628408a286a499d6664ec..34e41ea24e1673109f14153a1a0c8e794fed20bb 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -435,6 +435,11 @@ public class Commodore {
+@@ -453,6 +453,11 @@ public class Commodore {
super.visitMethodInsn(opcode, owner, name, "()Lcom/destroystokyo/paper/profile/PlayerProfile;", itf);
return;
}
@@ -181,20 +181,22 @@ index 0cb2b616e0fa060b7aae6c47502f75ee7647e917..17d6a4cdd16d34f83e0752c3bdaee082
if (modern) {
diff --git a/src/test/java/io/papermc/paper/advancement/AdvancementFrameTest.java b/src/test/java/io/papermc/paper/advancement/AdvancementFrameTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..47535c27d7cffc4b5ee6cc9e145b1087477eef79
+index 0000000000000000000000000000000000000000..6fe9c10ffd1dd5244ead05642609794623054cce
--- /dev/null
+++ b/src/test/java/io/papermc/paper/advancement/AdvancementFrameTest.java
-@@ -0,0 +1,24 @@
+@@ -0,0 +1,26 @@
+package io.papermc.paper.advancement;
+
+import io.papermc.paper.adventure.PaperAdventure;
+import net.kyori.adventure.text.format.TextColor;
+import net.minecraft.advancements.AdvancementType;
+import net.minecraft.network.chat.contents.TranslatableContents;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
++@Normal
+public class AdvancementFrameTest {
+
+ @Test
diff --git a/patches/server/0587-Add-ItemFactory-getSpawnEgg-API.patch b/patches/server/0587-Add-ItemFactory-getSpawnEgg-API.patch
index c4fffcd5cc..04c5e3b925 100644
--- a/patches/server/0587-Add-ItemFactory-getSpawnEgg-API.patch
+++ b/patches/server/0587-Add-ItemFactory-getSpawnEgg-API.patch
@@ -37,10 +37,10 @@ index eabb8b42b890224dd19b879ff276e9908674310d..803a19063c03627dbea79cb1c395ae35
+ // Paper end - old getSpawnEgg API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index 17d6a4cdd16d34f83e0752c3bdaee08288425a07..157fbe09ab22f3218d9d3f72e8c0a5a3d727eaeb 100644
+index 34e41ea24e1673109f14153a1a0c8e794fed20bb..63d4ffe93a445abf3c766d4f1f8fbf4a412a2a03 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -442,6 +442,15 @@ public class Commodore {
+@@ -460,6 +460,15 @@ public class Commodore {
}
// Paper end
diff --git a/patches/server/0593-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0593-Add-Raw-Byte-Entity-Serialization.patch
index 3ad09b5cc5..0613f5b2e2 100644
--- a/patches/server/0593-Add-Raw-Byte-Entity-Serialization.patch
+++ b/patches/server/0593-Add-Raw-Byte-Entity-Serialization.patch
@@ -7,7 +7,7 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 836356ecb3c91fd7886ac9ae83f1cc835469e198..f21bf6c8bbf30c59f1588c2105dbd7f80c07a0f1 100644
+index 65b1833125ce4b1190bf276a69ad4c0c88875d58..4c36bb6f61a75f20df911cd0a8a6ddc84800edd0 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2144,6 +2144,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
@@ -50,10 +50,10 @@ index 7c04eb9e7eb5ff728465b46e3739eb2598ef1204..6fab713531665298d3b03e7960a17ecb
@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 95a6f26f75efda7db41db9091107502e8d4e0453..0e849b49329054005c20a5773de2ff15bf3f6e5d 100644
+index 70c06eb6e743232d0e8243b12a927084c6c9414b..c10273445c4b5ef089f86fc08a944da69d708244 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -488,7 +488,33 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -494,7 +494,33 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.parse(MinecraftServer.getServer().registryAccess(), compound).orElseThrow());
}
diff --git a/patches/server/0597-Improve-and-expand-AsyncCatcher.patch b/patches/server/0597-Improve-and-expand-AsyncCatcher.patch
index 302d89f6e7..c36c1b44ca 100644
--- a/patches/server/0597-Improve-and-expand-AsyncCatcher.patch
+++ b/patches/server/0597-Improve-and-expand-AsyncCatcher.patch
@@ -166,7 +166,7 @@ index 1cfc906317f07a44f06a4adf021c44e34a2f1d07..6baa313b8201ed23193d7885c85606b0
PersistentEntitySectionManager.LOGGER.warn("Entity {} wasn't found in section {} (destroying due to {})", new Object[]{this.entity, SectionPos.of(this.currentSectionKey), reason});
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index e165199e30c96e0402c581d389eaae4c0869385f..654935df9dcc80de31caeccdfbeb11010f9dde4b 100644
+index 16e715c48acc882a9b355d885e181f1dd916fa76..bf4be21f24af1e569267be6413dbee533c153fc5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1760,6 +1760,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -202,10 +202,10 @@ index e165199e30c96e0402c581d389eaae4c0869385f..654935df9dcc80de31caeccdfbeb1101
ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(Holder.direct(SoundEvent.createVariableRangeEvent(ResourceLocation.parse(sound))), net.minecraft.sounds.SoundSource.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 1f704ba3b67838718913f892d810364ae6a71d54..097f03c83a90f476b74834407d2dcd0e98fe010a 100644
+index efac0d3ed78c621a52f905b5d7f267b4fb180e65..0ed2910e64b6efdb4180c5bc23a146aced87c3d9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -524,6 +524,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -525,6 +525,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@Override
public boolean addPotionEffect(PotionEffect effect, boolean force) {
diff --git a/patches/server/0598-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0598-Add-paper-mobcaps-and-paper-playermobcaps.patch
index 63ba16c1f3..d2bd8ad4d6 100644
--- a/patches/server/0598-Add-paper-mobcaps-and-paper-playermobcaps.patch
+++ b/patches/server/0598-Add-paper-mobcaps-and-paper-playermobcaps.patch
@@ -278,10 +278,10 @@ index 58ea6a1f95a09c22125a8262b1b221004ebce0e4..ea6533c1ac218aa075da3401807a06fc
BlockPos blockposition = NaturalSpawner.getRandomPosWithin(world, chunk);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index e09b0a624a80216db5b6f7882c3765f2eb967b06..b8117fac959a894c9821c82f624bc463174d3568 100644
+index 36a1b2704debdb8a2f247180d263a1a95bcba24b..b638ccf0e46eeb375a59a42d6f29edd3f084fa17 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2329,6 +2329,11 @@ public final class CraftServer implements Server {
+@@ -2331,6 +2331,11 @@ public final class CraftServer implements Server {
@Override
public int getSpawnLimit(SpawnCategory spawnCategory) {
@@ -294,7 +294,7 @@ index e09b0a624a80216db5b6f7882c3765f2eb967b06..b8117fac959a894c9821c82f624bc463
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 654935df9dcc80de31caeccdfbeb11010f9dde4b..d00ceebe07a837cd4b40a76379d1a8eec66e2272 100644
+index bf4be21f24af1e569267be6413dbee533c153fc5..838ffddba99964748dfe95d68ca93b578bc3292b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1718,9 +1718,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -315,18 +315,20 @@ index 654935df9dcc80de31caeccdfbeb11010f9dde4b..d00ceebe07a837cd4b40a76379d1a8ee
}
diff --git a/src/test/java/io/papermc/paper/command/subcommands/MobcapsCommandTest.java b/src/test/java/io/papermc/paper/command/subcommands/MobcapsCommandTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..fd238eacee24ebf0d0ce82b96107e093ca4866b0
+index 0000000000000000000000000000000000000000..6fdc77caa74845786c78a6ba087062b4d698cb82
--- /dev/null
+++ b/src/test/java/io/papermc/paper/command/subcommands/MobcapsCommandTest.java
-@@ -0,0 +1,20 @@
+@@ -0,0 +1,22 @@
+package io.papermc.paper.command.subcommands;
+
+import java.util.HashSet;
+import java.util.Set;
+import net.minecraft.world.entity.MobCategory;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
++@Normal
+public class MobcapsCommandTest {
+ @Test
+ public void testMobCategoryColors() {
diff --git a/patches/server/0613-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch b/patches/server/0613-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch
index 0b139a1e02..c313451894 100644
--- a/patches/server/0613-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch
+++ b/patches/server/0613-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch
@@ -25,10 +25,10 @@ index 8169d08c1bccf7c9896bb083eba388f918fac6c9..a514fe98d3d2b65d2cfd029079c69189
@Override
diff --git a/src/test/java/io/papermc/paper/inventory/CraftMetaTropicalFishBucketTest.java b/src/test/java/io/papermc/paper/inventory/CraftMetaTropicalFishBucketTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..a71e1d488a74dcac70b1dca889181527395be9b5
+index 0000000000000000000000000000000000000000..68a557cedbffb41f27ba21096e2ae5eebbf13f5c
--- /dev/null
+++ b/src/test/java/io/papermc/paper/inventory/CraftMetaTropicalFishBucketTest.java
-@@ -0,0 +1,40 @@
+@@ -0,0 +1,41 @@
+package io.papermc.paper.inventory;
+
+import org.bukkit.DyeColor;
@@ -36,11 +36,12 @@ index 0000000000000000000000000000000000000000..a71e1d488a74dcac70b1dca889181527
+import org.bukkit.entity.TropicalFish;
+import org.bukkit.inventory.ItemStack;
+import org.bukkit.inventory.meta.TropicalFishBucketMeta;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.AllFeatures;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
-+public class CraftMetaTropicalFishBucketTest extends AbstractTestingBase {
++@AllFeatures
++public class CraftMetaTropicalFishBucketTest {
+
+ @Test
+ public void testAllCombinations() {
diff --git a/patches/server/0623-Fix-upstreams-block-state-factories.patch b/patches/server/0623-Fix-upstreams-block-state-factories.patch
index 737645669d..0607b09768 100644
--- a/patches/server/0623-Fix-upstreams-block-state-factories.patch
+++ b/patches/server/0623-Fix-upstreams-block-state-factories.patch
@@ -26,7 +26,7 @@ index 48bee70ba4188a4a55beb6584224b0f23784dd88..cbb777f499a4e8a447153c04d09c0c71
if (state instanceof InventoryHolder) return (InventoryHolder) state;
return null;
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
-index 302955eed07d3af91f90875583c70a236bbe11b2..f9eb60d5a70da9a4d485288ab03d80829cf171a9 100644
+index 80bd6e8a6dadb74356a9fa9aa394efbd31c49c37..fe7e3e0628783d8d1be9635b689da8a9cb46c5d7 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -20,7 +20,7 @@ import org.bukkit.persistence.PersistentDataContainer;
@@ -38,7 +38,7 @@ index 302955eed07d3af91f90875583c70a236bbe11b2..f9eb60d5a70da9a4d485288ab03d8082
private final T tileEntity;
private final T snapshot;
-@@ -188,14 +188,10 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
+@@ -196,14 +196,10 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
}
@Override
@@ -458,7 +458,7 @@ index 83ac5fc6cbbd249b5865ab203b150f53f01c9f05..b7ff7af2513204b151340538d50a65c8
}
}
diff --git a/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java b/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java
-index 81d4c8867ebcba1b805be1828e0a6a476963a855..9ff1a8068533ba5fc2fb43188d9a5c544a907618 100644
+index c032daa6957df2ad8b621379e415ad925f5cc162..a9810c88e05ebc1af60c051faa45e50ee183924f 100644
--- a/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java
@@ -7,6 +7,7 @@ import net.minecraft.core.registries.BuiltInRegistries;
@@ -467,9 +467,9 @@ index 81d4c8867ebcba1b805be1828e0a6a476963a855..9ff1a8068533ba5fc2fb43188d9a5c54
import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.block.entity.BlockEntityType;
import org.bukkit.Material;
- import org.bukkit.support.AbstractTestingBase;
+ import org.bukkit.support.environment.AllFeatures;
import org.junit.jupiter.api.Test;
-@@ -41,4 +42,13 @@ public class BlockStateTest extends AbstractTestingBase {
+@@ -42,4 +43,13 @@ public class BlockStateTest {
}
}
}
diff --git a/patches/server/0646-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0646-Expose-vanilla-BiomeProvider-from-WorldInfo.patch
index 4fa91f877c..0801289d71 100644
--- a/patches/server/0646-Expose-vanilla-BiomeProvider-from-WorldInfo.patch
+++ b/patches/server/0646-Expose-vanilla-BiomeProvider-from-WorldInfo.patch
@@ -18,7 +18,7 @@ index 56589fee8dd09783e01f2ae290ffacb5dff3f05f..718b653a118a1c64d07efab93192f10d
biomeProvider = gen.getDefaultBiomeProvider(worldInfo);
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 3c947dc0aea06d66a00aeca51355ea41e8d98f88..60a77bd04489ee592ec61d3d739cb3062c1eefbb 100644
+index a473993ea48afd05a884e3ffcbdd15abe74580d2..a87a0c9672b53db0e06292c339b3b1e163901942 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -369,7 +369,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -31,10 +31,10 @@ index 3c947dc0aea06d66a00aeca51355ea41e8d98f88..60a77bd04489ee592ec61d3d739cb306
chunkgenerator = new NoiseBasedChunkGenerator(worldChunkManager, cga.settings);
} else if (chunkgenerator instanceof FlatLevelSource cpf) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index b8117fac959a894c9821c82f624bc463174d3568..8364316aac2c13c99244912122c333feeeb5dd06 100644
+index b638ccf0e46eeb375a59a42d6f29edd3f084fa17..bb232cd338f94b03f2add34766927ecae019e388 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1306,7 +1306,7 @@ public final class CraftServer implements Server {
+@@ -1308,7 +1308,7 @@ public final class CraftServer implements Server {
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata));
LevelStem worlddimension = iregistry.get(actualDimension);
@@ -44,7 +44,7 @@ index b8117fac959a894c9821c82f624bc463174d3568..8364316aac2c13c99244912122c333fe
biomeProvider = generator.getDefaultBiomeProvider(worldInfo);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 0c2734c1d06b6c5dff383f9c6139c0389f220a76..110a5d92d6154bc39c1916006a5cb74798092445 100644
+index 838ffddba99964748dfe95d68ca93b578bc3292b..bb837f7fa46a7f5926a67ce3f725a328b9bff415 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -212,6 +212,39 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/server/0656-More-PotionEffectType-API.patch b/patches/server/0656-More-PotionEffectType-API.patch
index 1bbb96d291..2773c98338 100644
--- a/patches/server/0656-More-PotionEffectType-API.patch
+++ b/patches/server/0656-More-PotionEffectType-API.patch
@@ -62,21 +62,23 @@ index 21d4224c8993f521d6004d708ecbf71fa6d09306..6cf790c9fa23ea313423fdaeb7c181bf
if (this == other) {
diff --git a/src/test/java/io/papermc/paper/effects/EffectCategoryTest.java b/src/test/java/io/papermc/paper/effects/EffectCategoryTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..6262598f85bd7d9af5546cc0a96531b2f4baf64d
+index 0000000000000000000000000000000000000000..a57e8fdc35efc7e0353d4f36c91578390ee4572e
--- /dev/null
+++ b/src/test/java/io/papermc/paper/effects/EffectCategoryTest.java
-@@ -0,0 +1,28 @@
+@@ -0,0 +1,30 @@
+package io.papermc.paper.effects;
+
+import io.papermc.paper.adventure.PaperAdventure;
+import net.minecraft.world.effect.MobEffectCategory;
+import org.bukkit.craftbukkit.potion.CraftPotionEffectType;
+import org.bukkit.potion.PotionEffectType;
++import org.bukkit.support.environment.AllFeatures;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
++@AllFeatures
+public class EffectCategoryTest {
+
+ @Test
diff --git a/patches/server/0658-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0658-API-for-creating-command-sender-which-forwards-feedb.patch
index d6e2e12cf1..477c1e1ddb 100644
--- a/patches/server/0658-API-for-creating-command-sender-which-forwards-feedb.patch
+++ b/patches/server/0658-API-for-creating-command-sender-which-forwards-feedb.patch
@@ -122,10 +122,10 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 8364316aac2c13c99244912122c333feeeb5dd06..d06e1f67e675034fb5d2ed71f409848155521ada 100644
+index bb232cd338f94b03f2add34766927ecae019e388..c0eca359919c55ba7b33520277c124eb54d935d7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2160,6 +2160,13 @@ public final class CraftServer implements Server {
+@@ -2162,6 +2162,13 @@ public final class CraftServer implements Server {
return this.console.console;
}
diff --git a/patches/server/0659-Add-missing-structure-set-seed-configs.patch b/patches/server/0659-Add-missing-structure-set-seed-configs.patch
index 12c137b53e..94091f5e9d 100644
--- a/patches/server/0659-Add-missing-structure-set-seed-configs.patch
+++ b/patches/server/0659-Add-missing-structure-set-seed-configs.patch
@@ -316,10 +316,10 @@ index e76f96a5c48d1eda2f9bbb3e11dd79f23f9ab75c..2b263246135c85aa225120519e9702a6
}
diff --git a/src/test/java/io/papermc/paper/world/structure/StructureSeedConfigTest.java b/src/test/java/io/papermc/paper/world/structure/StructureSeedConfigTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..9061ad5868ac18e76ae4d51d23d101c5e25f7f52
+index 0000000000000000000000000000000000000000..c77345f7e0c9bf179b8b35a8b300085f31fd45af
--- /dev/null
+++ b/src/test/java/io/papermc/paper/world/structure/StructureSeedConfigTest.java
-@@ -0,0 +1,75 @@
+@@ -0,0 +1,77 @@
+package io.papermc.paper.world.structure;
+
+import io.papermc.paper.configuration.PaperConfigurations;
@@ -333,7 +333,8 @@ index 0000000000000000000000000000000000000000..9061ad5868ac18e76ae4d51d23d101c5
+import net.minecraft.world.level.levelgen.structure.StructureSet;
+import net.minecraft.world.level.levelgen.structure.placement.StructurePlacement;
+import org.bukkit.configuration.file.YamlConfiguration;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.RegistryHelper;
++import org.bukkit.support.environment.AllFeatures;
+import org.jetbrains.annotations.NotNull;
+import org.junit.jupiter.api.Test;
+import org.spigotmc.SpigotConfig;
@@ -341,7 +342,8 @@ index 0000000000000000000000000000000000000000..9061ad5868ac18e76ae4d51d23d101c5
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
-+public class StructureSeedConfigTest extends AbstractTestingBase {
++@AllFeatures
++public class StructureSeedConfigTest {
+
+ @Test
+ public void checkStructureSeedDefaults() throws ReflectiveOperationException {
@@ -354,7 +356,7 @@ index 0000000000000000000000000000000000000000..9061ad5868ac18e76ae4d51d23d101c5
+ final SpigotWorldConfig config = PaperConfigurations.SPIGOT_WORLD_DEFAULTS.get();
+
+
-+ final Registry<StructureSet> structureSets = AbstractTestingBase.REGISTRY_CUSTOM.registryOrThrow(Registries.STRUCTURE_SET);
++ final Registry<StructureSet> structureSets = RegistryHelper.getRegistry().registryOrThrow(Registries.STRUCTURE_SET);
+ for (final ResourceKey<StructureSet> setKey : structureSets.registryKeySet()) {
+ assertEquals(ResourceLocation.DEFAULT_NAMESPACE, setKey.location().getNamespace());
+ final StructureSet set = structureSets.getOrThrow(setKey);
diff --git a/patches/server/0661-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0661-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch
index 23ebb6f9c1..604f6800ee 100644
--- a/patches/server/0661-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch
+++ b/patches/server/0661-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit
Copies appropriate checks from CraftWorld#getSpawnLimit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index d06e1f67e675034fb5d2ed71f409848155521ada..87ef72b05f6bbeac7f0fcdb0bb27b359b277898c 100644
+index c0eca359919c55ba7b33520277c124eb54d935d7..1a2081267e85ef5c1edd4808fbda5bb442a00252 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2337,6 +2337,8 @@ public final class CraftServer implements Server {
+@@ -2339,6 +2339,8 @@ public final class CraftServer implements Server {
@Override
public int getSpawnLimit(SpawnCategory spawnCategory) {
// Paper start - Add mobcaps commands
diff --git a/patches/server/0662-Add-GameEvent-tags.patch b/patches/server/0662-Add-GameEvent-tags.patch
index 46706c99d7..d545e402ae 100644
--- a/patches/server/0662-Add-GameEvent-tags.patch
+++ b/patches/server/0662-Add-GameEvent-tags.patch
@@ -46,10 +46,10 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 87ef72b05f6bbeac7f0fcdb0bb27b359b277898c..9a513feb638c913ee67ff00036efe8d27c3eb5fb 100644
+index 1a2081267e85ef5c1edd4808fbda5bb442a00252..8589b0218659ae5ddbaac5437316bf59265324dd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2686,6 +2686,15 @@ public final class CraftServer implements Server {
+@@ -2688,6 +2688,15 @@ public final class CraftServer implements Server {
return (org.bukkit.Tag<T>) new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey);
}
}
@@ -65,7 +65,7 @@ index 87ef72b05f6bbeac7f0fcdb0bb27b359b277898c..9a513feb638c913ee67ff00036efe8d2
default -> throw new IllegalArgumentException();
}
-@@ -2718,6 +2727,13 @@ public final class CraftServer implements Server {
+@@ -2720,6 +2729,13 @@ public final class CraftServer implements Server {
net.minecraft.core.Registry<EntityType<?>> entityTags = BuiltInRegistries.ENTITY_TYPE;
return entityTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftEntityTag(entityTags, pair.getFirst())).collect(ImmutableList.toImmutableList());
}
diff --git a/patches/server/0668-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0668-Put-world-into-worldlist-before-initing-the-world.patch
index f75024e70e..06960bd554 100644
--- a/patches/server/0668-Put-world-into-worldlist-before-initing-the-world.patch
+++ b/patches/server/0668-Put-world-into-worldlist-before-initing-the-world.patch
@@ -23,10 +23,10 @@ index 413a37991d1df6314dd9938e5eb5f28f5b69efb8..e7d6f4e6ac41b183c702d5195e4f9413
if (worlddata.getCustomBossEvents() != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 9a513feb638c913ee67ff00036efe8d27c3eb5fb..65cb367f0824b4045c436dd66809dd9a3eeccbcd 100644
+index 8589b0218659ae5ddbaac5437316bf59265324dd..74d2f6df5a4cdab8a24ca1769c7b7d98ef87bcfe 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1332,10 +1332,11 @@ public final class CraftServer implements Server {
+@@ -1334,10 +1334,11 @@ public final class CraftServer implements Server {
return null;
}
diff --git a/patches/server/0669-Custom-Potion-Mixes.patch b/patches/server/0669-Custom-Potion-Mixes.patch
index c86c2a255c..22dfe4c65a 100644
--- a/patches/server/0669-Custom-Potion-Mixes.patch
+++ b/patches/server/0669-Custom-Potion-Mixes.patch
@@ -108,7 +108,7 @@ index e7d6f4e6ac41b183c702d5195e4f94136c22b000..94aa901b77b19445a33d5b2b24ba2e94
this.getPlayerList().reloadResources();
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
diff --git a/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java b/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java
-index 993abd8b0b80bfc7a1ce936eaaf3e0804fc9e0a4..eb2cdb36366e376b4e91aea847170b82ca26d274 100644
+index 302e3fba89bc0f2f36448a7be1178710f5ea4d35..68c529cb38d61cd3a0f39bef0f666057fc219c9b 100644
--- a/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/BrewingStandMenu.java
@@ -53,9 +53,11 @@ public class BrewingStandMenu extends AbstractContainerMenu {
@@ -282,7 +282,7 @@ index c8f9972ad1c2330908cc840d426f29c20b242ca8..a2fafef89d5354e2cb02f56728109099
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 65cb367f0824b4045c436dd66809dd9a3eeccbcd..56fe4a91b557db7bd74c031046231a3bc7ba72c8 100644
+index 74d2f6df5a4cdab8a24ca1769c7b7d98ef87bcfe..566ed56de6fcb4dc64e504310b46295466917eee 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -308,6 +308,7 @@ public final class CraftServer implements Server {
@@ -293,7 +293,7 @@ index 65cb367f0824b4045c436dd66809dd9a3eeccbcd..56fe4a91b557db7bd74c031046231a3b
static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
-@@ -391,6 +392,7 @@ public final class CraftServer implements Server {
+@@ -392,6 +393,7 @@ public final class CraftServer implements Server {
if (this.configuration.getBoolean("settings.use-map-color-cache")) {
MapPalette.setMapColorCache(new CraftMapColorCache(this.logger));
}
@@ -301,7 +301,7 @@ index 65cb367f0824b4045c436dd66809dd9a3eeccbcd..56fe4a91b557db7bd74c031046231a3b
datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper
}
-@@ -3046,5 +3048,9 @@ public final class CraftServer implements Server {
+@@ -3048,5 +3050,9 @@ public final class CraftServer implements Server {
return datapackManager;
}
diff --git a/patches/server/0674-More-Projectile-API.patch b/patches/server/0674-More-Projectile-API.patch
index b526158a7f..a6794c62b0 100644
--- a/patches/server/0674-More-Projectile-API.patch
+++ b/patches/server/0674-More-Projectile-API.patch
@@ -518,10 +518,10 @@ index 6e2f91423371ead9890095cf4b1e2299c4dcba28..9d8f4b7176e60180565e3134a14ecf19
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 097f03c83a90f476b74834407d2dcd0e98fe010a..877e3d20edba3fe2ea6b51d0b54ec8893bd112ed 100644
+index 0ed2910e64b6efdb4180c5bc23a146aced87c3d9..6350d4729fa3fbd9b15f1150cb4322f1c685044a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -569,8 +569,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -570,8 +570,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
@Override
@@ -538,7 +538,7 @@ index 097f03c83a90f476b74834407d2dcd0e98fe010a..877e3d20edba3fe2ea6b51d0b54ec889
Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation");
net.minecraft.world.level.Level world = ((CraftWorld) this.getWorld()).getHandle();
-@@ -596,7 +603,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -597,7 +604,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
} else {
launch = new net.minecraft.world.entity.projectile.Arrow(world, this.getHandle(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ARROW), null);
}
@@ -547,28 +547,7 @@ index 097f03c83a90f476b74834407d2dcd0e98fe010a..877e3d20edba3fe2ea6b51d0b54ec889
} else if (ThrownPotion.class.isAssignableFrom(projectile)) {
if (LingeringPotion.class.isAssignableFrom(projectile)) {
launch = new net.minecraft.world.entity.projectile.ThrownPotion(world, this.getHandle());
-@@ -622,10 +629,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
- launch = new net.minecraft.world.entity.projectile.WitherSkull(world, this.getHandle(), vec);
- } else if (DragonFireball.class.isAssignableFrom(projectile)) {
- launch = new net.minecraft.world.entity.projectile.DragonFireball(world, this.getHandle(), vec);
-- } else if (WindCharge.class.isAssignableFrom(projectile)) {
-- launch = EntityType.WIND_CHARGE.create(world);
-- ((net.minecraft.world.entity.projectile.windcharge.WindCharge) launch).setOwner(this.getHandle());
-- ((net.minecraft.world.entity.projectile.windcharge.WindCharge) launch).assignDirectionalMovement(vec, 0.1D);
-+ // Paper start - more projectile API - correctly launch wind charges
-+ } else if (org.bukkit.entity.AbstractWindCharge.class.isAssignableFrom(projectile)) {
-+ if (org.bukkit.entity.BreezeWindCharge.class.isAssignableFrom(projectile)) {
-+ launch = EntityType.BREEZE_WIND_CHARGE.create(world);
-+ } else {
-+ launch = EntityType.WIND_CHARGE.create(world);
-+ }
-+ ((net.minecraft.world.entity.projectile.windcharge.AbstractWindCharge) launch).setOwner(this.getHandle());
-+ ((net.minecraft.world.entity.projectile.windcharge.AbstractWindCharge) launch).shootFromRotation(this.getHandle(), this.getHandle().getXRot(), this.getHandle().getYRot(), 0.0F, 1.5F, 1.0F); // Paper - copied from net.minecraft.world.item.WindChargeItem.use
-+ // Paper end - more projectile API - correctly launch wind charges
- } else {
- launch = new LargeFireball(world, this.getHandle(), vec, 1);
- }
-@@ -650,8 +663,26 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -656,8 +663,26 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
} else if (Firework.class.isAssignableFrom(projectile)) {
Location location = this.getEyeLocation();
@@ -597,7 +576,7 @@ index 097f03c83a90f476b74834407d2dcd0e98fe010a..877e3d20edba3fe2ea6b51d0b54ec889
}
Preconditions.checkArgument(launch != null, "Projectile (%s) not supported", projectile.getName());
-@@ -659,6 +690,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -665,6 +690,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
if (velocity != null) {
((T) launch.getBukkitEntity()).setVelocity(velocity);
}
@@ -865,10 +844,10 @@ index e8a455eb5e17bcfcae3f03664f2b47773fbdf37e..08178a88ba7d0881a6c2843eef24a846
}
diff --git a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
-index 8b57044518fbb0fd507da6ae3ff12b99eff70b37..e3312df146b942568ccee6595ae609c7d6a4f68f 100644
+index 93b9e6b32798e32026492fa3f80de9d4a7b3d9a5..baab2e097777a4295e7b14957304c927640a4a77 100644
--- a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
+++ b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
-@@ -56,90 +56,68 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
+@@ -55,7 +55,15 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
@Override
public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity) {
@@ -880,116 +859,38 @@ index 8b57044518fbb0fd507da6ae3ff12b99eff70b37..e3312df146b942568ccee6595ae609c7
+ public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity, java.util.function.Consumer<? super T> function) {
+ // Paper end - launchProjectile consumer
Preconditions.checkArgument(this.getBlock().getType() == Material.DISPENSER, "Block is no longer dispenser");
-- // Copied from BlockDispenser.dispense()
-- BlockSource sourceblock = new BlockSource((ServerLevel) this.dispenserBlock.getLevel(), this.dispenserBlock.getBlockPos(), this.dispenserBlock.getBlockState(), this.dispenserBlock);
-- // Copied from DispenseBehaviorProjectile
-- Position iposition = DispenserBlock.getDispensePosition(sourceblock);
-- Direction enumdirection = (Direction) sourceblock.state().getValue(DispenserBlock.FACING);
-- net.minecraft.world.level.Level world = this.dispenserBlock.getLevel();
-- net.minecraft.world.entity.Entity launch = null;
-
-+ // Paper start - rewrite whole method to match ProjectileDispenseBehavior
-+ net.minecraft.world.item.Item item = null;
- if (Snowball.class.isAssignableFrom(projectile)) {
-- launch = new net.minecraft.world.entity.projectile.Snowball(world, iposition.x(), iposition.y(), iposition.z());
-+ item = net.minecraft.world.item.Items.SNOWBALL;
- } else if (Egg.class.isAssignableFrom(projectile)) {
-- launch = new ThrownEgg(world, iposition.x(), iposition.y(), iposition.z());
-- } else if (EnderPearl.class.isAssignableFrom(projectile)) {
-- launch = new ThrownEnderpearl(world, null);
-- launch.setPos(iposition.x(), iposition.y(), iposition.z());
-+ item = net.minecraft.world.item.Items.EGG;
- } else if (ThrownExpBottle.class.isAssignableFrom(projectile)) {
-- launch = new ThrownExperienceBottle(world, iposition.x(), iposition.y(), iposition.z());
-+ item = net.minecraft.world.item.Items.EXPERIENCE_BOTTLE;
- } else if (ThrownPotion.class.isAssignableFrom(projectile)) {
- if (LingeringPotion.class.isAssignableFrom(projectile)) {
-- launch = new net.minecraft.world.entity.projectile.ThrownPotion(world, iposition.x(), iposition.y(), iposition.z());
-- ((net.minecraft.world.entity.projectile.ThrownPotion) launch).setItem(CraftItemStack.asNMSCopy(new ItemStack(org.bukkit.Material.LINGERING_POTION, 1)));
-+ item = net.minecraft.world.item.Items.LINGERING_POTION;
- } else {
-- launch = new net.minecraft.world.entity.projectile.ThrownPotion(world, iposition.x(), iposition.y(), iposition.z());
-- ((net.minecraft.world.entity.projectile.ThrownPotion) launch).setItem(CraftItemStack.asNMSCopy(new ItemStack(org.bukkit.Material.SPLASH_POTION, 1)));
-+ item = net.minecraft.world.item.Items.SPLASH_POTION;
- }
- } else if (AbstractArrow.class.isAssignableFrom(projectile)) {
-- if (TippedArrow.class.isAssignableFrom(projectile)) {
-- launch = new net.minecraft.world.entity.projectile.Arrow(world, iposition.x(), iposition.y(), iposition.z(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ARROW), null);
-- ((Arrow) launch.getBukkitEntity()).setBasePotionType(PotionType.WATER);
-- } else if (SpectralArrow.class.isAssignableFrom(projectile)) {
-- launch = new net.minecraft.world.entity.projectile.SpectralArrow(world, iposition.x(), iposition.y(), iposition.z(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.SPECTRAL_ARROW), null);
-+ if (SpectralArrow.class.isAssignableFrom(projectile)) {
-+ item = net.minecraft.world.item.Items.SPECTRAL_ARROW;
- } else {
-- launch = new net.minecraft.world.entity.projectile.Arrow(world, iposition.x(), iposition.y(), iposition.z(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ARROW), null);
-- }
-- ((net.minecraft.world.entity.projectile.AbstractArrow) launch).pickup = net.minecraft.world.entity.projectile.AbstractArrow.Pickup.ALLOWED;
-- ((net.minecraft.world.entity.projectile.AbstractArrow) launch).projectileSource = this;
-- } else if (Fireball.class.isAssignableFrom(projectile)) {
-- double d0 = iposition.x() + (double) ((float) enumdirection.getStepX() * 0.3F);
-- double d1 = iposition.y() + (double) ((float) enumdirection.getStepY() * 0.3F);
-- double d2 = iposition.z() + (double) ((float) enumdirection.getStepZ() * 0.3F);
-- RandomSource random = world.random;
-- double d3 = random.nextGaussian() * 0.05D + (double) enumdirection.getStepX();
-- double d4 = random.nextGaussian() * 0.05D + (double) enumdirection.getStepY();
-- double d5 = random.nextGaussian() * 0.05D + (double) enumdirection.getStepZ();
--
-- if (SmallFireball.class.isAssignableFrom(projectile)) {
-- launch = new net.minecraft.world.entity.projectile.SmallFireball(world, null, new Vec3(d0, d1, d2));
-- } else if (WitherSkull.class.isAssignableFrom(projectile)) {
-- launch = EntityType.WITHER_SKULL.create(world);
-- launch.setPos(d0, d1, d2);
--
-- ((AbstractHurtingProjectile) launch).assignDirectionalMovement(new Vec3(d3, d4, d5), 0.1D);
++
+ // Copied from BlockDispenser.dispense()
+ BlockSource sourceblock = new BlockSource((ServerLevel) this.dispenserBlock.getLevel(), this.dispenserBlock.getBlockPos(), this.dispenserBlock.getBlockState(), this.dispenserBlock);
+ // Copied from DispenseBehaviorProjectile
+@@ -88,7 +96,7 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
+ } else if (Fireball.class.isAssignableFrom(projectile)) {
+ if (AbstractWindCharge.class.isAssignableFrom(projectile)) {
+ item = Items.WIND_CHARGE;
- } else {
-- launch = EntityType.FIREBALL.create(world);
-- launch.setPos(d0, d1, d2);
--
-- ((AbstractHurtingProjectile) launch).assignDirectionalMovement(new Vec3(d3, d4, d5), 0.1D);
-+ item = net.minecraft.world.item.Items.ARROW;
++ } else if (org.bukkit.entity.SmallFireball.class.isAssignableFrom(projectile)) { // Paper - more projectile API - only allow firing fire charges.
+ item = Items.FIRE_CHARGE;
+ }
+ } else if (Firework.class.isAssignableFrom(projectile)) {
+@@ -104,7 +112,7 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
+ Position iposition = dispenseConfig.positionFunction().getDispensePosition(sourceblock, enumdirection);
+ net.minecraft.world.entity.projectile.Projectile launch = projectileItem.asProjectile(world, iposition, itemstack, enumdirection);
+
+- if (Fireball.class.isAssignableFrom(projectile)) {
++ if (false && Fireball.class.isAssignableFrom(projectile)) { // Paper - more project API - dispensers cannot launch anything but fire charges.
+ AbstractHurtingProjectile customFireball = null;
+ if (WitherSkull.class.isAssignableFrom(projectile)) {
+ launch = customFireball = EntityType.WITHER_SKULL.create(world);
+@@ -129,7 +137,7 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
}
-+ } else if (org.bukkit.entity.WindCharge.class.isAssignableFrom(projectile)) {
-+ item = net.minecraft.world.item.Items.WIND_CHARGE;
-+ } else if (org.bukkit.entity.Firework.class.isAssignableFrom(projectile)) {
-+ item = net.minecraft.world.item.Items.FIREWORK_ROCKET;
-+ } else if (SmallFireball.class.isAssignableFrom(projectile)) {
-+ item = net.minecraft.world.item.Items.FIRE_CHARGE;
-+ }
-
-- ((AbstractHurtingProjectile) launch).projectileSource = this;
-+ if (!(item instanceof net.minecraft.world.item.ProjectileItem projectileItem)) {
-+ throw new IllegalArgumentException("Projectile '%s' is not supported".formatted(projectile.getSimpleName()));
}
-- Preconditions.checkArgument(launch != null, "Projectile not supported");
-+ net.minecraft.world.item.ProjectileItem.DispenseConfig config = projectileItem.createDispenseConfig();
-+ net.minecraft.world.level.block.state.BlockState state = this.dispenserBlock.getBlockState();
-+ net.minecraft.world.level.Level world = this.dispenserBlock.getLevel();
-+ BlockSource pointer = new BlockSource((ServerLevel) world, this.dispenserBlock.getBlockPos(), state, this.dispenserBlock); // copied from DispenseBlock#dispenseFrom
-+ Direction facing = state.getValue(DispenserBlock.FACING);
-+ Position pos = config.positionFunction().getDispensePosition(pointer, facing);
-
-- if (launch instanceof net.minecraft.world.entity.projectile.Projectile) {
-- if (launch instanceof ThrowableProjectile) {
-- ((ThrowableProjectile) launch).projectileSource = this;
-- }
-- // Values from DispenseBehaviorProjectile
-- float a = 6.0F;
-- float b = 1.1F;
-- if (launch instanceof net.minecraft.world.entity.projectile.ThrownPotion || launch instanceof ThrownExpBottle) {
-- // Values from respective DispenseBehavior classes
-- a *= 0.5F;
-- b *= 1.25F;
-- }
-- // Copied from DispenseBehaviorProjectile
-- ((net.minecraft.world.entity.projectile.Projectile) launch).shoot((double) enumdirection.getStepX(), (double) ((float) enumdirection.getStepY() + 0.1F), (double) enumdirection.getStepZ(), b, a);
-- }
-+ net.minecraft.world.entity.projectile.Projectile launch = projectileItem.asProjectile(world, pos, new net.minecraft.world.item.ItemStack(item), facing);
-+ // some projectile are not shoot and doesn't rely on the config for power/uncertainty
-+ projectileItem.shoot(launch, facing.getStepX(), facing.getStepY(), facing.getStepZ(), config.power(), config.uncertainty());
-+ launch.projectileSource = this;
-+ // Paper end
-
+- if (launch instanceof net.minecraft.world.entity.projectile.AbstractArrow arrow) {
++ if (false && launch instanceof net.minecraft.world.entity.projectile.AbstractArrow arrow) { // Paper - more projectile API - this is set by the respective ArrowItem when constructing the projectile
+ arrow.pickup = net.minecraft.world.entity.projectile.AbstractArrow.Pickup.ALLOWED;
+ }
+ launch.projectileSource = this;
+@@ -138,6 +146,11 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
if (velocity != null) {
((T) launch.getBukkitEntity()).setVelocity(velocity);
}
diff --git a/patches/server/0680-Fix-saving-in-unloadWorld.patch b/patches/server/0680-Fix-saving-in-unloadWorld.patch
index a045e38f34..5536c9b21a 100644
--- a/patches/server/0680-Fix-saving-in-unloadWorld.patch
+++ b/patches/server/0680-Fix-saving-in-unloadWorld.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix saving in unloadWorld
Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 56fe4a91b557db7bd74c031046231a3bc7ba72c8..7cc0cd19996df0b37fa0b7c4dc34ee99ad9499cb 100644
+index 566ed56de6fcb4dc64e504310b46295466917eee..183d9672ad60e2b7db48c283b1ca863df01ad658 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1381,7 +1381,7 @@ public final class CraftServer implements Server {
+@@ -1383,7 +1383,7 @@ public final class CraftServer implements Server {
try {
if (save) {
diff --git a/patches/server/0692-WorldCreator-keepSpawnLoaded.patch b/patches/server/0692-WorldCreator-keepSpawnLoaded.patch
index 3e941053cb..6369ed67aa 100644
--- a/patches/server/0692-WorldCreator-keepSpawnLoaded.patch
+++ b/patches/server/0692-WorldCreator-keepSpawnLoaded.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 7cc0cd19996df0b37fa0b7c4dc34ee99ad9499cb..b09c1359e4bd5f287b9ce3682fd7d9defa8f7e61 100644
+index 183d9672ad60e2b7db48c283b1ca863df01ad658..cfdfb81bc81382b71131c037ebd56f24573d4e34 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1324,7 +1324,7 @@ public final class CraftServer implements Server {
+@@ -1326,7 +1326,7 @@ public final class CraftServer implements Server {
}
// If set to not keep spawn in memory (changed from default) then adjust rule accordingly
diff --git a/patches/server/0701-Add-support-for-Proxy-Protocol.patch b/patches/server/0701-Add-support-for-Proxy-Protocol.patch
index 51906f887a..8ad330c63d 100644
--- a/patches/server/0701-Add-support-for-Proxy-Protocol.patch
+++ b/patches/server/0701-Add-support-for-Proxy-Protocol.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add support for Proxy Protocol
diff --git a/build.gradle.kts b/build.gradle.kts
-index 688e901b75e95941e0101cc7d0c4effa7993cf3f..9de7a09c5f1b23754a2823978fa3ff218aadcfa7 100644
+index 6c3ed9e685473d7f555ae0e34fb9d4f3873f109a..ec9ae97b4a624bc208a778e63d0f0b86285167a6 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -28,6 +28,7 @@ dependencies {
@@ -15,7 +15,7 @@ index 688e901b75e95941e0101cc7d0c4effa7993cf3f..9de7a09c5f1b23754a2823978fa3ff21
+ implementation("io.netty:netty-codec-haproxy:4.1.97.Final") // Paper - Add support for proxy protocol
// Paper end
implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
- implementation("org.ow2.asm:asm-commons:9.7")
+ implementation("org.ow2.asm:asm-commons:9.7.1")
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
index c63c194c44646e6bc1a59426552787011fc2ced5..c62df32af11636ad408b584fcc590590ce4fb0d0 100644
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
diff --git a/patches/server/0707-Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/0707-Throw-exception-on-world-create-while-being-ticked.patch
index 562543e709..8d6f8d9e1d 100644
--- a/patches/server/0707-Throw-exception-on-world-create-while-being-ticked.patch
+++ b/patches/server/0707-Throw-exception-on-world-create-while-being-ticked.patch
@@ -45,10 +45,10 @@ index 94aa901b77b19445a33d5b2b24ba2e947d2a6aef..11b9eb8d7d5f9ad736f2c6784c5d9e74
this.profiler.popPush("connection");
MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index b09c1359e4bd5f287b9ce3682fd7d9defa8f7e61..50a4b51ff9b05786ac763f8277bb67c247c04d31 100644
+index cfdfb81bc81382b71131c037ebd56f24573d4e34..8f8674ccee58f1910ffc3926d42913048da1810e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -916,6 +916,11 @@ public final class CraftServer implements Server {
+@@ -917,6 +917,11 @@ public final class CraftServer implements Server {
return new ArrayList<World>(this.worlds.values());
}
@@ -60,7 +60,7 @@ index b09c1359e4bd5f287b9ce3682fd7d9defa8f7e61..50a4b51ff9b05786ac763f8277bb67c2
public DedicatedPlayerList getHandle() {
return this.playerList;
}
-@@ -1178,6 +1183,7 @@ public final class CraftServer implements Server {
+@@ -1180,6 +1185,7 @@ public final class CraftServer implements Server {
@Override
public World createWorld(WorldCreator creator) {
Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
@@ -68,7 +68,7 @@ index b09c1359e4bd5f287b9ce3682fd7d9defa8f7e61..50a4b51ff9b05786ac763f8277bb67c2
Preconditions.checkArgument(creator != null, "WorldCreator cannot be null");
String name = creator.name();
-@@ -1354,6 +1360,7 @@ public final class CraftServer implements Server {
+@@ -1356,6 +1362,7 @@ public final class CraftServer implements Server {
@Override
public boolean unloadWorld(World world, boolean save) {
diff --git a/patches/server/0713-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0713-Don-t-broadcast-messages-to-command-blocks.patch
index 6a6b62cf6c..6c746cf029 100644
--- a/patches/server/0713-Don-t-broadcast-messages-to-command-blocks.patch
+++ b/patches/server/0713-Don-t-broadcast-messages-to-command-blocks.patch
@@ -20,10 +20,10 @@ index 8c2dcc4134d96351cee75773214f3f47e71533e9..e6bfcc50cdf728216084bc00a5bb8b6b
Date date = new Date();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 50a4b51ff9b05786ac763f8277bb67c247c04d31..21ad1176a1b0a9445486d7be5efb692e745a78c7 100644
+index 8f8674ccee58f1910ffc3926d42913048da1810e..3c5d44499e94bd19e4058eb2bf2d9b5d5890f980 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1923,7 +1923,7 @@ public final class CraftServer implements Server {
+@@ -1925,7 +1925,7 @@ public final class CraftServer implements Server {
// Paper end
Set<CommandSender> recipients = new HashSet<>();
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
diff --git a/patches/server/0731-Add-Velocity-IP-Forwarding-Support.patch b/patches/server/0731-Add-Velocity-IP-Forwarding-Support.patch
index 9352ac5b67..72ee3dd6fe 100644
--- a/patches/server/0731-Add-Velocity-IP-Forwarding-Support.patch
+++ b/patches/server/0731-Add-Velocity-IP-Forwarding-Support.patch
@@ -228,10 +228,10 @@ index 9c343b579d9735dc59c8c74fde030d981a673c4f..35faa10f3b82504ae9d3f923fc04c5a9
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 21ad1176a1b0a9445486d7be5efb692e745a78c7..d0deaa80b404043b8cb3dbc390fd5ec3bff2630b 100644
+index 3c5d44499e94bd19e4058eb2bf2d9b5d5890f980..96e7bad6620ff6dc17a80af3febcbc4e1623944e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -845,7 +845,7 @@ public final class CraftServer implements Server {
+@@ -846,7 +846,7 @@ public final class CraftServer implements Server {
@Override
public long getConnectionThrottle() {
// Spigot Start - Automatically set connection throttle for bungee configurations
diff --git a/patches/server/0732-Add-NamespacedKey-biome-methods.patch b/patches/server/0732-Add-NamespacedKey-biome-methods.patch
index 1b67c6785e..1c393cb89c 100644
--- a/patches/server/0732-Add-NamespacedKey-biome-methods.patch
+++ b/patches/server/0732-Add-NamespacedKey-biome-methods.patch
@@ -6,10 +6,10 @@ 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 0e849b49329054005c20a5773de2ff15bf3f6e5d..39066b1d8df7f784e4c90b5fd47505ef65db307c 100644
+index c10273445c4b5ef089f86fc08a944da69d708244..72c2f70d22c5ac920f13b11badac404dbb15c055 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -578,6 +578,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -584,6 +584,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end
diff --git a/patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch b/patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
index aaf56a3c17..fb6e8b07ea 100644
--- a/patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
+++ b/patches/server/0741-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Mitigate effects of WorldCreator#keepSpawnLoaded ret type
TODO: Remove in 1.21?
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index 157fbe09ab22f3218d9d3f72e8c0a5a3d727eaeb..cae5c865388aca8041233ca52b25ecf68cd37494 100644
+index 63d4ffe93a445abf3c766d4f1f8fbf4a412a2a03..419b899f0e65b9656432513b69f60150c75bd13f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-@@ -440,6 +440,12 @@ public class Commodore {
+@@ -458,6 +458,12 @@ public class Commodore {
super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, runtimeCbPkgPrefix() + "advancement/CraftAdvancement", "getDisplay0", desc, false);
return;
}
diff --git a/patches/server/0775-fix-Instruments.patch b/patches/server/0775-fix-Instruments.patch
index c2cffdb2b5..41359cbf13 100644
--- a/patches/server/0775-fix-Instruments.patch
+++ b/patches/server/0775-fix-Instruments.patch
@@ -23,10 +23,10 @@ index 922ec82d566fd5ac0b40ed95629e63be3d1bf264..111b90f97f631369acfb76278da26de9
diff --git a/src/test/java/io/papermc/paper/block/InstrumentSoundTest.java b/src/test/java/io/papermc/paper/block/InstrumentSoundTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..28fc01045675247e75438bdc039fb8a90493419f
+index 0000000000000000000000000000000000000000..cd718ed01ba5d448cdf0a2b6a39dc7ef2337f70d
--- /dev/null
+++ b/src/test/java/io/papermc/paper/block/InstrumentSoundTest.java
-@@ -0,0 +1,27 @@
+@@ -0,0 +1,28 @@
+package io.papermc.paper.block;
+
+import java.util.Arrays;
@@ -35,13 +35,14 @@ index 0000000000000000000000000000000000000000..28fc01045675247e75438bdc039fb8a9
+import org.bukkit.Instrument;
+import org.bukkit.craftbukkit.CraftSound;
+import org.bukkit.craftbukkit.block.data.CraftBlockData;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.AllFeatures;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
-+class InstrumentSoundTest extends AbstractTestingBase {
++@AllFeatures
++class InstrumentSoundTest {
+
+ static Stream<Instrument> bukkitInstruments() {
+ return Arrays.stream(Instrument.values()).filter(i -> i.getSound() != null);
diff --git a/patches/server/0802-Add-Shearable-API.patch b/patches/server/0802-Add-Shearable-API.patch
index 069dcbaf2e..3cf9cf3015 100644
--- a/patches/server/0802-Add-Shearable-API.patch
+++ b/patches/server/0802-Add-Shearable-API.patch
@@ -85,10 +85,10 @@ index 1e9807b8f468742d208f817e22d7625106fc1b58..4ce2373ff71c3c1b8951646e057587a3
}
diff --git a/src/test/java/io/papermc/paper/entity/ShearableTest.java b/src/test/java/io/papermc/paper/entity/ShearableTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..fc8010c5fa0027d45d3c10d67e20631951714c40
+index 0000000000000000000000000000000000000000..709b90f0cd01a4508d44f2e971f5bf9785d78ae5
--- /dev/null
+++ b/src/test/java/io/papermc/paper/entity/ShearableTest.java
-@@ -0,0 +1,28 @@
+@@ -0,0 +1,30 @@
+package io.papermc.paper.entity;
+
+import com.destroystokyo.paper.entity.ai.MobGoalHelper;
@@ -97,10 +97,12 @@ index 0000000000000000000000000000000000000000..fc8010c5fa0027d45d3c10d67e206319
+import java.util.List;
+import net.minecraft.world.entity.Mob;
+import net.minecraft.world.entity.Shearable;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+
++@Normal
+class ShearableTest {
+
+ static List<Class<Shearable>> nmsShearables() {
diff --git a/patches/server/0824-Add-method-to-remove-all-active-potion-effects.patch b/patches/server/0824-Add-method-to-remove-all-active-potion-effects.patch
index 4e1ece1a04..6c4676b8f7 100644
--- a/patches/server/0824-Add-method-to-remove-all-active-potion-effects.patch
+++ b/patches/server/0824-Add-method-to-remove-all-active-potion-effects.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add method to remove all active potion effects
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index a50803a9b41cf3c0b081eb6b786f952dd0ed284f..0398ba2cac2b69111ce7c5f9e5680119dd27c6cf 100644
+index 4ede706367d00965ac75a6ac95877e862d464f74..fb6465bbb2a8bb7597c15d7ac8375f696b897e43 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-@@ -563,6 +563,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
+@@ -564,6 +564,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return effects;
}
diff --git a/patches/server/0834-fix-item-meta-for-tadpole-buckets.patch b/patches/server/0834-fix-item-meta-for-tadpole-buckets.patch
index b367979963..6c9509e2cf 100644
--- a/patches/server/0834-fix-item-meta-for-tadpole-buckets.patch
+++ b/patches/server/0834-fix-item-meta-for-tadpole-buckets.patch
@@ -30,10 +30,10 @@ index 27af7ca9d62bdb4a24be5af139c181d7bc271ba5..3ff0340c40e9dc9a6e690de15ccade7a
Material.GLOW_ITEM_FRAME,
Material.PAINTING
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
-index c0b7bb970bfd1ccd3bc071a77c47b374094a2fb6..3a9e5c6d781e9c24e040ebf95325f005ec9e8a3c 100644
+index 50faaaa48dffcaf53823caed1e3f7263cd5c441f..ba5c958f322dc34baff3c9d1b99741a4ffeee135 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
-@@ -208,6 +208,27 @@ public class ItemMetaTest extends AbstractTestingBase {
+@@ -209,6 +209,27 @@ public class ItemMetaTest {
}
}
diff --git a/patches/server/0845-API-for-updating-recipes-on-clients.patch b/patches/server/0845-API-for-updating-recipes-on-clients.patch
index dd2aa28e95..7cae857359 100644
--- a/patches/server/0845-API-for-updating-recipes-on-clients.patch
+++ b/patches/server/0845-API-for-updating-recipes-on-clients.patch
@@ -39,10 +39,10 @@ index 2912b15ccda373cf52cec020b0e06ac2c5cf2950..a6caf3a0df22f124a4ee1cfb3981bbeb
Iterator iterator1 = this.players.iterator();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 2dd20823769f1a3a2d028cd64d3af5989429d1ac..00f8042538a698995299aaa57212e7091c1af634 100644
+index bb89247a87067a74d793a1acc1eb95b98ace3d9e..75c222e592d676e98b293767d00de54a61411ae7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1174,6 +1174,18 @@ public final class CraftServer implements Server {
+@@ -1176,6 +1176,18 @@ public final class CraftServer implements Server {
ReloadCommand.reload(this.console);
}
@@ -61,7 +61,7 @@ index 2dd20823769f1a3a2d028cd64d3af5989429d1ac..00f8042538a698995299aaa57212e709
private void loadIcon() {
this.icon = new CraftIconCache(null);
try {
-@@ -1553,6 +1565,13 @@ public final class CraftServer implements Server {
+@@ -1555,6 +1567,13 @@ public final class CraftServer implements Server {
@Override
public boolean addRecipe(Recipe recipe) {
@@ -75,7 +75,7 @@ index 2dd20823769f1a3a2d028cd64d3af5989429d1ac..00f8042538a698995299aaa57212e709
CraftRecipe toAdd;
if (recipe instanceof CraftRecipe) {
toAdd = (CraftRecipe) recipe;
-@@ -1582,6 +1601,11 @@ public final class CraftServer implements Server {
+@@ -1584,6 +1603,11 @@ public final class CraftServer implements Server {
}
}
toAdd.addToCraftingManager();
@@ -87,7 +87,7 @@ index 2dd20823769f1a3a2d028cd64d3af5989429d1ac..00f8042538a698995299aaa57212e709
return true;
}
-@@ -1762,10 +1786,23 @@ public final class CraftServer implements Server {
+@@ -1764,10 +1788,23 @@ public final class CraftServer implements Server {
@Override
public boolean removeRecipe(NamespacedKey recipeKey) {
diff --git a/patches/server/0850-Use-correct-seed-on-api-world-load.patch b/patches/server/0850-Use-correct-seed-on-api-world-load.patch
index 764833c01d..58cf8e10f3 100644
--- a/patches/server/0850-Use-correct-seed-on-api-world-load.patch
+++ b/patches/server/0850-Use-correct-seed-on-api-world-load.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Use correct seed on api world load
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 00f8042538a698995299aaa57212e7091c1af634..b5af662ae3c3216b5dc30df5619d0c74db10d119 100644
+index 75c222e592d676e98b293767d00de54a61411ae7..69df0cf285a5af1011cc769a433683489ff3dded 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1396,7 +1396,7 @@ public final class CraftServer implements Server {
+@@ -1398,7 +1398,7 @@ public final class CraftServer implements Server {
net.minecraft.server.Main.forceUpgrade(worldSession, DataFixers.getDataFixer(), this.console.options.has("eraseCache"), () -> true, iregistrycustom_dimension, this.console.options.has("recreateRegionFiles"));
}
diff --git a/patches/server/0853-Fix-custom-statistic-criteria-creation.patch b/patches/server/0853-Fix-custom-statistic-criteria-creation.patch
index a3e8b66e3a..682cc84ee5 100644
--- a/patches/server/0853-Fix-custom-statistic-criteria-creation.patch
+++ b/patches/server/0853-Fix-custom-statistic-criteria-creation.patch
@@ -5,10 +5,10 @@ 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 39066b1d8df7f784e4c90b5fd47505ef65db307c..2d5cb690c332732d1d2a9e78918cd5e8595b37e9 100644
+index 72c2f70d22c5ac920f13b11badac404dbb15c055..23ed0a130525a0b3a1b41330685476463c81f183 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -593,6 +593,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -599,6 +599,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - namespaced key biome methods
diff --git a/patches/server/0857-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/server/0857-Deprecate-and-replace-methods-with-old-StructureType.patch
index d34d5b18df..b9b8b8b88e 100644
--- a/patches/server/0857-Deprecate-and-replace-methods-with-old-StructureType.patch
+++ b/patches/server/0857-Deprecate-and-replace-methods-with-old-StructureType.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index b5af662ae3c3216b5dc30df5619d0c74db10d119..733bd5c4951426fc9471a18d4b71cb4fa1532ec2 100644
+index 69df0cf285a5af1011cc769a433683489ff3dded..8b871d29d883119cd8ad9ca134f4c1fce9362705 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2001,6 +2001,11 @@ public final class CraftServer implements Server {
+@@ -2003,6 +2003,11 @@ public final class CraftServer implements Server {
ServerLevel worldServer = ((CraftWorld) world).getHandle();
Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored);
@@ -20,7 +20,7 @@ index b5af662ae3c3216b5dc30df5619d0c74db10d119..733bd5c4951426fc9471a18d4b71cb4f
BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation);
// Create map with trackPlayer = true, unlimitedTracking = true
-@@ -2011,6 +2016,31 @@ public final class CraftServer implements Server {
+@@ -2013,6 +2018,31 @@ public final class CraftServer implements Server {
return CraftItemStack.asBukkitCopy(stack);
}
diff --git a/patches/server/0859-Properly-handle-BlockBreakEvent-isDropItems.patch b/patches/server/0859-Properly-handle-BlockBreakEvent-isDropItems.patch
index 75a746ca81..4cd1896742 100644
--- a/patches/server/0859-Properly-handle-BlockBreakEvent-isDropItems.patch
+++ b/patches/server/0859-Properly-handle-BlockBreakEvent-isDropItems.patch
@@ -108,10 +108,10 @@ index bdcb732a31fff0cfc2119132079ce197c7a77c9a..a6f408e56fa6c9de82fd93555fe21e1b
diff --git a/src/test/java/io/papermc/paper/world/block/BlockPlayerDestroyOverrideTest.java b/src/test/java/io/papermc/paper/world/block/BlockPlayerDestroyOverrideTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..7c435f7079b429873f33d7bade82eca0c6b45842
+index 0000000000000000000000000000000000000000..22145bf698b3d1ff0a07a3aaa8d55a19905f99ad
--- /dev/null
+++ b/src/test/java/io/papermc/paper/world/block/BlockPlayerDestroyOverrideTest.java
-@@ -0,0 +1,47 @@
+@@ -0,0 +1,48 @@
+package io.papermc.paper.world.block;
+
+import io.github.classgraph.ClassGraph;
@@ -123,13 +123,14 @@ index 0000000000000000000000000000000000000000..7c435f7079b429873f33d7bade82eca0
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Stream;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
-+public class BlockPlayerDestroyOverrideTest extends AbstractTestingBase {
++@Normal
++public class BlockPlayerDestroyOverrideTest {
+
+ public static Stream<ClassInfo> parameters() {
+ final List<ClassInfo> classInfo = new ArrayList<>();
diff --git a/patches/server/0881-Fix-silent-equipment-change-for-mobs.patch b/patches/server/0881-Fix-silent-equipment-change-for-mobs.patch
index 793470108f..882525c86d 100644
--- a/patches/server/0881-Fix-silent-equipment-change-for-mobs.patch
+++ b/patches/server/0881-Fix-silent-equipment-change-for-mobs.patch
@@ -55,10 +55,10 @@ index 6627126ab02dbd5e9d1de6b186d75d850ef11280..3b5cf6ffb74d11bea5eb21bd66d67973
}
diff --git a/src/test/java/io/papermc/paper/entity/EntitySetItemSlotSilentOverrideTest.java b/src/test/java/io/papermc/paper/entity/EntitySetItemSlotSilentOverrideTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..81947843d1f2f7dc6f59d7b52f327d60b17d0dcc
+index 0000000000000000000000000000000000000000..18e0ae815528f3b2f944febc01df48f346b3a4f6
--- /dev/null
+++ b/src/test/java/io/papermc/paper/entity/EntitySetItemSlotSilentOverrideTest.java
-@@ -0,0 +1,51 @@
+@@ -0,0 +1,52 @@
+package io.papermc.paper.entity;
+
+import io.github.classgraph.ClassGraph;
@@ -70,13 +70,14 @@ index 0000000000000000000000000000000000000000..81947843d1f2f7dc6f59d7b52f327d60
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Stream;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import static org.junit.jupiter.api.Assertions.fail;
+
-+public class EntitySetItemSlotSilentOverrideTest extends AbstractTestingBase {
++@Normal
++public class EntitySetItemSlotSilentOverrideTest {
+
+ public static Stream<ClassInfo> parameters() {
+ final List<ClassInfo> classInfo = new ArrayList<>();
diff --git a/patches/server/0891-Fix-UnsafeValues-loadAdvancement.patch b/patches/server/0891-Fix-UnsafeValues-loadAdvancement.patch
index c1cfc35cc9..8f824385f8 100644
--- a/patches/server/0891-Fix-UnsafeValues-loadAdvancement.patch
+++ b/patches/server/0891-Fix-UnsafeValues-loadAdvancement.patch
@@ -5,10 +5,10 @@ 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 2d5cb690c332732d1d2a9e78918cd5e8595b37e9..5cbcfef31e2acdf27fc52f466ee70d9146d0228d 100644
+index 23ed0a130525a0b3a1b41330685476463c81f183..b07c8111daa010dee2bb8be52162aafa4c267f1f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -302,9 +302,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -308,9 +308,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
ResourceLocation minecraftkey = CraftNamespacedKey.toMinecraft(key);
JsonElement jsonelement = ServerAdvancementManager.GSON.fromJson(advancement, JsonElement.class);
diff --git a/patches/server/0909-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch b/patches/server/0909-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch
index 32e393d2a8..86ed135ebc 100644
--- a/patches/server/0909-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch
+++ b/patches/server/0909-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 5c76ba7f9ceb285d27e18369172612205be96224..11f55ef2645d50bbc24bd245ffe3ac98180315d8 100644
+index df34eba383c0d3035c8baed7fdd054ecdd681fa3..f15456b02cabbbe33d701450ef53a0561d91cb8c 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -1412,7 +1412,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1414,7 +1414,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/0913-Improve-Registry.patch b/patches/server/0913-Improve-Registry.patch
index bd6287869d..2f04f62383 100644
--- a/patches/server/0913-Improve-Registry.patch
+++ b/patches/server/0913-Improve-Registry.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Improve Registry
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
-index d1db491027a5e2d22a6c956b26a974a284d44c57..9b78bfd187a1bd5f99af5690f194441904956c7d 100644
+index 3dbdfc2fb973c3c9aecc6582451071e8a939f5f0..c410e2d94562afc6bdd5bb3c9c01995eac0bc3fc 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
@@ -155,6 +155,7 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
@@ -24,7 +24,7 @@ index d1db491027a5e2d22a6c956b26a974a284d44c57..9b78bfd187a1bd5f99af5690f1944419
return bukkit;
}
-@@ -225,4 +227,11 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
+@@ -235,4 +237,11 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
return this.minecraftToBukkit.apply(namespacedKey, minecraft);
}
@@ -61,10 +61,10 @@ index 364f8d7a7106259401154d91b1b79869d014a469..f336bf98574e4fdeabc3b21062983439
}
diff --git a/src/test/java/org/bukkit/registry/PerRegistryTest.java b/src/test/java/org/bukkit/registry/PerRegistryTest.java
-index 4e4ea083063daf22f1bb785ef212958ea889c43b..dad7935f9a4c7c8bb2a755cc0631330a59834233 100644
+index 18859eea522ff26cbefb5bbc5065b5369ed6c189..319e000519fd719cea0e6daf2ba9cfa67e6958a3 100644
--- a/src/test/java/org/bukkit/registry/PerRegistryTest.java
+++ b/src/test/java/org/bukkit/registry/PerRegistryTest.java
-@@ -48,19 +48,22 @@ public class PerRegistryTest extends AbstractTestingBase {
+@@ -49,19 +49,22 @@ public class PerRegistryTest {
@ParameterizedTest
@MethodSource("data")
@@ -91,7 +91,7 @@ index 4e4ea083063daf22f1bb785ef212958ea889c43b..dad7935f9a4c7c8bb2a755cc0631330a
this.assertSameMatchWithKeyMessage(registry, element, key.toString()); // namespace:key
this.assertSameMatchWithKeyMessage(registry, element, key.getKey()); // key
-@@ -71,7 +74,7 @@ public class PerRegistryTest extends AbstractTestingBase {
+@@ -72,7 +75,7 @@ public class PerRegistryTest {
});
}
diff --git a/patches/server/0916-Add-drops-to-shear-events.patch b/patches/server/0916-Add-drops-to-shear-events.patch
index 7e5645cd5f..8e1e2cd3f9 100644
--- a/patches/server/0916-Add-drops-to-shear-events.patch
+++ b/patches/server/0916-Add-drops-to-shear-events.patch
@@ -370,10 +370,10 @@ index f33742ee06e8443a5f5adaaa987d7523dc193b5a..a1a32a77bda0560a7b7f30a5d1c1837e
stack.setCount(amount);
diff --git a/src/test/java/io/papermc/paper/entity/ShearableDropsTest.java b/src/test/java/io/papermc/paper/entity/ShearableDropsTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..e612515f7709dbe5d1fa5751337cdc34fce10a98
+index 0000000000000000000000000000000000000000..5e6dfc93c86ec369b686f15ca066478e1635dbc3
--- /dev/null
+++ b/src/test/java/io/papermc/paper/entity/ShearableDropsTest.java
-@@ -0,0 +1,34 @@
+@@ -0,0 +1,35 @@
+package io.papermc.paper.entity;
+
+import io.github.classgraph.ClassGraph;
@@ -382,13 +382,14 @@ index 0000000000000000000000000000000000000000..e612515f7709dbe5d1fa5751337cdc34
+import io.github.classgraph.ScanResult;
+import java.util.ArrayList;
+import net.minecraft.world.entity.Shearable;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
-+class ShearableDropsTest extends AbstractTestingBase {
++@Normal
++class ShearableDropsTest {
+
+ static Iterable<ClassInfo> parameters() {
+ try (ScanResult scanResult = new ClassGraph()
diff --git a/patches/server/0925-Add-api-for-spawn-egg-texture-colors.patch b/patches/server/0925-Add-api-for-spawn-egg-texture-colors.patch
index f8a65ad281..8eac793c2e 100644
--- a/patches/server/0925-Add-api-for-spawn-egg-texture-colors.patch
+++ b/patches/server/0925-Add-api-for-spawn-egg-texture-colors.patch
@@ -5,10 +5,10 @@ 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 5cbcfef31e2acdf27fc52f466ee70d9146d0228d..9ea1ce24d831a828ae3c9c9863aef12e46dd501d 100644
+index b07c8111daa010dee2bb8be52162aafa4c267f1f..73a3e708f21c1b9c5de1fc180f728d6da7eea0fb 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -637,6 +637,15 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -643,6 +643,15 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftRegistry.get(registry, namespacedKey, ApiVersion.CURRENT);
}
diff --git a/patches/server/0926-Add-Lifecycle-Event-system.patch b/patches/server/0926-Add-Lifecycle-Event-system.patch
index ab34b0192c..f6600c4370 100644
--- a/patches/server/0926-Add-Lifecycle-Event-system.patch
+++ b/patches/server/0926-Add-Lifecycle-Event-system.patch
@@ -727,10 +727,10 @@ index 2e96308696e131f3f013469a395e5ddda2c5d529..65a66e484c1c39c5f41d97db52f31c67
} catch (Throwable e) {
LOGGER.error("Failed to run bootstrapper for %s. This plugin will not be loaded.".formatted(provider.getSource()), e);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 733bd5c4951426fc9471a18d4b71cb4fa1532ec2..33fbcd9fabfc42fdd457b9c7a41e4ce0281cd2c0 100644
+index 8b871d29d883119cd8ad9ca134f4c1fce9362705..f6b87a5249e1a21b3221f253f891d8978249c50a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1047,6 +1047,11 @@ public final class CraftServer implements Server {
+@@ -1048,6 +1048,11 @@ public final class CraftServer implements Server {
@Override
public void reload() {
@@ -743,10 +743,10 @@ index 733bd5c4951426fc9471a18d4b71cb4fa1532ec2..33fbcd9fabfc42fdd457b9c7a41e4ce0
this.reloadCount++;
this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 9ea1ce24d831a828ae3c9c9863aef12e46dd501d..ef56c54bd724137c1efbbac574e54027d7f7f5bc 100644
+index 73a3e708f21c1b9c5de1fc180f728d6da7eea0fb..b89db5335aa3984b76513165456ebe43ad9a0cc7 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -646,6 +646,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -652,6 +652,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - spawn egg color visibility
diff --git a/patches/server/0927-ItemStack-Tooltip-API.patch b/patches/server/0927-ItemStack-Tooltip-API.patch
index bdec7c8b91..c487ffd71f 100644
--- a/patches/server/0927-ItemStack-Tooltip-API.patch
+++ b/patches/server/0927-ItemStack-Tooltip-API.patch
@@ -5,10 +5,10 @@ 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 ef56c54bd724137c1efbbac574e54027d7f7f5bc..9739f2d97ea64452a92f254cb2d0e1274c691944 100644
+index b89db5335aa3984b76513165456ebe43ad9a0cc7..6e8838245b0792b15fd9788f2ce11f6503d0e070 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -622,6 +622,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -628,6 +628,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - fix custom stats criteria creation
diff --git a/patches/server/0931-improve-BanList-types.patch b/patches/server/0931-improve-BanList-types.patch
index 23a08cbe55..a3e327bc83 100644
--- a/patches/server/0931-improve-BanList-types.patch
+++ b/patches/server/0931-improve-BanList-types.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] improve BanList types
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 33fbcd9fabfc42fdd457b9c7a41e4ce0281cd2c0..cd747daf186fa3a540db08232a57683492f0131f 100644
+index f6b87a5249e1a21b3221f253f891d8978249c50a..0fc6e659915a4547c2db9205fed205a1d28f21d4 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2254,6 +2254,21 @@ public final class CraftServer implements Server {
+@@ -2256,6 +2256,21 @@ public final class CraftServer implements Server {
};
}
diff --git a/patches/server/0952-Deep-clone-nbt-tags-in-PDC.patch b/patches/server/0952-Deep-clone-nbt-tags-in-PDC.patch
index f559f0cd9d..944099f209 100644
--- a/patches/server/0952-Deep-clone-nbt-tags-in-PDC.patch
+++ b/patches/server/0952-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 11f55ef2645d50bbc24bd245ffe3ac98180315d8..ba49ac74a19ee1f14706c7f769aac35fa821ef7d 100644
+index f15456b02cabbbe33d701450ef53a0561d91cb8c..7ad1076de76c81c25b656e52237c2f60a2eca085 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -322,7 +322,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -17,7 +17,7 @@ index 11f55ef2645d50bbc24bd245ffe3ac98180315d8..ba49ac74a19ee1f14706c7f769aac35f
this.customTag = meta.customTag;
-@@ -1697,7 +1697,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1699,7 +1699,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.customTag = this.customTag.copy();
}
clone.removedTags = Sets.newHashSet(this.removedTags);
diff --git a/patches/server/0956-Fix-ItemFlags.patch b/patches/server/0956-Fix-ItemFlags.patch
index 46e55a9780..78bc31a514 100644
--- a/patches/server/0956-Fix-ItemFlags.patch
+++ b/patches/server/0956-Fix-ItemFlags.patch
@@ -33,7 +33,7 @@ index 73fe41322e0349ad1d46a760f621b6c91112e90e..19af55ec2bf62b70bd3be44f499b32f5
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index ba49ac74a19ee1f14706c7f769aac35fa821ef7d..6f3ab40a9d0bccd9a2c439bf0e200ba5cf0f5f6e 100644
+index 7ad1076de76c81c25b656e52237c2f60a2eca085..c2a215544589d903633c5aed51522870bea556d8 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -245,6 +245,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -114,16 +114,16 @@ index ba49ac74a19ee1f14706c7f769aac35fa821ef7d..6f3ab40a9d0bccd9a2c439bf0e200ba5
for (Map.Entry<DataComponentType<?>, Optional<?>> e : this.unhandledTags.build().entrySet()) {
e.getValue().ifPresent((value) -> {
itemTag.builder.set((DataComponentType) e.getKey(), value);
-@@ -958,7 +999,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -960,7 +1001,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Overridden
boolean isEmpty() {
-- return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
-+ return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper
+- return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
++ return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper
}
// Paper start
-@@ -1628,6 +1669,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1630,6 +1671,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
&& (this.hasJukeboxPlayable() ? that.hasJukeboxPlayable() && this.jukebox.equals(that.jukebox) : !that.hasJukeboxPlayable())
&& (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage())
&& (this.hasMaxDamage() ? that.hasMaxDamage() && this.maxDamage.equals(that.maxDamage) : !that.hasMaxDamage())
@@ -132,7 +132,7 @@ index ba49ac74a19ee1f14706c7f769aac35fa821ef7d..6f3ab40a9d0bccd9a2c439bf0e200ba5
&& (this.version == that.version);
}
-@@ -1673,6 +1716,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1675,6 +1718,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);
@@ -141,7 +141,7 @@ index ba49ac74a19ee1f14706c7f769aac35fa821ef7d..6f3ab40a9d0bccd9a2c439bf0e200ba5
hash = 61 * hash + this.version;
return hash;
}
-@@ -1717,6 +1762,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1719,6 +1764,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
clone.damage = this.damage;
clone.maxDamage = this.maxDamage;
clone.version = this.version;
@@ -156,7 +156,7 @@ index ba49ac74a19ee1f14706c7f769aac35fa821ef7d..6f3ab40a9d0bccd9a2c439bf0e200ba5
return clone;
} catch (CloneNotSupportedException e) {
throw new Error(e);
-@@ -1834,6 +1887,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1836,6 +1889,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@@ -173,7 +173,7 @@ index ba49ac74a19ee1f14706c7f769aac35fa821ef7d..6f3ab40a9d0bccd9a2c439bf0e200ba5
if (!this.unhandledTags.isEmpty()) {
Tag unhandled = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), this.unhandledTags.build()).getOrThrow(IllegalStateException::new);
try {
-@@ -1844,6 +1907,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1846,6 +1909,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
}
}
@@ -188,7 +188,7 @@ index ba49ac74a19ee1f14706c7f769aac35fa821ef7d..6f3ab40a9d0bccd9a2c439bf0e200ba5
if (!this.removedTags.isEmpty()) {
RegistryAccess registryAccess = CraftRegistry.getMinecraftRegistry();
-@@ -1997,6 +2068,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1999,6 +2070,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CraftMetaItem.MAX_DAMAGE.TYPE,
CraftMetaItem.CUSTOM_DATA.TYPE,
CraftMetaItem.ATTRIBUTES.TYPE,
diff --git a/patches/server/0959-improve-checking-handled-tags-in-itemmeta.patch b/patches/server/0959-improve-checking-handled-tags-in-itemmeta.patch
index 0d027cd582..83c83dde68 100644
--- a/patches/server/0959-improve-checking-handled-tags-in-itemmeta.patch
+++ b/patches/server/0959-improve-checking-handled-tags-in-itemmeta.patch
@@ -291,11 +291,11 @@ index eb44c19f6af624df458981e46c73a64358d6e1ce..d0a8cd89da3b8d87248494056470c306
getOrEmpty(tag, CraftMetaBanner.PATTERNS).ifPresent((entityTag) -> {
List<BannerPatternLayers.Layer> patterns = entityTag.layers();
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
-index 23dbc56edf0d16cf07ced2899942abae28397694..ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5 100644
+index 3985e5b4e2d65faa8eaea1d4a2acc6fb1e64f959..413e41f113226b8a2e9b30bb519076d78e451fa0 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
-@@ -70,8 +70,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
- this.blockEntityTag = te.blockEntityTag;
+@@ -73,8 +73,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
+ this.position = te.position;
}
- CraftMetaBlockState(DataComponentPatch tag, Material material) {
@@ -304,7 +304,7 @@ index 23dbc56edf0d16cf07ced2899942abae28397694..ed6e9d1f2d42392d92f4e3ae6f67c8d4
+ super(tag, extraHandledDcts); // Paper
this.material = material;
- getOrEmpty(tag, CraftMetaBlockState.BLOCK_ENTITY_TAG).ifPresent((nbt) -> {
+ getOrEmpty(tag, CraftMetaBlockState.BLOCK_ENTITY_TAG).ifPresent((blockTag) -> {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index 32e5188442551b3e72e1d4826d836d622d0e438a..257c835bc280eee9ee73ae75b5249bb568a687d0 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -456,7 +456,7 @@ index 4941e0afff8df5f10f06c715b54bf58eb86051c5..566d893a413fd04b99e83dc2da8fe958
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 6f3ab40a9d0bccd9a2c439bf0e200ba5cf0f5f6e..bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3 100644
+index c2a215544589d903633c5aed51522870bea556d8..85bc581d0807f07212bf0cd4c85c65f0ec7ef547 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -339,7 +339,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -486,7 +486,7 @@ index 6f3ab40a9d0bccd9a2c439bf0e200ba5cf0f5f6e..bee2f2f5675b8aaeb2a04ada1f6dba9a
key.getValue().ifPresent((value) -> {
this.unhandledTags.set((DataComponentType) key.getKey(), value);
});
-@@ -2043,68 +2050,76 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -2045,68 +2052,76 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
this.version = version;
}
@@ -699,7 +699,7 @@ index 17336c177a969f04c51ff12de4599ef261d79fef..90c554dcbfe2bcca3f742379499f1e8e
this.ominousBottleAmplifier = amplifier;
});
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
-index d1cb8d520b6d7b0981d70412def71e7aab04560a..7f9182809f6e67ff571db0f365bc7e05f600775a 100644
+index 8404520a3d15464f9dc9fa2292048e9fb1b06930..1a18779f9796704c8690226dbe491b0fa6ba99ea 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
@@ -51,8 +51,8 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
@@ -789,10 +789,10 @@ index a514fe98d3d2b65d2cfd029079c69189bcb99c01..17705059b81942e4df43a4a5180092e0
getOrEmpty(tag, CraftMetaTropicalFishBucket.ENTITY_TAG).ifPresent((nbt) -> {
this.entityTag = nbt.copyTag();
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
-index 51e2acf125bdff2ba6d8fd8af9f22e233d7c74a7..6bed0a5c8d9f1ca72678cdf4699128e441a24541 100644
+index 91cfa32272770cdfe56d97154ea9db4e2ed8a328..9cc1ef5c9221dd7d2069b280f0c91ce9439a995a 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
-@@ -96,7 +96,7 @@ public class DeprecatedItemMetaCustomValueTest extends AbstractTestingBase {
+@@ -97,7 +97,7 @@ public class DeprecatedItemMetaCustomValueTest {
CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator();
itemMeta.applyToItem(compound);
@@ -803,24 +803,25 @@ index 51e2acf125bdff2ba6d8fd8af9f22e233d7c74a7..6bed0a5c8d9f1ca72678cdf4699128e4
@Test
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/MetaHandledTagsTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/MetaHandledTagsTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..43fca566e139d370a37b2d56156df4ed7d0d0b66
+index 0000000000000000000000000000000000000000..df20446af3d43c624278d1a25f31f702677c8d96
--- /dev/null
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/MetaHandledTagsTest.java
-@@ -0,0 +1,32 @@
+@@ -0,0 +1,33 @@
+package org.bukkit.craftbukkit.inventory;
+
+import io.github.classgraph.ClassGraph;
+import io.github.classgraph.ClassInfo;
+import io.github.classgraph.ClassInfoList;
+import io.github.classgraph.ScanResult;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.AllFeatures;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+// in cb package because of package-private stuff
-+class MetaHandledTagsTest extends AbstractTestingBase {
++@AllFeatures
++class MetaHandledTagsTest {
+
+ @Test
+ public void checkAllMetasHaveHandledTags() {
@@ -840,10 +841,10 @@ index 0000000000000000000000000000000000000000..43fca566e139d370a37b2d56156df4ed
+ }
+}
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java
-index 30da18cbc878fb1ac2a134f3bcbfcb8d7bec3938..6f94c7a19f2f598a836ec7db30332dd95f8675a6 100644
+index 5b16e6f5e5517eed218e4b60ecd75f8b80712e89..130c4500a5e854480962c8f720b1df4c67d43c33 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java
-@@ -130,7 +130,7 @@ public class PersistentDataContainerTest extends AbstractTestingBase {
+@@ -131,7 +131,7 @@ public class PersistentDataContainerTest {
CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator();
itemMeta.applyToItem(compound);
@@ -852,7 +853,7 @@ index 30da18cbc878fb1ac2a134f3bcbfcb8d7bec3938..6f94c7a19f2f598a836ec7db30332dd9
}
@Test
-@@ -463,7 +463,7 @@ public class PersistentDataContainerTest extends AbstractTestingBase {
+@@ -464,7 +464,7 @@ public class PersistentDataContainerTest {
@Test
public void testEmptyListApplicationToAnyType() throws IOException {
@@ -861,7 +862,7 @@ index 30da18cbc878fb1ac2a134f3bcbfcb8d7bec3938..6f94c7a19f2f598a836ec7db30332dd9
final PersistentDataContainer container = craftItem.getPersistentDataContainer();
container.set(PersistentDataContainerTest.requestKey("list"), PersistentDataType.LIST.strings(), List.of());
-@@ -476,7 +476,7 @@ public class PersistentDataContainerTest extends AbstractTestingBase {
+@@ -477,7 +477,7 @@ public class PersistentDataContainerTest {
final CraftMetaItem.Applicator storage = new CraftMetaItem.Applicator();
craftItem.applyToItem(storage);
diff --git a/patches/server/0960-General-ItemMeta-fixes.patch b/patches/server/0960-General-ItemMeta-fixes.patch
index 0f463fd527..d61cc57b53 100644
--- a/patches/server/0960-General-ItemMeta-fixes.patch
+++ b/patches/server/0960-General-ItemMeta-fixes.patch
@@ -12,7 +12,7 @@ public net/minecraft/world/level/block/entity/BlockEntity saveId(Lnet/minecraft/
Co-authored-by: GhastCraftHD <[email protected]>
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
-index e9a9c89bd6a4ce7cb30c2fcf79a537fc18204aeb..58786dd7b51d17c1b602756c4c44840ab75ad0a7 100644
+index 256e5232425985502c0f9cb9258494555118687e..f09ef12023b1bbbf0c9c94487a705abda94db70b 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -1275,6 +1275,11 @@ public final class ItemStack implements DataComponentHolder {
@@ -44,10 +44,10 @@ index 41f43d7d12a47563360f48a793e63db8cf92ac69..a1d7ae987327382d9566860b991dc361
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
-index f9eb60d5a70da9a4d485288ab03d80829cf171a9..440b4c13121e3ac2bab937a83d20cc3fbf69bda1 100644
+index fe7e3e0628783d8d1be9635b689da8a9cb46c5d7..04ae258a2f8e98421340d29d5cceedec045171b7 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
-@@ -143,6 +143,19 @@ public abstract class CraftBlockEntityState<T extends BlockEntity> extends Craft
+@@ -151,6 +151,19 @@ public abstract class CraftBlockEntityState<T extends BlockEntity> extends Craft
return this.snapshot.getUpdateTag(this.getRegistryAccess());
}
@@ -159,10 +159,10 @@ index d0a8cd89da3b8d87248494056470c306f8fb5ae8..fdc0c1d73bb523f003e4169589f10023
for (Pattern p : this.patterns) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
-index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e73c2f7e4 100644
+index 413e41f113226b8a2e9b30bb519076d78e451fa0..d688339a57f0b4f12588ced0f7860a0d77eae728 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
-@@ -51,9 +51,24 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
+@@ -52,10 +52,24 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
@ItemMetaKey.Specific(ItemMetaKey.Specific.To.NBT)
static final ItemMetaKeyType<CustomData> BLOCK_ENTITY_TAG = new ItemMetaKeyType<>(DataComponents.BLOCK_ENTITY_DATA, "BlockEntityTag");
@@ -171,6 +171,7 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
final Material material;
- private CraftBlockEntityState<?> blockEntityTag;
+- private BlockVector position;
+ // Paper start - store data separately
+ DataComponentMap components;
+ CustomData blockEntityTag;
@@ -188,7 +189,7 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
private CompoundTag internalTag;
CraftMetaBlockState(CraftMetaItem meta, Material material) {
-@@ -62,41 +77,61 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
+@@ -64,47 +78,61 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
if (!(meta instanceof CraftMetaBlockState)
|| ((CraftMetaBlockState) meta).material != material) {
@@ -204,6 +205,7 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
+ // Paper start
+ this.components = te.components;
this.blockEntityTag = te.blockEntityTag;
+- this.position = te.position;
+ // Paper end
}
@@ -211,14 +213,19 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
super(tag, extraHandledDcts); // Paper
this.material = material;
+- getOrEmpty(tag, CraftMetaBlockState.BLOCK_ENTITY_TAG).ifPresent((blockTag) -> {
+- CompoundTag nbt = blockTag.copyTag();
+ // Paper start - move to separate method to be re-called
+ this.updateBlockState(tag);
+ }
-+
+
+- this.blockEntityTag = CraftMetaBlockState.getBlockState(material, nbt);
+- if (nbt.contains("x", CraftMagicNumbers.NBT.TAG_ANY_NUMBER) && nbt.contains("y", CraftMagicNumbers.NBT.TAG_ANY_NUMBER) && nbt.contains("z", CraftMagicNumbers.NBT.TAG_ANY_NUMBER)) {
+- this.position = new BlockVector(nbt.getInt("x"), nbt.getInt("y"), nbt.getInt("z"));
+- }
+ private void updateBlockState(final DataComponentPatch tag) {
+ // Paper end
- getOrEmpty(tag, CraftMetaBlockState.BLOCK_ENTITY_TAG).ifPresent((nbt) -> {
-- this.blockEntityTag = CraftMetaBlockState.getBlockState(material, nbt.copyTag());
++ getOrEmpty(tag, CraftMetaBlockState.BLOCK_ENTITY_TAG).ifPresent((nbt) -> {
+ this.blockEntityTag = nbt; // Paper
});
@@ -263,7 +270,7 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
}
}
-@@ -110,7 +145,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
+@@ -118,42 +146,43 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
this.material = Material.AIR;
}
if (this.internalTag != null) {
@@ -271,13 +278,33 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
+ this.setBlockState(CraftMetaBlockState.getBlockState(this.material, this.internalTag)); // Paper - general item meta fixes - pass through setter
this.internalTag = null;
}
+- this.position = SerializableMeta.getObject(BlockVector.class, map, "blockPosition", true);
++ // Paper start - general item meta fixes - parse spigot legacy position and merge into block entity tag
++ final BlockVector legacyPosition = SerializableMeta.getObject(BlockVector.class, map, "blockPosition", true);
++ if (legacyPosition != null) {
++ this.blockEntityTag = this.blockEntityTag.update(t -> {
++ if (t.isEmpty()) {
++ BlockEntity.addEntityType(t, java.util.Objects.requireNonNull(CraftBlockStates.getBlockEntityType(this.materialForBlockEntityType())));
++ }
++ t.putInt("x", legacyPosition.getBlockX());
++ t.putInt("y", legacyPosition.getBlockY());
++ t.putInt("z", legacyPosition.getBlockZ());
++ });
++ }
++ // Paper end - general item meta fixes - parse spigot legacy position and merge into block entity tag
}
-@@ -119,13 +154,21 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
+
+ @Override
void applyToItem(CraftMetaItem.Applicator tag) {
super.applyToItem(tag);
+- CompoundTag nbt = null;
- if (this.blockEntityTag != null) {
-- tag.put(CraftMetaBlockState.BLOCK_ENTITY_TAG, CustomData.of(this.blockEntityTag.getSnapshotNBTWithoutComponents()));
+- nbt = this.blockEntityTag.getItemNBT();
+-
+- for (TypedDataComponent<?> component : this.blockEntityTag.collectComponents()) {
+- tag.putIfAbsent(component);
+- }
+ // Paper start - accurately replicate logic for creating ItemStack from BlockEntity
+ // taken from BlockEntity#saveToItem and BlockItem#setBlockEntityData
+ final CompoundTag nbt = this.blockEntityTag.copyTag();
@@ -286,11 +313,24 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
+ } else if (!nbt.isEmpty()) {
+ BlockEntity.addEntityType(nbt, java.util.Objects.requireNonNull(CraftBlockStates.getBlockEntityType(this.materialForBlockEntityType())));
+ tag.put(CraftMetaBlockState.BLOCK_ENTITY_TAG, CustomData.of(nbt));
-+ }
+ }
-- for (TypedDataComponent<?> component : this.blockEntityTag.collectComponents()) {
-- tag.putIfAbsent(component);
+- if (this.position != null) {
+- if (nbt == null) {
+- nbt = new CompoundTag();
- }
+-
+- nbt.putInt("x", this.position.getBlockX());
+- nbt.putInt("y", this.position.getBlockY());
+- nbt.putInt("z", this.position.getBlockZ());
+- }
+-
+- if (nbt != null && !nbt.isEmpty()) {
+- CraftBlockEntityState<?> tile = (this.blockEntityTag != null) ? this.blockEntityTag : CraftMetaBlockState.getBlockState(this.material, null);
+- // See ItemBlock#setBlockEntityData
+- tile.addEntityType(nbt);
+-
+- tag.put(CraftMetaBlockState.BLOCK_ENTITY_TAG, CustomData.of(nbt));
+ for (final TypedDataComponent<?> component : this.components) {
+ if (CraftMetaItem.DEFAULT_HANDLED_DCTS.contains(component.type())) continue; // if the component type was already handled by CraftMetaItem, don't add it again
+ tag.builder.set(component);
@@ -299,7 +339,7 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
}
@Override
-@@ -134,14 +177,29 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
+@@ -162,23 +191,35 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
if (tag.contains(CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
this.internalTag = tag.getCompound(CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT);
@@ -308,10 +348,10 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
+ // Paper start - new serialization format
+ if (tag.contains(CraftMetaBlockState.BLOCK_ENTITY_TAG_CUSTOM_DATA.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
+ this.blockEntityTag = CustomData.of(tag.getCompound(CraftMetaBlockState.BLOCK_ENTITY_TAG_CUSTOM_DATA.NBT));
- }
++ }
+ if (tag.contains(CraftMetaBlockState.BLOCK_ENTITY_COMPONENTS.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
+ this.components = DataComponentMap.CODEC.parse(org.bukkit.craftbukkit.CraftRegistry.getMinecraftRegistry().createSerializationContext(net.minecraft.nbt.NbtOps.INSTANCE), tag.getCompound(CraftMetaBlockState.BLOCK_ENTITY_COMPONENTS.NBT)).getOrThrow();
-+ }
+ }
+ // Paper end - new serialization format
}
@@ -322,22 +362,34 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
+ // Paper start - new serialization format
+ if (!this.blockEntityTag.isEmpty()) {
+ internalTags.put(CraftMetaBlockState.BLOCK_ENTITY_TAG_CUSTOM_DATA.NBT, this.blockEntityTag.getUnsafe()); // unsafe because it's serialized right away
-+ }
+ }
+ if (!this.components.isEmpty()) {
+ final Tag componentsTag = DataComponentMap.CODEC.encodeStart(org.bukkit.craftbukkit.CraftRegistry.getMinecraftRegistry().createSerializationContext(net.minecraft.nbt.NbtOps.INSTANCE), this.components).getOrThrow();
+ internalTags.put(CraftMetaBlockState.BLOCK_ENTITY_COMPONENTS.NBT, componentsTag);
- }
++ }
+ // Paper end - new serialization format
}
@Override
-@@ -155,9 +213,10 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
+ ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
+ super.serialize(builder);
+ builder.put("blockMaterial", this.material.name());
+- if (this.position != null) {
+- builder.put("blockPosition", this.position);
+- }
+ return builder;
+ }
+
+@@ -186,12 +227,10 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
int applyHash() {
final int original;
int hash = original = super.applyHash();
- if (this.blockEntityTag != null) {
- hash = 61 * hash + this.blockEntityTag.hashCode();
- }
+- if (this.position != null) {
+- hash = 61 * hash + this.position.hashCode();
+- }
+ // Paper start
+ hash = 61 * hash + this.blockEntityTag.hashCode();
+ hash = 61 * hash + this.components.hashCode();
@@ -345,25 +397,30 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
return original != hash ? CraftMetaBlockState.class.hashCode() ^ hash : hash;
}
-@@ -169,45 +228,71 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
+@@ -203,52 +242,75 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
if (meta instanceof CraftMetaBlockState) {
CraftMetaBlockState that = (CraftMetaBlockState) meta;
-- return Objects.equal(this.blockEntityTag, that.blockEntityTag);
+- return Objects.equal(this.blockEntityTag, that.blockEntityTag) && Objects.equal(this.position, that.position);
+ return Objects.equal(this.blockEntityTag, that.blockEntityTag) && Objects.equal(this.components, that.components); // Paper
}
return true;
}
+ boolean isBlockStateEmpty() {
+- return !(this.blockEntityTag != null || this.position != null);
++ return !(this.blockEntityTag != null);
+ }
+
@Override
boolean notUncommon(CraftMetaItem meta) {
-- return super.notUncommon(meta) && (meta instanceof CraftMetaBlockState || this.blockEntityTag == null);
+- return super.notUncommon(meta) && (meta instanceof CraftMetaBlockState || this.isBlockStateEmpty());
+ return super.notUncommon(meta) && (meta instanceof CraftMetaBlockState || (this.blockEntityTag.isEmpty() && this.components.isEmpty())); // Paper
}
@Override
boolean isEmpty() {
-- return super.isEmpty() && this.blockEntityTag == null;
+- return super.isEmpty() && this.isBlockStateEmpty();
+ return super.isEmpty() && this.blockEntityTag.isEmpty() && this.components.isEmpty(); // Paper
}
@@ -373,6 +430,9 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
- if (this.blockEntityTag != null) {
- meta.blockEntityTag = this.blockEntityTag.copy();
- }
+- if (this.position != null) {
+- meta.position = this.position.clone();
+- }
+ // Paper start - no need for "clone" because they are essentially immutables
+ meta.blockEntityTag = this.blockEntityTag;
+ meta.components = this.components;
@@ -427,7 +487,7 @@ index ed6e9d1f2d42392d92f4e3ae6f67c8d4ed700fb5..d8ec01c65c6a57accf1b510499f9446e
}
private static CraftBlockEntityState<?> getBlockState(Material material, CompoundTag blockEntityTag) {
-@@ -237,7 +322,23 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
+@@ -278,7 +340,23 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
Class<?> blockStateType = CraftBlockStates.getBlockStateType(stateMaterial);
Preconditions.checkArgument(blockStateType == blockState.getClass() && blockState instanceof CraftBlockEntityState, "Invalid blockState for %s", this.material);
@@ -989,7 +1049,7 @@ index 566d893a413fd04b99e83dc2da8fe958a48492a8..a944803771d514572f94b4e98a6d4435
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c44174b0c943 100644
+index 85bc581d0807f07212bf0cd4c85c65f0ec7ef547..ecf3db9b976c0c1ceaf5db04dc0420cd2cde76f6 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -182,9 +182,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1053,7 +1113,16 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
itemTag.put(CraftMetaItem.DAMAGE, this.damage);
}
-@@ -966,10 +972,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -951,7 +957,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+ }
+
+ void applyEnchantments(Map<Enchantment, Integer> enchantments, CraftMetaItem.Applicator tag, ItemMetaKeyType<ItemEnchantments> key, ItemFlag itemFlag) {
+- if (enchantments == null && !this.hasItemFlag(itemFlag)) {
++ if (enchantments == null /*&& !this.hasItemFlag(itemFlag)*/) { // Paper - general item meta fixes - only emit enchantment component if enchantments are defined
+ return;
+ }
+
+@@ -968,10 +974,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
void applyModifiers(Multimap<Attribute, AttributeModifier> modifiers, CraftMetaItem.Applicator tag) {
@@ -1066,16 +1135,16 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
return;
}
-@@ -1006,7 +1010,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1008,7 +1012,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Overridden
boolean isEmpty() {
-- return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper
+- return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper
+ return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamageValue() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null || this.canPlaceOnPredicates != null || this.canBreakPredicates != null); // Paper
}
// Paper start
-@@ -1102,6 +1106,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1104,6 +1108,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public void lore(final List<? extends net.kyori.adventure.text.Component> lore) {
@@ -1083,7 +1152,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(lore) : null;
}
// Paper end
-@@ -1160,7 +1165,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1162,7 +1167,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public void removeEnchantments() {
if (this.hasEnchants()) {
@@ -1092,7 +1161,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
}
}
-@@ -1226,6 +1231,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1228,6 +1233,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
// Paper end
@Override
public void setLore(List<String> lore) {
@@ -1100,7 +1169,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
if (lore == null || lore.isEmpty()) {
this.lore = null;
} else {
-@@ -1241,6 +1247,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1243,6 +1249,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
// Paper start
@Override
public void setLoreComponents(List<net.md_5.bungee.api.chat.BaseComponent[]> lore) {
@@ -1108,7 +1177,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
if (lore == null) {
this.lore = null;
} else {
-@@ -1382,7 +1389,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1384,7 +1391,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public FoodComponent getFood() {
@@ -1117,7 +1186,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
}
@Override
-@@ -1438,7 +1445,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1440,7 +1447,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public Multimap<Attribute, AttributeModifier> getAttributeModifiers(@Nullable EquipmentSlot slot) {
@@ -1126,7 +1195,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
SetMultimap<Attribute, AttributeModifier> result = LinkedHashMultimap.create();
for (Map.Entry<Attribute, AttributeModifier> entry : this.attributeModifiers.entries()) {
if (entry.getValue().getSlot() == null || entry.getValue().getSlot() == slot) {
-@@ -1451,6 +1458,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1453,6 +1460,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public Collection<AttributeModifier> getAttributeModifiers(@Nonnull Attribute attribute) {
Preconditions.checkNotNull(attribute, "Attribute cannot be null");
@@ -1134,7 +1203,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
return this.attributeModifiers.containsKey(attribute) ? ImmutableList.copyOf(this.attributeModifiers.get(attribute)) : null;
}
-@@ -1458,22 +1466,33 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1460,22 +1468,33 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
public boolean addAttributeModifier(@Nonnull Attribute attribute, @Nonnull AttributeModifier modifier) {
Preconditions.checkNotNull(attribute, "Attribute cannot be null");
Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null");
@@ -1172,7 +1241,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
Iterator<Map.Entry<Attribute, AttributeModifier>> iterator = attributeModifiers.entries().iterator();
while (iterator.hasNext()) {
-@@ -1483,6 +1502,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1485,6 +1504,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
iterator.remove();
continue;
}
@@ -1180,7 +1249,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
this.attributeModifiers.put(next.getKey(), next.getValue());
}
}
-@@ -1490,13 +1510,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1492,13 +1512,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public boolean removeAttributeModifier(@Nonnull Attribute attribute) {
Preconditions.checkNotNull(attribute, "Attribute cannot be null");
@@ -1196,7 +1265,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
int removed = 0;
Iterator<Map.Entry<Attribute, AttributeModifier>> iter = this.attributeModifiers.entries().iterator();
-@@ -1516,7 +1536,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1518,7 +1538,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
public boolean removeAttributeModifier(@Nonnull Attribute attribute, @Nonnull AttributeModifier modifier) {
Preconditions.checkNotNull(attribute, "Attribute cannot be null");
Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null");
@@ -1205,7 +1274,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
int removed = 0;
Iterator<Map.Entry<Attribute, AttributeModifier>> iter = this.attributeModifiers.entries().iterator();
-@@ -1538,7 +1558,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1540,7 +1560,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public String getAsString() {
@@ -1214,7 +1283,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
this.applyToItem(tag);
DataComponentPatch patch = tag.build();
Tag nbt = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), patch).getOrThrow();
-@@ -1547,7 +1567,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1549,7 +1569,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public String getAsComponentString() {
@@ -1223,7 +1292,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
this.applyToItem(tag);
DataComponentPatch patch = tag.build();
-@@ -1587,6 +1607,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1589,6 +1609,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
if (first == null || second == null) {
return false;
}
@@ -1231,7 +1300,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
for (Map.Entry<Attribute, AttributeModifier> entry : first.entries()) {
if (!second.containsEntry(entry.getKey(), entry.getValue())) {
return false;
-@@ -1602,19 +1623,33 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1604,19 +1625,33 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public boolean hasDamage() {
@@ -1267,7 +1336,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
@Override
public boolean hasMaxDamage() {
return this.maxDamage != null;
-@@ -1628,6 +1663,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1630,6 +1665,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@Override
public void setMaxDamage(Integer maxDamage) {
@@ -1275,7 +1344,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
this.maxDamage = maxDamage;
}
-@@ -1659,7 +1695,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1661,7 +1697,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
&& (this.hasCustomModelData() ? that.hasCustomModelData() && this.customModelData.equals(that.customModelData) : !that.hasCustomModelData())
&& (this.hasBlockData() ? that.hasBlockData() && this.blockData.equals(that.blockData) : !that.hasBlockData())
&& (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost())
@@ -1284,7 +1353,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
&& (this.unhandledTags.equals(that.unhandledTags))
&& (this.removedTags.equals(that.removedTags))
&& (Objects.equals(this.customTag, that.customTag))
-@@ -1674,7 +1710,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1676,7 +1712,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
&& (this.hasFood() ? that.hasFood() && this.food.equals(that.food) : !that.hasFood())
&& (this.hasTool() ? that.hasTool() && this.tool.equals(that.tool) : !that.hasTool())
&& (this.hasJukeboxPlayable() ? that.hasJukeboxPlayable() && this.jukebox.equals(that.jukebox) : !that.hasJukeboxPlayable())
@@ -1293,7 +1362,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
&& (this.hasMaxDamage() ? that.hasMaxDamage() && this.maxDamage.equals(that.maxDamage) : !that.hasMaxDamage())
&& (this.canPlaceOnPredicates != null ? that.canPlaceOnPredicates != null && this.canPlaceOnPredicates.equals(that.canPlaceOnPredicates) : that.canPlaceOnPredicates == null) // Paper
&& (this.canBreakPredicates != null ? that.canBreakPredicates != null && this.canBreakPredicates.equals(that.canBreakPredicates) : that.canBreakPredicates == null) // Paper
-@@ -1720,9 +1756,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1722,9 +1758,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
hash = 61 * hash + (this.hasFood() ? this.food.hashCode() : 0);
hash = 61 * hash + (this.hasTool() ? this.tool.hashCode() : 0);
hash = 61 * hash + (this.hasJukeboxPlayable() ? this.jukebox.hashCode() : 0);
@@ -1306,7 +1375,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
hash = 61 * hash + (this.canPlaceOnPredicates != null ? this.canPlaceOnPredicates.hashCode() : 0); // Paper
hash = 61 * hash + (this.canBreakPredicates != null ? this.canBreakPredicates.hashCode() : 0); // Paper
hash = 61 * hash + this.version;
-@@ -1742,7 +1778,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1744,7 +1780,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
if (this.enchantments != null) {
clone.enchantments = new EnchantmentMap(this.enchantments); // Paper
}
@@ -1315,7 +1384,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
}
if (this.customTag != null) {
-@@ -1870,7 +1906,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1872,7 +1908,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
builder.put(CraftMetaItem.JUKEBOX_PLAYABLE.BUKKIT, this.jukebox);
}
@@ -1324,7 +1393,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
builder.put(CraftMetaItem.DAMAGE.BUKKIT, this.damage);
}
-@@ -1971,7 +2007,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1973,7 +2009,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
static void serializeModifiers(Multimap<Attribute, AttributeModifier> modifiers, ImmutableMap.Builder<String, Object> builder, ItemMetaKey key) {
@@ -1333,7 +1402,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
return;
}
-@@ -2053,7 +2089,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -2055,7 +2091,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
// Paper start - improve checking handled tags
@org.jetbrains.annotations.VisibleForTesting
public static final Map<Class<? extends CraftMetaItem>, Set<DataComponentType<?>>> HANDLED_DCTS_PER_TYPE = new HashMap<>();
@@ -1342,7 +1411,7 @@ index bee2f2f5675b8aaeb2a04ada1f6dba9aa9a14ed3..beeed762e5ba49c317c5f214af17c441
CraftMetaItem.NAME.TYPE,
CraftMetaItem.ITEM_NAME.TYPE,
CraftMetaItem.LORE.TYPE,
-@@ -2122,7 +2158,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -2124,7 +2160,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
// Paper end - improve checking handled data component types
protected static <T> Optional<? extends T> getOrEmpty(DataComponentPatch tag, ItemMetaKeyType<T> type) {
@@ -1529,7 +1598,7 @@ index 90c554dcbfe2bcca3f742379499f1e8e8665c512..14acdd2bd02de7e99b7f237151633ed7
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
-index 7f9182809f6e67ff571db0f365bc7e05f600775a..01c49df291f721bab3acb788ff2f27879b38bfc7 100644
+index 1a18779f9796704c8690226dbe491b0fa6ba99ea..c2476232b5472f1a0b1862588de2abf879b82ede 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
@@ -37,7 +37,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
@@ -1550,8 +1619,8 @@ index 7f9182809f6e67ff571db0f365bc7e05f600775a..01c49df291f721bab3acb788ff2f2787
} catch (IllegalArgumentException ex) {
// Invalid colour
}
-@@ -116,7 +116,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
- super.applyToItem(tag);
+@@ -120,7 +120,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
+ }
Optional<Holder<Potion>> defaultPotion = (this.hasBasePotionType()) ? Optional.of(CraftPotionType.bukkitToMinecraftHolder(this.type)) : Optional.empty();
- Optional<Integer> potionColor = (this.hasColor()) ? Optional.of(this.color.asRGB()) : Optional.empty();
@@ -1559,7 +1628,7 @@ index 7f9182809f6e67ff571db0f365bc7e05f600775a..01c49df291f721bab3acb788ff2f2787
List<MobEffectInstance> effectList = new ArrayList<>();
if (this.customEffects != null) {
-@@ -280,12 +280,12 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
+@@ -284,12 +284,12 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
@Override
public Color getColor() {
@@ -2032,10 +2101,10 @@ index 6c477913406a0dded8ca00295b8f4928e31404ae..2750c46c535d5b10afcaca109fc89d73
}
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
-index 6bed0a5c8d9f1ca72678cdf4699128e441a24541..8e03e14d0e65bfdf2196a08220d1408b1297aa0d 100644
+index 9cc1ef5c9221dd7d2069b280f0c91ce9439a995a..1c80fe7549d70ae16c7b755c22752549261f072a 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
-@@ -93,7 +93,7 @@ public class DeprecatedItemMetaCustomValueTest extends AbstractTestingBase {
+@@ -94,7 +94,7 @@ public class DeprecatedItemMetaCustomValueTest {
public void testNBTTagStoring() {
CraftMetaItem itemMeta = this.createComplexItemMeta();
@@ -2045,10 +2114,10 @@ index 6bed0a5c8d9f1ca72678cdf4699128e441a24541..8e03e14d0e65bfdf2196a08220d1408b
assertEquals(itemMeta, new CraftMetaItem(compound.build(), null)); // Paper
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java
-index 6f94c7a19f2f598a836ec7db30332dd95f8675a6..54ffbfd91a03efa2d0d271ed10db4209a2309638 100644
+index 130c4500a5e854480962c8f720b1df4c67d43c33..f33b49915d1f1f0838c49ac943e8d4d619450f6b 100644
--- a/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java
-@@ -127,7 +127,7 @@ public class PersistentDataContainerTest extends AbstractTestingBase {
+@@ -128,7 +128,7 @@ public class PersistentDataContainerTest {
public void testNBTTagStoring() {
CraftMetaItem itemMeta = this.createComplexItemMeta();
@@ -2057,7 +2126,7 @@ index 6f94c7a19f2f598a836ec7db30332dd95f8675a6..54ffbfd91a03efa2d0d271ed10db4209
itemMeta.applyToItem(compound);
assertEquals(itemMeta, new CraftMetaItem(compound.build(), null)); // Paper
-@@ -473,7 +473,7 @@ public class PersistentDataContainerTest extends AbstractTestingBase {
+@@ -474,7 +474,7 @@ public class PersistentDataContainerTest {
assertEquals(List.of(), container.get(PersistentDataContainerTest.requestKey("list"), PersistentDataType.LIST.strings()));
// Write and read the entire container to NBT
diff --git a/patches/server/0965-Brigadier-based-command-API.patch b/patches/server/0965-Brigadier-based-command-API.patch
index 997c10e4b7..6334fcc1c8 100644
--- a/patches/server/0965-Brigadier-based-command-API.patch
+++ b/patches/server/0965-Brigadier-based-command-API.patch
@@ -2392,7 +2392,7 @@ index e0c46e548a34c963750c9411dfd3c0946d67a7c7..5215783353021583e7a726d281e4d173
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index cd747daf186fa3a540db08232a57683492f0131f..df15ce8d1da2737e339880d3d2f6731e0b92ca7f 100644
+index 0fc6e659915a4547c2db9205fed205a1d28f21d4..35d1dcabb182b0a31727e5ddefe33955c804603b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -272,11 +272,11 @@ public final class CraftServer implements Server {
@@ -2423,7 +2423,7 @@ index cd747daf186fa3a540db08232a57683492f0131f..df15ce8d1da2737e339880d3d2f6731e
CraftRegistry.setMinecraftRegistry(console.registryAccess());
-@@ -602,48 +608,11 @@ public final class CraftServer implements Server {
+@@ -603,48 +609,11 @@ public final class CraftServer implements Server {
}
private void setVanillaCommands(boolean first) { // Spigot
@@ -2474,7 +2474,7 @@ index cd747daf186fa3a540db08232a57683492f0131f..df15ce8d1da2737e339880d3d2f6731e
// Refresh commands
for (ServerPlayer player : this.getHandle().players) {
-@@ -1030,17 +999,31 @@ public final class CraftServer implements Server {
+@@ -1031,17 +1000,31 @@ public final class CraftServer implements Server {
return true;
}
@@ -2516,7 +2516,7 @@ index cd747daf186fa3a540db08232a57683492f0131f..df15ce8d1da2737e339880d3d2f6731e
return false;
}
-@@ -1049,7 +1032,7 @@ public final class CraftServer implements Server {
+@@ -1050,7 +1033,7 @@ public final class CraftServer implements Server {
public void reload() {
// Paper start - lifecycle events
if (io.papermc.paper.plugin.lifecycle.event.LifecycleEventRunner.INSTANCE.blocksPluginReloading()) {
@@ -2525,7 +2525,7 @@ index cd747daf186fa3a540db08232a57683492f0131f..df15ce8d1da2737e339880d3d2f6731e
}
// Paper end - lifecycle events
org.spigotmc.WatchdogThread.hasStarted = false; // Paper - Disable watchdog early timeout on reload
-@@ -1103,8 +1086,9 @@ public final class CraftServer implements Server {
+@@ -1105,8 +1088,9 @@ public final class CraftServer implements Server {
}
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
@@ -2536,7 +2536,7 @@ index cd747daf186fa3a540db08232a57683492f0131f..df15ce8d1da2737e339880d3d2f6731e
// Paper start
for (Plugin plugin : pluginClone) {
entityMetadata.removeAll(plugin);
-@@ -1144,6 +1128,12 @@ public final class CraftServer implements Server {
+@@ -1146,6 +1130,12 @@ public final class CraftServer implements Server {
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins
@@ -2714,45 +2714,34 @@ index 0000000000000000000000000000000000000000..b2fdb8351c2abb55283850a929d2a87a
+io.papermc.paper.command.brigadier.argument.VanillaArgumentProviderImpl
diff --git a/src/test/java/io/papermc/paper/command/brigadier/BukkitCommandConversionTest.java b/src/test/java/io/papermc/paper/command/brigadier/BukkitCommandConversionTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..6475510ea1084a003fb2c8645cb4538b3f48e1c7
+index 0000000000000000000000000000000000000000..4b419ce023f61d5af9ff7a34e6879de1991cf4df
--- /dev/null
+++ b/src/test/java/io/papermc/paper/command/brigadier/BukkitCommandConversionTest.java
-@@ -0,0 +1,113 @@
+@@ -0,0 +1,102 @@
+package io.papermc.paper.command.brigadier;
+
+import com.mojang.brigadier.CommandDispatcher;
-+import com.mojang.brigadier.ResultConsumer;
-+import com.mojang.brigadier.context.CommandContext;
+import com.mojang.brigadier.exceptions.CommandSyntaxException;
+import com.mojang.brigadier.suggestion.Suggestions;
-+import com.mojang.brigadier.tree.CommandNode;
+import io.papermc.paper.command.brigadier.bukkit.BukkitBrigForwardingMap;
-+import net.minecraft.server.MinecraftServer;
-+import net.minecraft.world.flag.FeatureFlags;
-+import org.apache.logging.log4j.core.util.Assert;
++import java.util.List;
++import java.util.Map;
+import org.bukkit.Bukkit;
+import org.bukkit.Location;
-+import org.bukkit.World;
+import org.bukkit.command.Command;
+import org.bukkit.command.CommandMap;
+import org.bukkit.command.CommandSender;
+import org.bukkit.command.SimpleCommandMap;
-+import org.bukkit.craftbukkit.command.CraftCommandMap;
-+import org.bukkit.craftbukkit.command.VanillaCommandWrapper;
-+import org.bukkit.entity.Entity;
-+import org.bukkit.plugin.PluginManager;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.RegistryHelper;
++import org.bukkit.support.environment.AllFeatures;
++import org.bukkit.support.environment.Normal;
+import org.jetbrains.annotations.NotNull;
-+import org.jetbrains.annotations.Nullable;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+
-+import java.util.List;
-+import java.util.Map;
-+import java.util.logging.Logger;
-+
-+public class BukkitCommandConversionTest extends AbstractTestingBase {
++@Normal
++public class BukkitCommandConversionTest {
+
+ private CommandSender getSender() {
+ return Mockito.mock(CommandSender.class);
@@ -2764,7 +2753,7 @@ index 0000000000000000000000000000000000000000..6475510ea1084a003fb2c8645cb4538b
+ CommandSourceStack object = Mockito.mock(CommandSourceStack.class);
+ Mockito.when(object.getLocation()).thenReturn(new Location(null, 0, 0, 0));;
+
-+ CommandDispatcher dispatcher = DATA_PACK.commands.getDispatcher();
++ CommandDispatcher dispatcher = RegistryHelper.getDataPack().commands.getDispatcher();
+ dispatcher.setConsumer((context, success, result) -> {});
+ CommandMap commandMap = new SimpleCommandMap(Bukkit.getServer(), new BukkitBrigForwardingMap());
+ Map<String, Command> stringCommandMap = commandMap.getKnownCommands();
@@ -2831,16 +2820,16 @@ index 0000000000000000000000000000000000000000..6475510ea1084a003fb2c8645cb4538b
+ }
+ }
+}
-diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
-index cce9e2226ef554c10e1df1dbaa1791656d5d0799..6e9ee1b56b4151c31c373e58172055e02fd7875a 100644
---- a/src/test/java/org/bukkit/support/DummyServer.java
-+++ b/src/test/java/org/bukkit/support/DummyServer.java
-@@ -100,7 +100,7 @@ public final class DummyServer {
- final Thread currentThread = Thread.currentThread();
- when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
-
-- final org.bukkit.plugin.PluginManager pluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(instance, new org.bukkit.command.SimpleCommandMap(instance), null);
-+ final org.bukkit.plugin.PluginManager pluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(instance, new org.bukkit.command.SimpleCommandMap(instance, new java.util.HashMap<>()), null); // Paper
- when(instance.getPluginManager()).thenReturn(pluginManager);
- // paper end - testing additions
+diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
+index 5d24b95e3eec351ec1e9444533dd5f9d376ec4c6..fb4b7625b4ea4b4918ade95829e10e98d1bac70f 100644
+--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
++++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
+@@ -87,7 +87,7 @@ public final class DummyServerHelper {
+ // Paper start - testing additions
+ final Thread currentThread = Thread.currentThread();
+ when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
+- final org.bukkit.plugin.PluginManager pluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(instance, new org.bukkit.command.SimpleCommandMap(instance), null);
++ final org.bukkit.plugin.PluginManager pluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(instance, new org.bukkit.command.SimpleCommandMap(instance, new java.util.HashMap<>()), null);
+ when(instance.getPluginManager()).thenReturn(pluginManager);
+ // Paper end - testing additions
diff --git a/patches/server/0966-Fix-issues-with-Recipe-API.patch b/patches/server/0966-Fix-issues-with-Recipe-API.patch
index bb85dca687..415b2d65ba 100644
--- a/patches/server/0966-Fix-issues-with-Recipe-API.patch
+++ b/patches/server/0966-Fix-issues-with-Recipe-API.patch
@@ -42,47 +42,48 @@ index 6ba29875d78ede4aa7978ff689e588f7fed11528..c76c78bb7757d407102271463e14716a
if (list.exact) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
-index 38690b28b6f67624d68877c1e89ebe30b402b233..3aec771478a6b17353d57e82baac53dd24779e7b 100644
+index 37b39a2c696a59b0f52324cc222b83c0c9f341e6..3aec771478a6b17353d57e82baac53dd24779e7b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
@@ -30,6 +30,6 @@ public class CraftSmithingTransformRecipe extends SmithingTransformRecipe implem
public void addToCraftingManager() {
ItemStack result = this.getResult();
-- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMS(this.getTemplate(), true), this.toNMS(this.getBase(), true), this.toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy
+- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false), CraftItemStack.asNMSCopy(result), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy
+ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false), CraftItemStack.asNMSCopy(result), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy & support empty RecipeChoice
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
-index 5d7782b168138383c606a2c52fbdebe1732364ac..61af2fe3534ff67f10310c6c7dec39cff0f93ee3 100644
+index 389fa313f811279091cace76faaabf8bdb0fc94c..61af2fe3534ff67f10310c6c7dec39cff0f93ee3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
@@ -28,6 +28,6 @@ public class CraftSmithingTrimRecipe extends SmithingTrimRecipe implements Craft
@Override
public void addToCraftingManager() {
-- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMS(this.getTemplate(), true), this.toNMS(this.getBase(), true), this.toNMS(this.getAddition(), true), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy
+- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy
+ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMS(this.getTemplate(), false), this.toNMS(this.getBase(), false), this.toNMS(this.getAddition(), false), this.willCopyDataComponents()))); // Paper - Option to prevent data components copy & support empty RecipeChoice
}
}
diff --git a/src/test/java/io/papermc/paper/inventory/recipe/TestRecipeChoice.java b/src/test/java/io/papermc/paper/inventory/recipe/TestRecipeChoice.java
new file mode 100644
-index 0000000000000000000000000000000000000000..b6816485a2360b936c049b398183658ee18813ec
+index 0000000000000000000000000000000000000000..45ab2b6d32b29cb663df848534e1aa68293dd613
--- /dev/null
+++ b/src/test/java/io/papermc/paper/inventory/recipe/TestRecipeChoice.java
-@@ -0,0 +1,24 @@
+@@ -0,0 +1,25 @@
+package io.papermc.paper.inventory.recipe;
+
+import java.util.Iterator;
+import org.bukkit.Bukkit;
+import org.bukkit.inventory.Recipe;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.AllFeatures;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
-+class TestRecipeChoice extends AbstractTestingBase {
++@AllFeatures
++class TestRecipeChoice {
+
+ @Test
+ void testRecipeChoices() {
@@ -95,22 +96,23 @@ index 0000000000000000000000000000000000000000..b6816485a2360b936c049b398183658e
+ assertTrue(foundRecipes, "No recipes found!");
+ }
+}
-diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
-index 6e9ee1b56b4151c31c373e58172055e02fd7875a..11ba7a3db4c56ec00d9ad1ed8e46b242c033fe74 100644
---- a/src/test/java/org/bukkit/support/DummyServer.java
-+++ b/src/test/java/org/bukkit/support/DummyServer.java
-@@ -104,6 +104,14 @@ public final class DummyServer {
- when(instance.getPluginManager()).thenReturn(pluginManager);
- // paper end - testing additions
+diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
+index fb4b7625b4ea4b4918ade95829e10e98d1bac70f..cb2b39c562f609375b9e5b20cb5899780995373d 100644
+--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
++++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
+@@ -92,6 +92,15 @@ public final class DummyServerHelper {
+ // Paper end - testing additions
-+ // Paper start - add test for recipe conversion
-+ when(instance.recipeIterator()).thenAnswer(ignored -> {
-+ return com.google.common.collect.Iterators.transform(
-+ AbstractTestingBase.DATA_PACK.getRecipeManager().byType.entries().iterator(),
-+ input -> input.getValue().toBukkitRecipe());
-+ });
-+ // Paper end - add test for recipe conversion
+ io.papermc.paper.configuration.GlobalConfigTestingBase.setupGlobalConfigForTest(); // Paper - configuration files - setup global configuration test base
+
- Bukkit.setServer(instance);
- } catch (Throwable t) {
- throw new Error(t);
++ // Paper start - add test for recipe conversion
++ when(instance.recipeIterator()).thenAnswer(ignored ->
++ com.google.common.collect.Iterators.transform(
++ RegistryHelper.getDataPack().getRecipeManager().byType.entries().iterator(),
++ input -> input.getValue().toBukkitRecipe()
++ )
++ );
++ // Paper end - add test for recipe conversion
+ return instance;
+ }
+ }
diff --git a/patches/server/0967-Fix-equipment-slot-and-group-API.patch b/patches/server/0967-Fix-equipment-slot-and-group-API.patch
index 34fd77dcd9..e45968e407 100644
--- a/patches/server/0967-Fix-equipment-slot-and-group-API.patch
+++ b/patches/server/0967-Fix-equipment-slot-and-group-API.patch
@@ -10,7 +10,7 @@ Adds the following:
Co-authored-by: SoSeDiK <[email protected]>
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 0398ba2cac2b69111ce7c5f9e5680119dd27c6cf..7e280955067169f63f15162e9cad1e86e824a8e5 100644
+index fb6465bbb2a8bb7597c15d7ac8375f696b897e43..34641a6356876c46d05188a988c02835d0c06dc6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1211,4 +1211,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@@ -52,10 +52,10 @@ index 9d74577af071954e1e37201a96368c1360076209..eafa54c870c3e2aef30c3f9f96f51660
throw new IllegalArgumentException("Not implemented. This is a bug");
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index beeed762e5ba49c317c5f214af17c44174b0c943..042bfdd14c9ff4cc8ed3421f73565f0f03b11bcb 100644
+index 88e1156510f3a43dd37e279205e5ed5dd120c1db..7f6f404f5a2be7876ae239355979e8c8a7a198ce 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -1448,7 +1448,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1450,7 +1450,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
if (this.attributeModifiers == null) return LinkedHashMultimap.create(); // Paper - don't change the components
SetMultimap<Attribute, AttributeModifier> result = LinkedHashMultimap.create();
for (Map.Entry<Attribute, AttributeModifier> entry : this.attributeModifiers.entries()) {
@@ -64,7 +64,7 @@ index beeed762e5ba49c317c5f214af17c44174b0c943..042bfdd14c9ff4cc8ed3421f73565f0f
result.put(entry.getKey(), entry.getValue());
}
}
-@@ -1522,9 +1522,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -1524,9 +1524,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
while (iter.hasNext()) {
Map.Entry<Attribute, AttributeModifier> entry = iter.next();
@@ -77,10 +77,10 @@ index beeed762e5ba49c317c5f214af17c44174b0c943..042bfdd14c9ff4cc8ed3421f73565f0f
}
diff --git a/src/test/java/io/papermc/paper/inventory/item/EquipmentSlotGroupTest.java b/src/test/java/io/papermc/paper/inventory/item/EquipmentSlotGroupTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..ee0bfe4edb134d7ea3a3b97f5102a7f3122c3b99
+index 0000000000000000000000000000000000000000..a26dc8f4787276468417196440cb8f73670a56c7
--- /dev/null
+++ b/src/test/java/io/papermc/paper/inventory/item/EquipmentSlotGroupTest.java
-@@ -0,0 +1,51 @@
+@@ -0,0 +1,53 @@
+package io.papermc.paper.inventory.item;
+
+import java.lang.reflect.Field;
@@ -90,6 +90,7 @@ index 0000000000000000000000000000000000000000..ee0bfe4edb134d7ea3a3b97f5102a7f3
+import net.minecraft.world.entity.EquipmentSlot;
+import org.bukkit.craftbukkit.CraftEquipmentSlot;
+import org.bukkit.inventory.EquipmentSlotGroup;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.EnumSource;
+import org.junit.jupiter.params.provider.MethodSource;
@@ -97,6 +98,7 @@ index 0000000000000000000000000000000000000000..ee0bfe4edb134d7ea3a3b97f5102a7f3
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
++@Normal
+class EquipmentSlotGroupTest {
+
+ static List<EquipmentSlotGroup> apiValues() throws ReflectiveOperationException {
diff --git a/patches/server/0975-Adopt-MaterialRerouting.patch b/patches/server/0975-Adopt-MaterialRerouting.patch
index e6473ef21a..648057e1dd 100644
--- a/patches/server/0975-Adopt-MaterialRerouting.patch
+++ b/patches/server/0975-Adopt-MaterialRerouting.patch
@@ -94,10 +94,10 @@ index 3ff0f0e34356cee4c510fdd60af723b1c5df156a..6cc9d7a9e6d4bfdc27e52fc581b2bb83
+ // Paper end - register paper API specific material consumers in rerouting
}
diff --git a/src/test/java/org/bukkit/craftbukkit/legacy/MaterialReroutingTest.java b/src/test/java/org/bukkit/craftbukkit/legacy/MaterialReroutingTest.java
-index a5f3d562afec242912589bfc053ff91ede77347e..0fac826b9367a821c6801190997592219cb47f73 100644
+index cd03ea1f726894161ca786e7e7d00d04716405d3..329eeb174180b5d90b071247dac5459e4ffe3be3 100644
--- a/src/test/java/org/bukkit/craftbukkit/legacy/MaterialReroutingTest.java
+++ b/src/test/java/org/bukkit/craftbukkit/legacy/MaterialReroutingTest.java
-@@ -56,6 +56,9 @@ public class MaterialReroutingTest extends AbstractTestingBase {
+@@ -56,6 +56,9 @@ public class MaterialReroutingTest {
.filter(entry -> !entry.getName().endsWith("ItemType.class"))
.filter(entry -> !entry.getName().endsWith("Registry.class"))
.filter(entry -> !entry.getName().startsWith("org/bukkit/material"))
@@ -107,7 +107,7 @@ index a5f3d562afec242912589bfc053ff91ede77347e..0fac826b9367a821c680119099759221
.map(entry -> {
try {
return MaterialReroutingTest.jarFile.getInputStream(entry);
-@@ -93,6 +96,10 @@ public class MaterialReroutingTest extends AbstractTestingBase {
+@@ -93,6 +96,10 @@ public class MaterialReroutingTest {
continue;
}
}
@@ -116,9 +116,9 @@ index a5f3d562afec242912589bfc053ff91ede77347e..0fac826b9367a821c680119099759221
+ if (isInternal(methodNode.invisibleAnnotations)) continue;
+ // Paper end - filter out more methods from rerouting test
- if (!Commodore.rerouteMethods(Collections.emptySet(), ApiVersion.CURRENT, MaterialReroutingTest.MATERIAL_METHOD_REROUTE, (methodNode.access & Opcodes.ACC_STATIC) != 0, classNode.name, methodNode.name, methodNode.desc, a -> { })) {
+ if (!Commodore.rerouteMethods(ApiVersion.CURRENT, MaterialReroutingTest.MATERIAL_METHOD_REROUTE, (methodNode.access & Opcodes.ACC_STATIC) != 0, classNode.name, methodNode.name, methodNode.desc, a -> { })) {
missingReroute.add(methodNode.name + " " + methodNode.desc + " " + methodNode.signature);
-@@ -109,6 +116,13 @@ public class MaterialReroutingTest extends AbstractTestingBase {
+@@ -109,6 +116,13 @@ public class MaterialReroutingTest {
}
}
diff --git a/patches/server/0981-Moonrise-optimisation-patches.patch b/patches/server/0981-Moonrise-optimisation-patches.patch
index 0e81124113..0a8d66874e 100644
--- a/patches/server/0981-Moonrise-optimisation-patches.patch
+++ b/patches/server/0981-Moonrise-optimisation-patches.patch
@@ -22685,7 +22685,7 @@ index 0761d5bc5f2813bb4a9f664ac7a05b9744d0a778..7d2896918ff5fed37e5de5a22c37b0c7
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
-index 9a009a688c02e990723917766c51e1c0e71e338d..4db96543e2072e47040bb25a9d97ea6a69c4a43d 100644
+index 43513325b7052d388a63d63bd3a4edff48cf23c2..4db96543e2072e47040bb25a9d97ea6a69c4a43d 100644
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
@@ -32,46 +32,125 @@ import net.minecraft.world.level.lighting.LevelLightEngine;
@@ -22960,7 +22960,7 @@ index 9a009a688c02e990723917766c51e1c0e71e338d..4db96543e2072e47040bb25a9d97ea6a
for (int i = 0; i < this.changedBlocksPerSection.length; ++i) {
ShortSet shortset = this.changedBlocksPerSection[i];
-@@ -269,193 +349,40 @@ public class ChunkHolder extends GenerationChunkHolder {
+@@ -269,201 +349,40 @@ public class ChunkHolder extends GenerationChunkHolder {
@Override
public int getTicketLevel() {
@@ -23006,18 +23006,19 @@ index 9a009a688c02e990723917766c51e1c0e71e338d..4db96543e2072e47040bb25a9d97ea6a
+ throw new UnsupportedOperationException(); // Paper - rewrite chunk system
}
- protected void updateFutures(ChunkMap chunkLoadingManager, Executor executor) {
-- FullChunkStatus fullchunkstatus = ChunkLevel.fullStatus(this.oldTicketLevel);
-- FullChunkStatus fullchunkstatus1 = ChunkLevel.fullStatus(this.ticketLevel);
-- boolean flag = fullchunkstatus.isOrAfter(FullChunkStatus.FULL);
-- boolean flag1 = fullchunkstatus1.isOrAfter(FullChunkStatus.FULL);
-- // CraftBukkit start
-- // ChunkUnloadEvent: Called before the chunk is unloaded: isChunkLoaded is still true and chunk can still be modified by plugins.
-- if (flag && !flag1) {
+- // CraftBukkit start
+- // ChunkUnloadEvent: Called before the chunk is unloaded: isChunkLoaded is still true and chunk can still be modified by plugins.
+- // SPIGOT-7780: Moved out of updateFutures to call all chunk unload events before calling updateHighestAllowedStatus for all chunks
+- protected void callEventIfUnloading(ChunkMap playerchunkmap) {
+- FullChunkStatus oldFullChunkStatus = ChunkLevel.fullStatus(this.oldTicketLevel);
+- FullChunkStatus newFullChunkStatus = ChunkLevel.fullStatus(this.ticketLevel);
+- boolean oldIsFull = oldFullChunkStatus.isOrAfter(FullChunkStatus.FULL);
+- boolean newIsFull = newFullChunkStatus.isOrAfter(FullChunkStatus.FULL);
+- if (oldIsFull && !newIsFull) {
- this.getFullChunkFuture().thenAccept((either) -> {
- LevelChunk chunk = (LevelChunk) either.orElse(null);
- if (chunk != null) {
-- chunkLoadingManager.callbackExecutor.execute(() -> {
+- playerchunkmap.callbackExecutor.execute(() -> {
- // Minecraft will apply the chunks tick lists to the world once the chunk got loaded, and then store the tick
- // lists again inside the chunk once the chunk becomes inaccessible and set the chunk's needsSaving flag.
- // These actions may however happen deferred, so we manually set the needsSaving flag already here.
@@ -23032,9 +23033,16 @@ index 9a009a688c02e990723917766c51e1c0e71e338d..4db96543e2072e47040bb25a9d97ea6a
- });
-
- // Run callback right away if the future was already done
-- chunkLoadingManager.callbackExecutor.run();
+- playerchunkmap.callbackExecutor.run();
- }
-- // CraftBukkit end
+- }
+- // CraftBukkit end
+-
+ protected void updateFutures(ChunkMap chunkLoadingManager, Executor executor) {
+- FullChunkStatus fullchunkstatus = ChunkLevel.fullStatus(this.oldTicketLevel);
+- FullChunkStatus fullchunkstatus1 = ChunkLevel.fullStatus(this.ticketLevel);
+- boolean flag = fullchunkstatus.isOrAfter(FullChunkStatus.FULL);
+- boolean flag1 = fullchunkstatus1.isOrAfter(FullChunkStatus.FULL);
-
- this.wasAccessibleSinceLastSave |= flag1;
- if (!flag && flag1) {
@@ -24295,7 +24303,7 @@ index 4c1cf5798209297e1e8a634b63770e917a84a63c..48b8fa3dea0244f9a0f4e0b8850b17a6
this.serverEntity = new ServerEntity(ChunkMap.this.level, entity, j, flag, this::broadcast, this.seenBy); // CraftBukkit
this.entity = entity;
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
-index 56aa26bb8d0bfbd3c799163fa620259e6455c89b..2d2596f04f5addac38037a14a02c6e0622d0c485 100644
+index 1e7b440cc2c1bf53210069b38286f67a7b97041b..2d2596f04f5addac38037a14a02c6e0622d0c485 100644
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
@@ -36,64 +36,58 @@ import net.minecraft.world.level.ChunkPos;
@@ -24397,7 +24405,7 @@ index 56aa26bb8d0bfbd3c799163fa620259e6455c89b..2d2596f04f5addac38037a14a02c6e06
}
-@@ -110,86 +104,15 @@ public abstract class DistanceManager {
+@@ -110,91 +104,15 @@ public abstract class DistanceManager {
protected abstract ChunkHolder updateChunkScheduling(long pos, int level, @Nullable ChunkHolder holder, int k);
public boolean runAllUpdates(ChunkMap chunkLoadingManager) {
@@ -24412,6 +24420,11 @@ index 56aa26bb8d0bfbd3c799163fa620259e6455c89b..2d2596f04f5addac38037a14a02c6e06
- }
-
- if (!this.chunksToUpdateFutures.isEmpty()) {
+- // CraftBukkit start - SPIGOT-7780: Call chunk unload events before updateHighestAllowedStatus
+- this.chunksToUpdateFutures.forEach((playerchunk) -> {
+- playerchunk.callEventIfUnloading(chunkLoadingManager);
+- });
+- // CraftBukkit end
- this.chunksToUpdateFutures.forEach((playerchunk) -> {
- playerchunk.updateHighestAllowedStatus(chunkLoadingManager);
- });
@@ -24487,7 +24500,7 @@ index 56aa26bb8d0bfbd3c799163fa620259e6455c89b..2d2596f04f5addac38037a14a02c6e06
}
public <T> void addTicket(TicketType<T> type, ChunkPos pos, int level, T argument) {
-@@ -208,13 +131,7 @@ public abstract class DistanceManager {
+@@ -213,13 +131,7 @@ public abstract class DistanceManager {
}
public <T> boolean addRegionTicketAtDistance(TicketType<T> tickettype, ChunkPos chunkcoordintpair, int i, T t0) {
@@ -24502,7 +24515,7 @@ index 56aa26bb8d0bfbd3c799163fa620259e6455c89b..2d2596f04f5addac38037a14a02c6e06
}
public <T> void removeRegionTicket(TicketType<T> type, ChunkPos pos, int radius, T argument) {
-@@ -223,32 +140,21 @@ public abstract class DistanceManager {
+@@ -228,32 +140,21 @@ public abstract class DistanceManager {
}
public <T> boolean removeRegionTicketAtDistance(TicketType<T> tickettype, ChunkPos chunkcoordintpair, int i, T t0) {
@@ -24541,7 +24554,7 @@ index 56aa26bb8d0bfbd3c799163fa620259e6455c89b..2d2596f04f5addac38037a14a02c6e06
}
-@@ -259,9 +165,8 @@ public abstract class DistanceManager {
+@@ -264,9 +165,8 @@ public abstract class DistanceManager {
((ObjectSet) this.playersPerChunk.computeIfAbsent(i, (j) -> {
return new ObjectOpenHashSet();
})).add(player);
@@ -24553,7 +24566,7 @@ index 56aa26bb8d0bfbd3c799163fa620259e6455c89b..2d2596f04f5addac38037a14a02c6e06
}
public void removePlayer(SectionPos pos, ServerPlayer player) {
-@@ -273,151 +178,81 @@ public abstract class DistanceManager {
+@@ -278,151 +178,81 @@ public abstract class DistanceManager {
if (objectset != null) objectset.remove(player); // Paper - some state corruption happens here, don't crash, clean up gracefully
if (objectset == null || objectset.isEmpty()) { // Paper
this.playersPerChunk.remove(i);
@@ -24728,7 +24741,7 @@ index 56aa26bb8d0bfbd3c799163fa620259e6455c89b..2d2596f04f5addac38037a14a02c6e06
private class ChunkTicketTracker extends ChunkTracker {
private static final int MAX_LEVEL = ChunkLevel.MAX_LEVEL + 1;
-@@ -463,7 +298,7 @@ public abstract class DistanceManager {
+@@ -468,7 +298,7 @@ public abstract class DistanceManager {
public int runDistanceUpdates(int distance) {
return this.runUpdates(distance);
}
@@ -24737,7 +24750,7 @@ index 56aa26bb8d0bfbd3c799163fa620259e6455c89b..2d2596f04f5addac38037a14a02c6e06
private class FixedPlayerDistanceChunkTracker extends ChunkTracker {
-@@ -543,6 +378,7 @@ public abstract class DistanceManager {
+@@ -548,6 +378,7 @@ public abstract class DistanceManager {
}
}
@@ -24745,7 +24758,7 @@ index 56aa26bb8d0bfbd3c799163fa620259e6455c89b..2d2596f04f5addac38037a14a02c6e06
private class PlayerTicketTracker extends DistanceManager.FixedPlayerDistanceChunkTracker {
private int viewDistance = 0;
-@@ -637,5 +473,5 @@ public abstract class DistanceManager {
+@@ -642,5 +473,5 @@ public abstract class DistanceManager {
private boolean haveTicketFor(int distance) {
return distance <= this.viewDistance;
}
@@ -32731,10 +32744,10 @@ index 69c7fe5bf5b914276a9f7a0e57ce668e569d91f9..33322b57b4c6922f4daad0f584733f0f
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index df15ce8d1da2737e339880d3d2f6731e0b92ca7f..b5644700878a3eda50a56cd2292c6ceb5d43f34e 100644
+index 35d1dcabb182b0a31727e5ddefe33955c804603b..0bad47a4d45e9ca399de98edd0956efb90d21062 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -1428,7 +1428,7 @@ public final class CraftServer implements Server {
+@@ -1430,7 +1430,7 @@ public final class CraftServer implements Server {
// Paper - Put world into worldlist before initing the world; move up
this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
@@ -32743,7 +32756,7 @@ index df15ce8d1da2737e339880d3d2f6731e0b92ca7f..b5644700878a3eda50a56cd2292c6ceb
this.pluginManager.callEvent(new WorldLoadEvent(internal.getWorld()));
return internal.getWorld();
-@@ -1473,7 +1473,7 @@ public final class CraftServer implements Server {
+@@ -1475,7 +1475,7 @@ public final class CraftServer implements Server {
}
handle.getChunkSource().close(save);
@@ -32752,7 +32765,7 @@ index df15ce8d1da2737e339880d3d2f6731e0b92ca7f..b5644700878a3eda50a56cd2292c6ceb
handle.convertable.close();
} catch (Exception ex) {
this.getLogger().log(Level.SEVERE, null, ex);
-@@ -2509,7 +2509,7 @@ public final class CraftServer implements Server {
+@@ -2511,7 +2511,7 @@ public final class CraftServer implements Server {
@Override
public boolean isPrimaryThread() {
@@ -32762,7 +32775,7 @@ index df15ce8d1da2737e339880d3d2f6731e0b92ca7f..b5644700878a3eda50a56cd2292c6ceb
// Paper start - Adventure
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index e8404d5bad60b8fa290f334d3c64ee5503e01e5c..65c77bce55121c95bf2264e9058af73bcf22fc4b 100644
+index 3e5d381c0f2cfaf46292db0819d4996edf6e8564..5ff343759cc0c5046a9d45e8f74d4e6ec63f0f91 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -461,10 +461,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/server/0982-Rewrite-dataconverter-system.patch b/patches/server/0982-Rewrite-dataconverter-system.patch
index c973389ac9..b5c09ba076 100644
--- a/patches/server/0982-Rewrite-dataconverter-system.patch
+++ b/patches/server/0982-Rewrite-dataconverter-system.patch
@@ -29396,10 +29396,10 @@ index b54a3741cd3ba615c83c98985cb4b3c4c586ed7a..b148cf247acdd36f856d0495cde4cc5a
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 9739f2d97ea64452a92f254cb2d0e1274c691944..9e0d8fc51196ca07677f45e41614262036155e85 100644
+index 6e8838245b0792b15fd9788f2ce11f6503d0e070..9f2ddd47dc0658db2f95ef80543fb9a4d2f94f9f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -505,7 +505,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -511,7 +511,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
net.minecraft.nbt.CompoundTag compound = deserializeNbtFromBytes(data);
final int dataVersion = compound.getInt("DataVersion");
@@ -29408,7 +29408,7 @@ index 9739f2d97ea64452a92f254cb2d0e1274c691944..9e0d8fc51196ca07677f45e416142620
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.parse(MinecraftServer.getServer().registryAccess(), compound).orElseThrow());
}
-@@ -526,7 +526,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -532,7 +532,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
net.minecraft.nbt.CompoundTag compound = deserializeNbtFromBytes(data);
int dataVersion = compound.getInt("DataVersion");
diff --git a/patches/server/0992-Anti-Xray.patch b/patches/server/0992-Anti-Xray.patch
index c7253f3697..3081d5cc14 100644
--- a/patches/server/0992-Anti-Xray.patch
+++ b/patches/server/0992-Anti-Xray.patch
@@ -1104,7 +1104,7 @@ index 183b2191fa1c1b27adedf39593e1b5a223fb1279..8ead66c134688b11dca15f6509147e72
private ClientboundLevelChunkWithLightPacket(RegistryFriendlyByteBuf buf) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index eadbf175c69b6bb2d0df723afac96a517ebf0d83..1f611e7c877bf89f598148db69c1d4166b00f8ac 100644
+index aee8d882783130ed45a713e6c266114aaf4c0d93..acc11fc7f30b6d4a3a4445b7db25bf99c93b39f2 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -491,7 +491,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
@@ -1155,7 +1155,7 @@ index 32634e45ac8433648e49e47e20081e15ad41ff15..dafa2cf7d3c49fc5bdcd68d2a9528127
if (io.papermc.paper.event.packet.PlayerChunkLoadEvent.getHandlerList().getRegisteredListeners().length > 0) {
new io.papermc.paper.event.packet.PlayerChunkLoadEvent(new org.bukkit.craftbukkit.CraftChunk(chunk), handler.getPlayer().getBukkitEntity()).callEvent();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index c9d72ab365dcfc2482764463b116451187684b3c..db0a5c6258fa2b9a5d960f82f6b1f3bc2b386bc9 100644
+index f6624d3fab88c4bd7199c8412f1977a6dab388ad..ced2417fdd87ee9624f459065a7abc9df4810850 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -414,7 +414,7 @@ public abstract class PlayerList {
@@ -1168,7 +1168,7 @@ index c9d72ab365dcfc2482764463b116451187684b3c..db0a5c6258fa2b9a5d960f82f6b1f3bc
}
// Paper end - Send empty chunk
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index ce9350ed3c5c5fbbd9b2ade9ae2880e03305c787..87cde688976a45aa8848586b5371b3ab493813ea 100644
+index 3272af72ae0609bb9c928d0e4a8ba2ca3d90d63a..c4ec80bbab850fe767a345d96f02103ca43eb3cb 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -172,6 +172,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
@@ -1574,10 +1574,10 @@ index 33322b57b4c6922f4daad0f584733f0f24083911..45e262308aebafa377a2353661acdd12
private static final byte[] EMPTY_LIGHT = new byte[2048];
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index b5644700878a3eda50a56cd2292c6ceb5d43f34e..5ef080406d8954ecaa65cf60569cc05dbad649ea 100644
+index 0bad47a4d45e9ca399de98edd0956efb90d21062..27f47383c8065cc3b421001028b6cba528c38865 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-@@ -2686,7 +2686,7 @@ public final class CraftServer implements Server {
+@@ -2688,7 +2688,7 @@ public final class CraftServer implements Server {
public ChunkGenerator.ChunkData createChunkData(World world) {
Preconditions.checkArgument(world != null, "World cannot be null");
ServerLevel handle = ((CraftWorld) world).getHandle();
@@ -1587,7 +1587,7 @@ index b5644700878a3eda50a56cd2292c6ceb5d43f34e..5ef080406d8954ecaa65cf60569cc05d
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 15e075fc3a9b18e62e04f41fcadbe62e05cd8c79..8221597951c5e768fa8af23adc1a57871c76f3a6 100644
+index 5ff343759cc0c5046a9d45e8f74d4e6ec63f0f91..359c5771f7e2a0843505787f051bb2a61e0dca57 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -470,11 +470,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {
diff --git a/patches/server/1014-Registry-Modification-API.patch b/patches/server/1014-Registry-Modification-API.patch
index c31982d8a2..dba4fa5830 100644
--- a/patches/server/1014-Registry-Modification-API.patch
+++ b/patches/server/1014-Registry-Modification-API.patch
@@ -935,10 +935,10 @@ index 0000000000000000000000000000000000000000..7ee77022198bf5f9f88c6a1917a1da30
+ }
+}
diff --git a/src/main/java/io/papermc/paper/registry/legacy/DelayedRegistry.java b/src/main/java/io/papermc/paper/registry/legacy/DelayedRegistry.java
-index 5562e8da5ebaef2a3add46e88d64358b7737b59e..e5880f76cdb8ebf01fcefdf77ba9b95674b997a8 100644
+index 9400fed345344a0a8e4fb301cca6a1867adf625b..0cdc92acd3ebb6efb10e1b66419cc05618301581 100644
--- a/src/main/java/io/papermc/paper/registry/legacy/DelayedRegistry.java
+++ b/src/main/java/io/papermc/paper/registry/legacy/DelayedRegistry.java
-@@ -1,12 +1,13 @@
+@@ -1,5 +1,7 @@
package io.papermc.paper.registry.legacy;
+import io.papermc.paper.registry.tag.Tag;
@@ -946,6 +946,7 @@ index 5562e8da5ebaef2a3add46e88d64358b7737b59e..e5880f76cdb8ebf01fcefdf77ba9b956
import java.util.Iterator;
import java.util.function.Supplier;
import java.util.stream.Stream;
+@@ -7,7 +9,6 @@ import net.kyori.adventure.key.Key;
import org.bukkit.Keyed;
import org.bukkit.NamespacedKey;
import org.bukkit.Registry;
@@ -953,7 +954,7 @@ index 5562e8da5ebaef2a3add46e88d64358b7737b59e..e5880f76cdb8ebf01fcefdf77ba9b956
import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
import org.checkerframework.checker.nullness.qual.Nullable;
import org.jetbrains.annotations.NotNull;
-@@ -52,4 +53,14 @@ public final class DelayedRegistry<T extends Keyed, R extends Registry<T>> imple
+@@ -58,4 +59,14 @@ public final class DelayedRegistry<T extends Keyed, R extends Registry<T>> imple
public NamespacedKey getKey(final T value) {
return this.delegate().getKey(value);
}
@@ -1321,7 +1322,7 @@ index 397bdacab9517354875ebc0bc68d35059b3c318b..908431652a0fea79b5a0cee1efd0c7a7
return writableRegistry;
},
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
-index bd16933a5341908b21e549f66080c33466ad1079..90046c85ce1b9901de7476761da156141249300a 100644
+index 4dff173bbed34a49c22532bbee2b35ebf5920d22..53c70846666b746af6706ed2e363fe388e463e56 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
@@ -167,11 +167,11 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
@@ -1338,7 +1339,7 @@ index bd16933a5341908b21e549f66080c33466ad1079..90046c85ce1b9901de7476761da15614
this.bukkitClass = bukkitClass;
this.minecraftRegistry = minecraftRegistry;
this.minecraftToBukkit = minecraftToBukkit;
-@@ -244,4 +244,17 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
+@@ -254,4 +254,17 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
return this.byValue.get(value);
}
// Paper end - improve Registry
@@ -1357,10 +1358,10 @@ index bd16933a5341908b21e549f66080c33466ad1079..90046c85ce1b9901de7476761da15614
+ // Paper end - RegistrySet API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 9e0d8fc51196ca07677f45e41614262036155e85..0286375531b944ce572708e6c7cc9982e0d2b5b8 100644
+index 9f2ddd47dc0658db2f95ef80543fb9a4d2f94f9f..68a6cd43042e87501f5bd48565222638dd58a1cf 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -668,6 +668,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -674,6 +674,21 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - lifecycle event API
@@ -1391,10 +1392,10 @@ index 0000000000000000000000000000000000000000..8bee1a5ed877a04e4d027593df1f42ce
+io.papermc.paper.registry.event.RegistryEventTypeProviderImpl
diff --git a/src/test/java/io/papermc/paper/registry/RegistryBuilderTest.java b/src/test/java/io/papermc/paper/registry/RegistryBuilderTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..f27e5e0037b719b1fc10703f8d298d2326b00432
+index 0000000000000000000000000000000000000000..47b8ebac8496179008b8932c5ca2aadc274e24e0
--- /dev/null
+++ b/src/test/java/io/papermc/paper/registry/RegistryBuilderTest.java
-@@ -0,0 +1,34 @@
+@@ -0,0 +1,36 @@
+package io.papermc.paper.registry;
+
+import io.papermc.paper.registry.data.util.Conversions;
@@ -1403,7 +1404,8 @@ index 0000000000000000000000000000000000000000..f27e5e0037b719b1fc10703f8d298d23
+import net.minecraft.core.Registry;
+import net.minecraft.resources.RegistryOps;
+import net.minecraft.resources.ResourceKey;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.RegistryHelper;
++import org.bukkit.support.environment.AllFeatures;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
@@ -1411,7 +1413,8 @@ index 0000000000000000000000000000000000000000..f27e5e0037b719b1fc10703f8d298d23
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
-+class RegistryBuilderTest extends AbstractTestingBase {
++@AllFeatures
++class RegistryBuilderTest {
+
+ static List<Arguments> registries() {
+ return List.of(
@@ -1422,10 +1425,74 @@ index 0000000000000000000000000000000000000000..f27e5e0037b719b1fc10703f8d298d23
+ @ParameterizedTest
+ @MethodSource("registries")
+ <M, T> void testEquality(final ResourceKey<? extends Registry<M>> resourceKey, final PaperRegistryBuilder.Filler<M, T, ?> filler) {
-+ final Registry<M> registry = AbstractTestingBase.REGISTRY_CUSTOM.registryOrThrow(resourceKey);
++ final Registry<M> registry = RegistryHelper.getRegistry().registryOrThrow(resourceKey);
+ for (final Map.Entry<ResourceKey<M>, M> entry : registry.entrySet()) {
-+ final M built = filler.fill(new Conversions(new RegistryOps.HolderLookupAdapter(AbstractTestingBase.REGISTRY_CUSTOM)), PaperRegistries.fromNms(entry.getKey()), entry.getValue()).build();
++ final M built = filler.fill(new Conversions(new RegistryOps.HolderLookupAdapter(RegistryHelper.getRegistry())), PaperRegistries.fromNms(entry.getKey()), entry.getValue()).build();
+ assertEquals(entry.getValue(), built);
+ }
+ }
+}
+diff --git a/src/test/java/org/bukkit/registry/RegistryClassTest.java b/src/test/java/org/bukkit/registry/RegistryClassTest.java
+index 575a06125e0b60b5bb8b6f85131f7d6cf86f5083..85f93d8c9b3a48b267e0575ba7fbb3b9f273e70c 100644
+--- a/src/test/java/org/bukkit/registry/RegistryClassTest.java
++++ b/src/test/java/org/bukkit/registry/RegistryClassTest.java
+@@ -111,7 +111,7 @@ public class RegistryClassTest {
+ outsideRequest.clear();
+ MockUtil.resetMock(spyRegistry);
+ doAnswer(invocation -> {
+- Keyed item = realRegistry.get(invocation.getArgument(0));
++ Keyed item = realRegistry.get((NamespacedKey) invocation.getArgument(0)); // Paper - registry modification api - specifically call namespaced key overload
+
+ if (item == null) {
+ nullValue.add(invocation.getArgument(0));
+@@ -120,10 +120,10 @@ public class RegistryClassTest {
+ nullAble.add(invocation.getArgument(0));
+
+ return item;
+- }).when(spyRegistry).get(any());
++ }).when(spyRegistry).get((NamespacedKey) any()); // Paper - registry modification api - specifically call namespaced key overload
+
+ doAnswer(invocation -> {
+- Keyed item = realRegistry.get(invocation.getArgument(0));
++ Keyed item = realRegistry.get((NamespacedKey) invocation.getArgument(0)); // Paper - registry modification api - specifically call namespaced key overload
+
+ if (item == null) {
+ nullValue.add(invocation.getArgument(0));
+@@ -138,7 +138,7 @@ public class RegistryClassTest {
+ notNullAble.add(invocation.getArgument(0));
+
+ return item;
+- }).when(spyRegistry).getOrThrow(any());
++ }).when(spyRegistry).getOrThrow((NamespacedKey) any()); // Paper - registry modification api - specifically call namespaced key overload
+
+ // Load class
+ try {
+@@ -171,13 +171,13 @@ public class RegistryClassTest {
+ outsideRequest
+ .computeIfAbsent(type, ty -> new ArrayList<>()).add(invocation.getArgument(0));
+ return mock(type);
+- }).when(spyRegistry).get(any());
++ }).when(spyRegistry).get((NamespacedKey) any()); // Paper - registry modification api - specifically call namespaced key overload
+
+ doAnswer(invocation -> {
+ outsideRequest
+ .computeIfAbsent(type, ty -> new ArrayList<>()).add(invocation.getArgument(0));
+ return mock(type);
+- }).when(spyRegistry).getOrThrow(any());
++ }).when(spyRegistry).getOrThrow((NamespacedKey) any()); // Paper - registry modification api - specifically call namespaced key overload
+ }
+
+ private static void initFieldDataCache() {
+diff --git a/src/test/java/org/bukkit/support/extension/NormalExtension.java b/src/test/java/org/bukkit/support/extension/NormalExtension.java
+index 8b5dcc4d0ecf7f9c51f73080c123ca08e31b1898..a809ea2f0d2b477c61857aa02a7e55024b2a7e0d 100644
+--- a/src/test/java/org/bukkit/support/extension/NormalExtension.java
++++ b/src/test/java/org/bukkit/support/extension/NormalExtension.java
+@@ -62,7 +62,7 @@ public class NormalExtension extends BaseExtension {
+
+ doAnswer(invocation ->
+ mocks.computeIfAbsent(invocation.getArgument(0), k -> mock(RegistryHelper.updateClass(keyed, invocation.getArgument(0)), withSettings().stubOnly().defaultAnswer(DEFAULT_ANSWER)))
+- ).when(registry).get(any()); // Allow static classes to fill there fields, so that it does not error out, just by loading them
++ ).when(registry).get((NamespacedKey) any()); // Allow static classes to fill there fields, so that it does not error out, just by loading them // Paper - registry modification api - specifically call namespaced key overload
+
+ return registry;
+ }
diff --git a/patches/server/1015-Add-registry-entry-and-builders.patch b/patches/server/1015-Add-registry-entry-and-builders.patch
index 7f581892f6..8f2663ac94 100644
--- a/patches/server/1015-Add-registry-entry-and-builders.patch
+++ b/patches/server/1015-Add-registry-entry-and-builders.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add registry entry and builders
diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java
-index fba7c1758439db9044d9f7368bc9b79642d6b1b9..d59e77811e4090d0f8207e4fff3300d17b1753b2 100644
+index 5cf598905ed6a7ac2b0d9ced3420adaf20ceb6af..12220f78ffaf06433ada72fd0c7f22b97d55287d 100644
--- a/src/main/java/io/papermc/paper/registry/PaperRegistries.java
+++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java
@@ -1,6 +1,8 @@
@@ -442,10 +442,10 @@ index ac9b4328cd55a68664a3f71186bc9a7be7cd9658..ea9fe1f8b1a1685ea975eba0ca418a83
@Override
public NamespacedKey getKey() {
diff --git a/src/test/java/io/papermc/paper/registry/RegistryBuilderTest.java b/src/test/java/io/papermc/paper/registry/RegistryBuilderTest.java
-index f27e5e0037b719b1fc10703f8d298d2326b00432..2b42726c034f6701c86120d400446f0d868d464b 100644
+index 47b8ebac8496179008b8932c5ca2aadc274e24e0..814675bf67fd02e8cd2311dce60eeef651ef16f1 100644
--- a/src/test/java/io/papermc/paper/registry/RegistryBuilderTest.java
+++ b/src/test/java/io/papermc/paper/registry/RegistryBuilderTest.java
-@@ -1,27 +1,33 @@
+@@ -1,11 +1,16 @@
package io.papermc.paper.registry;
+import io.papermc.paper.registry.data.PaperEnchantmentRegistryEntry;
@@ -459,16 +459,17 @@ index f27e5e0037b719b1fc10703f8d298d2326b00432..2b42726c034f6701c86120d400446f0d
import net.minecraft.resources.ResourceKey;
+import net.minecraft.world.item.enchantment.Enchantment;
+import net.minecraft.world.level.gameevent.GameEvent;
- import org.bukkit.support.AbstractTestingBase;
--import org.junit.jupiter.api.Disabled;
- import org.junit.jupiter.params.ParameterizedTest;
- import org.junit.jupiter.params.provider.Arguments;
+ import org.bukkit.support.RegistryHelper;
+ import org.bukkit.support.environment.AllFeatures;
+ import org.junit.jupiter.api.Disabled;
+@@ -14,16 +19,18 @@ import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.params.provider.Arguments.arguments;
- class RegistryBuilderTest extends AbstractTestingBase {
+ @AllFeatures
+ class RegistryBuilderTest {
static List<Arguments> registries() {
return List.of(
diff --git a/patches/server/1017-Proxy-ItemStack-to-CraftItemStack.patch b/patches/server/1017-Proxy-ItemStack-to-CraftItemStack.patch
index 0e609e40fd..781b18ae7a 100644
--- a/patches/server/1017-Proxy-ItemStack-to-CraftItemStack.patch
+++ b/patches/server/1017-Proxy-ItemStack-to-CraftItemStack.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Proxy ItemStack to CraftItemStack
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
-index aef5c0d1be9c4aa62d9b7c5cacbb42066a802729..db0fe1b755f59eafca6e57917429fb7889889c3a 100644
+index efb7fb8dbaa7446e394f55b021692c11a25fd29f..a3c6d2cbdce60b1cf935d798568b8bb5d97e1229 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -26,15 +26,57 @@ import org.jetbrains.annotations.ApiStatus;
@@ -205,10 +205,10 @@ index 6cc9d7a9e6d4bfdc27e52fc581b2bb832616f121..6930d0afb230a88aa813b02e4d55c95d
+ // 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 82ebfd09e9baca0a31ee41c0e5228bce3c54e74f..28dbe30a98a6730839949bc9a6a90b78619ff84d 100644
+index 68a6cd43042e87501f5bd48565222638dd58a1cf..6adc18c40d5d62e2ebc8deec197cec630a366937 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -683,6 +683,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -689,6 +689,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
// Paper end - hack to get tags for non server-backed registries
@@ -224,7 +224,7 @@ index 82ebfd09e9baca0a31ee41c0e5228bce3c54e74f..28dbe30a98a6730839949bc9a6a90b78
* <p>
diff --git a/src/test/java/io/papermc/paper/configuration/ConfigurationSectionTest.java b/src/test/java/io/papermc/paper/configuration/ConfigurationSectionTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..e5c2fb160e9d390cdfa0259a3feb9f488b2dc14d
+index 0000000000000000000000000000000000000000..ed45bfa577579afcbd54d655c3b5d05d6c6f3e86
--- /dev/null
+++ b/src/test/java/io/papermc/paper/configuration/ConfigurationSectionTest.java
@@ -0,0 +1,53 @@
@@ -233,7 +233,7 @@ index 0000000000000000000000000000000000000000..e5c2fb160e9d390cdfa0259a3feb9f48
+import org.bukkit.Material;
+import org.bukkit.configuration.ConfigurationSection;
+import org.bukkit.inventory.ItemStack;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.environment.VanillaFeature;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -241,7 +241,7 @@ index 0000000000000000000000000000000000000000..e5c2fb160e9d390cdfa0259a3feb9f48
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
-+public abstract class ConfigurationSectionTest extends AbstractTestingBase {
++public abstract class ConfigurationSectionTest {
+ public abstract ConfigurationSection getConfigurationSection();
+
+ @Test
@@ -283,15 +283,17 @@ index 0000000000000000000000000000000000000000..e5c2fb160e9d390cdfa0259a3feb9f48
+}
diff --git a/src/test/java/io/papermc/paper/configuration/MemorySectionTest.java b/src/test/java/io/papermc/paper/configuration/MemorySectionTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..def33c36f207a4c5306b5a895336aa70335c1678
+index 0000000000000000000000000000000000000000..c00085328ce8a00fc274632a556ab27660fa57ed
--- /dev/null
+++ b/src/test/java/io/papermc/paper/configuration/MemorySectionTest.java
-@@ -0,0 +1,11 @@
+@@ -0,0 +1,13 @@
+package io.papermc.paper.configuration;
+
+import org.bukkit.configuration.ConfigurationSection;
+import org.bukkit.configuration.MemoryConfiguration;
++import org.bukkit.support.environment.Normal;
+
++@Normal
+public class MemorySectionTest extends ConfigurationSectionTest {
+ @Override
+ public ConfigurationSection getConfigurationSection() {
diff --git a/patches/server/1032-Bundle-spark.patch b/patches/server/1032-Bundle-spark.patch
index 0a5655b71e..403f8733bc 100644
--- a/patches/server/1032-Bundle-spark.patch
+++ b/patches/server/1032-Bundle-spark.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Bundle spark
diff --git a/build.gradle.kts b/build.gradle.kts
-index 4f6136ae3ac4890b21a5fb3f69f9c1474a0773d1..648281575eb8d45a5c06549eb3d0f517c086fe64 100644
+index a0f086ec054c456067ee07bf3c7685e2b9458d72..2ed184ccaa963ba1ea007628d2472f31c053be98 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
-@@ -61,6 +61,10 @@ dependencies {
+@@ -62,6 +62,10 @@ dependencies {
implementation("io.papermc:reflection-rewriter-runtime:$reflectionRewriterVersion")
implementation("io.papermc:reflection-rewriter-proxy-generator:$reflectionRewriterVersion")
// Paper end - Remap reflection
@@ -334,7 +334,7 @@ index d43b98bdfcb00603737a309c0fb7793d42289b8c..dd56c8e041116ef3602a9f89c998c820
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
-index 5ef080406d8954ecaa65cf60569cc05dbad649ea..b7af2d4300facf41a025c8ca322bf6541949b3ab 100644
+index 27f47383c8065cc3b421001028b6cba528c38865..c7df339aeb62ee627edaf1bb4c8474b61e357ba6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -309,6 +309,7 @@ public final class CraftServer implements Server {
@@ -345,7 +345,7 @@ index 5ef080406d8954ecaa65cf60569cc05dbad649ea..b7af2d4300facf41a025c8ca322bf654
// Paper start - Folia region threading API
private final io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler regionizedScheduler = new io.papermc.paper.threadedregions.scheduler.FallbackRegionScheduler();
-@@ -474,6 +475,7 @@ public final class CraftServer implements Server {
+@@ -475,6 +476,7 @@ public final class CraftServer implements Server {
}
this.potionBrewer = new io.papermc.paper.potion.PaperPotionBrewer(console); // Paper - custom potion mixes
datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper
@@ -353,7 +353,7 @@ index 5ef080406d8954ecaa65cf60569cc05dbad649ea..b7af2d4300facf41a025c8ca322bf654
}
public boolean getCommandBlockOverride(String command) {
-@@ -1099,6 +1101,7 @@ public final class CraftServer implements Server {
+@@ -1101,6 +1103,7 @@ public final class CraftServer implements Server {
this.reloadData();
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
io.papermc.paper.command.PaperCommands.registerCommands(this.console); // Paper
@@ -361,7 +361,7 @@ index 5ef080406d8954ecaa65cf60569cc05dbad649ea..b7af2d4300facf41a025c8ca322bf654
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
-@@ -1127,6 +1130,7 @@ public final class CraftServer implements Server {
+@@ -1129,6 +1132,7 @@ public final class CraftServer implements Server {
this.loadPlugins();
this.enablePlugins(PluginLoadOrder.STARTUP);
this.enablePlugins(PluginLoadOrder.POSTWORLD);
diff --git a/patches/server/1037-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch b/patches/server/1037-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch
index 8347a4c5c4..025db7dddb 100644
--- a/patches/server/1037-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch
+++ b/patches/server/1037-Add-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add API for CanPlaceOn and CanDestroy NBT values
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-index 042bfdd14c9ff4cc8ed3421f73565f0f03b11bcb..e0414b0a48a95f1f5e718070dd0e5f955052a898 100644
+index 7f6f404f5a2be7876ae239355979e8c8a7a198ce..07f31bce96e3c47bea43b5d6443070ae158430ef 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
-@@ -2183,4 +2183,117 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
+@@ -2185,4 +2185,117 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
// Paper end
diff --git a/patches/server/1046-Properly-destroy-placed-blocks-on-the-end-platform.patch b/patches/server/1046-Properly-destroy-placed-blocks-on-the-end-platform.patch
index 9bbeddc476..c81ee5b7b2 100644
--- a/patches/server/1046-Properly-destroy-placed-blocks-on-the-end-platform.patch
+++ b/patches/server/1046-Properly-destroy-placed-blocks-on-the-end-platform.patch
@@ -12,7 +12,7 @@ platform to be lost. The patch moves the destroy calls and executes them
on the actual world access.
diff --git a/src/main/java/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java b/src/main/java/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
-index 0bc659a8427b89b5e3211220c55b52eec6a20494..8aa5445e38622cd7cf4b3e42e9be8760827639fa 100644
+index ff1f151b342a1567605f92a921fc7ab01f1c4807..b92c40352e4f1af05a2f90701b3f74c235ae57cf 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
@@ -44,7 +44,7 @@ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> {
@@ -24,17 +24,3 @@ index 0bc659a8427b89b5e3211220c55b52eec6a20494..8aa5445e38622cd7cf4b3e42e9be8760
}
blockList.setBlock(blockposition_mutableblockposition1, block.defaultBlockState(), 3);
-@@ -65,6 +65,13 @@ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> {
-
- worldaccess.getLevel().getCraftServer().getPluginManager().callEvent(portalEvent);
- if (!portalEvent.isCancelled()) {
-+ // Paper start - Properly destroy placed blocks on the end platform
-+ if (flag) {
-+ for (org.bukkit.craftbukkit.block.CraftBlockState state : blockList.getList()) {
-+ worldaccess.destroyBlock(state.getPosition(), true);
-+ }
-+ }
-+ // Paper end - Properly destroy placed blocks on the end platform
- blockList.updateList();
- }
- // CraftBukkit end
diff --git a/patches/server/1047-Add-enchantment-seed-update-API.patch b/patches/server/1047-Add-enchantment-seed-update-API.patch
index f66f062401..16a2bfd389 100644
--- a/patches/server/1047-Add-enchantment-seed-update-API.patch
+++ b/patches/server/1047-Add-enchantment-seed-update-API.patch
@@ -20,10 +20,10 @@ index 1ef014b29645ed09ccffb898f1819428c3dc6259..9bc9b4218ffd966f43097c9e009b2926
+ // Paper end - add enchantment seed update API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java b/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java
-index 259a21ff618b791f1225535a416b90386b2df3ad..fd4e87464dc76fb46d554fb8b497c19134d4273e 100644
+index 4d28a2e9a4bfd9adee934c3033f32a8cf66286db..3b3d2d6d23d8f3b75ec52df17b86f6639c8c349b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java
-@@ -26,6 +26,13 @@ public class CraftEnchantmentView extends CraftInventoryView<EnchantmentMenu> im
+@@ -26,6 +26,13 @@ public class CraftEnchantmentView extends CraftInventoryView<EnchantmentMenu, En
return this.container.getEnchantmentSeed();
}
diff --git a/patches/server/1052-Add-FeatureFlag-API.patch b/patches/server/1052-Add-FeatureFlag-API.patch
index 039bb83bf3..aa43543249 100644
--- a/patches/server/1052-Add-FeatureFlag-API.patch
+++ b/patches/server/1052-Add-FeatureFlag-API.patch
@@ -160,7 +160,7 @@ index 284234fcdd15c4c7a4567c7c887d47bf0b7967f4..c9ecec5da937bc5458f69736b68ff6ae
+ // Paper end - feature flag API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
-index 77fb4ffdd548d858fbecfe31f6765ce0cb786944..38b046da5acac8633db8618a2957187d291f5e73 100644
+index 74feb45c3199308652448c8448eb87fb8fbf6f11..7fc52f9f4f2e2cd8ea3abdf6c6f5d1f679779c47 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2374,10 +2374,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@@ -282,7 +282,7 @@ index 6cf790c9fa23ea313423fdaeb7c181bf530828c6..0bcb9df1103050441f8922a688b163dc
public static PotionEffectType minecraftHolderToBukkit(Holder<MobEffect> minecraft) {
return CraftPotionEffectType.minecraftToBukkit(minecraft.value());
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 28dbe30a98a6730839949bc9a6a90b78619ff84d..7d32c032b63b9c4674489b30c845fe2de8275808 100644
+index 6adc18c40d5d62e2ebc8deec197cec630a366937..8b2dbdfcdc4e98602f6bfd48d2c53840730f4691 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -47,7 +47,7 @@ import org.bukkit.advancement.Advancement;
@@ -294,7 +294,7 @@ index 28dbe30a98a6730839949bc9a6a90b78619ff84d..7d32c032b63b9c4674489b30c845fe2d
import org.bukkit.craftbukkit.CraftRegistry;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.craftbukkit.attribute.CraftAttribute;
-@@ -455,11 +455,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -461,11 +461,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftAttribute.bukkitToMinecraft(attribute).getDescriptionId();
}
@@ -323,10 +323,10 @@ index 0000000000000000000000000000000000000000..c3e6b96013f6dd0b784bd867196552d9
+io.papermc.paper.world.flag.PaperFeatureFlagProviderImpl
diff --git a/src/test/java/io/papermc/paper/world/flag/FeatureFlagTest.java b/src/test/java/io/papermc/paper/world/flag/FeatureFlagTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..4817040741de8b0e12c96994f59b58681c09852d
+index 0000000000000000000000000000000000000000..2e07ff04faa5999d14d29e44377deb4e483044a0
--- /dev/null
+++ b/src/test/java/io/papermc/paper/world/flag/FeatureFlagTest.java
-@@ -0,0 +1,98 @@
+@@ -0,0 +1,99 @@
+package io.papermc.paper.world.flag;
+
+import io.papermc.paper.adventure.PaperAdventure;
@@ -338,7 +338,6 @@ index 0000000000000000000000000000000000000000..4817040741de8b0e12c96994f59b5868
+import java.util.Set;
+import java.util.stream.Stream;
+import net.kyori.adventure.key.Key;
-+import net.minecraft.core.registries.Registries;
+import net.minecraft.resources.ResourceKey;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.world.flag.FeatureElement;
@@ -346,7 +345,8 @@ index 0000000000000000000000000000000000000000..4817040741de8b0e12c96994f59b5868
+import net.minecraft.world.flag.FeatureFlags;
+import org.bukkit.FeatureFlag;
+import org.bukkit.Keyed;
-+import org.bukkit.support.AbstractTestingBase;
++import org.bukkit.support.RegistryHelper;
++import org.bukkit.support.environment.AllFeatures;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
@@ -358,7 +358,8 @@ index 0000000000000000000000000000000000000000..4817040741de8b0e12c96994f59b5868
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
+
-+class FeatureFlagTest extends AbstractTestingBase {
++@AllFeatures
++class FeatureFlagTest {
+
+ @Test
+ void testFeatureFlagParity() {
@@ -409,7 +410,7 @@ index 0000000000000000000000000000000000000000..4817040741de8b0e12c96994f59b5868
+ }
+
+ static Stream<RegistryKey<?>> nonFeatureFilteredRegistries() {
-+ return AbstractTestingBase.REGISTRY_CUSTOM.registries().filter(r -> {
++ return RegistryHelper.getRegistry().registries().filter(r -> {
+ final RegistryEntry<?, ?> entry = PaperRegistries.getEntry(r.key());
+ // has an API registry and isn't a filtered registry
+ return entry != null && !FeatureElement.FILTERED_REGISTRIES.contains(r.key());
diff --git a/patches/server/1054-Item-serialization-as-json.patch b/patches/server/1054-Item-serialization-as-json.patch
index 988bbbea45..20a7aba6f3 100644
--- a/patches/server/1054-Item-serialization-as-json.patch
+++ b/patches/server/1054-Item-serialization-as-json.patch
@@ -28,10 +28,10 @@ index 6b7245cf05ea4b6ce05462eb3164bce7f5d76a03..ac1914438307e8a7cc3a3b6352e88a06
public static final Codec<CustomData> CODEC_WITH_ID = CODEC.validate(
component -> component.getUnsafe().contains("id", 8) ? DataResult.success(component) : DataResult.error(() -> "Missing id for entity in: " + component)
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-index 7d32c032b63b9c4674489b30c845fe2de8275808..f78744b6d6075f584d9a88612661854f3f04aed1 100644
+index 8b2dbdfcdc4e98602f6bfd48d2c53840730f4691..d06aab9bd5cd901c8367f9680f5d27ddb17b3dc4 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
-@@ -505,6 +505,39 @@ public final class CraftMagicNumbers implements UnsafeValues {
+@@ -511,6 +511,39 @@ public final class CraftMagicNumbers implements UnsafeValues {
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.parse(MinecraftServer.getServer().registryAccess(), compound).orElseThrow());
}
diff --git a/patches/server/1060-Improve-entity-effect-API.patch b/patches/server/1060-Improve-entity-effect-API.patch
index 5aefeb8279..1c14f7f686 100644
--- a/patches/server/1060-Improve-entity-effect-API.patch
+++ b/patches/server/1060-Improve-entity-effect-API.patch
@@ -66,10 +66,10 @@ index ad740739437be632fc7fedec488a7d0c49534688..42d7660efe5baa6f796f2a7606686c76
}
diff --git a/src/test/java/org/bukkit/EntityEffectTest.java b/src/test/java/org/bukkit/EntityEffectTest.java
new file mode 100644
-index 0000000000000000000000000000000000000000..fdd3b443ae0ae16a09134d4a8b3e35905e287154
+index 0000000000000000000000000000000000000000..5e64dfaeba167374dc45c5becfb2e7114657dff6
--- /dev/null
+++ b/src/test/java/org/bukkit/EntityEffectTest.java
-@@ -0,0 +1,80 @@
+@@ -0,0 +1,82 @@
+package org.bukkit;
+
+import com.google.common.base.Joiner;
@@ -82,10 +82,12 @@ index 0000000000000000000000000000000000000000..fdd3b443ae0ae16a09134d4a8b3e3590
+import java.util.Map;
+import java.util.Set;
+import net.minecraft.world.entity.EntityEvent;
++import org.bukkit.support.environment.Normal;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.fail;
+
++@Normal
+public class EntityEffectTest {
+
+ private static List<Byte> collectNmsLevelEvents() throws ReflectiveOperationException {
diff --git a/patches/server/1061-Add-recipeBrewTime.patch b/patches/server/1061-Add-recipeBrewTime.patch
index 34513fe035..cd4192dc8c 100644
--- a/patches/server/1061-Add-recipeBrewTime.patch
+++ b/patches/server/1061-Add-recipeBrewTime.patch
@@ -158,10 +158,10 @@ index 674e3a827f8fb64e5c0beefb3c1874d6e8aee4e5..6d3f9d5dab6c9a2860ae31cae24310aa
case HOPPER:
this.delegate = new HopperMenu(windowId, bottom, top);
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java b/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java
-index c92e51227cf2c0046a558b012c078c46582aed44..4f60ff23422ed268ee1e76190e5bac1fc2f7cdc1 100644
+index aeb5a9c996ba6b6d812735bc78e3e5aec2c9d269..6e88347d74f6bd20d7808e0d556997ab73861e7c 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java
-@@ -35,4 +35,17 @@ public class CraftBrewingStandView extends CraftInventoryView<BrewingStandMenu>
+@@ -35,4 +35,17 @@ public class CraftBrewingStandView extends CraftInventoryView<BrewingStandMenu,
Preconditions.checkArgument(brewingTicks > 0, "The given brewing ticks must be greater than 0");
this.container.setData(BrewingStandBlockEntity.DATA_BREW_TIME, brewingTicks);
}
diff --git a/patches/server/1066-Add-AnvilView-bypassEnchantmentLevelRestriction.patch b/patches/server/1066-Add-AnvilView-bypassEnchantmentLevelRestriction.patch
index b67e8bea16..67f7503c24 100644
--- a/patches/server/1066-Add-AnvilView-bypassEnchantmentLevelRestriction.patch
+++ b/patches/server/1066-Add-AnvilView-bypassEnchantmentLevelRestriction.patch
@@ -29,10 +29,10 @@ index d685511104ac552dfc9ae2111e1bfb60fa812102..362278407679f245ebcea778f2199b35
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java b/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java
-index e2d8d69c5ae8feb6840462ba8332344972658d83..59f0b1207931a2a10d559f43e2926b17e6991257 100644
+index fdc2bd4c3ee5f762a72df39c87215e3a15f47db2..f86c95a13dff012de5db3e41ac261e9e8d44d9f3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java
-@@ -50,6 +50,18 @@ public class CraftAnvilView extends CraftInventoryView<AnvilMenu> implements Anv
+@@ -50,6 +50,18 @@ public class CraftAnvilView extends CraftInventoryView<AnvilMenu, AnvilInventory
this.container.maximumRepairCost = cost;
}
diff --git a/work/Bukkit b/work/Bukkit
-Subproject 1fc1020ad0d91a1cf6bfaae6f0441c24be701fb
+Subproject bb4e97c60d2978a1d008f21295a5234228341e1
diff --git a/work/CraftBukkit b/work/CraftBukkit
-Subproject bbb30e7a853eb15c00dfea1bd46715101c777c8
+Subproject 0a7bd6c81a33cfaaa2f4d2456c6b237792f38fe