From 6a763830b704b2db5d05c1a91d497c099b02b5c2 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 31 Oct 2024 22:44:48 +0100 Subject: [PATCH 1/4] Updated Upstream (Bukkit/CraftBukkit) Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 97c59261 PR-1073: Make Biome an interface a38581aa Fix further javadoc errors 8271c490 Fix javadoc error 8a9ecf29 PR-1072: Fix bad naming for Vault State methods 6dd58108 PR-1071: Make Fluid an interface and add missing entry ed2cdfc3 PR-1070: Make Attribute an interface and align names with the new minecraft ones 63472efb PR-1069: Add missing winter drop experimental annotation to pale boats CraftBukkit Changes: 7235ad7b0 PR-1501: Make Biome an interface 602904003 PR-1500: Rename implementation for Vault State methods 75f26f79f PR-1499: Make Fluid an interface and add missing entry 4cfd87adc PR-1498: Make Attribute an interface and align names with the new minecraft ones 6bb0db5cb SPIGOT-7928: ExactChoice acts as MaterialChoice 3eaf3a13c SPIGOT-7929: Error when setting EquippableComponent abbf57bac SPIGOT-7930: Fix spawning entities with SummonEntityEffect 92d6ab6cf PR-1497: Move boat field rename entries to below key renaming, so that keys are also renamed abfe292aa PR-1496: Use correct Fluid class on Tags type check c7aab7fa7 SPIGOT-7923: Fix Dispenser logic to avoid firing empty projectiles --- patches/api/0006-Adventure.patch | 4 +- patches/api/0009-Paper-Plugins.patch | 6 +-- ...0015-Expose-server-build-information.patch | 4 +- patches/api/0142-Improve-death-events.patch | 4 +- .../0166-Fix-Spigot-annotation-mistakes.patch | 6 +-- ...Add-Raw-Byte-ItemStack-Serialization.patch | 4 +- ...-Add-methods-to-get-translation-keys.patch | 53 +++++++------------ ...y-Counter-to-allow-plugins-to-use-va.patch | 4 +- patches/api/0253-Expand-world-key-API.patch | 4 +- .../api/0255-Expose-protocol-version.patch | 4 +- patches/api/0270-Add-basic-Datapack-API.patch | 4 +- .../api/0272-ItemStack-repair-check-API.patch | 4 +- .../0304-Get-entity-default-attributes.patch | 8 +-- ...12-Add-Raw-Byte-Entity-Serialization.patch | 4 +- ...0358-Add-NamespacedKey-biome-methods.patch | 8 ++- patches/api/0378-Add-missing-Fluid-type.patch | 23 -------- ...ments.patch => 0378-fix-Instruments.patch} | 0 ...tch => 0379-Add-BlockLockCheckEvent.patch} | 0 ... 0380-Add-Sneaking-API-for-Entities.patch} | 0 ....patch => 0381-Improve-PortalEvents.patch} | 0 ...atch => 0382-Flying-Fall-Damage-API.patch} | 0 ...eplace-ItemFlag.HIDE_POTION_EFFECTS.patch} | 0 ...en-API.patch => 0384-Win-Screen-API.patch} | 0 ...tch => 0385-Add-Entity-Body-Yaw-API.patch} | 0 ...or-InventoryBlockStartEvent-subclas.patch} | 0 ...=> 0387-Add-EntityFertilizeEggEvent.patch} | 0 ...temEvent-and-EntityCompostItemEvent.patch} | 0 ...API.patch => 0389-Add-Shearable-API.patch} | 0 ...Fix-SpawnEggMeta-get-setSpawnedType.patch} | 0 ... 0391-Add-Mob-Experience-reward-API.patch} | 0 ... => 0392-Expand-PlayerItemMendEvent.patch} | 0 ...to-remove-all-active-potion-effects.patch} | 0 ...olia-scheduler-and-owned-region-API.patch} | 0 ...5-Add-event-for-player-editing-sign.patch} | 0 ...I.patch => 0396-More-Sign-Block-API.patch} | 0 ...t-API.patch => 0397-Fix-BanList-API.patch} | 0 ....patch => 0398-Add-whitelist-events.patch} | 0 ...API-for-updating-recipes-on-clients.patch} | 0 ...tch => 0400-Add-PlayerFailMoveEvent.patch} | 0 ...-custom-statistic-criteria-creation.patch} | 6 +-- ...tch => 0402-SculkCatalyst-bloom-API.patch} | 0 ...API-for-an-entity-s-scoreboard-name.patch} | 0 ...lace-methods-with-old-StructureType.patch} | 0 ... => 0405-Add-Listing-API-for-Player.patch} | 0 ...d-BlockFace-during-BlockDamageEvent.patch} | 0 ...h => 0407-Fix-NPE-on-Boat-getStatus.patch} | 0 ...e-API.patch => 0408-Expand-Pose-API.patch} | 0 ...MerchantRecipe-add-copy-constructor.patch} | 0 ...patch => 0410-More-DragonBattle-API.patch} | 0 ...tch => 0411-Add-PlayerPickItemEvent.patch} | 0 ...=> 0412-Allow-trident-custom-damage.patch} | 0 ...pose-hand-during-BlockCanBuildEvent.patch} | 0 ...t-setBurnTime-to-valid-short-values.patch} | 0 ... 0415-Add-OfflinePlayer-isConnected.patch} | 0 ...titleOverride-to-InventoryOpenEvent.patch} | 0 ...roper-checking-of-empty-item-stacks.patch} | 0 ...dItemsEvent-throwing-exception-when.patch} | 0 ...> 0419-Add-player-idle-duration-API.patch} | 0 ...e-collision-shape-of-a-block-before.patch} | 0 ...redicate-for-blocks-when-raytracing.patch} | 0 ...h-event-for-all-player-interactions.patch} | 0 ...Attribute-Modifier-API-improvements.patch} | 0 ... => 0424-Expand-LingeringPotion-API.patch} | 0 ...y-durability-check-in-ItemStack-isS.patch} | 0 ...tch => 0426-Add-Structure-check-API.patch} | 0 ...427-Experimental-annotations-change.patch} | 0 ...tch => 0428-Add-more-scoreboard-API.patch} | 0 ...stry.patch => 0429-Improve-Registry.patch} | 2 +- ...h => 0430-Add-experience-points-API.patch} | 0 ...h => 0431-Add-missing-InventoryType.patch} | 0 ...h => 0432-Add-drops-to-shear-events.patch} | 0 ... => 0433-Add-HiddenPotionEffect-API.patch} | 0 ...> 0434-Add-PlayerShieldDisableEvent.patch} | 0 ...mpty-String-in-NamespacedKey.fromSt.patch} | 0 ...-Add-BlockStateMeta-clearBlockState.patch} | 0 ...37-Expose-LootTable-of-DecoratedPot.patch} | 0 ...h => 0438-Add-ShulkerDuplicateEvent.patch} | 0 ...dd-api-for-spawn-egg-texture-colors.patch} | 4 +- ... => 0440-Add-Lifecycle-Event-system.patch} | 4 +- ...patch => 0441-ItemStack-Tooltip-API.patch} | 4 +- ...Snapshot-includeLightData-parameter.patch} | 0 ...PI.patch => 0443-Add-FluidState-API.patch} | 0 ...patch => 0444-add-number-format-api.patch} | 0 ...patch => 0445-improve-BanList-types.patch} | 0 ...=> 0446-Suspicious-Effect-Entry-API.patch} | 0 ....patch => 0447-Fix-DamageSource-API.patch} | 0 ...I.patch => 0448-Expanded-Hopper-API.patch} | 0 ...tables-to-prevent-unexpected-issues.patch} | 0 ...0-Add-BlockBreakProgressUpdateEvent.patch} | 0 ...=> 0451-Deprecate-ItemStack-setType.patch} | 0 ...s.patch => 0452-Item-Mutation-Fixes.patch} | 0 ...> 0453-API-for-checking-sent-chunks.patch} | 0 ...ch => 0454-Add-CartographyItemEvent.patch} | 0 ...aid-API.patch => 0455-More-Raid-API.patch} | 0 ...0456-Fix-SpawnerEntry-Equipment-API.patch} | 0 ...emFlags.patch => 0457-Fix-ItemFlags.patch} | 0 ...ifying-library-loader-jars-bytecode.patch} | 0 ...0459-Add-hook-to-remap-library-jars.patch} | 0 ...=> 0460-Add-GameMode-isInvulnerable.patch} | 0 ...61-Expose-hasColor-to-leather-armor.patch} | 0 ...-API-to-get-player-ha-proxy-address.patch} | 0 ....patch => 0463-More-Chest-Block-API.patch} | 0 ...=> 0464-Brigadier-based-command-API.patch} | 0 ... => 0465-Fix-issues-with-recipe-API.patch} | 0 ...66-Fix-equipment-slot-and-group-API.patch} | 0 ...lugin-to-use-Paper-PluginLoader-API.patch} | 0 ...atch => 0468-General-ItemMeta-fixes.patch} | 0 ...469-Add-missing-fishing-event-state.patch} | 0 ...ate-InvAction-HOTBAR_MOVE_AND_READD.patch} | 0 ...h => 0471-Registry-Modification-API.patch} | 6 +-- ...troduce-registry-entry-and-builders.patch} | 0 ...3-Proxy-ItemStack-to-CraftItemStack.patch} | 4 +- ...-accessible-directly-from-ItemStack.patch} | 0 ...h => 0475-Fix-HelpCommand-searching.patch} | 0 ...atch => 0476-add-Plugin-getDataPath.patch} | 0 ...0477-Fix-PickupStatus-getting-reset.patch} | 0 ...anPlaceOn-and-CanDestroy-NBT-values.patch} | 0 ...tandardMessenger-exception-messages.patch} | 0 ... 0480-Add-even-more-Enchantment-API.patch} | 0 ...ble-API.patch => 0481-Leashable-API.patch} | 0 ...482-Add-enchantment-seed-update-API.patch} | 0 ...removal-all-OldEnum-related-methods.patch} | 0 ...I.patch => 0484-Add-FeatureFlag-API.patch} | 8 +-- ....patch => 0485-Tag-Lifecycle-Events.patch} | 0 ... => 0486-Item-serialization-as-json.patch} | 4 +- ...487-create-TileStateInventoryHolder.patch} | 0 ...evels-with-enchantment-registry-set.patch} | 0 ...h => 0489-Improve-entity-effect-API.patch} | 0 ...me.patch => 0490-Add-recipeBrewTime.patch} | 0 ...91-Add-PlayerInsertLecternBookEvent.patch} | 0 ... 0492-Void-damage-configuration-API.patch} | 0 ...I.patch => 0493-Add-Offline-PDC-API.patch} | 0 ...w-bypassEnchantmentLevelRestriction.patch} | 0 ...tch => 0495-fix-DamageTypeTags-init.patch} | 0 patches/server/0008-CB-fixes.patch | 17 +----- patches/server/0010-Adventure.patch | 8 +-- patches/server/0019-Paper-Plugins.patch | 6 +-- .../0021-Hook-into-CB-plugin-rewrites.patch | 16 +++--- ...ion-calls-in-plugins-using-internals.patch | 14 ++--- ...0033-Expose-server-build-information.patch | 8 +-- .../0176-Player.setPlayerProfile-API.patch | 4 +- .../server/0241-Improve-death-events.patch | 4 +- ...Add-Raw-Byte-ItemStack-Serialization.patch | 4 +- ...-Add-methods-to-get-translation-keys.patch | 16 ++++++ ...y-Counter-to-allow-plugins-to-use-va.patch | 4 +- ...ix-client-lag-on-advancement-loading.patch | 4 +- ...gistryAccess-for-managing-Registries.patch | 44 ++++++++++----- .../server/0496-Expand-world-key-API.patch | 6 +-- .../server/0501-Expose-protocol-version.patch | 4 +- .../0528-ItemStack-repair-check-API.patch | 4 +- ...5-Improve-item-default-attribute-API.patch | 4 +- .../0580-Get-entity-default-attributes.patch | 4 +- .../0582-Add-more-advancement-API.patch | 4 +- ...0583-Add-ItemFactory-getSpawnEgg-API.patch | 4 +- ...89-Add-Raw-Byte-Entity-Serialization.patch | 4 +- ...eys-and-optimize-reference-Holder-ta.patch | 28 ---------- ...0726-Add-NamespacedKey-biome-methods.patch | 4 +- ...-of-WorldCreator-keepSpawnLoaded-ret.patch | 4 +- ...x-custom-statistic-criteria-creation.patch | 4 +- ...883-Fix-UnsafeValues-loadAdvancement.patch | 4 +- patches/server/0905-Improve-Registry.patch | 8 +-- .../0912-Fixup-NamespacedKey-handling.patch | 8 +-- ...Add-api-for-spawn-egg-texture-colors.patch | 4 +- .../0918-Add-Lifecycle-Event-system.patch | 6 +-- .../server/0919-ItemStack-Tooltip-API.patch | 4 +- ...ckOverflowError-and-NPE-for-some-dis.patch | 6 +-- ...he-changed-item-from-dispense-events.patch | 16 +++--- .../server/0953-General-ItemMeta-fixes.patch | 11 +--- .../0993-Registry-Modification-API.patch | 16 +++--- ...0994-Add-registry-entry-and-builders.patch | 8 +-- ...95-Proxy-ItemStack-to-CraftItemStack.patch | 4 +- patches/server/1020-Add-FeatureFlag-API.patch | 12 ++--- .../1022-Item-serialization-as-json.patch | 4 +- .../1037-Rewrite-dataconverter-system.patch | 6 +-- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 176 files changed, 242 insertions(+), 288 deletions(-) delete mode 100644 patches/api/0378-Add-missing-Fluid-type.patch rename patches/api/{0379-fix-Instruments.patch => 0378-fix-Instruments.patch} (100%) rename patches/api/{0380-Add-BlockLockCheckEvent.patch => 0379-Add-BlockLockCheckEvent.patch} (100%) rename patches/api/{0381-Add-Sneaking-API-for-Entities.patch => 0380-Add-Sneaking-API-for-Entities.patch} (100%) rename patches/api/{0382-Improve-PortalEvents.patch => 0381-Improve-PortalEvents.patch} (100%) rename patches/api/{0383-Flying-Fall-Damage-API.patch => 0382-Flying-Fall-Damage-API.patch} (100%) rename patches/api/{0384-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch => 0383-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch} (100%) rename patches/api/{0385-Win-Screen-API.patch => 0384-Win-Screen-API.patch} (100%) rename patches/api/{0386-Add-Entity-Body-Yaw-API.patch => 0385-Add-Entity-Body-Yaw-API.patch} (100%) rename patches/api/{0387-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch => 0386-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch} (100%) rename patches/api/{0388-Add-EntityFertilizeEggEvent.patch => 0387-Add-EntityFertilizeEggEvent.patch} (100%) rename patches/api/{0389-Add-CompostItemEvent-and-EntityCompostItemEvent.patch => 0388-Add-CompostItemEvent-and-EntityCompostItemEvent.patch} (100%) rename patches/api/{0390-Add-Shearable-API.patch => 0389-Add-Shearable-API.patch} (100%) rename patches/api/{0391-Fix-SpawnEggMeta-get-setSpawnedType.patch => 0390-Fix-SpawnEggMeta-get-setSpawnedType.patch} (100%) rename patches/api/{0392-Add-Mob-Experience-reward-API.patch => 0391-Add-Mob-Experience-reward-API.patch} (100%) rename patches/api/{0393-Expand-PlayerItemMendEvent.patch => 0392-Expand-PlayerItemMendEvent.patch} (100%) rename patches/api/{0394-Add-method-to-remove-all-active-potion-effects.patch => 0393-Add-method-to-remove-all-active-potion-effects.patch} (100%) rename patches/api/{0395-Folia-scheduler-and-owned-region-API.patch => 0394-Folia-scheduler-and-owned-region-API.patch} (100%) rename patches/api/{0396-Add-event-for-player-editing-sign.patch => 0395-Add-event-for-player-editing-sign.patch} (100%) rename patches/api/{0397-More-Sign-Block-API.patch => 0396-More-Sign-Block-API.patch} (100%) rename patches/api/{0398-Fix-BanList-API.patch => 0397-Fix-BanList-API.patch} (100%) rename patches/api/{0399-Add-whitelist-events.patch => 0398-Add-whitelist-events.patch} (100%) rename patches/api/{0400-API-for-updating-recipes-on-clients.patch => 0399-API-for-updating-recipes-on-clients.patch} (100%) rename patches/api/{0401-Add-PlayerFailMoveEvent.patch => 0400-Add-PlayerFailMoveEvent.patch} (100%) rename patches/api/{0402-Fix-custom-statistic-criteria-creation.patch => 0401-Fix-custom-statistic-criteria-creation.patch} (87%) rename patches/api/{0403-SculkCatalyst-bloom-API.patch => 0402-SculkCatalyst-bloom-API.patch} (100%) rename patches/api/{0404-API-for-an-entity-s-scoreboard-name.patch => 0403-API-for-an-entity-s-scoreboard-name.patch} (100%) rename patches/api/{0405-Deprecate-and-replace-methods-with-old-StructureType.patch => 0404-Deprecate-and-replace-methods-with-old-StructureType.patch} (100%) rename patches/api/{0406-Add-Listing-API-for-Player.patch => 0405-Add-Listing-API-for-Player.patch} (100%) rename patches/api/{0407-Expose-clicked-BlockFace-during-BlockDamageEvent.patch => 0406-Expose-clicked-BlockFace-during-BlockDamageEvent.patch} (100%) rename patches/api/{0408-Fix-NPE-on-Boat-getStatus.patch => 0407-Fix-NPE-on-Boat-getStatus.patch} (100%) rename patches/api/{0409-Expand-Pose-API.patch => 0408-Expand-Pose-API.patch} (100%) rename patches/api/{0410-MerchantRecipe-add-copy-constructor.patch => 0409-MerchantRecipe-add-copy-constructor.patch} (100%) rename patches/api/{0411-More-DragonBattle-API.patch => 0410-More-DragonBattle-API.patch} (100%) rename patches/api/{0412-Add-PlayerPickItemEvent.patch => 0411-Add-PlayerPickItemEvent.patch} (100%) rename patches/api/{0413-Allow-trident-custom-damage.patch => 0412-Allow-trident-custom-damage.patch} (100%) rename patches/api/{0414-Expose-hand-during-BlockCanBuildEvent.patch => 0413-Expose-hand-during-BlockCanBuildEvent.patch} (100%) rename patches/api/{0415-Limit-setBurnTime-to-valid-short-values.patch => 0414-Limit-setBurnTime-to-valid-short-values.patch} (100%) rename patches/api/{0416-Add-OfflinePlayer-isConnected.patch => 0415-Add-OfflinePlayer-isConnected.patch} (100%) rename patches/api/{0417-Add-titleOverride-to-InventoryOpenEvent.patch => 0416-Add-titleOverride-to-InventoryOpenEvent.patch} (100%) rename patches/api/{0418-Allow-proper-checking-of-empty-item-stacks.patch => 0417-Allow-proper-checking-of-empty-item-stacks.patch} (100%) rename patches/api/{0419-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch => 0418-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch} (100%) rename patches/api/{0420-Add-player-idle-duration-API.patch => 0419-Add-player-idle-duration-API.patch} (100%) rename patches/api/{0421-Add-API-to-get-the-collision-shape-of-a-block-before.patch => 0420-Add-API-to-get-the-collision-shape-of-a-block-before.patch} (100%) rename patches/api/{0422-Add-predicate-for-blocks-when-raytracing.patch => 0421-Add-predicate-for-blocks-when-raytracing.patch} (100%) rename patches/api/{0423-Add-hand-to-fish-event-for-all-player-interactions.patch => 0422-Add-hand-to-fish-event-for-all-player-interactions.patch} (100%) rename patches/api/{0424-Attribute-Modifier-API-improvements.patch => 0423-Attribute-Modifier-API-improvements.patch} (100%) rename patches/api/{0425-Expand-LingeringPotion-API.patch => 0424-Expand-LingeringPotion-API.patch} (100%) rename patches/api/{0426-Remove-unnecessary-durability-check-in-ItemStack-isS.patch => 0425-Remove-unnecessary-durability-check-in-ItemStack-isS.patch} (100%) rename patches/api/{0427-Add-Structure-check-API.patch => 0426-Add-Structure-check-API.patch} (100%) rename patches/api/{0428-Experimental-annotations-change.patch => 0427-Experimental-annotations-change.patch} (100%) rename patches/api/{0429-Add-more-scoreboard-API.patch => 0428-Add-more-scoreboard-API.patch} (100%) rename patches/api/{0430-Improve-Registry.patch => 0429-Improve-Registry.patch} (99%) rename patches/api/{0431-Add-experience-points-API.patch => 0430-Add-experience-points-API.patch} (100%) rename patches/api/{0432-Add-missing-InventoryType.patch => 0431-Add-missing-InventoryType.patch} (100%) rename patches/api/{0433-Add-drops-to-shear-events.patch => 0432-Add-drops-to-shear-events.patch} (100%) rename patches/api/{0434-Add-HiddenPotionEffect-API.patch => 0433-Add-HiddenPotionEffect-API.patch} (100%) rename patches/api/{0435-Add-PlayerShieldDisableEvent.patch => 0434-Add-PlayerShieldDisableEvent.patch} (100%) rename patches/api/{0436-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch => 0435-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch} (100%) rename patches/api/{0437-Add-BlockStateMeta-clearBlockState.patch => 0436-Add-BlockStateMeta-clearBlockState.patch} (100%) rename patches/api/{0438-Expose-LootTable-of-DecoratedPot.patch => 0437-Expose-LootTable-of-DecoratedPot.patch} (100%) rename patches/api/{0439-Add-ShulkerDuplicateEvent.patch => 0438-Add-ShulkerDuplicateEvent.patch} (100%) rename patches/api/{0440-Add-api-for-spawn-egg-texture-colors.patch => 0439-Add-api-for-spawn-egg-texture-colors.patch} (89%) rename patches/api/{0441-Add-Lifecycle-Event-system.patch => 0440-Add-Lifecycle-Event-system.patch} (99%) rename patches/api/{0442-ItemStack-Tooltip-API.patch => 0441-ItemStack-Tooltip-API.patch} (97%) rename patches/api/{0443-Add-getChunkSnapshot-includeLightData-parameter.patch => 0442-Add-getChunkSnapshot-includeLightData-parameter.patch} (100%) rename patches/api/{0444-Add-FluidState-API.patch => 0443-Add-FluidState-API.patch} (100%) rename patches/api/{0445-add-number-format-api.patch => 0444-add-number-format-api.patch} (100%) rename patches/api/{0446-improve-BanList-types.patch => 0445-improve-BanList-types.patch} (100%) rename patches/api/{0447-Suspicious-Effect-Entry-API.patch => 0446-Suspicious-Effect-Entry-API.patch} (100%) rename patches/api/{0448-Fix-DamageSource-API.patch => 0447-Fix-DamageSource-API.patch} (100%) rename patches/api/{0449-Expanded-Hopper-API.patch => 0448-Expanded-Hopper-API.patch} (100%) rename patches/api/{0450-Clone-mutables-to-prevent-unexpected-issues.patch => 0449-Clone-mutables-to-prevent-unexpected-issues.patch} (100%) rename patches/api/{0451-Add-BlockBreakProgressUpdateEvent.patch => 0450-Add-BlockBreakProgressUpdateEvent.patch} (100%) rename patches/api/{0452-Deprecate-ItemStack-setType.patch => 0451-Deprecate-ItemStack-setType.patch} (100%) rename patches/api/{0453-Item-Mutation-Fixes.patch => 0452-Item-Mutation-Fixes.patch} (100%) rename patches/api/{0454-API-for-checking-sent-chunks.patch => 0453-API-for-checking-sent-chunks.patch} (100%) rename patches/api/{0455-Add-CartographyItemEvent.patch => 0454-Add-CartographyItemEvent.patch} (100%) rename patches/api/{0456-More-Raid-API.patch => 0455-More-Raid-API.patch} (100%) rename patches/api/{0457-Fix-SpawnerEntry-Equipment-API.patch => 0456-Fix-SpawnerEntry-Equipment-API.patch} (100%) rename patches/api/{0458-Fix-ItemFlags.patch => 0457-Fix-ItemFlags.patch} (100%) rename patches/api/{0459-Allow-modifying-library-loader-jars-bytecode.patch => 0458-Allow-modifying-library-loader-jars-bytecode.patch} (100%) rename patches/api/{0460-Add-hook-to-remap-library-jars.patch => 0459-Add-hook-to-remap-library-jars.patch} (100%) rename patches/api/{0461-Add-GameMode-isInvulnerable.patch => 0460-Add-GameMode-isInvulnerable.patch} (100%) rename patches/api/{0462-Expose-hasColor-to-leather-armor.patch => 0461-Expose-hasColor-to-leather-armor.patch} (100%) rename patches/api/{0463-Added-API-to-get-player-ha-proxy-address.patch => 0462-Added-API-to-get-player-ha-proxy-address.patch} (100%) rename patches/api/{0464-More-Chest-Block-API.patch => 0463-More-Chest-Block-API.patch} (100%) rename patches/api/{0465-Brigadier-based-command-API.patch => 0464-Brigadier-based-command-API.patch} (100%) rename patches/api/{0466-Fix-issues-with-recipe-API.patch => 0465-Fix-issues-with-recipe-API.patch} (100%) rename patches/api/{0467-Fix-equipment-slot-and-group-API.patch => 0466-Fix-equipment-slot-and-group-API.patch} (100%) rename patches/api/{0468-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch => 0467-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch} (100%) rename patches/api/{0469-General-ItemMeta-fixes.patch => 0468-General-ItemMeta-fixes.patch} (100%) rename patches/api/{0470-Add-missing-fishing-event-state.patch => 0469-Add-missing-fishing-event-state.patch} (100%) rename patches/api/{0471-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch => 0470-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch} (100%) rename patches/api/{0472-Registry-Modification-API.patch => 0471-Registry-Modification-API.patch} (99%) rename patches/api/{0473-Introduce-registry-entry-and-builders.patch => 0472-Introduce-registry-entry-and-builders.patch} (100%) rename patches/api/{0474-Proxy-ItemStack-to-CraftItemStack.patch => 0473-Proxy-ItemStack-to-CraftItemStack.patch} (99%) rename patches/api/{0475-Make-a-PDC-view-accessible-directly-from-ItemStack.patch => 0474-Make-a-PDC-view-accessible-directly-from-ItemStack.patch} (100%) rename patches/api/{0476-Fix-HelpCommand-searching.patch => 0475-Fix-HelpCommand-searching.patch} (100%) rename patches/api/{0477-add-Plugin-getDataPath.patch => 0476-add-Plugin-getDataPath.patch} (100%) rename patches/api/{0478-Fix-PickupStatus-getting-reset.patch => 0477-Fix-PickupStatus-getting-reset.patch} (100%) rename patches/api/{0479-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch => 0478-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch} (100%) rename patches/api/{0480-Improve-StandardMessenger-exception-messages.patch => 0479-Improve-StandardMessenger-exception-messages.patch} (100%) rename patches/api/{0481-Add-even-more-Enchantment-API.patch => 0480-Add-even-more-Enchantment-API.patch} (100%) rename patches/api/{0482-Leashable-API.patch => 0481-Leashable-API.patch} (100%) rename patches/api/{0483-Add-enchantment-seed-update-API.patch => 0482-Add-enchantment-seed-update-API.patch} (100%) rename patches/api/{0484-Deprecate-for-removal-all-OldEnum-related-methods.patch => 0483-Deprecate-for-removal-all-OldEnum-related-methods.patch} (100%) rename patches/api/{0485-Add-FeatureFlag-API.patch => 0484-Add-FeatureFlag-API.patch} (98%) rename patches/api/{0486-Tag-Lifecycle-Events.patch => 0485-Tag-Lifecycle-Events.patch} (100%) rename patches/api/{0487-Item-serialization-as-json.patch => 0486-Item-serialization-as-json.patch} (93%) rename patches/api/{0488-create-TileStateInventoryHolder.patch => 0487-create-TileStateInventoryHolder.patch} (100%) rename patches/api/{0489-Add-enchantWithLevels-with-enchantment-registry-set.patch => 0488-Add-enchantWithLevels-with-enchantment-registry-set.patch} (100%) rename patches/api/{0490-Improve-entity-effect-API.patch => 0489-Improve-entity-effect-API.patch} (100%) rename patches/api/{0491-Add-recipeBrewTime.patch => 0490-Add-recipeBrewTime.patch} (100%) rename patches/api/{0492-Add-PlayerInsertLecternBookEvent.patch => 0491-Add-PlayerInsertLecternBookEvent.patch} (100%) rename patches/api/{0493-Void-damage-configuration-API.patch => 0492-Void-damage-configuration-API.patch} (100%) rename patches/api/{0494-Add-Offline-PDC-API.patch => 0493-Add-Offline-PDC-API.patch} (100%) rename patches/api/{0495-Add-AnvilView-bypassEnchantmentLevelRestriction.patch => 0494-Add-AnvilView-bypassEnchantmentLevelRestriction.patch} (100%) rename patches/api/{0496-fix-DamageTypeTags-init.patch => 0495-fix-DamageTypeTags-init.patch} (100%) diff --git a/patches/api/0006-Adventure.patch b/patches/api/0006-Adventure.patch index da57b44ba1d6..db5ecc6561cc 100644 --- a/patches/api/0006-Adventure.patch +++ b/patches/api/0006-Adventure.patch @@ -1555,10 +1555,10 @@ index ac5e263d737973af077e3406a84a84baca4370db..2d91924b7f5ef16a91d40cdc1bfc3d68 + // Paper end } diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 0bb3637d73132f1882af38ca7ad6864a44812edc..9ba1a4e838538ecd55f4f8e50ffb0c5f1f474382 100644 +index 752fef0205d7edc09a7072e4ca63152b12eb28ec..1ed3f8dae84c10cb3245d08fa776396a695b5c2f 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -30,6 +30,15 @@ import org.jetbrains.annotations.Nullable; +@@ -31,6 +31,15 @@ import org.jetbrains.annotations.Nullable; */ @Deprecated public interface UnsafeValues { diff --git a/patches/api/0009-Paper-Plugins.patch b/patches/api/0009-Paper-Plugins.patch index b9fcf1aeb9c9..74ff26e12ae3 100644 --- a/patches/api/0009-Paper-Plugins.patch +++ b/patches/api/0009-Paper-Plugins.patch @@ -1325,13 +1325,13 @@ index 0000000000000000000000000000000000000000..48a67c1b6070292dbf4ea3081f89b530 + +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 9ba1a4e838538ecd55f4f8e50ffb0c5f1f474382..d8b346fe0f9634218954fe818d53272a0896af9c 100644 +index 1ed3f8dae84c10cb3245d08fa776396a695b5c2f..e320729782245b5511cd744c417141508020fd26 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -141,4 +141,14 @@ public interface UnsafeValues { +@@ -146,4 +146,14 @@ public interface UnsafeValues { @ApiStatus.Internal - B get(Registry registry, NamespacedKey key); + Biome getCustomBiome(); + + // Paper start + @Deprecated(forRemoval = true) diff --git a/patches/api/0015-Expose-server-build-information.patch b/patches/api/0015-Expose-server-build-information.patch index 2853b4562644..1865aaa0f50e 100644 --- a/patches/api/0015-Expose-server-build-information.patch +++ b/patches/api/0015-Expose-server-build-information.patch @@ -316,10 +316,10 @@ index ba28d9f3213ca4b5f15178dc637bff37a8896edc..8a07f21eeb04fb54032ce377a1478f60 * Gets a view of all currently logged in players. This {@linkplain * Collections#unmodifiableCollection(Collection) view} is a reused diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index d8b346fe0f9634218954fe818d53272a0896af9c..45ed0007d6de20b98794b3ccaef57aed213e72d4 100644 +index e320729782245b5511cd744c417141508020fd26..8b5e4756d1c80e55be166dbe1faf57799f9cc03b 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -151,4 +151,13 @@ public interface UnsafeValues { +@@ -156,4 +156,13 @@ public interface UnsafeValues { return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion()); } // Paper end diff --git a/patches/api/0142-Improve-death-events.patch b/patches/api/0142-Improve-death-events.patch index 3f91458a84d0..1ddc0abdba43 100644 --- a/patches/api/0142-Improve-death-events.patch +++ b/patches/api/0142-Improve-death-events.patch @@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using internal code. diff --git a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java -index b0c069f65da29c6e9eff8e0490fda43a6bed307c..81a3067ff5ae22943b66051f4613ab9fe095720c 100644 +index b0c069f65da29c6e9eff8e0490fda43a6bed307c..086bec9daa89315b1d4719ab74de0e889f93e340 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java @@ -6,15 +6,25 @@ import org.bukkit.entity.LivingEntity; @@ -79,7 +79,7 @@ index b0c069f65da29c6e9eff8e0490fda43a6bed307c..81a3067ff5ae22943b66051f4613ab9f + * @throws IllegalArgumentException Thrown if the health is {@literal <= 0 or >} max health + */ + public void setReviveHealth(double reviveHealth) throws IllegalArgumentException { -+ double maxHealth = ((LivingEntity) entity).getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).getValue(); ++ double maxHealth = ((LivingEntity) entity).getAttribute(org.bukkit.attribute.Attribute.MAX_HEALTH).getValue(); + if ((maxHealth != 0 && reviveHealth <= 0) || (reviveHealth > maxHealth)) { + throw new IllegalArgumentException("Health must be between 0 (exclusive) and " + maxHealth + " (inclusive), but was " + reviveHealth); + } diff --git a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch index bcff5eb5a0c4..300cf3299042 100644 --- a/patches/api/0166-Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/0166-Fix-Spigot-annotation-mistakes.patch @@ -453,7 +453,7 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f return note; } diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 30ba3daba730c2994b589cc321d66b503da2fe8b..4e67b944351ec3743e5eeaba3f5de99e0df15154 100644 +index 774f9bd0ef95d385dc3f715753c83e05fcc2bdff..26399345dd02031712994da1553417186b8c7370 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -248,14 +248,12 @@ public interface Registry extends Iterable { @@ -837,10 +837,10 @@ index 3afe2787de576f7190d87c796bea0ab34dc30248..875817b807c9f515eb07b03cc85d3689 /** diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java -index f5b0ff195b3f7cf1c5b8ebe2fb8cefcf6c1012f4..1c1cdfd6b5a98a378ff7bb7bb3201e84662b52f3 100644 +index 17d9669be0eb48e54b230ad15e66463167cfb7d6..e758a13ea84f472dcdf7fe31e2ea23c0e554c4c7 100644 --- a/src/main/java/org/bukkit/entity/EntityType.java +++ b/src/main/java/org/bukkit/entity/EntityType.java -@@ -424,9 +424,9 @@ public enum EntityType implements Keyed, Translatable { +@@ -428,9 +428,9 @@ public enum EntityType implements Keyed, Translatable { * * @param name the entity type's name * @return the matching entity type or null diff --git a/patches/api/0182-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/api/0182-Add-Raw-Byte-ItemStack-Serialization.patch index b852c64ded54..1d4c5dfaea57 100644 --- a/patches/api/0182-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/patches/api/0182-Add-Raw-Byte-ItemStack-Serialization.patch @@ -8,10 +8,10 @@ Serializes using NBT which is safer for server data migrations than bukkits form Co-authored-by: Nassim Jahnke diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 45ed0007d6de20b98794b3ccaef57aed213e72d4..dd81e309c584e37e4bc7644261ecc649e1237570 100644 +index 8b5e4756d1c80e55be166dbe1faf57799f9cc03b..66d29e7f4187309d4a55202d1bda4b94e42211b0 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -159,5 +159,9 @@ public interface UnsafeValues { +@@ -164,5 +164,9 @@ public interface UnsafeValues { default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher(); } 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 825d506e8a31..13d99de8c241 100644 --- a/patches/api/0202-Add-methods-to-get-translation-keys.patch +++ b/patches/api/0202-Add-methods-to-get-translation-keys.patch @@ -235,53 +235,40 @@ index e3faa2c675c85a9cbdbbb1debec0ff81c58a1bbd..fd1629c2d2028a88fb3d56b0aeb833d1 String getTranslationKey(); } diff --git a/src/main/java/org/bukkit/attribute/Attribute.java b/src/main/java/org/bukkit/attribute/Attribute.java -index e5a9d1692f0f6fd8e9ac4903782e9330b4da6ef3..6075cd2a88394cd7f0ce2470e732a45094b033c0 100644 +index 951c23491390c2c8693d415598ef2de712189220..21f9998b472dc18eb308554f5cdf467f6675f2f0 100644 --- a/src/main/java/org/bukkit/attribute/Attribute.java +++ b/src/main/java/org/bukkit/attribute/Attribute.java -@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull; +@@ -14,7 +14,7 @@ import org.jetbrains.annotations.NotNull; /** * Types of attributes which may be present on an {@link Attributable}. */ --public enum Attribute implements Keyed, Translatable { -+public enum Attribute implements Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations +-public interface Attribute extends OldEnum, Keyed, Translatable { ++public interface Attribute extends OldEnum, Keyed, Translatable, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations /** * Maximum health of an Entity. -@@ -157,4 +157,12 @@ public enum Attribute implements Keyed, Translatable { - public String getTranslationKey() { - return Bukkit.getUnsafe().getTranslationKey(this); - } -+ -+ // Paper start -+ @SuppressWarnings("deprecation") -+ @Override -+ public @NotNull String translationKey() { -+ return Bukkit.getUnsafe().getTranslationKey(this); -+ } -+ // Paper end - } diff --git a/src/main/java/org/bukkit/block/Biome.java b/src/main/java/org/bukkit/block/Biome.java -index 2201b63e7335b12622268a3ef40d1fcb06c1d705..b71975b904d48e22a0e2134bb0e8231679dd9700 100644 +index f46932a12f46895ae10b63f7fbb54750da1bd2ba..b352886e697a1c9869226b583da5240592575064 100644 --- a/src/main/java/org/bukkit/block/Biome.java +++ b/src/main/java/org/bukkit/block/Biome.java -@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull; - /** - * Holds all accepted Biomes in the default server +@@ -22,7 +22,7 @@ import org.jetbrains.annotations.NotNull; + * There may be additional biomes present in the server, for example from a {@link DataPack} + * which can be accessed via {@link Registry#BIOME}. */ --public enum Biome implements Keyed { -+public enum Biome implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - OCEAN, - PLAINS, - DESERT, -@@ -94,4 +94,11 @@ public enum Biome implements Keyed { - public NamespacedKey getKey() { - return key; +-public interface Biome extends OldEnum, Keyed { ++public interface Biome extends OldEnum, Keyed, net.kyori.adventure.translation.Translatable { // Paper - Adventure translations + + Biome OCEAN = getBiome("ocean"); + Biome PLAINS = getBiome("plains"); +@@ -131,4 +131,11 @@ public interface Biome extends OldEnum, Keyed { + static Biome[] values() { + return Lists.newArrayList(Registry.BIOME).toArray(new Biome[0]); } + + // Paper start + @Override -+ public @NotNull String translationKey() { -+ return "biome.minecraft." + this.key.getKey(); ++ default @NotNull String translationKey() { ++ return "biome.minecraft." + this.getKey().getKey(); + } + // Paper end } @@ -384,7 +371,7 @@ index c4f86ba1037f3f0e5d697a0962d71d6f8c7c1fbe..ac0371285370594d4de1554871b19bbc // Paper end } diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java -index 1c1cdfd6b5a98a378ff7bb7bb3201e84662b52f3..be1c8c9b27ad792f2b0ff1cec0c575eb1fc3023a 100644 +index e758a13ea84f472dcdf7fe31e2ea23c0e554c4c7..a5e5c252405a7b940afbb6715abcda7ec9007dd3 100644 --- a/src/main/java/org/bukkit/entity/EntityType.java +++ b/src/main/java/org/bukkit/entity/EntityType.java @@ -45,7 +45,7 @@ import org.jetbrains.annotations.Contract; @@ -396,7 +383,7 @@ index 1c1cdfd6b5a98a378ff7bb7bb3201e84662b52f3..be1c8c9b27ad792f2b0ff1cec0c575eb // These strings MUST match the strings in nms.EntityTypes and are case sensitive. /** -@@ -470,10 +470,22 @@ public enum EntityType implements Keyed, Translatable { +@@ -474,10 +474,22 @@ public enum EntityType implements Keyed, Translatable { @Override @NotNull diff --git a/patches/api/0205-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/api/0205-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index 241d581e0cd4..a9993be8970e 100644 --- a/patches/api/0205-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/api/0205-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index dd81e309c584e37e4bc7644261ecc649e1237570..db48f30704efa6928599a5cebf5ce577c8430198 100644 +index 66d29e7f4187309d4a55202d1bda4b94e42211b0..33acd8e0993b1f02a14794f55d0cf568a85a099e 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -163,5 +163,12 @@ public interface UnsafeValues { +@@ -168,5 +168,12 @@ public interface UnsafeValues { byte[] serializeItem(ItemStack item); ItemStack deserializeItem(byte[] data); diff --git a/patches/api/0253-Expand-world-key-API.patch b/patches/api/0253-Expand-world-key-API.patch index 2716158a70bf..a22199d327ea 100644 --- a/patches/api/0253-Expand-world-key-API.patch +++ b/patches/api/0253-Expand-world-key-API.patch @@ -100,10 +100,10 @@ index 943f8881ea23481ea5d5125b6ec7c9c6f763f0b0..42930006b6425b5d82233e4ffe7025ce * Create a new virtual {@link WorldBorder}. *

diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index db48f30704efa6928599a5cebf5ce577c8430198..4229db3c6abb693803a4bdd5a71e426c688f26cc 100644 +index 33acd8e0993b1f02a14794f55d0cf568a85a099e..e924f313cead4cb0a9d73f5be8bc69b654293ddf 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -170,5 +170,10 @@ public interface UnsafeValues { +@@ -175,5 +175,10 @@ public interface UnsafeValues { * Use this when sending custom packets, so that there are no collisions on the client or server. */ public int nextEntityId(); diff --git a/patches/api/0255-Expose-protocol-version.patch b/patches/api/0255-Expose-protocol-version.patch index f6cace865e17..f1037f03a8f1 100644 --- a/patches/api/0255-Expose-protocol-version.patch +++ b/patches/api/0255-Expose-protocol-version.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 4229db3c6abb693803a4bdd5a71e426c688f26cc..f33426207c403906c3c6fb99e848fd7ecbffd127 100644 +index e924f313cead4cb0a9d73f5be8bc69b654293ddf..ce9bbe4a9010ca31ace1f0b7fb67eab0f13ac97d 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -175,5 +175,12 @@ public interface UnsafeValues { +@@ -180,5 +180,12 @@ public interface UnsafeValues { * Just don't use it. */ @org.jetbrains.annotations.NotNull String getMainLevelName(); diff --git a/patches/api/0270-Add-basic-Datapack-API.patch b/patches/api/0270-Add-basic-Datapack-API.patch index 796a519bd972..aa351735084d 100644 --- a/patches/api/0270-Add-basic-Datapack-API.patch +++ b/patches/api/0270-Add-basic-Datapack-API.patch @@ -277,10 +277,10 @@ index 42930006b6425b5d82233e4ffe7025ce5397b277..45693e6c02eac37eb609cd3c59253a94 // Paper end } diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java -index be1c8c9b27ad792f2b0ff1cec0c575eb1fc3023a..f08d241d5350dfdb0d325e89190c90f79a5c791e 100644 +index a5e5c252405a7b940afbb6715abcda7ec9007dd3..1f241e74c256eb3e824a029798f623ad9d38efe2 100644 --- a/src/main/java/org/bukkit/entity/EntityType.java +++ b/src/main/java/org/bukkit/entity/EntityType.java -@@ -492,6 +492,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans +@@ -496,6 +496,7 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans * @param world the world to check * @return true if this EntityType can be used to spawn an Entity for this World. */ diff --git a/patches/api/0272-ItemStack-repair-check-API.patch b/patches/api/0272-ItemStack-repair-check-API.patch index 6385fdeb47ea..149c1f28521f 100644 --- a/patches/api/0272-ItemStack-repair-check-API.patch +++ b/patches/api/0272-ItemStack-repair-check-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index f33426207c403906c3c6fb99e848fd7ecbffd127..3ef6ffb506a7fdd05a08353f342e45de8066ca19 100644 +index ce9bbe4a9010ca31ace1f0b7fb67eab0f13ac97d..5015cfe26522468ac7decbf6205d654c0e60207b 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -182,5 +182,15 @@ public interface UnsafeValues { +@@ -187,5 +187,15 @@ public interface UnsafeValues { * @return the server's protocol version */ int getProtocolVersion(); diff --git a/patches/api/0304-Get-entity-default-attributes.patch b/patches/api/0304-Get-entity-default-attributes.patch index deca580fd38d..d330cf091c97 100644 --- a/patches/api/0304-Get-entity-default-attributes.patch +++ b/patches/api/0304-Get-entity-default-attributes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Get entity default attributes diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 3ef6ffb506a7fdd05a08353f342e45de8066ca19..b8627d845bbc8c845af364408d3b6abb57c7308b 100644 +index 5015cfe26522468ac7decbf6205d654c0e60207b..1a4a42991449f30db0f702e7ddeac950e4a805ac 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -192,5 +192,22 @@ public interface UnsafeValues { +@@ -197,5 +197,22 @@ public interface UnsafeValues { * @return true if valid repair, false if not */ public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial); @@ -32,10 +32,10 @@ index 3ef6ffb506a7fdd05a08353f342e45de8066ca19..b8627d845bbc8c845af364408d3b6abb // Paper end } diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java -index f08d241d5350dfdb0d325e89190c90f79a5c791e..6521a20d69a4c8e75be7e9b3fdebbc25b843ec1b 100644 +index 1f241e74c256eb3e824a029798f623ad9d38efe2..9e115cec6232b22760e91ade671f81461c0c0364 100644 --- a/src/main/java/org/bukkit/entity/EntityType.java +++ b/src/main/java/org/bukkit/entity/EntityType.java -@@ -484,6 +484,25 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans +@@ -488,6 +488,25 @@ public enum EntityType implements Keyed, Translatable, net.kyori.adventure.trans Preconditions.checkArgument(this != UNKNOWN, "UNKNOWN entities do not have translation keys"); return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this); } diff --git a/patches/api/0312-Add-Raw-Byte-Entity-Serialization.patch b/patches/api/0312-Add-Raw-Byte-Entity-Serialization.patch index abe5d9f16364..820ac462d863 100644 --- a/patches/api/0312-Add-Raw-Byte-Entity-Serialization.patch +++ b/patches/api/0312-Add-Raw-Byte-Entity-Serialization.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index b8627d845bbc8c845af364408d3b6abb57c7308b..ef22077e2bf9709bef21e259cfa6435f80305b5e 100644 +index 1a4a42991449f30db0f702e7ddeac950e4a805ac..2d612f2c6b483eec6fbc7ad35d5d878359db4770 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -164,6 +164,14 @@ public interface UnsafeValues { +@@ -169,6 +169,14 @@ public interface UnsafeValues { ItemStack deserializeItem(byte[] data); diff --git a/patches/api/0358-Add-NamespacedKey-biome-methods.patch b/patches/api/0358-Add-NamespacedKey-biome-methods.patch index be2c0e7b2aa2..20a293488749 100644 --- a/patches/api/0358-Add-NamespacedKey-biome-methods.patch +++ b/patches/api/0358-Add-NamespacedKey-biome-methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index ef22077e2bf9709bef21e259cfa6435f80305b5e..14cf57a96f47ba666f05cedbc0005ff0fec6a33d 100644 +index 2d612f2c6b483eec6fbc7ad35d5d878359db4770..b2ab190a73946ad2a5750c2408036cc3641e23f8 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -218,4 +218,33 @@ public interface UnsafeValues { +@@ -223,4 +223,37 @@ public interface UnsafeValues { */ @org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey); // Paper end @@ -22,9 +22,11 @@ index ef22077e2bf9709bef21e259cfa6435f80305b5e..14cf57a96f47ba666f05cedbc0005ff0 + * @param x X-coordinate of the block + * @param y Y-coordinate of the block + * @param z Z-coordinate of the block ++ * @deprecated custom biomes are properly supported in API now + * @return the biome's {@link NamespacedKey} + */ + @org.jetbrains.annotations.NotNull ++ @Deprecated(since = "1.21.3", forRemoval = true) + NamespacedKey getBiomeKey(RegionAccessor accessor, int x, int y, int z); + + /** @@ -38,8 +40,10 @@ index ef22077e2bf9709bef21e259cfa6435f80305b5e..14cf57a96f47ba666f05cedbc0005ff0 + * @param y Y-coordinate of the block + * @param z Z-coordinate of the block + * @param biomeKey Biome key ++ * @deprecated custom biomes are properly supported in API now + * @throws IllegalStateException if no biome by the given key is registered. + */ ++ @Deprecated(since = "1.21.3", forRemoval = true) + void setBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey); + // Paper end - namespaced key biome methods } diff --git a/patches/api/0378-Add-missing-Fluid-type.patch b/patches/api/0378-Add-missing-Fluid-type.patch deleted file mode 100644 index c260bf84979d..000000000000 --- a/patches/api/0378-Add-missing-Fluid-type.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic -Date: Sun, 4 Dec 2022 10:07:16 -0800 -Subject: [PATCH] Add missing Fluid type - - -diff --git a/src/main/java/org/bukkit/Fluid.java b/src/main/java/org/bukkit/Fluid.java -index 4cc974689a229e73ddbf2c353ac0fe23da03a5b2..7202b44a65e8699cf64329e441e83d4dd1779c19 100644 ---- a/src/main/java/org/bukkit/Fluid.java -+++ b/src/main/java/org/bukkit/Fluid.java -@@ -8,6 +8,12 @@ import org.jetbrains.annotations.NotNull; - */ - public enum Fluid implements Keyed { - -+ // Paper start -+ /** -+ * No fluid. -+ */ -+ EMPTY, -+ // Paper end - /** - * Stationary water. - */ diff --git a/patches/api/0379-fix-Instruments.patch b/patches/api/0378-fix-Instruments.patch similarity index 100% rename from patches/api/0379-fix-Instruments.patch rename to patches/api/0378-fix-Instruments.patch diff --git a/patches/api/0380-Add-BlockLockCheckEvent.patch b/patches/api/0379-Add-BlockLockCheckEvent.patch similarity index 100% rename from patches/api/0380-Add-BlockLockCheckEvent.patch rename to patches/api/0379-Add-BlockLockCheckEvent.patch diff --git a/patches/api/0381-Add-Sneaking-API-for-Entities.patch b/patches/api/0380-Add-Sneaking-API-for-Entities.patch similarity index 100% rename from patches/api/0381-Add-Sneaking-API-for-Entities.patch rename to patches/api/0380-Add-Sneaking-API-for-Entities.patch diff --git a/patches/api/0382-Improve-PortalEvents.patch b/patches/api/0381-Improve-PortalEvents.patch similarity index 100% rename from patches/api/0382-Improve-PortalEvents.patch rename to patches/api/0381-Improve-PortalEvents.patch diff --git a/patches/api/0383-Flying-Fall-Damage-API.patch b/patches/api/0382-Flying-Fall-Damage-API.patch similarity index 100% rename from patches/api/0383-Flying-Fall-Damage-API.patch rename to patches/api/0382-Flying-Fall-Damage-API.patch diff --git a/patches/api/0384-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch b/patches/api/0383-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch similarity index 100% rename from patches/api/0384-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch rename to patches/api/0383-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch diff --git a/patches/api/0385-Win-Screen-API.patch b/patches/api/0384-Win-Screen-API.patch similarity index 100% rename from patches/api/0385-Win-Screen-API.patch rename to patches/api/0384-Win-Screen-API.patch diff --git a/patches/api/0386-Add-Entity-Body-Yaw-API.patch b/patches/api/0385-Add-Entity-Body-Yaw-API.patch similarity index 100% rename from patches/api/0386-Add-Entity-Body-Yaw-API.patch rename to patches/api/0385-Add-Entity-Body-Yaw-API.patch diff --git a/patches/api/0387-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch b/patches/api/0386-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch similarity index 100% rename from patches/api/0387-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch rename to patches/api/0386-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch diff --git a/patches/api/0388-Add-EntityFertilizeEggEvent.patch b/patches/api/0387-Add-EntityFertilizeEggEvent.patch similarity index 100% rename from patches/api/0388-Add-EntityFertilizeEggEvent.patch rename to patches/api/0387-Add-EntityFertilizeEggEvent.patch diff --git a/patches/api/0389-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/api/0388-Add-CompostItemEvent-and-EntityCompostItemEvent.patch similarity index 100% rename from patches/api/0389-Add-CompostItemEvent-and-EntityCompostItemEvent.patch rename to patches/api/0388-Add-CompostItemEvent-and-EntityCompostItemEvent.patch diff --git a/patches/api/0390-Add-Shearable-API.patch b/patches/api/0389-Add-Shearable-API.patch similarity index 100% rename from patches/api/0390-Add-Shearable-API.patch rename to patches/api/0389-Add-Shearable-API.patch diff --git a/patches/api/0391-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/api/0390-Fix-SpawnEggMeta-get-setSpawnedType.patch similarity index 100% rename from patches/api/0391-Fix-SpawnEggMeta-get-setSpawnedType.patch rename to patches/api/0390-Fix-SpawnEggMeta-get-setSpawnedType.patch diff --git a/patches/api/0392-Add-Mob-Experience-reward-API.patch b/patches/api/0391-Add-Mob-Experience-reward-API.patch similarity index 100% rename from patches/api/0392-Add-Mob-Experience-reward-API.patch rename to patches/api/0391-Add-Mob-Experience-reward-API.patch diff --git a/patches/api/0393-Expand-PlayerItemMendEvent.patch b/patches/api/0392-Expand-PlayerItemMendEvent.patch similarity index 100% rename from patches/api/0393-Expand-PlayerItemMendEvent.patch rename to patches/api/0392-Expand-PlayerItemMendEvent.patch diff --git a/patches/api/0394-Add-method-to-remove-all-active-potion-effects.patch b/patches/api/0393-Add-method-to-remove-all-active-potion-effects.patch similarity index 100% rename from patches/api/0394-Add-method-to-remove-all-active-potion-effects.patch rename to patches/api/0393-Add-method-to-remove-all-active-potion-effects.patch diff --git a/patches/api/0395-Folia-scheduler-and-owned-region-API.patch b/patches/api/0394-Folia-scheduler-and-owned-region-API.patch similarity index 100% rename from patches/api/0395-Folia-scheduler-and-owned-region-API.patch rename to patches/api/0394-Folia-scheduler-and-owned-region-API.patch diff --git a/patches/api/0396-Add-event-for-player-editing-sign.patch b/patches/api/0395-Add-event-for-player-editing-sign.patch similarity index 100% rename from patches/api/0396-Add-event-for-player-editing-sign.patch rename to patches/api/0395-Add-event-for-player-editing-sign.patch diff --git a/patches/api/0397-More-Sign-Block-API.patch b/patches/api/0396-More-Sign-Block-API.patch similarity index 100% rename from patches/api/0397-More-Sign-Block-API.patch rename to patches/api/0396-More-Sign-Block-API.patch diff --git a/patches/api/0398-Fix-BanList-API.patch b/patches/api/0397-Fix-BanList-API.patch similarity index 100% rename from patches/api/0398-Fix-BanList-API.patch rename to patches/api/0397-Fix-BanList-API.patch diff --git a/patches/api/0399-Add-whitelist-events.patch b/patches/api/0398-Add-whitelist-events.patch similarity index 100% rename from patches/api/0399-Add-whitelist-events.patch rename to patches/api/0398-Add-whitelist-events.patch diff --git a/patches/api/0400-API-for-updating-recipes-on-clients.patch b/patches/api/0399-API-for-updating-recipes-on-clients.patch similarity index 100% rename from patches/api/0400-API-for-updating-recipes-on-clients.patch rename to patches/api/0399-API-for-updating-recipes-on-clients.patch diff --git a/patches/api/0401-Add-PlayerFailMoveEvent.patch b/patches/api/0400-Add-PlayerFailMoveEvent.patch similarity index 100% rename from patches/api/0401-Add-PlayerFailMoveEvent.patch rename to patches/api/0400-Add-PlayerFailMoveEvent.patch diff --git a/patches/api/0402-Fix-custom-statistic-criteria-creation.patch b/patches/api/0401-Fix-custom-statistic-criteria-creation.patch similarity index 87% rename from patches/api/0402-Fix-custom-statistic-criteria-creation.patch rename to patches/api/0401-Fix-custom-statistic-criteria-creation.patch index ff4bad9d3519..bfa683fb849e 100644 --- a/patches/api/0402-Fix-custom-statistic-criteria-creation.patch +++ b/patches/api/0401-Fix-custom-statistic-criteria-creation.patch @@ -5,11 +5,11 @@ Subject: [PATCH] Fix custom statistic criteria creation diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 14cf57a96f47ba666f05cedbc0005ff0fec6a33d..57b51acd566f6ccabeea0b3f4c76b19547d35b5a 100644 +index b2ab190a73946ad2a5750c2408036cc3641e23f8..cfafd64ee39a6448e382f9903b8c462f3c454d3f 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -247,4 +247,6 @@ public interface UnsafeValues { - */ +@@ -256,4 +256,6 @@ public interface UnsafeValues { + @Deprecated(since = "1.21.3", forRemoval = true) void setBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey); // Paper end - namespaced key biome methods + diff --git a/patches/api/0403-SculkCatalyst-bloom-API.patch b/patches/api/0402-SculkCatalyst-bloom-API.patch similarity index 100% rename from patches/api/0403-SculkCatalyst-bloom-API.patch rename to patches/api/0402-SculkCatalyst-bloom-API.patch diff --git a/patches/api/0404-API-for-an-entity-s-scoreboard-name.patch b/patches/api/0403-API-for-an-entity-s-scoreboard-name.patch similarity index 100% rename from patches/api/0404-API-for-an-entity-s-scoreboard-name.patch rename to patches/api/0403-API-for-an-entity-s-scoreboard-name.patch diff --git a/patches/api/0405-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/api/0404-Deprecate-and-replace-methods-with-old-StructureType.patch similarity index 100% rename from patches/api/0405-Deprecate-and-replace-methods-with-old-StructureType.patch rename to patches/api/0404-Deprecate-and-replace-methods-with-old-StructureType.patch diff --git a/patches/api/0406-Add-Listing-API-for-Player.patch b/patches/api/0405-Add-Listing-API-for-Player.patch similarity index 100% rename from patches/api/0406-Add-Listing-API-for-Player.patch rename to patches/api/0405-Add-Listing-API-for-Player.patch diff --git a/patches/api/0407-Expose-clicked-BlockFace-during-BlockDamageEvent.patch b/patches/api/0406-Expose-clicked-BlockFace-during-BlockDamageEvent.patch similarity index 100% rename from patches/api/0407-Expose-clicked-BlockFace-during-BlockDamageEvent.patch rename to patches/api/0406-Expose-clicked-BlockFace-during-BlockDamageEvent.patch diff --git a/patches/api/0408-Fix-NPE-on-Boat-getStatus.patch b/patches/api/0407-Fix-NPE-on-Boat-getStatus.patch similarity index 100% rename from patches/api/0408-Fix-NPE-on-Boat-getStatus.patch rename to patches/api/0407-Fix-NPE-on-Boat-getStatus.patch diff --git a/patches/api/0409-Expand-Pose-API.patch b/patches/api/0408-Expand-Pose-API.patch similarity index 100% rename from patches/api/0409-Expand-Pose-API.patch rename to patches/api/0408-Expand-Pose-API.patch diff --git a/patches/api/0410-MerchantRecipe-add-copy-constructor.patch b/patches/api/0409-MerchantRecipe-add-copy-constructor.patch similarity index 100% rename from patches/api/0410-MerchantRecipe-add-copy-constructor.patch rename to patches/api/0409-MerchantRecipe-add-copy-constructor.patch diff --git a/patches/api/0411-More-DragonBattle-API.patch b/patches/api/0410-More-DragonBattle-API.patch similarity index 100% rename from patches/api/0411-More-DragonBattle-API.patch rename to patches/api/0410-More-DragonBattle-API.patch diff --git a/patches/api/0412-Add-PlayerPickItemEvent.patch b/patches/api/0411-Add-PlayerPickItemEvent.patch similarity index 100% rename from patches/api/0412-Add-PlayerPickItemEvent.patch rename to patches/api/0411-Add-PlayerPickItemEvent.patch diff --git a/patches/api/0413-Allow-trident-custom-damage.patch b/patches/api/0412-Allow-trident-custom-damage.patch similarity index 100% rename from patches/api/0413-Allow-trident-custom-damage.patch rename to patches/api/0412-Allow-trident-custom-damage.patch diff --git a/patches/api/0414-Expose-hand-during-BlockCanBuildEvent.patch b/patches/api/0413-Expose-hand-during-BlockCanBuildEvent.patch similarity index 100% rename from patches/api/0414-Expose-hand-during-BlockCanBuildEvent.patch rename to patches/api/0413-Expose-hand-during-BlockCanBuildEvent.patch diff --git a/patches/api/0415-Limit-setBurnTime-to-valid-short-values.patch b/patches/api/0414-Limit-setBurnTime-to-valid-short-values.patch similarity index 100% rename from patches/api/0415-Limit-setBurnTime-to-valid-short-values.patch rename to patches/api/0414-Limit-setBurnTime-to-valid-short-values.patch diff --git a/patches/api/0416-Add-OfflinePlayer-isConnected.patch b/patches/api/0415-Add-OfflinePlayer-isConnected.patch similarity index 100% rename from patches/api/0416-Add-OfflinePlayer-isConnected.patch rename to patches/api/0415-Add-OfflinePlayer-isConnected.patch diff --git a/patches/api/0417-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/api/0416-Add-titleOverride-to-InventoryOpenEvent.patch similarity index 100% rename from patches/api/0417-Add-titleOverride-to-InventoryOpenEvent.patch rename to patches/api/0416-Add-titleOverride-to-InventoryOpenEvent.patch diff --git a/patches/api/0418-Allow-proper-checking-of-empty-item-stacks.patch b/patches/api/0417-Allow-proper-checking-of-empty-item-stacks.patch similarity index 100% rename from patches/api/0418-Allow-proper-checking-of-empty-item-stacks.patch rename to patches/api/0417-Allow-proper-checking-of-empty-item-stacks.patch diff --git a/patches/api/0419-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch b/patches/api/0418-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch similarity index 100% rename from patches/api/0419-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch rename to patches/api/0418-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch diff --git a/patches/api/0420-Add-player-idle-duration-API.patch b/patches/api/0419-Add-player-idle-duration-API.patch similarity index 100% rename from patches/api/0420-Add-player-idle-duration-API.patch rename to patches/api/0419-Add-player-idle-duration-API.patch diff --git a/patches/api/0421-Add-API-to-get-the-collision-shape-of-a-block-before.patch b/patches/api/0420-Add-API-to-get-the-collision-shape-of-a-block-before.patch similarity index 100% rename from patches/api/0421-Add-API-to-get-the-collision-shape-of-a-block-before.patch rename to patches/api/0420-Add-API-to-get-the-collision-shape-of-a-block-before.patch diff --git a/patches/api/0422-Add-predicate-for-blocks-when-raytracing.patch b/patches/api/0421-Add-predicate-for-blocks-when-raytracing.patch similarity index 100% rename from patches/api/0422-Add-predicate-for-blocks-when-raytracing.patch rename to patches/api/0421-Add-predicate-for-blocks-when-raytracing.patch diff --git a/patches/api/0423-Add-hand-to-fish-event-for-all-player-interactions.patch b/patches/api/0422-Add-hand-to-fish-event-for-all-player-interactions.patch similarity index 100% rename from patches/api/0423-Add-hand-to-fish-event-for-all-player-interactions.patch rename to patches/api/0422-Add-hand-to-fish-event-for-all-player-interactions.patch diff --git a/patches/api/0424-Attribute-Modifier-API-improvements.patch b/patches/api/0423-Attribute-Modifier-API-improvements.patch similarity index 100% rename from patches/api/0424-Attribute-Modifier-API-improvements.patch rename to patches/api/0423-Attribute-Modifier-API-improvements.patch diff --git a/patches/api/0425-Expand-LingeringPotion-API.patch b/patches/api/0424-Expand-LingeringPotion-API.patch similarity index 100% rename from patches/api/0425-Expand-LingeringPotion-API.patch rename to patches/api/0424-Expand-LingeringPotion-API.patch diff --git a/patches/api/0426-Remove-unnecessary-durability-check-in-ItemStack-isS.patch b/patches/api/0425-Remove-unnecessary-durability-check-in-ItemStack-isS.patch similarity index 100% rename from patches/api/0426-Remove-unnecessary-durability-check-in-ItemStack-isS.patch rename to patches/api/0425-Remove-unnecessary-durability-check-in-ItemStack-isS.patch diff --git a/patches/api/0427-Add-Structure-check-API.patch b/patches/api/0426-Add-Structure-check-API.patch similarity index 100% rename from patches/api/0427-Add-Structure-check-API.patch rename to patches/api/0426-Add-Structure-check-API.patch diff --git a/patches/api/0428-Experimental-annotations-change.patch b/patches/api/0427-Experimental-annotations-change.patch similarity index 100% rename from patches/api/0428-Experimental-annotations-change.patch rename to patches/api/0427-Experimental-annotations-change.patch diff --git a/patches/api/0429-Add-more-scoreboard-API.patch b/patches/api/0428-Add-more-scoreboard-API.patch similarity index 100% rename from patches/api/0429-Add-more-scoreboard-API.patch rename to patches/api/0428-Add-more-scoreboard-API.patch diff --git a/patches/api/0430-Improve-Registry.patch b/patches/api/0429-Improve-Registry.patch similarity index 99% rename from patches/api/0430-Improve-Registry.patch rename to patches/api/0429-Improve-Registry.patch index 607568bd87a0..c2e07efffbf9 100644 --- a/patches/api/0430-Improve-Registry.patch +++ b/patches/api/0429-Improve-Registry.patch @@ -49,7 +49,7 @@ index c9f02466a04d20579fe2258bb02acf98e163ca81..bffd4ab2d08e5c3f83a49a31e1e55cc1 @Override public @NotNull String translationKey() { diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 6112db5d1153d045f2271038bada6b46d1a6a051..67cf3fcad21a8977d6fad172cc776b628ab68f25 100644 +index 5cd69669f8893d89e88b56bdbec17dea9f49beca..80a6bc584222adf1cde3e27ee78d2b9f7c4069fc 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -379,6 +379,79 @@ public interface Registry extends Iterable { diff --git a/patches/api/0431-Add-experience-points-API.patch b/patches/api/0430-Add-experience-points-API.patch similarity index 100% rename from patches/api/0431-Add-experience-points-API.patch rename to patches/api/0430-Add-experience-points-API.patch diff --git a/patches/api/0432-Add-missing-InventoryType.patch b/patches/api/0431-Add-missing-InventoryType.patch similarity index 100% rename from patches/api/0432-Add-missing-InventoryType.patch rename to patches/api/0431-Add-missing-InventoryType.patch diff --git a/patches/api/0433-Add-drops-to-shear-events.patch b/patches/api/0432-Add-drops-to-shear-events.patch similarity index 100% rename from patches/api/0433-Add-drops-to-shear-events.patch rename to patches/api/0432-Add-drops-to-shear-events.patch diff --git a/patches/api/0434-Add-HiddenPotionEffect-API.patch b/patches/api/0433-Add-HiddenPotionEffect-API.patch similarity index 100% rename from patches/api/0434-Add-HiddenPotionEffect-API.patch rename to patches/api/0433-Add-HiddenPotionEffect-API.patch diff --git a/patches/api/0435-Add-PlayerShieldDisableEvent.patch b/patches/api/0434-Add-PlayerShieldDisableEvent.patch similarity index 100% rename from patches/api/0435-Add-PlayerShieldDisableEvent.patch rename to patches/api/0434-Add-PlayerShieldDisableEvent.patch diff --git a/patches/api/0436-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch b/patches/api/0435-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch similarity index 100% rename from patches/api/0436-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch rename to patches/api/0435-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch diff --git a/patches/api/0437-Add-BlockStateMeta-clearBlockState.patch b/patches/api/0436-Add-BlockStateMeta-clearBlockState.patch similarity index 100% rename from patches/api/0437-Add-BlockStateMeta-clearBlockState.patch rename to patches/api/0436-Add-BlockStateMeta-clearBlockState.patch diff --git a/patches/api/0438-Expose-LootTable-of-DecoratedPot.patch b/patches/api/0437-Expose-LootTable-of-DecoratedPot.patch similarity index 100% rename from patches/api/0438-Expose-LootTable-of-DecoratedPot.patch rename to patches/api/0437-Expose-LootTable-of-DecoratedPot.patch diff --git a/patches/api/0439-Add-ShulkerDuplicateEvent.patch b/patches/api/0438-Add-ShulkerDuplicateEvent.patch similarity index 100% rename from patches/api/0439-Add-ShulkerDuplicateEvent.patch rename to patches/api/0438-Add-ShulkerDuplicateEvent.patch diff --git a/patches/api/0440-Add-api-for-spawn-egg-texture-colors.patch b/patches/api/0439-Add-api-for-spawn-egg-texture-colors.patch similarity index 89% rename from patches/api/0440-Add-api-for-spawn-egg-texture-colors.patch rename to patches/api/0439-Add-api-for-spawn-egg-texture-colors.patch index 14a80bca1c12..a239d4c10021 100644 --- a/patches/api/0440-Add-api-for-spawn-egg-texture-colors.patch +++ b/patches/api/0439-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/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 57b51acd566f6ccabeea0b3f4c76b19547d35b5a..38e84d98670b45b1f855885cf07ce13f0433fa49 100644 +index cfafd64ee39a6448e382f9903b8c462f3c454d3f..94913f522d3c060c609f6ec7d7b0d92ea5587fc8 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -249,4 +249,17 @@ public interface UnsafeValues { +@@ -258,4 +258,17 @@ public interface UnsafeValues { // Paper end - namespaced key biome methods String getStatisticCriteriaKey(@NotNull org.bukkit.Statistic statistic); // Paper - fix custom stats criteria creation diff --git a/patches/api/0441-Add-Lifecycle-Event-system.patch b/patches/api/0440-Add-Lifecycle-Event-system.patch similarity index 99% rename from patches/api/0441-Add-Lifecycle-Event-system.patch rename to patches/api/0440-Add-Lifecycle-Event-system.patch index 2d2d639018c9..5dfac8ef467f 100644 --- a/patches/api/0441-Add-Lifecycle-Event-system.patch +++ b/patches/api/0440-Add-Lifecycle-Event-system.patch @@ -546,10 +546,10 @@ index 0000000000000000000000000000000000000000..f70814de0d6c40b2c1c9921b8abdd116 + } +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 38e84d98670b45b1f855885cf07ce13f0433fa49..81b1c024e27a7021982336b94fc1e1ba33308f6c 100644 +index 94913f522d3c060c609f6ec7d7b0d92ea5587fc8..a0b02efdb3beed93cb1656e840f24cb98f5fd555 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -262,4 +262,12 @@ public interface UnsafeValues { +@@ -271,4 +271,12 @@ public interface UnsafeValues { */ @Nullable org.bukkit.Color getSpawnEggLayerColor(org.bukkit.entity.EntityType entityType, int layer); // Paper end - spawn egg color visibility diff --git a/patches/api/0442-ItemStack-Tooltip-API.patch b/patches/api/0441-ItemStack-Tooltip-API.patch similarity index 97% rename from patches/api/0442-ItemStack-Tooltip-API.patch rename to patches/api/0441-ItemStack-Tooltip-API.patch index 1d0644e6e126..a3c4cf2de9aa 100644 --- a/patches/api/0442-ItemStack-Tooltip-API.patch +++ b/patches/api/0441-ItemStack-Tooltip-API.patch @@ -110,10 +110,10 @@ index 0000000000000000000000000000000000000000..a649b90dfac6000c01579a48234a1138 + } +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 81b1c024e27a7021982336b94fc1e1ba33308f6c..e5144471056e69586c1693a9264a3995387de3cc 100644 +index a0b02efdb3beed93cb1656e840f24cb98f5fd555..b503b5e13c51580367d53939ad4c19a7718c22ce 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -270,4 +270,6 @@ public interface UnsafeValues { +@@ -279,4 +279,6 @@ public interface UnsafeValues { @org.jetbrains.annotations.ApiStatus.Internal io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager createPluginLifecycleEventManager(final org.bukkit.plugin.java.JavaPlugin plugin, final java.util.function.BooleanSupplier registrationCheck); // Paper end - lifecycle event API diff --git a/patches/api/0443-Add-getChunkSnapshot-includeLightData-parameter.patch b/patches/api/0442-Add-getChunkSnapshot-includeLightData-parameter.patch similarity index 100% rename from patches/api/0443-Add-getChunkSnapshot-includeLightData-parameter.patch rename to patches/api/0442-Add-getChunkSnapshot-includeLightData-parameter.patch diff --git a/patches/api/0444-Add-FluidState-API.patch b/patches/api/0443-Add-FluidState-API.patch similarity index 100% rename from patches/api/0444-Add-FluidState-API.patch rename to patches/api/0443-Add-FluidState-API.patch diff --git a/patches/api/0445-add-number-format-api.patch b/patches/api/0444-add-number-format-api.patch similarity index 100% rename from patches/api/0445-add-number-format-api.patch rename to patches/api/0444-add-number-format-api.patch diff --git a/patches/api/0446-improve-BanList-types.patch b/patches/api/0445-improve-BanList-types.patch similarity index 100% rename from patches/api/0446-improve-BanList-types.patch rename to patches/api/0445-improve-BanList-types.patch diff --git a/patches/api/0447-Suspicious-Effect-Entry-API.patch b/patches/api/0446-Suspicious-Effect-Entry-API.patch similarity index 100% rename from patches/api/0447-Suspicious-Effect-Entry-API.patch rename to patches/api/0446-Suspicious-Effect-Entry-API.patch diff --git a/patches/api/0448-Fix-DamageSource-API.patch b/patches/api/0447-Fix-DamageSource-API.patch similarity index 100% rename from patches/api/0448-Fix-DamageSource-API.patch rename to patches/api/0447-Fix-DamageSource-API.patch diff --git a/patches/api/0449-Expanded-Hopper-API.patch b/patches/api/0448-Expanded-Hopper-API.patch similarity index 100% rename from patches/api/0449-Expanded-Hopper-API.patch rename to patches/api/0448-Expanded-Hopper-API.patch diff --git a/patches/api/0450-Clone-mutables-to-prevent-unexpected-issues.patch b/patches/api/0449-Clone-mutables-to-prevent-unexpected-issues.patch similarity index 100% rename from patches/api/0450-Clone-mutables-to-prevent-unexpected-issues.patch rename to patches/api/0449-Clone-mutables-to-prevent-unexpected-issues.patch diff --git a/patches/api/0451-Add-BlockBreakProgressUpdateEvent.patch b/patches/api/0450-Add-BlockBreakProgressUpdateEvent.patch similarity index 100% rename from patches/api/0451-Add-BlockBreakProgressUpdateEvent.patch rename to patches/api/0450-Add-BlockBreakProgressUpdateEvent.patch diff --git a/patches/api/0452-Deprecate-ItemStack-setType.patch b/patches/api/0451-Deprecate-ItemStack-setType.patch similarity index 100% rename from patches/api/0452-Deprecate-ItemStack-setType.patch rename to patches/api/0451-Deprecate-ItemStack-setType.patch diff --git a/patches/api/0453-Item-Mutation-Fixes.patch b/patches/api/0452-Item-Mutation-Fixes.patch similarity index 100% rename from patches/api/0453-Item-Mutation-Fixes.patch rename to patches/api/0452-Item-Mutation-Fixes.patch diff --git a/patches/api/0454-API-for-checking-sent-chunks.patch b/patches/api/0453-API-for-checking-sent-chunks.patch similarity index 100% rename from patches/api/0454-API-for-checking-sent-chunks.patch rename to patches/api/0453-API-for-checking-sent-chunks.patch diff --git a/patches/api/0455-Add-CartographyItemEvent.patch b/patches/api/0454-Add-CartographyItemEvent.patch similarity index 100% rename from patches/api/0455-Add-CartographyItemEvent.patch rename to patches/api/0454-Add-CartographyItemEvent.patch diff --git a/patches/api/0456-More-Raid-API.patch b/patches/api/0455-More-Raid-API.patch similarity index 100% rename from patches/api/0456-More-Raid-API.patch rename to patches/api/0455-More-Raid-API.patch diff --git a/patches/api/0457-Fix-SpawnerEntry-Equipment-API.patch b/patches/api/0456-Fix-SpawnerEntry-Equipment-API.patch similarity index 100% rename from patches/api/0457-Fix-SpawnerEntry-Equipment-API.patch rename to patches/api/0456-Fix-SpawnerEntry-Equipment-API.patch diff --git a/patches/api/0458-Fix-ItemFlags.patch b/patches/api/0457-Fix-ItemFlags.patch similarity index 100% rename from patches/api/0458-Fix-ItemFlags.patch rename to patches/api/0457-Fix-ItemFlags.patch diff --git a/patches/api/0459-Allow-modifying-library-loader-jars-bytecode.patch b/patches/api/0458-Allow-modifying-library-loader-jars-bytecode.patch similarity index 100% rename from patches/api/0459-Allow-modifying-library-loader-jars-bytecode.patch rename to patches/api/0458-Allow-modifying-library-loader-jars-bytecode.patch diff --git a/patches/api/0460-Add-hook-to-remap-library-jars.patch b/patches/api/0459-Add-hook-to-remap-library-jars.patch similarity index 100% rename from patches/api/0460-Add-hook-to-remap-library-jars.patch rename to patches/api/0459-Add-hook-to-remap-library-jars.patch diff --git a/patches/api/0461-Add-GameMode-isInvulnerable.patch b/patches/api/0460-Add-GameMode-isInvulnerable.patch similarity index 100% rename from patches/api/0461-Add-GameMode-isInvulnerable.patch rename to patches/api/0460-Add-GameMode-isInvulnerable.patch diff --git a/patches/api/0462-Expose-hasColor-to-leather-armor.patch b/patches/api/0461-Expose-hasColor-to-leather-armor.patch similarity index 100% rename from patches/api/0462-Expose-hasColor-to-leather-armor.patch rename to patches/api/0461-Expose-hasColor-to-leather-armor.patch diff --git a/patches/api/0463-Added-API-to-get-player-ha-proxy-address.patch b/patches/api/0462-Added-API-to-get-player-ha-proxy-address.patch similarity index 100% rename from patches/api/0463-Added-API-to-get-player-ha-proxy-address.patch rename to patches/api/0462-Added-API-to-get-player-ha-proxy-address.patch diff --git a/patches/api/0464-More-Chest-Block-API.patch b/patches/api/0463-More-Chest-Block-API.patch similarity index 100% rename from patches/api/0464-More-Chest-Block-API.patch rename to patches/api/0463-More-Chest-Block-API.patch diff --git a/patches/api/0465-Brigadier-based-command-API.patch b/patches/api/0464-Brigadier-based-command-API.patch similarity index 100% rename from patches/api/0465-Brigadier-based-command-API.patch rename to patches/api/0464-Brigadier-based-command-API.patch diff --git a/patches/api/0466-Fix-issues-with-recipe-API.patch b/patches/api/0465-Fix-issues-with-recipe-API.patch similarity index 100% rename from patches/api/0466-Fix-issues-with-recipe-API.patch rename to patches/api/0465-Fix-issues-with-recipe-API.patch diff --git a/patches/api/0467-Fix-equipment-slot-and-group-API.patch b/patches/api/0466-Fix-equipment-slot-and-group-API.patch similarity index 100% rename from patches/api/0467-Fix-equipment-slot-and-group-API.patch rename to patches/api/0466-Fix-equipment-slot-and-group-API.patch diff --git a/patches/api/0468-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch b/patches/api/0467-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch similarity index 100% rename from patches/api/0468-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch rename to patches/api/0467-Allow-Bukkit-plugin-to-use-Paper-PluginLoader-API.patch diff --git a/patches/api/0469-General-ItemMeta-fixes.patch b/patches/api/0468-General-ItemMeta-fixes.patch similarity index 100% rename from patches/api/0469-General-ItemMeta-fixes.patch rename to patches/api/0468-General-ItemMeta-fixes.patch diff --git a/patches/api/0470-Add-missing-fishing-event-state.patch b/patches/api/0469-Add-missing-fishing-event-state.patch similarity index 100% rename from patches/api/0470-Add-missing-fishing-event-state.patch rename to patches/api/0469-Add-missing-fishing-event-state.patch diff --git a/patches/api/0471-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch b/patches/api/0470-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch similarity index 100% rename from patches/api/0471-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch rename to patches/api/0470-Deprecate-InvAction-HOTBAR_MOVE_AND_READD.patch diff --git a/patches/api/0472-Registry-Modification-API.patch b/patches/api/0471-Registry-Modification-API.patch similarity index 99% rename from patches/api/0472-Registry-Modification-API.patch rename to patches/api/0471-Registry-Modification-API.patch index b51badfa70a6..2500f3c6301d 100644 --- a/patches/api/0472-Registry-Modification-API.patch +++ b/patches/api/0471-Registry-Modification-API.patch @@ -809,7 +809,7 @@ index 0000000000000000000000000000000000000000..bf49125acc8a0508bf59674bba3ed350 + } +} diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 67cf3fcad21a8977d6fad172cc776b628ab68f25..b4ef3133fdd9d79a3381cf8f659ff561ab2b4fad 100644 +index 80a6bc584222adf1cde3e27ee78d2b9f7c4069fc..b2c45ef76b65c59c3fb1caf3c62c5da422a8d27d 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java @@ -378,6 +378,27 @@ public interface Registry extends Iterable { @@ -900,10 +900,10 @@ index 67cf3fcad21a8977d6fad172cc776b628ab68f25..b4ef3133fdd9d79a3381cf8f659ff561 } } diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index e5144471056e69586c1693a9264a3995387de3cc..2c365ecf3f5a5252e489bc1dc04359e766a2d739 100644 +index b503b5e13c51580367d53939ad4c19a7718c22ce..5b13617e497e847ef66214f9140aea0cd41f4c4f 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -272,4 +272,6 @@ public interface UnsafeValues { +@@ -281,4 +281,6 @@ public interface UnsafeValues { // Paper end - lifecycle event API @NotNull java.util.List computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines diff --git a/patches/api/0473-Introduce-registry-entry-and-builders.patch b/patches/api/0472-Introduce-registry-entry-and-builders.patch similarity index 100% rename from patches/api/0473-Introduce-registry-entry-and-builders.patch rename to patches/api/0472-Introduce-registry-entry-and-builders.patch diff --git a/patches/api/0474-Proxy-ItemStack-to-CraftItemStack.patch b/patches/api/0473-Proxy-ItemStack-to-CraftItemStack.patch similarity index 99% rename from patches/api/0474-Proxy-ItemStack-to-CraftItemStack.patch rename to patches/api/0473-Proxy-ItemStack-to-CraftItemStack.patch index 157b63eeb46c..927052f343a3 100644 --- a/patches/api/0474-Proxy-ItemStack-to-CraftItemStack.patch +++ b/patches/api/0473-Proxy-ItemStack-to-CraftItemStack.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Proxy ItemStack to CraftItemStack diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 2c365ecf3f5a5252e489bc1dc04359e766a2d739..06b7af5dbae3dd1c5cb024cc875162725a0b8c37 100644 +index 5b13617e497e847ef66214f9140aea0cd41f4c4f..56d16c887b7663aab7db2f7be532d9912aeb3570 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -274,4 +274,6 @@ public interface UnsafeValues { +@@ -283,4 +283,6 @@ public interface UnsafeValues { @NotNull java.util.List computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines io.papermc.paper.registry.tag.@Nullable Tag getTag(io.papermc.paper.registry.tag.@NotNull TagKey tagKey); // Paper - hack to get tags for non-server backed registries diff --git a/patches/api/0475-Make-a-PDC-view-accessible-directly-from-ItemStack.patch b/patches/api/0474-Make-a-PDC-view-accessible-directly-from-ItemStack.patch similarity index 100% rename from patches/api/0475-Make-a-PDC-view-accessible-directly-from-ItemStack.patch rename to patches/api/0474-Make-a-PDC-view-accessible-directly-from-ItemStack.patch diff --git a/patches/api/0476-Fix-HelpCommand-searching.patch b/patches/api/0475-Fix-HelpCommand-searching.patch similarity index 100% rename from patches/api/0476-Fix-HelpCommand-searching.patch rename to patches/api/0475-Fix-HelpCommand-searching.patch diff --git a/patches/api/0477-add-Plugin-getDataPath.patch b/patches/api/0476-add-Plugin-getDataPath.patch similarity index 100% rename from patches/api/0477-add-Plugin-getDataPath.patch rename to patches/api/0476-add-Plugin-getDataPath.patch diff --git a/patches/api/0478-Fix-PickupStatus-getting-reset.patch b/patches/api/0477-Fix-PickupStatus-getting-reset.patch similarity index 100% rename from patches/api/0478-Fix-PickupStatus-getting-reset.patch rename to patches/api/0477-Fix-PickupStatus-getting-reset.patch diff --git a/patches/api/0479-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch b/patches/api/0478-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch similarity index 100% rename from patches/api/0479-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch rename to patches/api/0478-Add-an-API-for-CanPlaceOn-and-CanDestroy-NBT-values.patch diff --git a/patches/api/0480-Improve-StandardMessenger-exception-messages.patch b/patches/api/0479-Improve-StandardMessenger-exception-messages.patch similarity index 100% rename from patches/api/0480-Improve-StandardMessenger-exception-messages.patch rename to patches/api/0479-Improve-StandardMessenger-exception-messages.patch diff --git a/patches/api/0481-Add-even-more-Enchantment-API.patch b/patches/api/0480-Add-even-more-Enchantment-API.patch similarity index 100% rename from patches/api/0481-Add-even-more-Enchantment-API.patch rename to patches/api/0480-Add-even-more-Enchantment-API.patch diff --git a/patches/api/0482-Leashable-API.patch b/patches/api/0481-Leashable-API.patch similarity index 100% rename from patches/api/0482-Leashable-API.patch rename to patches/api/0481-Leashable-API.patch diff --git a/patches/api/0483-Add-enchantment-seed-update-API.patch b/patches/api/0482-Add-enchantment-seed-update-API.patch similarity index 100% rename from patches/api/0483-Add-enchantment-seed-update-API.patch rename to patches/api/0482-Add-enchantment-seed-update-API.patch diff --git a/patches/api/0484-Deprecate-for-removal-all-OldEnum-related-methods.patch b/patches/api/0483-Deprecate-for-removal-all-OldEnum-related-methods.patch similarity index 100% rename from patches/api/0484-Deprecate-for-removal-all-OldEnum-related-methods.patch rename to patches/api/0483-Deprecate-for-removal-all-OldEnum-related-methods.patch diff --git a/patches/api/0485-Add-FeatureFlag-API.patch b/patches/api/0484-Add-FeatureFlag-API.patch similarity index 98% rename from patches/api/0485-Add-FeatureFlag-API.patch rename to patches/api/0484-Add-FeatureFlag-API.patch index 26442d7b0125..9a535e20f5ff 100644 --- a/patches/api/0485-Add-FeatureFlag-API.patch +++ b/patches/api/0484-Add-FeatureFlag-API.patch @@ -247,11 +247,11 @@ index eb33e8e671972aa308ad75a7ce9aa9ac526f470f..05ecf3cb38ff42c8b52405d900197e6b /** * Gets the {@link Biome} at the given {@link Location}. diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 06b7af5dbae3dd1c5cb024cc875162725a0b8c37..aa3916b0d8e40615a7ae142e254277744b4f024e 100644 +index 56d16c887b7663aab7db2f7be532d9912aeb3570..2dd4c16ac107f58752c725540ab414ff79c46ff4 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -109,8 +109,7 @@ public interface UnsafeValues { - +@@ -111,8 +111,7 @@ public interface UnsafeValues { + @Deprecated(since = "1.21.3", forRemoval = true) String getTranslationKey(Attribute attribute); - @Nullable @@ -284,7 +284,7 @@ index c080c2a3323d19cb3d549aa0fe6c164666d7da75..ed534fe4983873a2d5f623f0d9d5e3ce /** diff --git a/src/main/java/org/bukkit/entity/EntityType.java b/src/main/java/org/bukkit/entity/EntityType.java -index 6521a20d69a4c8e75be7e9b3fdebbc25b843ec1b..37dbd114f91a26bc09a1230d38afe7f6a99e5c28 100644 +index 9e115cec6232b22760e91ade671f81461c0c0364..c1aa59bab82aee8fd42f7149c520b45660b29082 100644 --- a/src/main/java/org/bukkit/entity/EntityType.java +++ b/src/main/java/org/bukkit/entity/EntityType.java @@ -45,7 +45,7 @@ import org.jetbrains.annotations.Contract; diff --git a/patches/api/0486-Tag-Lifecycle-Events.patch b/patches/api/0485-Tag-Lifecycle-Events.patch similarity index 100% rename from patches/api/0486-Tag-Lifecycle-Events.patch rename to patches/api/0485-Tag-Lifecycle-Events.patch diff --git a/patches/api/0487-Item-serialization-as-json.patch b/patches/api/0486-Item-serialization-as-json.patch similarity index 93% rename from patches/api/0487-Item-serialization-as-json.patch rename to patches/api/0486-Item-serialization-as-json.patch index c2b00d8d3de7..e7d391dc2035 100644 --- a/patches/api/0487-Item-serialization-as-json.patch +++ b/patches/api/0486-Item-serialization-as-json.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Item serialization as json diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index aa3916b0d8e40615a7ae142e254277744b4f024e..e4084369d12390bb5c92ab58ad34ff07afea1142 100644 +index 2dd4c16ac107f58752c725540ab414ff79c46ff4..79312bdda8ef0799e2d46decc52cfdac95b97d37 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -163,6 +163,36 @@ public interface UnsafeValues { +@@ -168,6 +168,36 @@ public interface UnsafeValues { ItemStack deserializeItem(byte[] data); diff --git a/patches/api/0488-create-TileStateInventoryHolder.patch b/patches/api/0487-create-TileStateInventoryHolder.patch similarity index 100% rename from patches/api/0488-create-TileStateInventoryHolder.patch rename to patches/api/0487-create-TileStateInventoryHolder.patch diff --git a/patches/api/0489-Add-enchantWithLevels-with-enchantment-registry-set.patch b/patches/api/0488-Add-enchantWithLevels-with-enchantment-registry-set.patch similarity index 100% rename from patches/api/0489-Add-enchantWithLevels-with-enchantment-registry-set.patch rename to patches/api/0488-Add-enchantWithLevels-with-enchantment-registry-set.patch diff --git a/patches/api/0490-Improve-entity-effect-API.patch b/patches/api/0489-Improve-entity-effect-API.patch similarity index 100% rename from patches/api/0490-Improve-entity-effect-API.patch rename to patches/api/0489-Improve-entity-effect-API.patch diff --git a/patches/api/0491-Add-recipeBrewTime.patch b/patches/api/0490-Add-recipeBrewTime.patch similarity index 100% rename from patches/api/0491-Add-recipeBrewTime.patch rename to patches/api/0490-Add-recipeBrewTime.patch diff --git a/patches/api/0492-Add-PlayerInsertLecternBookEvent.patch b/patches/api/0491-Add-PlayerInsertLecternBookEvent.patch similarity index 100% rename from patches/api/0492-Add-PlayerInsertLecternBookEvent.patch rename to patches/api/0491-Add-PlayerInsertLecternBookEvent.patch diff --git a/patches/api/0493-Void-damage-configuration-API.patch b/patches/api/0492-Void-damage-configuration-API.patch similarity index 100% rename from patches/api/0493-Void-damage-configuration-API.patch rename to patches/api/0492-Void-damage-configuration-API.patch diff --git a/patches/api/0494-Add-Offline-PDC-API.patch b/patches/api/0493-Add-Offline-PDC-API.patch similarity index 100% rename from patches/api/0494-Add-Offline-PDC-API.patch rename to patches/api/0493-Add-Offline-PDC-API.patch diff --git a/patches/api/0495-Add-AnvilView-bypassEnchantmentLevelRestriction.patch b/patches/api/0494-Add-AnvilView-bypassEnchantmentLevelRestriction.patch similarity index 100% rename from patches/api/0495-Add-AnvilView-bypassEnchantmentLevelRestriction.patch rename to patches/api/0494-Add-AnvilView-bypassEnchantmentLevelRestriction.patch diff --git a/patches/api/0496-fix-DamageTypeTags-init.patch b/patches/api/0495-fix-DamageTypeTags-init.patch similarity index 100% rename from patches/api/0496-fix-DamageTypeTags-init.patch rename to patches/api/0495-fix-DamageTypeTags-init.patch diff --git a/patches/server/0008-CB-fixes.patch b/patches/server/0008-CB-fixes.patch index 3c0b7b9d42c7..50afbc86c905 100644 --- a/patches/server/0008-CB-fixes.patch +++ b/patches/server/0008-CB-fixes.patch @@ -31,19 +31,6 @@ index a17846ccd8581c3d6da962e977623aaab8314ec7..f6a3606b972064c4ec78487374e6197c this.structureManager = new StructureManager(this, this.serverLevelData.worldGenOptions(), this.structureCheck); // CraftBukkit if ((this.dimension() == Level.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END)) || env == org.bukkit.World.Environment.THE_END) { // CraftBukkit - Allow to create EnderDragonBattle in default and custom END this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenOptions().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit -diff --git a/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java b/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java -index ed78039b89884c41ce10d520786c5b56f7d9b154..0239495abcc7b796864976b37ece184efa9a747e 100644 ---- a/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java -+++ b/src/main/java/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java -@@ -54,7 +54,7 @@ public record SummonEntityEffect(HolderSet> entityTypes, boolean j - // CraftBukkit start - world.strikeLightning(entity1, (context.itemStack().getItem() == Items.TRIDENT) ? LightningStrikeEvent.Cause.TRIDENT : LightningStrikeEvent.Cause.ENCHANTMENT); - } else { -- world.addFreshEntityWithPassengers(user, CreatureSpawnEvent.SpawnReason.ENCHANTMENT); -+ world.addFreshEntityWithPassengers(entity1, CreatureSpawnEvent.SpawnReason.ENCHANTMENT); // Paper - Fix typo when adding summoned entity - // CraftBukkit end - } - diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java index 4f68394a94308513269f0a4c749b6a36738e3ca0..953ab7638f7242b5a11dd1de8786172443a0558c 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/StructureCheck.java @@ -115,10 +102,10 @@ index 163d54a8bf4cedbd1471e86b7ab1a1b850ed3f39..6effe47b32a8551aa6f6b11bc0315714 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 e95c367d1c14dc28b1bf83cc461c80f454af22af..5187d48ba067d0edf55fecfc912ae5ac34452da3 100644 +index 7d39ed941cd0567d01122469a36d7a645b5aeeba..c101b342e4f0c154a35f6268253d9c30d97a98c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -246,7 +246,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -247,7 +247,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/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 7375271d2050..827ba628ff45 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -3331,7 +3331,7 @@ index 49c037e961c5ca5ba8d6a870cb32ffe8719adc91..2772c19f58a35713d61aab24f6f0d6f5 } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index eb61712ea067b277e7f32f887e3528faca275450..16a9142bdbbfbbbb69d1486bd119dc610094484b 100644 +index 49102177454765b8e53d0d7f47fe4bf4a33549af..c3fc8b1abe843a19347509947f4b864c1b417800 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -648,8 +648,10 @@ public final class CraftServer implements Server { @@ -5202,7 +5202,7 @@ 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 bc68a45af66699f013851869646a2c11d5a871ee..626fe2af05fecd41b777b5dd5decbedb2f17b43a 100644 +index 5dea83c1a0de4e5123430bf2f902a78969021167..2e524520308dda7ce7df98d91c89a9cfe7542862 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -1097,6 +1097,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @@ -5635,10 +5635,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 5187d48ba067d0edf55fecfc912ae5ac34452da3..aa02e932ea19325694b1058d749b0858465530e8 100644 +index c101b342e4f0c154a35f6268253d9c30d97a98c3..54551723c6a6aae63edee6034ef8b8d20760cf11 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -79,6 +79,43 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -80,6 +80,43 @@ public final class CraftMagicNumbers implements UnsafeValues { private CraftMagicNumbers() {} diff --git a/patches/server/0019-Paper-Plugins.patch b/patches/server/0019-Paper-Plugins.patch index 2ca42e58a647..71fc842f89d2 100644 --- a/patches/server/0019-Paper-Plugins.patch +++ b/patches/server/0019-Paper-Plugins.patch @@ -7257,7 +7257,7 @@ index 9bd6056bba6ba48bada7e9cd5883b0a171b0bbc4..7399358f18dc7869fbfe414186cf1841 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 1b66c5173dd37433d895c0d804257141a3a8c588..e8c1ceed228a1dfb9f3c76b54a91d712c511ffb5 100644 +index 4ec8731a48f81aff33c7d8bcfe00dea263735e48..600e865688b423d9bb4338f413dc28418ba37748 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -280,7 +280,8 @@ public final class CraftServer implements Server { @@ -7329,10 +7329,10 @@ index 1b66c5173dd37433d895c0d804257141a3a8c588..e8c1ceed228a1dfb9f3c76b54a91d712 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 aa02e932ea19325694b1058d749b0858465530e8..0ff9c62636e8709a6df252e9aaf931c9c17bd9bf 100644 +index 54551723c6a6aae63edee6034ef8b8d20760cf11..3c9cdb8c67d2704caac6488a6216d8c9c8a009ef 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -401,6 +401,16 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -402,6 +402,16 @@ public final class CraftMagicNumbers implements UnsafeValues { net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack); return nmsItemStack.getItem().getDescriptionId(); } diff --git a/patches/server/0021-Hook-into-CB-plugin-rewrites.patch b/patches/server/0021-Hook-into-CB-plugin-rewrites.patch index 036deead6e2e..4b98c18cbf53 100644 --- a/patches/server/0021-Hook-into-CB-plugin-rewrites.patch +++ b/patches/server/0021-Hook-into-CB-plugin-rewrites.patch @@ -8,7 +8,7 @@ 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 b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390cb9129cd 100644 +index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b89f56a10 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java @@ -12,6 +12,7 @@ import java.util.Arrays; @@ -27,7 +27,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390 import joptsimple.OptionParser; import joptsimple.OptionSet; import joptsimple.OptionSpec; -@@ -123,6 +125,40 @@ public class Commodore { +@@ -126,6 +128,40 @@ public class Commodore { return this.reroutes; } @@ -68,7 +68,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390 public static void main(String[] args) { OptionParser parser = new OptionParser(); OptionSpec inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required(); -@@ -278,9 +314,49 @@ public class Commodore { +@@ -281,9 +317,49 @@ public class Commodore { } return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) { @@ -118,7 +118,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390 name = FieldRename.rename(pluginVersion, owner, name); if (modern) { -@@ -393,6 +469,13 @@ public class Commodore { +@@ -396,6 +472,13 @@ public class Commodore { return; } @@ -132,7 +132,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390 if (modern) { if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) { switch (name) { -@@ -489,6 +572,13 @@ public class Commodore { +@@ -492,6 +575,13 @@ public class Commodore { @Override public void visitLdcInsn(Object value) { @@ -146,7 +146,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390 if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) { super.visitLdcInsn("com.mysql.cj.jdbc.Driver"); return; -@@ -499,6 +589,14 @@ public class Commodore { +@@ -502,6 +592,14 @@ public class Commodore { @Override public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) { @@ -161,7 +161,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390 if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory") && bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) { Type samMethodType = (Type) bootstrapMethodArguments[0]; -@@ -515,7 +613,7 @@ public class Commodore { +@@ -518,7 +616,7 @@ public class Commodore { methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf)); methodArgs.add(newInstantiated); @@ -170,7 +170,7 @@ index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390 }, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType); return; } -@@ -566,6 +664,12 @@ public class Commodore { +@@ -569,6 +667,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 3610187c209d..d424e1f6fc1a 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 @@ -645,10 +645,10 @@ 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 2a29f60c3e82239ab7acd85242fc3390cb9129cd..91c6721201b095eb32c5fd5a1aaf2cbcf3ee196d 100644 +index 58df23162aed12f3058b5e0921a9e30b89f56a10..ba104635c7713b04ce624bc4c7bd390462bc0edb 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -126,36 +126,26 @@ public class Commodore { +@@ -129,36 +129,26 @@ public class Commodore { } // Paper start - Plugin rewrites @@ -696,7 +696,7 @@ index 2a29f60c3e82239ab7acd85242fc3390cb9129cd..91c6721201b095eb32c5fd5a1aaf2cbc } // Paper end - Plugin rewrites -@@ -240,6 +230,7 @@ public class Commodore { +@@ -243,6 +233,7 @@ public class Commodore { visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES)); } @@ -705,10 +705,10 @@ index 2a29f60c3e82239ab7acd85242fc3390cb9129cd..91c6721201b095eb32c5fd5a1aaf2cbc final Set 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 0ff9c62636e8709a6df252e9aaf931c9c17bd9bf..4b2377a1de608b9142a28c66389d04290f7c0330 100644 +index 3c9cdb8c67d2704caac6488a6216d8c9c8a009ef..ab4dd5a86ccd8e9878abf95417bb05ceb91dd19c 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; +@@ -75,6 +75,7 @@ import org.bukkit.potion.PotionType; @SuppressWarnings("deprecation") public final class CraftMagicNumbers implements UnsafeValues { public static final CraftMagicNumbers INSTANCE = new CraftMagicNumbers(); @@ -716,7 +716,7 @@ index 0ff9c62636e8709a6df252e9aaf931c9c17bd9bf..4b2377a1de608b9142a28c66389d0429 private final Commodore commodore = new Commodore(); -@@ -346,7 +347,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -347,7 +348,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 0ff9c62636e8709a6df252e9aaf931c9c17bd9bf..4b2377a1de608b9142a28c66389d0429 CraftLegacy.init(); } -@@ -361,6 +362,12 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -362,6 +363,12 @@ public final class CraftMagicNumbers implements UnsafeValues { @Override public byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz) { diff --git a/patches/server/0033-Expose-server-build-information.patch b/patches/server/0033-Expose-server-build-information.patch index 83f13af41a6a..a6d2360581a8 100644 --- a/patches/server/0033-Expose-server-build-information.patch +++ b/patches/server/0033-Expose-server-build-information.patch @@ -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 db7cad60c8f805dd1b4089673f5f9d073a429a67..2bfa790a9f0ca07217c9d9f7dd916950d859530c 100644 +index f4c36880ca29d657d0b443d9578265bd84e007c7..f0ae14146015d8145cf873788559b8f0666f7f33 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; @@ -692,11 +692,11 @@ index 03790abcc3474999db6d8986e50ebc2caf6eba0c..13f811173c67533ee02f70cc4b6b398c 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 4b2377a1de608b9142a28c66389d04290f7c0330..2b60572307e3ec23e21e09c34a04de9a1c57f136 100644 +index ab4dd5a86ccd8e9878abf95417bb05ceb91dd19c..61efb305e25b23fe6309276e15efdb41a46c7738 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -464,6 +464,13 @@ public final class CraftMagicNumbers implements UnsafeValues { - return CraftRegistry.get(registry, namespacedKey, ApiVersion.CURRENT); +@@ -475,6 +475,13 @@ public final class CraftMagicNumbers implements UnsafeValues { + return this.customBiome; } + // Paper start diff --git a/patches/server/0176-Player.setPlayerProfile-API.patch b/patches/server/0176-Player.setPlayerProfile-API.patch index d971b0d45541..42216ef379ee 100644 --- a/patches/server/0176-Player.setPlayerProfile-API.patch +++ b/patches/server/0176-Player.setPlayerProfile-API.patch @@ -207,10 +207,10 @@ index 128fcd537783986d816dae6d1ce2afb7af07d45a..32eeca2467189c6c97f7da5529d4fe93 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 91c6721201b095eb32c5fd5a1aaf2cbcf3ee196d..b85223ebff4dbb8aa74b501663afc87ef11e2a96 100644 +index ba104635c7713b04ce624bc4c7bd390462bc0edb..9a6857f325d72c1b5ce403c3240e0b1a3f43bc38 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -467,6 +467,13 @@ public class Commodore { +@@ -470,6 +470,13 @@ public class Commodore { } // Paper end - Rewrite plugins diff --git a/patches/server/0241-Improve-death-events.patch b/patches/server/0241-Improve-death-events.patch index 0dd870277303..00939c177d62 100644 --- a/patches/server/0241-Improve-death-events.patch +++ b/patches/server/0241-Improve-death-events.patch @@ -440,7 +440,7 @@ index e4d840d6335007a6a542240746504bf1f2af332d..159bba49095aec77cce5f53d4388a5df public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 474f330f381aa74e9f2fd0accdbaf2617ec1c557..199abd66d2113e7bc8c478fe8e4f6657d2e12304 100644 +index 474f330f381aa74e9f2fd0accdbaf2617ec1c557..b537b3ac2ed238c01ec76ccc7941a09bfc959c10 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -902,8 +902,15 @@ public class CraftEventFactory { @@ -481,7 +481,7 @@ index 474f330f381aa74e9f2fd0accdbaf2617ec1c557..199abd66d2113e7bc8c478fe8e4f6657 + // Paper start - helper methods for making death event cancellable + // Add information to death event + private static void populateFields(net.minecraft.world.entity.LivingEntity victim, EntityDeathEvent event) { -+ event.setReviveHealth(event.getEntity().getAttribute(org.bukkit.attribute.Attribute.GENERIC_MAX_HEALTH).getValue()); ++ event.setReviveHealth(event.getEntity().getAttribute(org.bukkit.attribute.Attribute.MAX_HEALTH).getValue()); + event.setShouldPlayDeathSound(!victim.silentDeath && !victim.isSilent()); + net.minecraft.sounds.SoundEvent soundEffect = victim.getDeathSound(); + event.setDeathSound(soundEffect != null ? org.bukkit.craftbukkit.CraftSound.minecraftToBukkit(soundEffect) : null); diff --git a/patches/server/0324-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/0324-Add-Raw-Byte-ItemStack-Serialization.patch index 3895429c4425..70ced2037c01 100644 --- a/patches/server/0324-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/patches/server/0324-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 2b60572307e3ec23e21e09c34a04de9a1c57f136..150ab63f231fc3c39661ab876a8c90d608ee8568 100644 +index 61efb305e25b23fe6309276e15efdb41a46c7738..b50d1ddfd23bf1af16d86e5edcb72196b4674868 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -469,6 +469,53 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -480,6 +480,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/0401-Add-methods-to-get-translation-keys.patch b/patches/server/0401-Add-methods-to-get-translation-keys.patch index 8ff2f02eb993..de167b55e7ee 100644 --- a/patches/server/0401-Add-methods-to-get-translation-keys.patch +++ b/patches/server/0401-Add-methods-to-get-translation-keys.patch @@ -10,6 +10,22 @@ public org.bukkit.craftbukkit.inventory.CraftMetaFirework getNBT(Lorg/bukkit/Fir Co-authored-by: MeFisto94 +diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java +index 8797a47be16b85dc69a28a56bb355bee7d6b1a78..9ab615347e241ac264fb70f43306075907420885 100644 +--- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java ++++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java +@@ -98,6 +98,11 @@ public class CraftAttribute implements Attribute, Handleable org.bukkit.Registry.BIOME), @@ -743,10 +749,10 @@ index 8e8d6214adbd21a221147f0fc0d91cd9c06a080c..6fddef967b6314ca0158f5bd4b889867 String string = Registries.elementsDirPath(type.registryKey()); SimpleJsonResourceReloadListener.scanDirectory(resourceManager, string, ops, type.codec(), map); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -index b4ed857f2437759b71b75d7ab36c986a2fd71dbc..09929f580164abcd1c04061d04c6aa992767e256 100644 +index d7e3371ebc08b5534c259ea45d89a969dfbe491a..16985dc1f54d64c44f96b045012612f16ba9ae8a 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 implements Registry { +@@ -125,90 +125,12 @@ public class CraftRegistry implements Registry { + ", this can happen if a plugin creates its own registry entry with out properly registering it."); } @@ -758,9 +764,18 @@ index b4ed857f2437759b71b75d7ab36c986a2fd71dbc..09929f580164abcd1c04061d04c6aa99 - * @return the bukkit registry of the provided class - */ - public static Registry createRegistry(Class bukkitClass, RegistryAccess registryHolder) { +- if (bukkitClass == Attribute.class) { +- return new CraftRegistry<>(Attribute.class, registryHolder.lookupOrThrow(Registries.ATTRIBUTE), CraftAttribute::new, FieldRename.ATTRIBUTE_RENAME); +- } +- if (bukkitClass == Biome.class) { +- return new CraftRegistry<>(Biome.class, registryHolder.lookupOrThrow(Registries.BIOME), CraftBiome::new, FieldRename.BIOME_RENAME); +- } - if (bukkitClass == Enchantment.class) { - return new CraftRegistry<>(Enchantment.class, registryHolder.lookupOrThrow(Registries.ENCHANTMENT), CraftEnchantment::new, FieldRename.ENCHANTMENT_RENAME); - } +- if (bukkitClass == Fluid.class) { +- return new CraftRegistry<>(Fluid.class, registryHolder.lookupOrThrow(Registries.FLUID), CraftFluid::new, FieldRename.NONE); +- } - if (bukkitClass == GameEvent.class) { - return new CraftRegistry<>(GameEvent.class, registryHolder.lookupOrThrow(Registries.GAME_EVENT), CraftGameEvent::new, FieldRename.NONE); - } @@ -831,7 +846,7 @@ index b4ed857f2437759b71b75d7ab36c986a2fd71dbc..09929f580164abcd1c04061d04c6aa99 } if (bukkit instanceof Registry.SimpleRegistry simple) { -@@ -222,23 +153,21 @@ public class CraftRegistry implements Registry { +@@ -226,23 +148,21 @@ public class CraftRegistry implements Registry { return bukkit.get(namespacedKey); } @@ -861,7 +876,7 @@ index b4ed857f2437759b71b75d7ab36c986a2fd71dbc..09929f580164abcd1c04061d04c6aa99 @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 30675a23a25dc065e09d97b9b08386c9f41989d8..a12dc990a9094e964be2af26a5135e3b798f9666 100644 +index 1c30369a2ed1577d7fb8457f9751de2d32634d29..45ddb643d544dbcb35954108abb6f5d2454a555d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -284,7 +284,7 @@ public final class CraftServer implements Server { @@ -891,7 +906,7 @@ index 30675a23a25dc065e09d97b9b08386c9f41989d8..a12dc990a9094e964be2af26a5135e3b @Deprecated diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java -index c1023eff9f391c07b57e57450b756fe16299f723..b5e0023e431f9fb43c93a3f977144b03545322bb 100644 +index 091e11934bddb180f0b2e51efb3921c62275d41d..12fe2f8d0dcb715545e071023490a32125b9c4a4 100644 --- a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java +++ b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java @@ -51,11 +51,14 @@ public class FieldRename { @@ -915,10 +930,10 @@ index c1023eff9f391c07b57e57450b756fe16299f723..b5e0023e431f9fb43c93a3f977144b03 // 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 b85223ebff4dbb8aa74b501663afc87ef11e2a96..760f56d36f0e4a74b58628408a286a499d6664ec 100644 +index 9a6857f325d72c1b5ce403c3240e0b1a3f43bc38..e4b79d92a8c41eb37d989248425b1e5a963b476c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -215,20 +215,10 @@ public class Commodore { +@@ -218,20 +218,10 @@ public class Commodore { public byte[] convert(byte[] b, final String pluginName, final ApiVersion pluginVersion, final Set activeCompatibilities) { final boolean modern = pluginVersion.isNewerThanOrSameAs(ApiVersion.FLATTENING); @@ -939,7 +954,7 @@ index b85223ebff4dbb8aa74b501663afc87ef11e2a96..760f56d36f0e4a74b58628408a286a49 visitor = io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(visitor); // Paper cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, visitor) { -@@ -295,15 +285,6 @@ public class Commodore { +@@ -298,15 +288,6 @@ public class Commodore { @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { @@ -1244,7 +1259,7 @@ index bbd5dd5b27937ddc3d8c57f2b604331495b0f311..626c3033e36897846fe84a77d05e2e91 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 47f3b79d76399ff2185ea753260a702441ecadf5..eb3974690fb12ffe678522ed47e0f730712db016 100644 +index c0e02198200c93e3d0ff2461d267e856db087532..949094070455fdc73c1dca16276e051a0a35a5e2 100644 --- a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java +++ b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java @@ -1,6 +1,7 @@ @@ -1255,12 +1270,15 @@ index 47f3b79d76399ff2185ea753260a702441ecadf5..eb3974690fb12ffe678522ed47e0f730 import java.util.List; import java.util.stream.Stream; import net.minecraft.core.registries.Registries; -@@ -61,36 +62,35 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { +@@ -67,39 +68,37 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { private static final List DATA = Lists.newArrayList(); static { - // Order: Bukkit class, Minecraft Registry key, CraftBukkit class, Minecraft class +- register(Attribute.class, Registries.ATTRIBUTE, CraftAttribute.class, net.minecraft.world.entity.ai.attributes.Attribute.class); +- register(Biome.class, Registries.BIOME, CraftBiome.class, net.minecraft.world.level.biome.Biome.class); - register(Enchantment.class, Registries.ENCHANTMENT, CraftEnchantment.class, net.minecraft.world.item.enchantment.Enchantment.class); +- register(Fluid.class, Registries.FLUID, CraftFluid.class, net.minecraft.world.level.material.Fluid.class); - register(GameEvent.class, Registries.GAME_EVENT, CraftGameEvent.class, net.minecraft.world.level.gameevent.GameEvent.class); - register(MusicInstrument.class, Registries.INSTRUMENT, CraftMusicInstrument.class, Instrument.class); - register(MenuType.class, Registries.MENU, CraftMenuType.class, net.minecraft.world.inventory.MenuType.class); @@ -1282,6 +1300,8 @@ index 47f3b79d76399ff2185ea753260a702441ecadf5..eb3974690fb12ffe678522ed47e0f730 - register(PatternType.class, Registries.BANNER_PATTERN, CraftPatternType.class, BannerPattern.class); - + // Order: RegistryKey, Bukkit class, Minecraft Registry key, CraftBukkit class, Minecraft class ++ register(RegistryKey.ATTRIBUTE, Attribute.class, Registries.ATTRIBUTE, CraftAttribute.class, net.minecraft.world.entity.ai.attributes.Attribute.class); ++ register(RegistryKey.BIOME, Biome.class, Registries.BIOME, CraftBiome.class, net.minecraft.world.level.biome.Biome.class); + register(RegistryKey.ENCHANTMENT, Enchantment.class, Registries.ENCHANTMENT, CraftEnchantment.class, net.minecraft.world.item.enchantment.Enchantment.class); + register(RegistryKey.GAME_EVENT, GameEvent.class, Registries.GAME_EVENT, CraftGameEvent.class, net.minecraft.world.level.gameevent.GameEvent.class); + register(RegistryKey.INSTRUMENT, MusicInstrument.class, Registries.INSTRUMENT, CraftMusicInstrument.class, Instrument.class); diff --git a/patches/server/0496-Expand-world-key-API.patch b/patches/server/0496-Expand-world-key-API.patch index 80f4011a34f9..903e7ac8ea5f 100644 --- a/patches/server/0496-Expand-world-key-API.patch +++ b/patches/server/0496-Expand-world-key-API.patch @@ -20,7 +20,7 @@ index 15da29058f80a2d7cf2be26c48421c1746815a10..a070b2a83edaa702b13bc6d302691412 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a12dc990a9094e964be2af26a5135e3b798f9666..85b2298efface87ee97e0f996d939cc135ca981d 100644 +index 45ddb643d544dbcb35954108abb6f5d2454a555d..aeb6568c6a48d3448c5724896898371228313ceb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1185,9 +1185,15 @@ public final class CraftServer implements Server { @@ -67,10 +67,10 @@ index a12dc990a9094e964be2af26a5135e3b798f9666..85b2298efface87ee97e0f996d939cc1 // 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 af8fde74b3162d2de740ecae1122b4f2115baeb6..77f0d6c44c3773968b1e858d02cfc4ffb25fe99b 100644 +index e88b384e3d640dd77e419611f3c0e588fbf4f406..28948975c5adcf78d9c0e0b6fb63db981a369a77 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -527,6 +527,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -538,6 +538,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public int nextEntityId() { return net.minecraft.world.entity.Entity.nextEntityId(); } diff --git a/patches/server/0501-Expose-protocol-version.patch b/patches/server/0501-Expose-protocol-version.patch index 13133988e5a0..61d4fc32be7e 100644 --- a/patches/server/0501-Expose-protocol-version.patch +++ b/patches/server/0501-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 77f0d6c44c3773968b1e858d02cfc4ffb25fe99b..ada83b5e843f761837a7510112162c6954ab4260 100644 +index 28948975c5adcf78d9c0e0b6fb63db981a369a77..25a206cf1eb07e826b549aacf9a4d0fbffb32177 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -532,6 +532,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -543,6 +543,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/0528-ItemStack-repair-check-API.patch b/patches/server/0528-ItemStack-repair-check-API.patch index b016fcc18dd2..fb178f277b7b 100644 --- a/patches/server/0528-ItemStack-repair-check-API.patch +++ b/patches/server/0528-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 ada83b5e843f761837a7510112162c6954ab4260..02306ed81a67faa94d98070d3e7c9044cb5d2825 100644 +index 25a206cf1eb07e826b549aacf9a4d0fbffb32177..079cb08b92061bb14952cf4ad2bda61e154f4438 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -537,6 +537,14 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -548,6 +548,14 @@ public final class CraftMagicNumbers implements UnsafeValues { public int getProtocolVersion() { return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion(); } diff --git a/patches/server/0535-Improve-item-default-attribute-API.patch b/patches/server/0535-Improve-item-default-attribute-API.patch index 6f2c104c786a..f5daf2828778 100644 --- a/patches/server/0535-Improve-item-default-attribute-API.patch +++ b/patches/server/0535-Improve-item-default-attribute-API.patch @@ -62,10 +62,10 @@ index 68756419ac6ee292db9569eab380a5c14d748002..6d76cc1db3ac3f1ae74c13511937fb86 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 02306ed81a67faa94d98070d3e7c9044cb5d2825..ffc98d8ed238cc653a7a6518a46c4e45a1b3682c 100644 +index 079cb08b92061bb14952cf4ad2bda61e154f4438..6855210dc58f455b5af05d9c039da55e8dfc93f1 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 { +@@ -386,7 +386,11 @@ public final class CraftMagicNumbers implements UnsafeValues { @Override public Multimap getDefaultAttributeModifiers(Material material, EquipmentSlot slot) { diff --git a/patches/server/0580-Get-entity-default-attributes.patch b/patches/server/0580-Get-entity-default-attributes.patch index 6d512ca6376f..468e4b22e59f 100644 --- a/patches/server/0580-Get-entity-default-attributes.patch +++ b/patches/server/0580-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 ffc98d8ed238cc653a7a6518a46c4e45a1b3682c..31b625779dfe27602ac198259258e64195c1796d 100644 +index 6855210dc58f455b5af05d9c039da55e8dfc93f1..1dd9a5cc45d5073adb150abdcbe2025e6ed2c315 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -549,6 +549,18 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -560,6 +560,18 @@ public final class CraftMagicNumbers implements UnsafeValues { } return CraftItemStack.unwrap(itemToBeRepaired).isValidRepairItem(CraftItemStack.unwrap(repairMaterial)); } diff --git a/patches/server/0582-Add-more-advancement-API.patch b/patches/server/0582-Add-more-advancement-API.patch index 1d8e873a3644..ac526b9045af 100644 --- a/patches/server/0582-Add-more-advancement-API.patch +++ b/patches/server/0582-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 760f56d36f0e4a74b58628408a286a499d6664ec..34e41ea24e1673109f14153a1a0c8e794fed20bb 100644 +index e4b79d92a8c41eb37d989248425b1e5a963b476c..1f25fa2b2ce8fae5bce29232cbb51966b86dae85 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -453,6 +453,11 @@ public class Commodore { +@@ -456,6 +456,11 @@ public class Commodore { super.visitMethodInsn(opcode, owner, name, "()Lcom/destroystokyo/paper/profile/PlayerProfile;", itf); return; } diff --git a/patches/server/0583-Add-ItemFactory-getSpawnEgg-API.patch b/patches/server/0583-Add-ItemFactory-getSpawnEgg-API.patch index 715b0b753d24..52f7274600af 100644 --- a/patches/server/0583-Add-ItemFactory-getSpawnEgg-API.patch +++ b/patches/server/0583-Add-ItemFactory-getSpawnEgg-API.patch @@ -37,10 +37,10 @@ index cab7a3d21699605cb7fc480830d7529f70e69e88..ad86ee4372e55c82968fd4fc6a65deba + // 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 34e41ea24e1673109f14153a1a0c8e794fed20bb..63d4ffe93a445abf3c766d4f1f8fbf4a412a2a03 100644 +index 1f25fa2b2ce8fae5bce29232cbb51966b86dae85..f10e7a847e9f57d2a987b118215c0ceab251a5b0 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -460,6 +460,15 @@ public class Commodore { +@@ -463,6 +463,15 @@ public class Commodore { } // Paper end diff --git a/patches/server/0589-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0589-Add-Raw-Byte-Entity-Serialization.patch index 660fb63c77aa..404023dde8da 100644 --- a/patches/server/0589-Add-Raw-Byte-Entity-Serialization.patch +++ b/patches/server/0589-Add-Raw-Byte-Entity-Serialization.patch @@ -50,10 +50,10 @@ index 0c1c9033646dedcf1d11dee74d6965683adadf0a..1ed01978611cddb2558e441863dadc46 @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 31b625779dfe27602ac198259258e64195c1796d..1ab160c3d042be43df3bd19d095534b91c4c2f71 100644 +index 1dd9a5cc45d5073adb150abdcbe2025e6ed2c315..2a3dc48aa50b41ede0e1a0e280314624961967f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -499,7 +499,33 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -510,7 +510,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/0681-Cache-resource-keys-and-optimize-reference-Holder-ta.patch b/patches/server/0681-Cache-resource-keys-and-optimize-reference-Holder-ta.patch index 263f5852b348..7356aca21a07 100644 --- a/patches/server/0681-Cache-resource-keys-and-optimize-reference-Holder-ta.patch +++ b/patches/server/0681-Cache-resource-keys-and-optimize-reference-Holder-ta.patch @@ -18,34 +18,6 @@ index 94671ea227b59a8f820425c401712e6aeb8b2b10..e91c4e26c25980645941ca8fbdcc3a9d } @Override -diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBiome.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBiome.java -index 95b956802f83b583a823fcd24808363775a56842..33d2e89ac40465b0c4633f9c51378b80f7c397a9 100644 ---- a/src/main/java/org/bukkit/craftbukkit/block/CraftBiome.java -+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBiome.java -@@ -3,6 +3,7 @@ package org.bukkit.craftbukkit.block; - import com.google.common.base.Preconditions; - import net.minecraft.core.Holder; - import net.minecraft.core.registries.Registries; -+import net.minecraft.resources.ResourceKey; - import org.bukkit.Registry; - import org.bukkit.block.Biome; - import org.bukkit.craftbukkit.CraftRegistry; -@@ -27,13 +28,14 @@ public class CraftBiome { - return CraftBiome.minecraftToBukkit(minecraft.value()); - } - -+ private static final java.util.Map> BIOME_KEY_CACHE = java.util.Collections.synchronizedMap(new java.util.EnumMap<>(Biome.class)); // Paper - public static net.minecraft.world.level.biome.Biome bukkitToMinecraft(Biome bukkit) { - if (bukkit == null || bukkit == Biome.CUSTOM) { - return null; - } - - return CraftRegistry.getMinecraftRegistry(Registries.BIOME) -- .getOptional(CraftNamespacedKey.toMinecraft(bukkit.getKey())).orElseThrow(); -+ .getOptional(BIOME_KEY_CACHE.computeIfAbsent(bukkit, b -> ResourceKey.create(Registries.BIOME, CraftNamespacedKey.toMinecraft(b.getKey())))).orElseThrow(); - } - - public static Holder bukkitToMinecraftHolder(Biome bukkit) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityType.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityType.java index 6cf8af0c85231de9955282d4abaa0607ec9a195c..d230cbc26f61d8ac5880825aca4dfab197c20401 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityType.java diff --git a/patches/server/0726-Add-NamespacedKey-biome-methods.patch b/patches/server/0726-Add-NamespacedKey-biome-methods.patch index 015b2064d994..edb6f458312a 100644 --- a/patches/server/0726-Add-NamespacedKey-biome-methods.patch +++ b/patches/server/0726-Add-NamespacedKey-biome-methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 1ab160c3d042be43df3bd19d095534b91c4c2f71..9f4124485dac3d029ec8247b64098042aa1a48d2 100644 +index 2a3dc48aa50b41ede0e1a0e280314624961967f2..b45655e7c72bc15173fbf09599dafa05babd5bb1 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -587,6 +587,19 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -598,6 +598,19 @@ public final class CraftMagicNumbers implements UnsafeValues { var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType) net.minecraft.core.registries.BuiltInRegistries.ENTITY_TYPE.getValue(CraftNamespacedKey.toMinecraft(bukkitEntityKey))); return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier); } diff --git a/patches/server/0735-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch b/patches/server/0735-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch index fb6e8b07ea78..62022124a81e 100644 --- a/patches/server/0735-Mitigate-effects-of-WorldCreator-keepSpawnLoaded-ret.patch +++ b/patches/server/0735-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 63d4ffe93a445abf3c766d4f1f8fbf4a412a2a03..419b899f0e65b9656432513b69f60150c75bd13f 100644 +index f10e7a847e9f57d2a987b118215c0ceab251a5b0..015a2cf3e969e938158f27a04e172c837068437d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -@@ -458,6 +458,12 @@ public class Commodore { +@@ -461,6 +461,12 @@ public class Commodore { super.visitMethodInsn(Opcodes.INVOKEVIRTUAL, runtimeCbPkgPrefix() + "advancement/CraftAdvancement", "getDisplay0", desc, false); return; } diff --git a/patches/server/0845-Fix-custom-statistic-criteria-creation.patch b/patches/server/0845-Fix-custom-statistic-criteria-creation.patch index c57ac9625590..92862d81f187 100644 --- a/patches/server/0845-Fix-custom-statistic-criteria-creation.patch +++ b/patches/server/0845-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 9f4124485dac3d029ec8247b64098042aa1a48d2..a74784ddf63d316f253381ed803822a149e92bc7 100644 +index b45655e7c72bc15173fbf09599dafa05babd5bb1..f15060bbe6dc0fbb4a81aee294d311047a3650b2 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -600,6 +600,12 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -611,6 +611,12 @@ public final class CraftMagicNumbers implements UnsafeValues { net.minecraft.core.Holder biomeBase = cra.getHandle().registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME).getOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey))); cra.setBiome(x, y, z, biomeBase); } diff --git a/patches/server/0883-Fix-UnsafeValues-loadAdvancement.patch b/patches/server/0883-Fix-UnsafeValues-loadAdvancement.patch index dc4c28926e54..1fa31034dc58 100644 --- a/patches/server/0883-Fix-UnsafeValues-loadAdvancement.patch +++ b/patches/server/0883-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 a74784ddf63d316f253381ed803822a149e92bc7..1835f8cfda0222fadd9db31abfb7e85899051853 100644 +index f15060bbe6dc0fbb4a81aee294d311047a3650b2..86c78365e7510140515b0f0f834113d01095b842 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 { +@@ -303,9 +303,30 @@ public final class CraftMagicNumbers implements UnsafeValues { ResourceLocation minecraftkey = CraftNamespacedKey.toMinecraft(key); JsonElement jsonelement = JsonParser.parseString(advancement); diff --git a/patches/server/0905-Improve-Registry.patch b/patches/server/0905-Improve-Registry.patch index d5769f63c038..7bd4b1163bf3 100644 --- a/patches/server/0905-Improve-Registry.patch +++ b/patches/server/0905-Improve-Registry.patch @@ -5,10 +5,10 @@ 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 09929f580164abcd1c04061d04c6aa992767e256..aa66fd8dca886c1f064d8cb4a3d15c2086c1719a 100644 +index 16985dc1f54d64c44f96b045012612f16ba9ae8a..002a3475c6e062071845399ed723754ce4ce9e95 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 implements Registry { +@@ -150,6 +150,7 @@ public class CraftRegistry implements Registry { private final Class bukkitClass; // Paper - relax preload class private final Map cache = new HashMap<>(); @@ -16,7 +16,7 @@ index 09929f580164abcd1c04061d04c6aa992767e256..aa66fd8dca886c1f064d8cb4a3d15c20 private final net.minecraft.core.Registry minecraftRegistry; private final BiFunction minecraftToBukkit; private final BiFunction serializationUpdater; // Paper - rename to make it *clear* what it is *only* for -@@ -203,6 +204,7 @@ public class CraftRegistry implements Registry { +@@ -198,6 +199,7 @@ public class CraftRegistry implements Registry { } this.cache.put(namespacedKey, bukkit); @@ -24,7 +24,7 @@ index 09929f580164abcd1c04061d04c6aa992767e256..aa66fd8dca886c1f064d8cb4a3d15c20 return bukkit; } -@@ -235,4 +237,11 @@ public class CraftRegistry implements Registry { +@@ -230,4 +232,11 @@ public class CraftRegistry implements Registry { return this.minecraftToBukkit.apply(namespacedKey, minecraft); } diff --git a/patches/server/0912-Fixup-NamespacedKey-handling.patch b/patches/server/0912-Fixup-NamespacedKey-handling.patch index 932cc370d881..0eee21b8d09c 100644 --- a/patches/server/0912-Fixup-NamespacedKey-handling.patch +++ b/patches/server/0912-Fixup-NamespacedKey-handling.patch @@ -18,10 +18,10 @@ index 90b82ad996b2b85628c9a5ddeef9410150b7f70c..5fd22a80e9d05afbea273471cee99173 public static NamespacedKey minecraftToBukkitKey(ResourceKey minecraft) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -index aa66fd8dca886c1f064d8cb4a3d15c2086c1719a..f8450a2abd1e96fac7827d252cc00038b9dee839 100644 +index 002a3475c6e062071845399ed723754ce4ce9e95..9245f6de141384bfc12e8dd81ce1df366c6a62aa 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -@@ -122,6 +122,16 @@ public class CraftRegistry implements Registry { +@@ -125,6 +125,16 @@ public class CraftRegistry implements Registry { + ", this can happen if a plugin creates its own registry entry with out properly registering it."); } @@ -39,10 +39,10 @@ index aa66fd8dca886c1f064d8cb4a3d15c2086c1719a..f8450a2abd1e96fac7827d252cc00038 // Paper - NOTE: As long as all uses of the method below relate to *serialization* via ConfigurationSerializable, it's fine diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java -index cc97638e038ea64ad180ebfded2528aa07d1809e..10e4318782107644f67818109784fff60d017e0a 100644 +index 9ab615347e241ac264fb70f43306075907420885..0d04f0a34d1d1894845b720a407f7190ea78d514 100644 --- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java +++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java -@@ -37,6 +37,7 @@ public class CraftAttribute { +@@ -33,6 +33,7 @@ public class CraftAttribute implements Attribute, Handleable>) PaperRegistries.registryToNms(typedKey.registryKey()), PaperAdventure.asVanilla(typedKey.key())); } @@ -1323,10 +1323,10 @@ index 6fddef967b6314ca0158f5bd4b8898670ea5e9ec..b5ca1a0acb16d0cd8dccc854f309d425 return writableRegistry; }, prepareExecutor); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -index f8450a2abd1e96fac7827d252cc00038b9dee839..891ccc39d52331648a11b4e7cce78d4c848cdea0 100644 +index 9245f6de141384bfc12e8dd81ce1df366c6a62aa..d97ddbcb5efdae5f848c77bee52058b16316b3dc 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 implements Registry { +@@ -162,11 +162,11 @@ public class CraftRegistry implements Registry { private final Map cache = new HashMap<>(); private final Map byValue = new java.util.IdentityHashMap<>(); // Paper - improve Registry private final net.minecraft.core.Registry minecraftRegistry; @@ -1340,7 +1340,7 @@ index f8450a2abd1e96fac7827d252cc00038b9dee839..891ccc39d52331648a11b4e7cce78d4c this.bukkitClass = bukkitClass; this.minecraftRegistry = minecraftRegistry; this.minecraftToBukkit = minecraftToBukkit; -@@ -254,4 +254,17 @@ public class CraftRegistry implements Registry { +@@ -249,4 +249,17 @@ public class CraftRegistry implements Registry { return this.byValue.get(value); } // Paper end - improve Registry @@ -1359,10 +1359,10 @@ index f8450a2abd1e96fac7827d252cc00038b9dee839..891ccc39d52331648a11b4e7cce78d4c + // 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 51d5629b00ec4929c12ed9e6ba5a37f5903cf13e..d728bf1d83877290e4d3fdaa7649ed077c0ee1ec 100644 +index 61837051eb67709bf671b94c02e23bdb6eae6711..be4c52dc4d7b5d42d6f408c386fb838c1d8c35c4 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -658,6 +658,21 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -669,6 +669,21 @@ public final class CraftMagicNumbers implements UnsafeValues { } // Paper end - lifecycle event API diff --git a/patches/server/0994-Add-registry-entry-and-builders.patch b/patches/server/0994-Add-registry-entry-and-builders.patch index 0355a6b2992e..8edd2ba95678 100644 --- a/patches/server/0994-Add-registry-entry-and-builders.patch +++ b/patches/server/0994-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 5cf598905ed6a7ac2b0d9ced3420adaf20ceb6af..12220f78ffaf06433ada72fd0c7f22b97d55287d 100644 +index 9c7f03abda5175b837ed8592a91ec0cab28f28df..8000eaccc9bf60702feabde71d09db04e26106e8 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 @@ @@ -17,7 +17,7 @@ index 5cf598905ed6a7ac2b0d9ced3420adaf20ceb6af..12220f78ffaf06433ada72fd0c7f22b9 import io.papermc.paper.registry.entry.RegistryEntry; import io.papermc.paper.registry.tag.TagKey; import java.util.Collections; -@@ -70,7 +72,7 @@ public final class PaperRegistries { +@@ -74,7 +76,7 @@ public final class PaperRegistries { static { REGISTRY_ENTRIES = List.of( // built-ins @@ -26,7 +26,7 @@ index 5cf598905ed6a7ac2b0d9ced3420adaf20ceb6af..12220f78ffaf06433ada72fd0c7f22b9 entry(Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, StructureType.class, CraftStructureType::new), entry(Registries.INSTRUMENT, RegistryKey.INSTRUMENT, MusicInstrument.class, CraftMusicInstrument::new), entry(Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, PotionEffectType.class, CraftPotionEffectType::new), -@@ -89,7 +91,7 @@ public final class PaperRegistries { +@@ -94,7 +96,7 @@ public final class PaperRegistries { entry(Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, TrimPattern.class, CraftTrimPattern::new).delayed(), entry(Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, DamageType.class, CraftDamageType::new).delayed(), entry(Registries.WOLF_VARIANT, RegistryKey.WOLF_VARIANT, Wolf.Variant.class, CraftWolf.CraftVariant::new).delayed(), @@ -34,7 +34,7 @@ index 5cf598905ed6a7ac2b0d9ced3420adaf20ceb6af..12220f78ffaf06433ada72fd0c7f22b9 + writable(Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, Enchantment.class, CraftEnchantment::new, PaperEnchantmentRegistryEntry.PaperBuilder::new).withSerializationUpdater(FieldRename.ENCHANTMENT_RENAME).delayed(), entry(Registries.JUKEBOX_SONG, RegistryKey.JUKEBOX_SONG, JukeboxSong.class, CraftJukeboxSong::new).delayed(), entry(Registries.BANNER_PATTERN, RegistryKey.BANNER_PATTERN, PatternType.class, CraftPatternType::new).delayed(), - + entry(Registries.BIOME, RegistryKey.BIOME, Biome.class, CraftBiome::new).delayed(), diff --git a/src/main/java/io/papermc/paper/registry/data/PaperEnchantmentRegistryEntry.java b/src/main/java/io/papermc/paper/registry/data/PaperEnchantmentRegistryEntry.java new file mode 100644 index 0000000000000000000000000000000000000000..481f5f0cfae1fada3bc3f873fb7e04c3086ea9bf diff --git a/patches/server/0995-Proxy-ItemStack-to-CraftItemStack.patch b/patches/server/0995-Proxy-ItemStack-to-CraftItemStack.patch index 40da32a4fb75..8172ef1a2efe 100644 --- a/patches/server/0995-Proxy-ItemStack-to-CraftItemStack.patch +++ b/patches/server/0995-Proxy-ItemStack-to-CraftItemStack.patch @@ -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 d728bf1d83877290e4d3fdaa7649ed077c0ee1ec..d3759c1262a5ce8ff82215a99abd31f20af95fc5 100644 +index be4c52dc4d7b5d42d6f408c386fb838c1d8c35c4..3bd77074da98bcfe3677995038642c4e9cdb86b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -673,6 +673,13 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -684,6 +684,13 @@ public final class CraftMagicNumbers implements UnsafeValues { } // Paper end - hack to get tags for non server-backed registries diff --git a/patches/server/1020-Add-FeatureFlag-API.patch b/patches/server/1020-Add-FeatureFlag-API.patch index eaaa35ce8306..e28ac2d6dbbf 100644 --- a/patches/server/1020-Add-FeatureFlag-API.patch +++ b/patches/server/1020-Add-FeatureFlag-API.patch @@ -284,20 +284,20 @@ index 6cf790c9fa23ea313423fdaeb7c181bf530828c6..0bcb9df1103050441f8922a688b163dc public static PotionEffectType minecraftHolderToBukkit(Holder 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 d3759c1262a5ce8ff82215a99abd31f20af95fc5..15bb55f0b4c60b0519918b910398a0908022128f 100644 +index 3bd77074da98bcfe3677995038642c4e9cdb86b8..83835e41034e79442177f19dcb18e7df5b0e296e 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; - import org.bukkit.attribute.Attribute; +@@ -48,7 +48,7 @@ import org.bukkit.attribute.Attribute; import org.bukkit.attribute.AttributeModifier; + import org.bukkit.block.Biome; import org.bukkit.block.data.BlockData; -import org.bukkit.craftbukkit.CraftFeatureFlag; +// import org.bukkit.craftbukkit.CraftFeatureFlag; // Paper 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 { - return CraftAttribute.bukkitToMinecraft(attribute).getDescriptionId(); + import org.bukkit.craftbukkit.block.CraftBiome; +@@ -456,11 +456,7 @@ public final class CraftMagicNumbers implements UnsafeValues { + return attribute.getTranslationKey(); } - @Override diff --git a/patches/server/1022-Item-serialization-as-json.patch b/patches/server/1022-Item-serialization-as-json.patch index 6b8500a0d76d..4cc5284169ba 100644 --- a/patches/server/1022-Item-serialization-as-json.patch +++ b/patches/server/1022-Item-serialization-as-json.patch @@ -28,10 +28,10 @@ index c80fd4960dfbb0fde37363e7df25b0a5411bdb11..ff7f6916f65466c25a7bde35d64682c1 public static final Codec 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 15bb55f0b4c60b0519918b910398a0908022128f..ef0ef0872a44eb34fe41358728f3ddcf262297e9 100644 +index 83835e41034e79442177f19dcb18e7df5b0e296e..08d48cd55cfaf92530cc900f2f119ae3a258eb39 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -516,6 +516,39 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -527,6 +527,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/1037-Rewrite-dataconverter-system.patch b/patches/server/1037-Rewrite-dataconverter-system.patch index e91a834827c6..e452b9f7719a 100644 --- a/patches/server/1037-Rewrite-dataconverter-system.patch +++ b/patches/server/1037-Rewrite-dataconverter-system.patch @@ -30384,10 +30384,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 ef0ef0872a44eb34fe41358728f3ddcf262297e9..05a62b2cf9ca8e0141274bd7f44ef8fb703466d1 100644 +index 08d48cd55cfaf92530cc900f2f119ae3a258eb39..d8d04183fd8bb0bcf2f703ef65b11dbd342473ba 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -512,7 +512,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -523,7 +523,7 @@ public final class CraftMagicNumbers implements UnsafeValues { net.minecraft.nbt.CompoundTag compound = deserializeNbtFromBytes(data); final int dataVersion = compound.getInt("DataVersion"); @@ -30396,7 +30396,7 @@ index ef0ef0872a44eb34fe41358728f3ddcf262297e9..05a62b2cf9ca8e0141274bd7f44ef8fb return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.parse(MinecraftServer.getServer().registryAccess(), compound).orElseThrow()); } -@@ -566,7 +566,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -577,7 +577,7 @@ public final class CraftMagicNumbers implements UnsafeValues { net.minecraft.nbt.CompoundTag compound = deserializeNbtFromBytes(data); int dataVersion = compound.getInt("DataVersion"); diff --git a/work/Bukkit b/work/Bukkit index 553558256cab..97c592614042 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit 553558256cab26217919a0809cc26f7aad22995d +Subproject commit 97c5926140420c7b9e8a06b2b8348b1816f2a6bd diff --git a/work/CraftBukkit b/work/CraftBukkit index 18b8ae183907..7235ad7b0454 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 18b8ae18390763d48ea292435b75c1eabf5dbff7 +Subproject commit 7235ad7b04542ce214869eb1ec1966bb392aedc7 From 9ae19147485b0a94a42a2da8d3bcaee257046ca6 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Thu, 31 Oct 2024 22:56:20 +0100 Subject: [PATCH 2/4] Missing things --- ...d-RegistryAccess-for-managing-Registries.patch | 15 ++++++++------- .../0580-Get-entity-default-attributes.patch | 6 +++--- .../server/0993-Registry-Modification-API.patch | 4 ++-- .../0994-Add-registry-entry-and-builders.patch | 6 +++--- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/patches/server/0467-Add-RegistryAccess-for-managing-Registries.patch b/patches/server/0467-Add-RegistryAccess-for-managing-Registries.patch index 570083757228..fbb76f2784de 100644 --- a/patches/server/0467-Add-RegistryAccess-for-managing-Registries.patch +++ b/patches/server/0467-Add-RegistryAccess-for-managing-Registries.patch @@ -12,7 +12,7 @@ public net.minecraft.server.RegistryLayer STATIC_ACCESS diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java new file mode 100644 -index 0000000000000000000000000000000000000000..24a763b2ae635f19032696bb1feeb3b3aa72f0fd +index 0000000000000000000000000000000000000000..b5df90b500a64ee3ba1026fa3449ca6441293367 --- /dev/null +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java @@ -0,0 +1,152 @@ @@ -28,6 +28,7 @@ index 0000000000000000000000000000000000000000..24a763b2ae635f19032696bb1feeb3b3 +import net.minecraft.core.Registry; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; ++import org.bukkit.Fluid; +import org.bukkit.GameEvent; +import org.bukkit.JukeboxSong; +import org.bukkit.Keyed; @@ -36,6 +37,7 @@ index 0000000000000000000000000000000000000000..24a763b2ae635f19032696bb1feeb3b3 +import org.bukkit.block.Biome; +import org.bukkit.block.BlockType; +import org.bukkit.block.banner.PatternType; ++import org.bukkit.craftbukkit.CraftFluid; +import org.bukkit.craftbukkit.CraftGameEvent; +import org.bukkit.craftbukkit.CraftJukeboxSong; +import org.bukkit.craftbukkit.CraftMusicInstrument; @@ -103,6 +105,7 @@ index 0000000000000000000000000000000000000000..24a763b2ae635f19032696bb1feeb3b3 + entry(Registries.MAP_DECORATION_TYPE, RegistryKey.MAP_DECORATION_TYPE, MapCursor.Type.class, CraftMapCursor.CraftType::new), + entry(Registries.MENU, RegistryKey.MENU, MenuType.class, CraftMenuType::new), + entry(Registries.ATTRIBUTE, RegistryKey.ATTRIBUTE, Attribute.class, CraftAttribute::new), ++ entry(Registries.FLUID, RegistryKey.FLUID, Fluid.class, CraftFluid::new), + + // data-drivens + entry(Registries.STRUCTURE, RegistryKey.STRUCTURE, Structure.class, CraftStructure::new).delayed(), @@ -116,15 +119,12 @@ index 0000000000000000000000000000000000000000..24a763b2ae635f19032696bb1feeb3b3 + entry(Registries.BIOME, RegistryKey.BIOME, Biome.class, CraftBiome::new).delayed(), + + // api-only -+ apiOnly(Registries.BIOME, RegistryKey.BIOME, () -> org.bukkit.Registry.BIOME), + apiOnly(Registries.PAINTING_VARIANT, RegistryKey.PAINTING_VARIANT, () -> org.bukkit.Registry.ART), -+ apiOnly(Registries.ATTRIBUTE, RegistryKey.ATTRIBUTE, () -> org.bukkit.Registry.ATTRIBUTE), + apiOnly(Registries.ENTITY_TYPE, RegistryKey.ENTITY_TYPE, () -> org.bukkit.Registry.ENTITY_TYPE), + apiOnly(Registries.PARTICLE_TYPE, RegistryKey.PARTICLE_TYPE, () -> org.bukkit.Registry.PARTICLE_TYPE), + apiOnly(Registries.POTION, RegistryKey.POTION, () -> org.bukkit.Registry.POTION), + apiOnly(Registries.SOUND_EVENT, RegistryKey.SOUND_EVENT, () -> org.bukkit.Registry.SOUNDS), -+ apiOnly(Registries.MEMORY_MODULE_TYPE, RegistryKey.MEMORY_MODULE_TYPE, () -> (org.bukkit.Registry>) (org.bukkit.Registry) org.bukkit.Registry.MEMORY_MODULE_TYPE), -+ apiOnly(Registries.FLUID, RegistryKey.FLUID, () -> org.bukkit.Registry.FLUID) ++ apiOnly(Registries.MEMORY_MODULE_TYPE, RegistryKey.MEMORY_MODULE_TYPE, () -> (org.bukkit.Registry>) (org.bukkit.Registry) org.bukkit.Registry.MEMORY_MODULE_TYPE) + ); + final Map, RegistryEntry> byRegistryKey = new IdentityHashMap<>(REGISTRY_ENTRIES.size()); + final Map, RegistryEntry> byResourceKey = new IdentityHashMap<>(REGISTRY_ENTRIES.size()); @@ -1259,7 +1259,7 @@ index bbd5dd5b27937ddc3d8c57f2b604331495b0f311..626c3033e36897846fe84a77d05e2e91 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 c0e02198200c93e3d0ff2461d267e856db087532..949094070455fdc73c1dca16276e051a0a35a5e2 100644 +index c0e02198200c93e3d0ff2461d267e856db087532..bbabfad54c58f74cb5d70cbce4d140ad69a56abb 100644 --- a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java +++ b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java @@ -1,6 +1,7 @@ @@ -1270,7 +1270,7 @@ index c0e02198200c93e3d0ff2461d267e856db087532..949094070455fdc73c1dca16276e051a import java.util.List; import java.util.stream.Stream; import net.minecraft.core.registries.Registries; -@@ -67,39 +68,37 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { +@@ -67,39 +68,38 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { private static final List DATA = Lists.newArrayList(); static { @@ -1303,6 +1303,7 @@ index c0e02198200c93e3d0ff2461d267e856db087532..949094070455fdc73c1dca16276e051a + register(RegistryKey.ATTRIBUTE, Attribute.class, Registries.ATTRIBUTE, CraftAttribute.class, net.minecraft.world.entity.ai.attributes.Attribute.class); + register(RegistryKey.BIOME, Biome.class, Registries.BIOME, CraftBiome.class, net.minecraft.world.level.biome.Biome.class); + register(RegistryKey.ENCHANTMENT, Enchantment.class, Registries.ENCHANTMENT, CraftEnchantment.class, net.minecraft.world.item.enchantment.Enchantment.class); ++ register(RegistryKey.FLUID, Fluid.class, Registries.FLUID, CraftFluid.class, net.minecraft.world.level.material.Fluid.class); + register(RegistryKey.GAME_EVENT, GameEvent.class, Registries.GAME_EVENT, CraftGameEvent.class, net.minecraft.world.level.gameevent.GameEvent.class); + register(RegistryKey.INSTRUMENT, MusicInstrument.class, Registries.INSTRUMENT, CraftMusicInstrument.class, Instrument.class); + register(RegistryKey.MOB_EFFECT, PotionEffectType.class, Registries.MOB_EFFECT, CraftPotionEffectType.class, MobEffect.class); diff --git a/patches/server/0580-Get-entity-default-attributes.patch b/patches/server/0580-Get-entity-default-attributes.patch index 468e4b22e59f..9c95ca361194 100644 --- a/patches/server/0580-Get-entity-default-attributes.patch +++ b/patches/server/0580-Get-entity-default-attributes.patch @@ -105,7 +105,7 @@ index 6855210dc58f455b5af05d9c039da55e8dfc93f1..1dd9a5cc45d5073adb150abdcbe2025e /** 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..f512d416df883036965ff6c802fd242a4c9c8079 +index 0000000000000000000000000000000000000000..fa9fb37993f4025f85dac084efb4b5eda0ede637 --- /dev/null +++ b/src/test/java/io/papermc/paper/attribute/EntityTypeAttributesTest.java @@ -0,0 +1,40 @@ @@ -142,8 +142,8 @@ index 0000000000000000000000000000000000000000..f512d416df883036965ff6c802fd242a + @Test + public void testUnmodifiabilityOfAttributable() { + Attributable attributable = EntityType.ZOMBIE.getDefaultAttributes(); -+ assertThrows(UnsupportedOperationException.class, () -> attributable.registerAttribute(Attribute.GENERIC_ATTACK_DAMAGE)); -+ AttributeInstance instance = attributable.getAttribute(Attribute.GENERIC_FOLLOW_RANGE); ++ assertThrows(UnsupportedOperationException.class, () -> attributable.registerAttribute(Attribute.ATTACK_DAMAGE)); ++ AttributeInstance instance = attributable.getAttribute(Attribute.FOLLOW_RANGE); + assertNotNull(instance); + assertThrows(UnsupportedOperationException.class, () -> instance.addModifier(new AttributeModifier("test", 3, AttributeModifier.Operation.ADD_NUMBER))); + assertThrows(UnsupportedOperationException.class, () -> instance.setBaseValue(3.2)); diff --git a/patches/server/0993-Registry-Modification-API.patch b/patches/server/0993-Registry-Modification-API.patch index 166ad90f9062..3e652cd1d065 100644 --- a/patches/server/0993-Registry-Modification-API.patch +++ b/patches/server/0993-Registry-Modification-API.patch @@ -9,7 +9,7 @@ public net.minecraft.resources.RegistryOps lookupProvider public net.minecraft.resources.RegistryOps$HolderLookupAdapter diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java -index 24a763b2ae635f19032696bb1feeb3b3aa72f0fd..9c7f03abda5175b837ed8592a91ec0cab28f28df 100644 +index b5df90b500a64ee3ba1026fa3449ca6441293367..36bc8d005de14622eb8a0bf4736d964276c95344 100644 --- a/src/main/java/io/papermc/paper/registry/PaperRegistries.java +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java @@ -2,6 +2,7 @@ package io.papermc.paper.registry; @@ -20,7 +20,7 @@ index 24a763b2ae635f19032696bb1feeb3b3aa72f0fd..9c7f03abda5175b837ed8592a91ec0ca import java.util.Collections; import java.util.IdentityHashMap; import java.util.List; -@@ -62,6 +63,7 @@ import org.checkerframework.framework.qual.DefaultQualifier; +@@ -64,6 +65,7 @@ import org.checkerframework.framework.qual.DefaultQualifier; import static io.papermc.paper.registry.entry.RegistryEntry.apiOnly; import static io.papermc.paper.registry.entry.RegistryEntry.entry; diff --git a/patches/server/0994-Add-registry-entry-and-builders.patch b/patches/server/0994-Add-registry-entry-and-builders.patch index 8edd2ba95678..61941d6748f4 100644 --- a/patches/server/0994-Add-registry-entry-and-builders.patch +++ b/patches/server/0994-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 9c7f03abda5175b837ed8592a91ec0cab28f28df..8000eaccc9bf60702feabde71d09db04e26106e8 100644 +index 36bc8d005de14622eb8a0bf4736d964276c95344..3ad1ba8c14fe3745cedcbbd9bb28dad36eb6c7bb 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 @@ @@ -17,7 +17,7 @@ index 9c7f03abda5175b837ed8592a91ec0cab28f28df..8000eaccc9bf60702feabde71d09db04 import io.papermc.paper.registry.entry.RegistryEntry; import io.papermc.paper.registry.tag.TagKey; import java.util.Collections; -@@ -74,7 +76,7 @@ public final class PaperRegistries { +@@ -76,7 +78,7 @@ public final class PaperRegistries { static { REGISTRY_ENTRIES = List.of( // built-ins @@ -26,7 +26,7 @@ index 9c7f03abda5175b837ed8592a91ec0cab28f28df..8000eaccc9bf60702feabde71d09db04 entry(Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, StructureType.class, CraftStructureType::new), entry(Registries.INSTRUMENT, RegistryKey.INSTRUMENT, MusicInstrument.class, CraftMusicInstrument::new), entry(Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, PotionEffectType.class, CraftPotionEffectType::new), -@@ -94,7 +96,7 @@ public final class PaperRegistries { +@@ -97,7 +99,7 @@ public final class PaperRegistries { entry(Registries.TRIM_PATTERN, RegistryKey.TRIM_PATTERN, TrimPattern.class, CraftTrimPattern::new).delayed(), entry(Registries.DAMAGE_TYPE, RegistryKey.DAMAGE_TYPE, DamageType.class, CraftDamageType::new).delayed(), entry(Registries.WOLF_VARIANT, RegistryKey.WOLF_VARIANT, Wolf.Variant.class, CraftWolf.CraftVariant::new).delayed(), From 16995c855dc38be0d541a6181fdb867d582d0e6c Mon Sep 17 00:00:00 2001 From: Bjarne Koll Date: Thu, 31 Oct 2024 23:09:35 +0100 Subject: [PATCH 3/4] Cleanup some leftovers --- ...gistryAccess-for-managing-registries.patch | 48 +++++++++++++++---- .../api/0329-More-PotionEffectType-API.patch | 4 +- patches/api/0429-Improve-Registry.patch | 6 +-- .../api/0471-Registry-Modification-API.patch | 8 ++-- ...0726-Add-NamespacedKey-biome-methods.patch | 11 ++--- ...x-custom-statistic-criteria-creation.patch | 8 ++-- ...Add-api-for-spawn-egg-texture-colors.patch | 4 +- .../0918-Add-Lifecycle-Event-system.patch | 4 +- .../server/0919-ItemStack-Tooltip-API.patch | 4 +- .../0993-Registry-Modification-API.patch | 4 +- ...95-Proxy-ItemStack-to-CraftItemStack.patch | 4 +- 11 files changed, 65 insertions(+), 40 deletions(-) diff --git a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch index 275ee68a7c67..5c4084cf8c1b 100644 --- a/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch +++ b/patches/api/0236-Add-RegistryAccess-for-managing-registries.patch @@ -207,10 +207,19 @@ 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 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e23d273ebd 100644 +index 26399345dd02031712994da1553417186b8c7370..759925decc0b66e8f5861f3f8bd9bee0ed66181e 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -98,8 +98,10 @@ public interface Registry extends Iterable { +@@ -92,20 +92,26 @@ public interface Registry extends Iterable { + * Attribute. + * + * @see Attribute ++ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#ATTRIBUTE} + */ +- Registry ATTRIBUTE = Objects.requireNonNull(Bukkit.getRegistry(Attribute.class), "No registry present for Attribute. This is a bug."); ++ @Deprecated(since = "1.21.3") // Paper ++ Registry ATTRIBUTE = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(Attribute.class), "No registry present for Attribute. This is a bug."); + /** * Server banner patterns. * * @see PatternType @@ -222,7 +231,16 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2 /** * Server biomes. * -@@ -113,7 +115,7 @@ public interface Registry extends Iterable { + * @see Biome ++ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#BIOME} + */ +- Registry BIOME = Objects.requireNonNull(Bukkit.getRegistry(Biome.class), "No registry present for Biome. This is a bug."); ++ @Deprecated(since = "1.21.3") // Paper ++ Registry BIOME = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(Biome.class), "No registry present for Biome. This is a bug."); + /** + * Server block types. + * +@@ -113,7 +119,7 @@ public interface Registry extends Iterable { * @apiNote BlockType is not ready for public usage yet */ @ApiStatus.Internal @@ -231,7 +249,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2 /** * Custom boss bars. * -@@ -155,13 +157,15 @@ public interface Registry extends Iterable { +@@ -155,13 +161,15 @@ public interface Registry extends Iterable { * * @see Cat.Type */ @@ -249,7 +267,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2 /** * Server entity types. * -@@ -173,7 +177,7 @@ public interface Registry extends Iterable { +@@ -173,7 +181,7 @@ public interface Registry extends Iterable { * * @see MusicInstrument */ @@ -258,7 +276,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2 /** * Server item types. * -@@ -181,7 +185,7 @@ public interface Registry extends Iterable { +@@ -181,7 +189,7 @@ public interface Registry extends Iterable { * @apiNote ItemType is not ready for public usage yet */ @ApiStatus.Internal @@ -267,7 +285,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2 /** * Default server loot tables. * -@@ -200,13 +204,13 @@ public interface Registry extends Iterable { +@@ -200,13 +208,13 @@ public interface Registry extends Iterable { * @see MenuType */ @ApiStatus.Experimental @@ -283,7 +301,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2 /** * Server particles. * -@@ -229,14 +233,16 @@ public interface Registry extends Iterable { +@@ -229,14 +237,16 @@ public interface Registry extends Iterable { * Server structures. * * @see Structure @@ -302,7 +320,7 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2 /** * Sound keys. * -@@ -247,40 +253,47 @@ public interface Registry extends Iterable { +@@ -247,40 +257,47 @@ public interface Registry extends Iterable { * Trim materials. * * @see TrimMaterial @@ -357,7 +375,17 @@ index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e2 /** * Memory Keys. * -@@ -327,25 +340,27 @@ public interface Registry extends Iterable { +@@ -320,32 +337,36 @@ public interface Registry extends Iterable { + * Server fluids. + * + * @see Fluid ++ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#FLUID} + */ +- Registry FLUID = Objects.requireNonNull(Bukkit.getRegistry(Fluid.class), "No registry present for Fluid. This is a bug."); ++ @Deprecated(since = "1.21.3") ++ Registry FLUID = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(Fluid.class), "No registry present for Fluid. This is a bug."); + /** + * Frog variants. * * @see Frog.Variant */ diff --git a/patches/api/0329-More-PotionEffectType-API.patch b/patches/api/0329-More-PotionEffectType-API.patch index c23d878a4dca..6ee4c1216bd5 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 39997047be9f3796d8d5d8934eb361e23d273ebd..6112db5d1153d045f2271038bada6b46d1a6a051 100644 +index 759925decc0b66e8f5861f3f8bd9bee0ed66181e..833eea6ee8c7fd8ccb3f2eed4285a3eb8311448c 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -361,6 +361,15 @@ public interface Registry extends Iterable { +@@ -367,6 +367,15 @@ public interface Registry extends Iterable { * @see GameEvent */ Registry GAME_EVENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.GAME_EVENT); // Paper diff --git a/patches/api/0429-Improve-Registry.patch b/patches/api/0429-Improve-Registry.patch index c2e07efffbf9..13b36b1a9215 100644 --- a/patches/api/0429-Improve-Registry.patch +++ b/patches/api/0429-Improve-Registry.patch @@ -49,10 +49,10 @@ index c9f02466a04d20579fe2258bb02acf98e163ca81..bffd4ab2d08e5c3f83a49a31e1e55cc1 @Override public @NotNull String translationKey() { diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 5cd69669f8893d89e88b56bdbec17dea9f49beca..80a6bc584222adf1cde3e27ee78d2b9f7c4069fc 100644 +index 833eea6ee8c7fd8ccb3f2eed4285a3eb8311448c..e4d4ac6436f341f5d9de95e1ab56461fd68a3dc2 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -379,6 +379,79 @@ public interface Registry extends Iterable { +@@ -385,6 +385,79 @@ public interface Registry extends Iterable { @Nullable T get(@NotNull NamespacedKey key); @@ -132,7 +132,7 @@ index 5cd69669f8893d89e88b56bdbec17dea9f49beca..80a6bc584222adf1cde3e27ee78d2b9f /** * Get the object by its key. * -@@ -475,5 +548,12 @@ public interface Registry extends Iterable { +@@ -481,5 +554,12 @@ public interface Registry extends Iterable { public Class getType() { return this.type; } diff --git a/patches/api/0471-Registry-Modification-API.patch b/patches/api/0471-Registry-Modification-API.patch index 2500f3c6301d..bc1c27afcd07 100644 --- a/patches/api/0471-Registry-Modification-API.patch +++ b/patches/api/0471-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 80a6bc584222adf1cde3e27ee78d2b9f7c4069fc..b2c45ef76b65c59c3fb1caf3c62c5da422a8d27d 100644 +index e4d4ac6436f341f5d9de95e1ab56461fd68a3dc2..b56e8fc3fba40637396abef27c08806f5157b3b4 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -378,6 +378,27 @@ public interface Registry extends Iterable { +@@ -384,6 +384,27 @@ public interface Registry extends Iterable { */ @Nullable T get(@NotNull NamespacedKey key); @@ -840,7 +840,7 @@ index 80a6bc584222adf1cde3e27ee78d2b9f7c4069fc..b2c45ef76b65c59c3fb1caf3c62c5da4 // Paper start - improve Registry /** -@@ -452,6 +473,34 @@ public interface Registry extends Iterable { +@@ -458,6 +479,34 @@ public interface Registry extends Iterable { } // Paper end - improve Registry @@ -875,7 +875,7 @@ index 80a6bc584222adf1cde3e27ee78d2b9f7c4069fc..b2c45ef76b65c59c3fb1caf3c62c5da4 /** * Get the object by its key. * -@@ -555,5 +604,23 @@ public interface Registry extends Iterable { +@@ -561,5 +610,23 @@ public interface Registry extends Iterable { return value.getKey(); } // Paper end - improve Registry diff --git a/patches/server/0726-Add-NamespacedKey-biome-methods.patch b/patches/server/0726-Add-NamespacedKey-biome-methods.patch index edb6f458312a..1734d3c1191c 100644 --- a/patches/server/0726-Add-NamespacedKey-biome-methods.patch +++ b/patches/server/0726-Add-NamespacedKey-biome-methods.patch @@ -6,25 +6,22 @@ Subject: [PATCH] Add NamespacedKey biome methods Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 2a3dc48aa50b41ede0e1a0e280314624961967f2..b45655e7c72bc15173fbf09599dafa05babd5bb1 100644 +index 2a3dc48aa50b41ede0e1a0e280314624961967f2..d4d5d40ba3bcf715e52aeb72ec4d14718c793e7c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -598,6 +598,19 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -598,6 +598,16 @@ public final class CraftMagicNumbers implements UnsafeValues { var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType) net.minecraft.core.registries.BuiltInRegistries.ENTITY_TYPE.getValue(CraftNamespacedKey.toMinecraft(bukkitEntityKey))); return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier); } + + @Override + public org.bukkit.NamespacedKey getBiomeKey(org.bukkit.RegionAccessor accessor, int x, int y, int z) { -+ org.bukkit.craftbukkit.CraftRegionAccessor cra = (org.bukkit.craftbukkit.CraftRegionAccessor) accessor; -+ return org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(cra.getHandle().registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME).getKey(cra.getHandle().getBiome(new net.minecraft.core.BlockPos(x, y, z)).value())); ++ return accessor.getBiome(x, y, z).getKey(); + } + + @Override + public void setBiomeKey(org.bukkit.RegionAccessor accessor, int x, int y, int z, org.bukkit.NamespacedKey biomeKey) { -+ org.bukkit.craftbukkit.CraftRegionAccessor cra = (org.bukkit.craftbukkit.CraftRegionAccessor) accessor; -+ net.minecraft.core.Holder biomeBase = cra.getHandle().registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME).getOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey))); -+ cra.setBiome(x, y, z, biomeBase); ++ accessor.setBiome(x, y, z, org.bukkit.Registry.BIOME.getOrThrow(biomeKey)); + } // Paper end diff --git a/patches/server/0845-Fix-custom-statistic-criteria-creation.patch b/patches/server/0845-Fix-custom-statistic-criteria-creation.patch index 92862d81f187..ff197a490ca9 100644 --- a/patches/server/0845-Fix-custom-statistic-criteria-creation.patch +++ b/patches/server/0845-Fix-custom-statistic-criteria-creation.patch @@ -5,12 +5,12 @@ 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 b45655e7c72bc15173fbf09599dafa05babd5bb1..f15060bbe6dc0fbb4a81aee294d311047a3650b2 100644 +index d4d5d40ba3bcf715e52aeb72ec4d14718c793e7c..939bc76ca46081d51a6cb18ac39cd05d3ce58ac8 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -611,6 +611,12 @@ public final class CraftMagicNumbers implements UnsafeValues { - net.minecraft.core.Holder biomeBase = cra.getHandle().registryAccess().lookupOrThrow(net.minecraft.core.registries.Registries.BIOME).getOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey))); - cra.setBiome(x, y, z, biomeBase); +@@ -608,6 +608,12 @@ public final class CraftMagicNumbers implements UnsafeValues { + public void setBiomeKey(org.bukkit.RegionAccessor accessor, int x, int y, int z, org.bukkit.NamespacedKey biomeKey) { + accessor.setBiome(x, y, z, org.bukkit.Registry.BIOME.getOrThrow(biomeKey)); } + + @Override diff --git a/patches/server/0917-Add-api-for-spawn-egg-texture-colors.patch b/patches/server/0917-Add-api-for-spawn-egg-texture-colors.patch index 4e62776b8422..d894cc200c2c 100644 --- a/patches/server/0917-Add-api-for-spawn-egg-texture-colors.patch +++ b/patches/server/0917-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 86c78365e7510140515b0f0f834113d01095b842..406459fb842f3dca6f303547c041c6c7cfbdc3d0 100644 +index 789f98d0a6bbe240714ae965dfa1312439ce09cf..0d530bcefc0ceb00a60a70d454ec96d24de8c7e5 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -640,6 +640,15 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -637,6 +637,15 @@ public final class CraftMagicNumbers implements UnsafeValues { } // Paper end diff --git a/patches/server/0918-Add-Lifecycle-Event-system.patch b/patches/server/0918-Add-Lifecycle-Event-system.patch index 705dd8b63718..6b71908eac7d 100644 --- a/patches/server/0918-Add-Lifecycle-Event-system.patch +++ b/patches/server/0918-Add-Lifecycle-Event-system.patch @@ -743,10 +743,10 @@ index 9ab601a8e455196cd04dfa0fa81c4d356ec62b13..5112fdb9faf4b2761bb2b7107c49952f 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 406459fb842f3dca6f303547c041c6c7cfbdc3d0..457bde1fbf8904d193aee15ec4dea3891ecfb451 100644 +index 0d530bcefc0ceb00a60a70d454ec96d24de8c7e5..b4e3ca43982f99843df959ff4280d4355929eb72 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -649,6 +649,13 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -646,6 +646,13 @@ public final class CraftMagicNumbers implements UnsafeValues { } // Paper end - spawn egg color visibility diff --git a/patches/server/0919-ItemStack-Tooltip-API.patch b/patches/server/0919-ItemStack-Tooltip-API.patch index 992e3acfcc2c..f3abeb774c89 100644 --- a/patches/server/0919-ItemStack-Tooltip-API.patch +++ b/patches/server/0919-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 457bde1fbf8904d193aee15ec4dea3891ecfb451..61837051eb67709bf671b94c02e23bdb6eae6711 100644 +index b4e3ca43982f99843df959ff4280d4355929eb72..f0556a207f6d9d1766ef0d9753355f7fa5052dc1 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -638,6 +638,19 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -635,6 +635,19 @@ public final class CraftMagicNumbers implements UnsafeValues { if (statistic.getType() != org.bukkit.Statistic.Type.UNTYPED) return "minecraft.custom:minecraft." + statistic.getKey().getKey(); return org.bukkit.craftbukkit.CraftStatistic.getNMSStatistic(statistic).getName(); } diff --git a/patches/server/0993-Registry-Modification-API.patch b/patches/server/0993-Registry-Modification-API.patch index 3e652cd1d065..8c62f4ec9b53 100644 --- a/patches/server/0993-Registry-Modification-API.patch +++ b/patches/server/0993-Registry-Modification-API.patch @@ -1359,10 +1359,10 @@ index 9245f6de141384bfc12e8dd81ce1df366c6a62aa..d97ddbcb5efdae5f848c77bee52058b1 + // 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 61837051eb67709bf671b94c02e23bdb6eae6711..be4c52dc4d7b5d42d6f408c386fb838c1d8c35c4 100644 +index f0556a207f6d9d1766ef0d9753355f7fa5052dc1..f55733b7a56ac21cb297971b9e854ef54001ca26 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -669,6 +669,21 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -666,6 +666,21 @@ public final class CraftMagicNumbers implements UnsafeValues { } // Paper end - lifecycle event API diff --git a/patches/server/0995-Proxy-ItemStack-to-CraftItemStack.patch b/patches/server/0995-Proxy-ItemStack-to-CraftItemStack.patch index 8172ef1a2efe..c7dfc54b2eb5 100644 --- a/patches/server/0995-Proxy-ItemStack-to-CraftItemStack.patch +++ b/patches/server/0995-Proxy-ItemStack-to-CraftItemStack.patch @@ -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 be4c52dc4d7b5d42d6f408c386fb838c1d8c35c4..3bd77074da98bcfe3677995038642c4e9cdb86b8 100644 +index f55733b7a56ac21cb297971b9e854ef54001ca26..8af9ac9e22a15457da12f0746d0e411942c278fb 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -684,6 +684,13 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -681,6 +681,13 @@ public final class CraftMagicNumbers implements UnsafeValues { } // Paper end - hack to get tags for non server-backed registries From 9c9ba117fd65d88f044cbad2807caaf40c6564ac Mon Sep 17 00:00:00 2001 From: Bjarne Koll Date: Thu, 31 Oct 2024 23:23:19 +0100 Subject: [PATCH 4/4] Fix incorrect javadocs on upstream --- patches/api/0053-Fix-upstream-javadocs.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/patches/api/0053-Fix-upstream-javadocs.patch b/patches/api/0053-Fix-upstream-javadocs.patch index 151552e5d6fc..cb77c4cd8262 100644 --- a/patches/api/0053-Fix-upstream-javadocs.patch +++ b/patches/api/0053-Fix-upstream-javadocs.patch @@ -590,7 +590,7 @@ index 9513ce004101bd1bef90ca4a558f6b7c28d97adb..c8ba70f787a3460c1f9faaeaab086e9e * not provided. This might result in newer versions not loading the * pack correctly. diff --git a/src/main/java/org/bukkit/entity/Slime.java b/src/main/java/org/bukkit/entity/Slime.java -index a5ad3250cebfeb302c58e0bfd6db1295913c927e..bfac874840cf1f36afba16ae4d176c5821a68cfb 100644 +index a5ad3250cebfeb302c58e0bfd6db1295913c927e..0a2d603bf6a3f60d3fa7d85df6ef2373fc93d848 100644 --- a/src/main/java/org/bukkit/entity/Slime.java +++ b/src/main/java/org/bukkit/entity/Slime.java @@ -11,6 +11,16 @@ public interface Slime extends Mob, Enemy { @@ -600,9 +600,9 @@ index a5ad3250cebfeb302c58e0bfd6db1295913c927e..bfac874840cf1f36afba16ae4d176c58 + * Setting the size of the slime (regardless of previous size) + * will set the following attributes: + *

+ * to their per-size defaults and heal the + * slime to its max health (assuming it's alive).