From 2f92d4e00ecc4be92089a1494097aaba0ce82fff Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Fri, 8 Dec 2023 11:00:39 -0800 Subject: [PATCH] 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: 01bb6ba7 PR-936: Add new PersistentDataContainer methods and clean up docs bc145b90 PR-940: Create registry for banner pattern and cat type CraftBukkit Changes: cb2ea54de SPIGOT-7440, PR-1292: Fire EntityTeleportEvent for end gateways 4fea66e44 PR-1299: Add new PersistentDataContainer methods and clean up docs b483a20db PR-1303: Create registry for banner pattern and cat type 4642dd526 SPIGOT-7535: Fix maps not having an ID and also call MapInitializeEvent in more places --- .../0173-Fix-Spigot-annotation-mistakes.patch | 6 +-- .../api/0247-Add-StructuresLocateEvent.patch | 4 +- patches/api/0300-Missing-Entity-API.patch | 8 ++-- ...rload-to-PersistentDataContainer-has.patch | 30 -------------- ...7-Multiple-Entries-with-Scoreboards.patch} | 0 ...ostname-to-AsyncPlayerPreLoginEvent.patch} | 0 ...n-strange-EventHandler-return-types.patch} | 0 ...atch => 0340-Multi-Block-Change-API.patch} | 0 ...ent.patch => 0341-Fix-NotePlayEvent.patch} | 0 ....patch => 0342-Freeze-Tick-Lock-API.patch} | 0 ...lphin-API.patch => 0343-Dolphin-API.patch} | 0 ...h => 0344-More-PotionEffectType-API.patch} | 4 +- ...command-sender-which-forwards-feedb.patch} | 0 ...h => 0346-Implement-regenerateChunk.patch} | 0 ...gs.patch => 0347-Add-GameEvent-tags.patch} | 0 ...tch => 0348-Furnace-RecipesUsed-API.patch} | 0 ...gurable-sculk-sensor-listener-range.patch} | 0 ...d-missing-block-data-mins-and-maxes.patch} | 0 ...s.patch => 0351-Custom-Potion-Mixes.patch} | 0 ...Expose-furnace-minecart-push-values.patch} | 0 ...I.patch => 0353-More-Projectile-API.patch} | 0 ...ch => 0354-Add-getComputedBiome-API.patch} | 0 ...h => 0355-Add-enchantWithLevels-API.patch} | 0 ... 0356-Add-TameableDeathMessageEvent.patch} | 0 ...hange-the-podium-of-the-EnderDragon.patch} | 0 ...-blockstate-in-EntityBreakDoorEvent.patch} | 0 ...ing-amount-to-PlayerItemDamageEvent.patch} | 0 ...> 0360-WorldCreator-keepSpawnLoaded.patch} | 0 ...Event-and-CollarColorable-interface.patch} | 8 ++-- ...> 0362-Add-PlayerStopUsingItemEvent.patch} | 0 ...tch => 0363-Expand-FallingBlock-API.patch} | 0 ...dd-method-isTickingWorlds-to-Bukkit.patch} | 0 ... => 0365-Add-WardenAngerChangeEvent.patch} | 0 patches/api/0365-Keyed-Cat-Type.patch | 40 ------------------- ...I.patch => 0366-Nameable-Banner-API.patch} | 0 ...atch => 0367-Add-Player-getFishHook.patch} | 0 ...API.patch => 0368-More-Teleport-API.patch} | 0 ... => 0369-Add-EntityPortalReadyEvent.patch} | 0 ...tom-Chat-Completion-Suggestions-API.patch} | 0 ...ion-API.patch => 0371-Collision-API.patch} | 0 ...API.patch => 0372-Block-Ticking-API.patch} | 0 ...373-Add-NamespacedKey-biome-methods.patch} | 0 ...o-load-resources-from-LibraryLoader.patch} | 0 ...serialization-deserialization-for-P.patch} | 13 +++--- ...rameter-to-ProjectileSource-launchP.patch} | 0 ...limit-in-YamlConfigOptions-and-incr.patch} | 0 ... => 0378-Add-getDrops-to-BlockState.patch} | 0 ...-Add-PlayerInventorySlotChangeEvent.patch} | 0 ... 0380-Elder-Guardian-appearance-API.patch} | 0 ...ow-changing-bed-s-occupied-property.patch} | 0 ...d-EquipmentSlot-convenience-methods.patch} | 0 ...swingHand-EquipmentSlot-convenience.patch} | 0 ...ch => 0384-Add-entity-knockback-API.patch} | 0 ... => 0385-Added-EntityToggleSitEvent.patch} | 0 ...patch => 0386-Add-Moving-Piston-API.patch} | 0 ...0387-Add-PrePlayerAttackEntityEvent.patch} | 0 ... 0388-Add-Player-Warden-Warning-API.patch} | 0 ...a-friendly-methods-to-update-trades.patch} | 0 ...390-Add-paper-dumplisteners-command.patch} | 0 ....patch => 0391-ItemStack-damage-API.patch} | 0 ...patch => 0392-Add-Tick-TemporalUnit.patch} | 0 ...tion-API.patch => 0393-Friction-API.patch} | 0 ... 0394-Player-Entity-Tracking-Events.patch} | 0 ...atch => 0395-Add-missing-Fluid-type.patch} | 0 ...ments.patch => 0396-fix-Instruments.patch} | 0 ...tch => 0397-Add-BlockLockCheckEvent.patch} | 0 ... 0398-Add-Sneaking-API-for-Entities.patch} | 0 ....patch => 0399-Improve-PortalEvents.patch} | 0 ...k-state-to-BlockExplodeEvent-and-En.patch} | 0 ...atch => 0401-Flying-Fall-Damage-API.patch} | 0 ...ion-moving-velocity-to-VehicleBlock.patch} | 0 ...eplace-ItemFlag.HIDE_POTION_EFFECTS.patch} | 0 ...en-API.patch => 0404-Win-Screen-API.patch} | 0 ...tch => 0405-Add-Entity-Body-Yaw-API.patch} | 0 ...or-InventoryBlockStartEvent-subclas.patch} | 0 ...=> 0407-Add-EntityFertilizeEggEvent.patch} | 0 ...temEvent-and-EntityCompostItemEvent.patch} | 0 ...API.patch => 0409-Add-Shearable-API.patch} | 0 ...Fix-SpawnEggMeta-get-setSpawnedType.patch} | 0 ... 0411-Add-Mob-Experience-reward-API.patch} | 0 ... => 0412-Expand-PlayerItemMendEvent.patch} | 0 ... => 0413-Add-transient-modifier-API.patch} | 0 ...he-experimental-smithing-inventory-.patch} | 0 ...to-remove-all-active-potion-effects.patch} | 0 ...olia-scheduler-and-owned-region-API.patch} | 0 ...7-Add-event-for-player-editing-sign.patch} | 0 ...418-Add-Sign-getInteractableSideFor.patch} | 0 ...t-API.patch => 0419-Fix-BanList-API.patch} | 0 ....patch => 0420-Add-whitelist-events.patch} | 0 ...API-for-updating-recipes-on-clients.patch} | 0 ...tch => 0422-Add-PlayerFailMoveEvent.patch} | 0 ...-custom-statistic-criteria-creation.patch} | 0 ...tch => 0424-SculkCatalyst-bloom-API.patch} | 0 ...API-for-an-entity-s-scoreboard-name.patch} | 0 ...lace-methods-with-old-StructureType.patch} | 0 ... => 0427-Add-Listing-API-for-Player.patch} | 0 ...d-BlockFace-during-BlockDamageEvent.patch} | 0 ...h => 0429-Fix-NPE-on-Boat-getStatus.patch} | 0 ...e-API.patch => 0430-Expand-Pose-API.patch} | 0 ...MerchantRecipe-add-copy-constructor.patch} | 0 ...patch => 0432-More-DragonBattle-API.patch} | 0 ...tch => 0433-Add-PlayerPickItemEvent.patch} | 0 ...=> 0434-Allow-trident-custom-damage.patch} | 0 ...pose-hand-during-BlockCanBuildEvent.patch} | 0 ...t-setBurnTime-to-valid-short-values.patch} | 0 ... 0437-Add-OfflinePlayer-isConnected.patch} | 0 ...titleOverride-to-InventoryOpenEvent.patch} | 0 ...roper-checking-of-empty-item-stacks.patch} | 0 ...dItemsEvent-throwing-exception-when.patch} | 0 ...> 0441-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 ...445-Add-UUID-attribute-modifier-API.patch} | 0 ... => 0446-Expand-LingeringPotion-API.patch} | 0 ...y-durability-check-in-ItemStack-isS.patch} | 0 ...tch => 0448-Add-Structure-check-API.patch} | 0 .../server/0018-Rewrite-chunk-system.patch | 16 ++++---- patches/server/0033-Entity-Origin-API.patch | 4 +- ...Entity-AddTo-RemoveFrom-World-Events.patch | 6 +-- ...item-frames-performance-and-bug-fixe.patch | 4 +- .../0123-PlayerTeleportEndGatewayEvent.patch | 18 ++++----- ...-get-a-BlockState-without-a-snapshot.patch | 4 +- ...0190-Block-Enderpearl-Travel-Exploit.patch | 4 +- ...lement-EntityTeleportEndGatewayEvent.patch | 25 +++++------- .../0214-InventoryCloseEvent-Reason-API.patch | 4 +- ...le-Keep-Spawn-Loaded-range-per-world.patch | 4 +- ...-PlayerChunkMap-adds-crashing-server.patch | 6 +-- .../0401-Maps-shouldn-t-load-chunks.patch | 4 +- ...ookup-for-Treasure-Maps-Fixes-lag-fr.patch | 4 +- ...geEvent-not-firing-for-all-use-cases.patch | 4 +- patches/server/0524-Remove-stale-POIs.patch | 4 +- patches/server/0621-Missing-Entity-API.patch | 6 +-- ...ncy-issue-with-empty-map-items-in-CB.patch | 4 +- ...entory-not-closing-on-entity-removal.patch | 4 +- ...check-for-PersistentDataContainer-ha.patch | 18 +++++++++ ...rload-to-PersistentDataContainer-has.patch | 24 ----------- patches/server/0801-Don-t-tick-markers.patch | 4 +- ...nate-Current-redstone-implementation.patch | 4 +- ...-serialization-deserialization-for-P.patch | 23 ++++++----- ...ry-onTrackingStart-during-navigation.patch | 6 +-- ...global-player-list-where-appropriate.patch | 4 +- .../0995-Deep-clone-unhandled-nbt-tags.patch | 9 +++-- ...ix-missing-map-initialize-event-call.patch | 30 ++++++-------- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 146 files changed, 141 insertions(+), 223 deletions(-) delete mode 100644 patches/api/0337-Add-new-overload-to-PersistentDataContainer-has.patch rename patches/api/{0338-Multiple-Entries-with-Scoreboards.patch => 0337-Multiple-Entries-with-Scoreboards.patch} (100%) rename patches/api/{0339-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch => 0338-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch} (100%) rename patches/api/{0340-Warn-on-strange-EventHandler-return-types.patch => 0339-Warn-on-strange-EventHandler-return-types.patch} (100%) rename patches/api/{0341-Multi-Block-Change-API.patch => 0340-Multi-Block-Change-API.patch} (100%) rename patches/api/{0342-Fix-NotePlayEvent.patch => 0341-Fix-NotePlayEvent.patch} (100%) rename patches/api/{0343-Freeze-Tick-Lock-API.patch => 0342-Freeze-Tick-Lock-API.patch} (100%) rename patches/api/{0344-Dolphin-API.patch => 0343-Dolphin-API.patch} (100%) rename patches/api/{0345-More-PotionEffectType-API.patch => 0344-More-PotionEffectType-API.patch} (97%) rename patches/api/{0346-API-for-creating-command-sender-which-forwards-feedb.patch => 0345-API-for-creating-command-sender-which-forwards-feedb.patch} (100%) rename patches/api/{0347-Implement-regenerateChunk.patch => 0346-Implement-regenerateChunk.patch} (100%) rename patches/api/{0348-Add-GameEvent-tags.patch => 0347-Add-GameEvent-tags.patch} (100%) rename patches/api/{0349-Furnace-RecipesUsed-API.patch => 0348-Furnace-RecipesUsed-API.patch} (100%) rename patches/api/{0350-Configurable-sculk-sensor-listener-range.patch => 0349-Configurable-sculk-sensor-listener-range.patch} (100%) rename patches/api/{0351-Add-missing-block-data-mins-and-maxes.patch => 0350-Add-missing-block-data-mins-and-maxes.patch} (100%) rename patches/api/{0352-Custom-Potion-Mixes.patch => 0351-Custom-Potion-Mixes.patch} (100%) rename patches/api/{0353-Expose-furnace-minecart-push-values.patch => 0352-Expose-furnace-minecart-push-values.patch} (100%) rename patches/api/{0354-More-Projectile-API.patch => 0353-More-Projectile-API.patch} (100%) rename patches/api/{0355-Add-getComputedBiome-API.patch => 0354-Add-getComputedBiome-API.patch} (100%) rename patches/api/{0356-Add-enchantWithLevels-API.patch => 0355-Add-enchantWithLevels-API.patch} (100%) rename patches/api/{0357-Add-TameableDeathMessageEvent.patch => 0356-Add-TameableDeathMessageEvent.patch} (100%) rename patches/api/{0358-Allow-to-change-the-podium-of-the-EnderDragon.patch => 0357-Allow-to-change-the-podium-of-the-EnderDragon.patch} (100%) rename patches/api/{0359-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch => 0358-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch} (100%) rename patches/api/{0360-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch => 0359-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch} (100%) rename patches/api/{0361-WorldCreator-keepSpawnLoaded.patch => 0360-WorldCreator-keepSpawnLoaded.patch} (100%) rename patches/api/{0362-Add-EntityDyeEvent-and-CollarColorable-interface.patch => 0361-Add-EntityDyeEvent-and-CollarColorable-interface.patch} (96%) rename patches/api/{0363-Add-PlayerStopUsingItemEvent.patch => 0362-Add-PlayerStopUsingItemEvent.patch} (100%) rename patches/api/{0364-Expand-FallingBlock-API.patch => 0363-Expand-FallingBlock-API.patch} (100%) rename patches/api/{0366-Add-method-isTickingWorlds-to-Bukkit.patch => 0364-Add-method-isTickingWorlds-to-Bukkit.patch} (100%) rename patches/api/{0367-Add-WardenAngerChangeEvent.patch => 0365-Add-WardenAngerChangeEvent.patch} (100%) delete mode 100644 patches/api/0365-Keyed-Cat-Type.patch rename patches/api/{0368-Nameable-Banner-API.patch => 0366-Nameable-Banner-API.patch} (100%) rename patches/api/{0369-Add-Player-getFishHook.patch => 0367-Add-Player-getFishHook.patch} (100%) rename patches/api/{0370-More-Teleport-API.patch => 0368-More-Teleport-API.patch} (100%) rename patches/api/{0371-Add-EntityPortalReadyEvent.patch => 0369-Add-EntityPortalReadyEvent.patch} (100%) rename patches/api/{0372-Custom-Chat-Completion-Suggestions-API.patch => 0370-Custom-Chat-Completion-Suggestions-API.patch} (100%) rename patches/api/{0373-Collision-API.patch => 0371-Collision-API.patch} (100%) rename patches/api/{0374-Block-Ticking-API.patch => 0372-Block-Ticking-API.patch} (100%) rename patches/api/{0375-Add-NamespacedKey-biome-methods.patch => 0373-Add-NamespacedKey-biome-methods.patch} (100%) rename patches/api/{0376-Also-load-resources-from-LibraryLoader.patch => 0374-Also-load-resources-from-LibraryLoader.patch} (100%) rename patches/api/{0377-Added-byte-array-serialization-deserialization-for-P.patch => 0375-Added-byte-array-serialization-deserialization-for-P.patch} (81%) rename patches/api/{0378-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch => 0376-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch} (100%) rename patches/api/{0379-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch => 0377-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch} (100%) rename patches/api/{0380-Add-getDrops-to-BlockState.patch => 0378-Add-getDrops-to-BlockState.patch} (100%) rename patches/api/{0381-Add-PlayerInventorySlotChangeEvent.patch => 0379-Add-PlayerInventorySlotChangeEvent.patch} (100%) rename patches/api/{0382-Elder-Guardian-appearance-API.patch => 0380-Elder-Guardian-appearance-API.patch} (100%) rename patches/api/{0383-Allow-changing-bed-s-occupied-property.patch => 0381-Allow-changing-bed-s-occupied-property.patch} (100%) rename patches/api/{0384-Add-EquipmentSlot-convenience-methods.patch => 0382-Add-EquipmentSlot-convenience-methods.patch} (100%) rename patches/api/{0385-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch => 0383-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch} (100%) rename patches/api/{0386-Add-entity-knockback-API.patch => 0384-Add-entity-knockback-API.patch} (100%) rename patches/api/{0387-Added-EntityToggleSitEvent.patch => 0385-Added-EntityToggleSitEvent.patch} (100%) rename patches/api/{0388-Add-Moving-Piston-API.patch => 0386-Add-Moving-Piston-API.patch} (100%) rename patches/api/{0389-Add-PrePlayerAttackEntityEvent.patch => 0387-Add-PrePlayerAttackEntityEvent.patch} (100%) rename patches/api/{0390-Add-Player-Warden-Warning-API.patch => 0388-Add-Player-Warden-Warning-API.patch} (100%) rename patches/api/{0391-More-vanilla-friendly-methods-to-update-trades.patch => 0389-More-vanilla-friendly-methods-to-update-trades.patch} (100%) rename patches/api/{0392-Add-paper-dumplisteners-command.patch => 0390-Add-paper-dumplisteners-command.patch} (100%) rename patches/api/{0393-ItemStack-damage-API.patch => 0391-ItemStack-damage-API.patch} (100%) rename patches/api/{0394-Add-Tick-TemporalUnit.patch => 0392-Add-Tick-TemporalUnit.patch} (100%) rename patches/api/{0395-Friction-API.patch => 0393-Friction-API.patch} (100%) rename patches/api/{0396-Player-Entity-Tracking-Events.patch => 0394-Player-Entity-Tracking-Events.patch} (100%) rename patches/api/{0397-Add-missing-Fluid-type.patch => 0395-Add-missing-Fluid-type.patch} (100%) rename patches/api/{0398-fix-Instruments.patch => 0396-fix-Instruments.patch} (100%) rename patches/api/{0399-Add-BlockLockCheckEvent.patch => 0397-Add-BlockLockCheckEvent.patch} (100%) rename patches/api/{0400-Add-Sneaking-API-for-Entities.patch => 0398-Add-Sneaking-API-for-Entities.patch} (100%) rename patches/api/{0401-Improve-PortalEvents.patch => 0399-Improve-PortalEvents.patch} (100%) rename patches/api/{0402-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch => 0400-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch} (100%) rename patches/api/{0403-Flying-Fall-Damage-API.patch => 0401-Flying-Fall-Damage-API.patch} (100%) rename patches/api/{0404-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch => 0402-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch} (100%) rename patches/api/{0405-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch => 0403-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch} (100%) rename patches/api/{0406-Win-Screen-API.patch => 0404-Win-Screen-API.patch} (100%) rename patches/api/{0407-Add-Entity-Body-Yaw-API.patch => 0405-Add-Entity-Body-Yaw-API.patch} (100%) rename patches/api/{0408-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch => 0406-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch} (100%) rename patches/api/{0409-Add-EntityFertilizeEggEvent.patch => 0407-Add-EntityFertilizeEggEvent.patch} (100%) rename patches/api/{0410-Add-CompostItemEvent-and-EntityCompostItemEvent.patch => 0408-Add-CompostItemEvent-and-EntityCompostItemEvent.patch} (100%) rename patches/api/{0411-Add-Shearable-API.patch => 0409-Add-Shearable-API.patch} (100%) rename patches/api/{0412-Fix-SpawnEggMeta-get-setSpawnedType.patch => 0410-Fix-SpawnEggMeta-get-setSpawnedType.patch} (100%) rename patches/api/{0413-Add-Mob-Experience-reward-API.patch => 0411-Add-Mob-Experience-reward-API.patch} (100%) rename patches/api/{0414-Expand-PlayerItemMendEvent.patch => 0412-Expand-PlayerItemMendEvent.patch} (100%) rename patches/api/{0415-Add-transient-modifier-API.patch => 0413-Add-transient-modifier-API.patch} (100%) rename patches/api/{0416-Properly-remove-the-experimental-smithing-inventory-.patch => 0414-Properly-remove-the-experimental-smithing-inventory-.patch} (100%) rename patches/api/{0417-Add-method-to-remove-all-active-potion-effects.patch => 0415-Add-method-to-remove-all-active-potion-effects.patch} (100%) rename patches/api/{0418-Folia-scheduler-and-owned-region-API.patch => 0416-Folia-scheduler-and-owned-region-API.patch} (100%) rename patches/api/{0419-Add-event-for-player-editing-sign.patch => 0417-Add-event-for-player-editing-sign.patch} (100%) rename patches/api/{0420-Add-Sign-getInteractableSideFor.patch => 0418-Add-Sign-getInteractableSideFor.patch} (100%) rename patches/api/{0421-Fix-BanList-API.patch => 0419-Fix-BanList-API.patch} (100%) rename patches/api/{0422-Add-whitelist-events.patch => 0420-Add-whitelist-events.patch} (100%) rename patches/api/{0423-API-for-updating-recipes-on-clients.patch => 0421-API-for-updating-recipes-on-clients.patch} (100%) rename patches/api/{0424-Add-PlayerFailMoveEvent.patch => 0422-Add-PlayerFailMoveEvent.patch} (100%) rename patches/api/{0425-Fix-custom-statistic-criteria-creation.patch => 0423-Fix-custom-statistic-criteria-creation.patch} (100%) rename patches/api/{0426-SculkCatalyst-bloom-API.patch => 0424-SculkCatalyst-bloom-API.patch} (100%) rename patches/api/{0427-API-for-an-entity-s-scoreboard-name.patch => 0425-API-for-an-entity-s-scoreboard-name.patch} (100%) rename patches/api/{0428-Deprecate-and-replace-methods-with-old-StructureType.patch => 0426-Deprecate-and-replace-methods-with-old-StructureType.patch} (100%) rename patches/api/{0429-Add-Listing-API-for-Player.patch => 0427-Add-Listing-API-for-Player.patch} (100%) rename patches/api/{0430-Expose-clicked-BlockFace-during-BlockDamageEvent.patch => 0428-Expose-clicked-BlockFace-during-BlockDamageEvent.patch} (100%) rename patches/api/{0431-Fix-NPE-on-Boat-getStatus.patch => 0429-Fix-NPE-on-Boat-getStatus.patch} (100%) rename patches/api/{0432-Expand-Pose-API.patch => 0430-Expand-Pose-API.patch} (100%) rename patches/api/{0433-MerchantRecipe-add-copy-constructor.patch => 0431-MerchantRecipe-add-copy-constructor.patch} (100%) rename patches/api/{0434-More-DragonBattle-API.patch => 0432-More-DragonBattle-API.patch} (100%) rename patches/api/{0435-Add-PlayerPickItemEvent.patch => 0433-Add-PlayerPickItemEvent.patch} (100%) rename patches/api/{0436-Allow-trident-custom-damage.patch => 0434-Allow-trident-custom-damage.patch} (100%) rename patches/api/{0437-Expose-hand-during-BlockCanBuildEvent.patch => 0435-Expose-hand-during-BlockCanBuildEvent.patch} (100%) rename patches/api/{0438-Limit-setBurnTime-to-valid-short-values.patch => 0436-Limit-setBurnTime-to-valid-short-values.patch} (100%) rename patches/api/{0439-Add-OfflinePlayer-isConnected.patch => 0437-Add-OfflinePlayer-isConnected.patch} (100%) rename patches/api/{0440-Add-titleOverride-to-InventoryOpenEvent.patch => 0438-Add-titleOverride-to-InventoryOpenEvent.patch} (100%) rename patches/api/{0441-Allow-proper-checking-of-empty-item-stacks.patch => 0439-Allow-proper-checking-of-empty-item-stacks.patch} (100%) rename patches/api/{0442-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch => 0440-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch} (100%) rename patches/api/{0443-Add-player-idle-duration-API.patch => 0441-Add-player-idle-duration-API.patch} (100%) rename patches/api/{0444-Add-API-to-get-the-collision-shape-of-a-block-before.patch => 0442-Add-API-to-get-the-collision-shape-of-a-block-before.patch} (100%) rename patches/api/{0445-Add-predicate-for-blocks-when-raytracing.patch => 0443-Add-predicate-for-blocks-when-raytracing.patch} (100%) rename patches/api/{0446-Add-hand-to-fish-event-for-all-player-interactions.patch => 0444-Add-hand-to-fish-event-for-all-player-interactions.patch} (100%) rename patches/api/{0447-Add-UUID-attribute-modifier-API.patch => 0445-Add-UUID-attribute-modifier-API.patch} (100%) rename patches/api/{0448-Expand-LingeringPotion-API.patch => 0446-Expand-LingeringPotion-API.patch} (100%) rename patches/api/{0449-Remove-unnecessary-durability-check-in-ItemStack-isS.patch => 0447-Remove-unnecessary-durability-check-in-ItemStack-isS.patch} (100%) rename patches/api/{0450-Add-Structure-check-API.patch => 0448-Add-Structure-check-API.patch} (100%) create mode 100644 patches/server/0742-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch delete mode 100644 patches/server/0742-Add-new-overload-to-PersistentDataContainer-has.patch diff --git a/patches/api/0173-Fix-Spigot-annotation-mistakes.patch b/patches/api/0173-Fix-Spigot-annotation-mistakes.patch index 4ac9ae865..c86fa5a29 100644 --- a/patches/api/0173-Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/0173-Fix-Spigot-annotation-mistakes.patch @@ -474,10 +474,10 @@ index 26d02aa5da444112f8fa84c07e3080bb669983a1..0cb15350704955f4a1aeff184a8b60d9 private final NamespacedKey key; diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 3be4214348e72e90f8b59225b3e31db0e6ba7e09..79d1ed1750d9ed843da128a0d047ae455f12ae38 100644 +index 6455163261082c444985bc58b188d224517d4529..613cd9c2e91a851c86e339d2be86981b57669311 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -184,14 +184,14 @@ public interface Registry extends Iterable { +@@ -198,14 +198,14 @@ public interface Registry extends Iterable { * * @see TrimMaterial */ @@ -494,7 +494,7 @@ index 3be4214348e72e90f8b59225b3e31db0e6ba7e09..79d1ed1750d9ed843da128a0d047ae45 Registry TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class); /** * Villager profession. -@@ -273,8 +273,11 @@ public interface Registry extends Iterable { +@@ -287,8 +287,11 @@ public interface Registry extends Iterable { * * @param input non-null input * @return registered object or null if does not exist diff --git a/patches/api/0247-Add-StructuresLocateEvent.patch b/patches/api/0247-Add-StructuresLocateEvent.patch index 9396a38a8..67ad06955 100644 --- a/patches/api/0247-Add-StructuresLocateEvent.patch +++ b/patches/api/0247-Add-StructuresLocateEvent.patch @@ -505,10 +505,10 @@ index 0000000000000000000000000000000000000000..1e7b53f9bc13dcd5a0a4a40004591e4f + } +} diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 79d1ed1750d9ed843da128a0d047ae455f12ae38..4a9c196a2caeb7f1b180347b480ed48056ad6a00 100644 +index 613cd9c2e91a851c86e339d2be86981b57669311..4331acfc9efd08011e339a1bc0a5190abc197506 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -248,6 +248,17 @@ public interface Registry extends Iterable { +@@ -262,6 +262,17 @@ public interface Registry extends Iterable { * @see GameEvent */ Registry GAME_EVENT = Objects.requireNonNull(Bukkit.getRegistry(GameEvent.class), "No registry present for GameEvent. This is a bug."); diff --git a/patches/api/0300-Missing-Entity-API.patch b/patches/api/0300-Missing-Entity-API.patch index 308114814..5a408bea2 100644 --- a/patches/api/0300-Missing-Entity-API.patch +++ b/patches/api/0300-Missing-Entity-API.patch @@ -323,12 +323,12 @@ index adb20a9abba33c32d553f620fa82b27dff64ab5f..1f6702b0de00b87dbed7f6d93e911655 + // Paper end } diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java -index c2a566b864c82ffb094b7334d9e6e25a1bfc87d1..c340fecb61bac66baf0f44189d21bc85289b1269 100644 +index d1327761a4b95eba97877f1991fc19b298b48eaf..9bc385682472418c787481bbc809f238194d5918 100644 --- a/src/main/java/org/bukkit/entity/Cat.java +++ b/src/main/java/org/bukkit/entity/Cat.java -@@ -54,4 +54,36 @@ public interface Cat extends Tameable, Sittable { - JELLIE, - ALL_BLACK; +@@ -68,4 +68,36 @@ public interface Cat extends Tameable, Sittable { + return key; + } } + + // Paper Start - More cat api diff --git a/patches/api/0337-Add-new-overload-to-PersistentDataContainer-has.patch b/patches/api/0337-Add-new-overload-to-PersistentDataContainer-has.patch deleted file mode 100644 index 73c49a2fc..000000000 --- a/patches/api/0337-Add-new-overload-to-PersistentDataContainer-has.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: u9g -Date: Mon, 3 Jan 2022 23:27:21 -0500 -Subject: [PATCH] Add new overload to PersistentDataContainer#has - -Adds the new overload: PersistentDataContainer#has(NamespacedKey key) - -diff --git a/src/main/java/org/bukkit/persistence/PersistentDataContainer.java b/src/main/java/org/bukkit/persistence/PersistentDataContainer.java -index bf2a957be52d86d07d7d303c86bd3da5fe0a16c0..eebb3da156e2d95efbe22d4afa470b977ce19f10 100644 ---- a/src/main/java/org/bukkit/persistence/PersistentDataContainer.java -+++ b/src/main/java/org/bukkit/persistence/PersistentDataContainer.java -@@ -151,4 +151,18 @@ public interface PersistentDataContainer { - */ - @NotNull - PersistentDataAdapterContext getAdapterContext(); -+ -+ // Paper start -+ /** -+ * Returns if the persistent metadata provider has metadata registered -+ * matching the provided key. -+ * -+ * @param key the key for which existence should be checked. -+ * -+ * @return whether the key exists -+ * -+ * @throws NullPointerException if the key to look up is null -+ */ -+ boolean has(@NotNull NamespacedKey key); -+ // Paper end - } diff --git a/patches/api/0338-Multiple-Entries-with-Scoreboards.patch b/patches/api/0337-Multiple-Entries-with-Scoreboards.patch similarity index 100% rename from patches/api/0338-Multiple-Entries-with-Scoreboards.patch rename to patches/api/0337-Multiple-Entries-with-Scoreboards.patch diff --git a/patches/api/0339-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch b/patches/api/0338-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch similarity index 100% rename from patches/api/0339-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch rename to patches/api/0338-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch diff --git a/patches/api/0340-Warn-on-strange-EventHandler-return-types.patch b/patches/api/0339-Warn-on-strange-EventHandler-return-types.patch similarity index 100% rename from patches/api/0340-Warn-on-strange-EventHandler-return-types.patch rename to patches/api/0339-Warn-on-strange-EventHandler-return-types.patch diff --git a/patches/api/0341-Multi-Block-Change-API.patch b/patches/api/0340-Multi-Block-Change-API.patch similarity index 100% rename from patches/api/0341-Multi-Block-Change-API.patch rename to patches/api/0340-Multi-Block-Change-API.patch diff --git a/patches/api/0342-Fix-NotePlayEvent.patch b/patches/api/0341-Fix-NotePlayEvent.patch similarity index 100% rename from patches/api/0342-Fix-NotePlayEvent.patch rename to patches/api/0341-Fix-NotePlayEvent.patch diff --git a/patches/api/0343-Freeze-Tick-Lock-API.patch b/patches/api/0342-Freeze-Tick-Lock-API.patch similarity index 100% rename from patches/api/0343-Freeze-Tick-Lock-API.patch rename to patches/api/0342-Freeze-Tick-Lock-API.patch diff --git a/patches/api/0344-Dolphin-API.patch b/patches/api/0343-Dolphin-API.patch similarity index 100% rename from patches/api/0344-Dolphin-API.patch rename to patches/api/0343-Dolphin-API.patch diff --git a/patches/api/0345-More-PotionEffectType-API.patch b/patches/api/0344-More-PotionEffectType-API.patch similarity index 97% rename from patches/api/0345-More-PotionEffectType-API.patch rename to patches/api/0344-More-PotionEffectType-API.patch index 4c47b4f23..3ccfee4a9 100644 --- a/patches/api/0345-More-PotionEffectType-API.patch +++ b/patches/api/0344-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 4a9c196a2caeb7f1b180347b480ed48056ad6a00..7eef8ba452c7a35d70d07782f288d51b061a2d03 100644 +index 4331acfc9efd08011e339a1bc0a5190abc197506..800d23bb249e19d5cf924e7ba36684068624da02 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -257,6 +257,31 @@ public interface Registry extends Iterable { +@@ -271,6 +271,31 @@ public interface Registry extends Iterable { */ @Deprecated(forRemoval = true) Registry CONFIGURED_STRUCTURE = Bukkit.getRegistry(io.papermc.paper.world.structure.ConfiguredStructure.class); diff --git a/patches/api/0346-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/api/0345-API-for-creating-command-sender-which-forwards-feedb.patch similarity index 100% rename from patches/api/0346-API-for-creating-command-sender-which-forwards-feedb.patch rename to patches/api/0345-API-for-creating-command-sender-which-forwards-feedb.patch diff --git a/patches/api/0347-Implement-regenerateChunk.patch b/patches/api/0346-Implement-regenerateChunk.patch similarity index 100% rename from patches/api/0347-Implement-regenerateChunk.patch rename to patches/api/0346-Implement-regenerateChunk.patch diff --git a/patches/api/0348-Add-GameEvent-tags.patch b/patches/api/0347-Add-GameEvent-tags.patch similarity index 100% rename from patches/api/0348-Add-GameEvent-tags.patch rename to patches/api/0347-Add-GameEvent-tags.patch diff --git a/patches/api/0349-Furnace-RecipesUsed-API.patch b/patches/api/0348-Furnace-RecipesUsed-API.patch similarity index 100% rename from patches/api/0349-Furnace-RecipesUsed-API.patch rename to patches/api/0348-Furnace-RecipesUsed-API.patch diff --git a/patches/api/0350-Configurable-sculk-sensor-listener-range.patch b/patches/api/0349-Configurable-sculk-sensor-listener-range.patch similarity index 100% rename from patches/api/0350-Configurable-sculk-sensor-listener-range.patch rename to patches/api/0349-Configurable-sculk-sensor-listener-range.patch diff --git a/patches/api/0351-Add-missing-block-data-mins-and-maxes.patch b/patches/api/0350-Add-missing-block-data-mins-and-maxes.patch similarity index 100% rename from patches/api/0351-Add-missing-block-data-mins-and-maxes.patch rename to patches/api/0350-Add-missing-block-data-mins-and-maxes.patch diff --git a/patches/api/0352-Custom-Potion-Mixes.patch b/patches/api/0351-Custom-Potion-Mixes.patch similarity index 100% rename from patches/api/0352-Custom-Potion-Mixes.patch rename to patches/api/0351-Custom-Potion-Mixes.patch diff --git a/patches/api/0353-Expose-furnace-minecart-push-values.patch b/patches/api/0352-Expose-furnace-minecart-push-values.patch similarity index 100% rename from patches/api/0353-Expose-furnace-minecart-push-values.patch rename to patches/api/0352-Expose-furnace-minecart-push-values.patch diff --git a/patches/api/0354-More-Projectile-API.patch b/patches/api/0353-More-Projectile-API.patch similarity index 100% rename from patches/api/0354-More-Projectile-API.patch rename to patches/api/0353-More-Projectile-API.patch diff --git a/patches/api/0355-Add-getComputedBiome-API.patch b/patches/api/0354-Add-getComputedBiome-API.patch similarity index 100% rename from patches/api/0355-Add-getComputedBiome-API.patch rename to patches/api/0354-Add-getComputedBiome-API.patch diff --git a/patches/api/0356-Add-enchantWithLevels-API.patch b/patches/api/0355-Add-enchantWithLevels-API.patch similarity index 100% rename from patches/api/0356-Add-enchantWithLevels-API.patch rename to patches/api/0355-Add-enchantWithLevels-API.patch diff --git a/patches/api/0357-Add-TameableDeathMessageEvent.patch b/patches/api/0356-Add-TameableDeathMessageEvent.patch similarity index 100% rename from patches/api/0357-Add-TameableDeathMessageEvent.patch rename to patches/api/0356-Add-TameableDeathMessageEvent.patch diff --git a/patches/api/0358-Allow-to-change-the-podium-of-the-EnderDragon.patch b/patches/api/0357-Allow-to-change-the-podium-of-the-EnderDragon.patch similarity index 100% rename from patches/api/0358-Allow-to-change-the-podium-of-the-EnderDragon.patch rename to patches/api/0357-Allow-to-change-the-podium-of-the-EnderDragon.patch diff --git a/patches/api/0359-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch b/patches/api/0358-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch similarity index 100% rename from patches/api/0359-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch rename to patches/api/0358-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch diff --git a/patches/api/0360-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch b/patches/api/0359-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch similarity index 100% rename from patches/api/0360-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch rename to patches/api/0359-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch diff --git a/patches/api/0361-WorldCreator-keepSpawnLoaded.patch b/patches/api/0360-WorldCreator-keepSpawnLoaded.patch similarity index 100% rename from patches/api/0361-WorldCreator-keepSpawnLoaded.patch rename to patches/api/0360-WorldCreator-keepSpawnLoaded.patch diff --git a/patches/api/0362-Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/api/0361-Add-EntityDyeEvent-and-CollarColorable-interface.patch similarity index 96% rename from patches/api/0362-Add-EntityDyeEvent-and-CollarColorable-interface.patch rename to patches/api/0361-Add-EntityDyeEvent-and-CollarColorable-interface.patch index 032a0872d..8940c430c 100644 --- a/patches/api/0362-Add-EntityDyeEvent-and-CollarColorable-interface.patch +++ b/patches/api/0361-Add-EntityDyeEvent-and-CollarColorable-interface.patch @@ -117,10 +117,10 @@ index 0000000000000000000000000000000000000000..aefbaccd32f1ab25a4da63bdc878922e + } +} diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java -index c340fecb61bac66baf0f44189d21bc85289b1269..97b0d8ccd3fd3a711ec5fa4ce3d8703515895081 100644 +index 9bc385682472418c787481bbc809f238194d5918..4ea1027c8540cdba82acf829d0720846b3a13e3e 100644 --- a/src/main/java/org/bukkit/entity/Cat.java +++ b/src/main/java/org/bukkit/entity/Cat.java -@@ -6,7 +6,7 @@ import org.jetbrains.annotations.NotNull; +@@ -8,7 +8,7 @@ import org.jetbrains.annotations.NotNull; /** * Meow. */ @@ -129,7 +129,7 @@ index c340fecb61bac66baf0f44189d21bc85289b1269..97b0d8ccd3fd3a711ec5fa4ce3d87035 /** * Gets the current type of this cat. -@@ -29,6 +29,7 @@ public interface Cat extends Tameable, Sittable { +@@ -31,6 +31,7 @@ public interface Cat extends Tameable, Sittable { * @return the color of the collar */ @NotNull @@ -137,7 +137,7 @@ index c340fecb61bac66baf0f44189d21bc85289b1269..97b0d8ccd3fd3a711ec5fa4ce3d87035 public DyeColor getCollarColor(); /** -@@ -36,6 +37,7 @@ public interface Cat extends Tameable, Sittable { +@@ -38,6 +39,7 @@ public interface Cat extends Tameable, Sittable { * * @param color the color to apply */ diff --git a/patches/api/0363-Add-PlayerStopUsingItemEvent.patch b/patches/api/0362-Add-PlayerStopUsingItemEvent.patch similarity index 100% rename from patches/api/0363-Add-PlayerStopUsingItemEvent.patch rename to patches/api/0362-Add-PlayerStopUsingItemEvent.patch diff --git a/patches/api/0364-Expand-FallingBlock-API.patch b/patches/api/0363-Expand-FallingBlock-API.patch similarity index 100% rename from patches/api/0364-Expand-FallingBlock-API.patch rename to patches/api/0363-Expand-FallingBlock-API.patch diff --git a/patches/api/0366-Add-method-isTickingWorlds-to-Bukkit.patch b/patches/api/0364-Add-method-isTickingWorlds-to-Bukkit.patch similarity index 100% rename from patches/api/0366-Add-method-isTickingWorlds-to-Bukkit.patch rename to patches/api/0364-Add-method-isTickingWorlds-to-Bukkit.patch diff --git a/patches/api/0367-Add-WardenAngerChangeEvent.patch b/patches/api/0365-Add-WardenAngerChangeEvent.patch similarity index 100% rename from patches/api/0367-Add-WardenAngerChangeEvent.patch rename to patches/api/0365-Add-WardenAngerChangeEvent.patch diff --git a/patches/api/0365-Keyed-Cat-Type.patch b/patches/api/0365-Keyed-Cat-Type.patch deleted file mode 100644 index b0797d78b..000000000 --- a/patches/api/0365-Keyed-Cat-Type.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> -Date: Wed, 8 Jun 2022 18:23:17 -0400 -Subject: [PATCH] Keyed Cat Type - - -diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java -index 97b0d8ccd3fd3a711ec5fa4ce3d8703515895081..bd74b47879b69b7a2e078a5aca460e5c97b0a919 100644 ---- a/src/main/java/org/bukkit/entity/Cat.java -+++ b/src/main/java/org/bukkit/entity/Cat.java -@@ -43,7 +43,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC - /** - * Represents the various different cat types there are. - */ -- public enum Type { -+ public enum Type implements org.bukkit.Keyed { // Paper - TABBY, - BLACK, - RED, -@@ -55,6 +55,20 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC - WHITE, - JELLIE, - ALL_BLACK; -+ -+ // Paper start -+ private final org.bukkit.NamespacedKey key; -+ -+ Type() { -+ this.key = org.bukkit.NamespacedKey.minecraft(name().toLowerCase(java.util.Locale.ROOT)); -+ } -+ -+ @NotNull -+ @Override -+ public org.bukkit.NamespacedKey getKey() { -+ return key; -+ } -+ // Paper end - } - - // Paper Start - More cat api diff --git a/patches/api/0368-Nameable-Banner-API.patch b/patches/api/0366-Nameable-Banner-API.patch similarity index 100% rename from patches/api/0368-Nameable-Banner-API.patch rename to patches/api/0366-Nameable-Banner-API.patch diff --git a/patches/api/0369-Add-Player-getFishHook.patch b/patches/api/0367-Add-Player-getFishHook.patch similarity index 100% rename from patches/api/0369-Add-Player-getFishHook.patch rename to patches/api/0367-Add-Player-getFishHook.patch diff --git a/patches/api/0370-More-Teleport-API.patch b/patches/api/0368-More-Teleport-API.patch similarity index 100% rename from patches/api/0370-More-Teleport-API.patch rename to patches/api/0368-More-Teleport-API.patch diff --git a/patches/api/0371-Add-EntityPortalReadyEvent.patch b/patches/api/0369-Add-EntityPortalReadyEvent.patch similarity index 100% rename from patches/api/0371-Add-EntityPortalReadyEvent.patch rename to patches/api/0369-Add-EntityPortalReadyEvent.patch diff --git a/patches/api/0372-Custom-Chat-Completion-Suggestions-API.patch b/patches/api/0370-Custom-Chat-Completion-Suggestions-API.patch similarity index 100% rename from patches/api/0372-Custom-Chat-Completion-Suggestions-API.patch rename to patches/api/0370-Custom-Chat-Completion-Suggestions-API.patch diff --git a/patches/api/0373-Collision-API.patch b/patches/api/0371-Collision-API.patch similarity index 100% rename from patches/api/0373-Collision-API.patch rename to patches/api/0371-Collision-API.patch diff --git a/patches/api/0374-Block-Ticking-API.patch b/patches/api/0372-Block-Ticking-API.patch similarity index 100% rename from patches/api/0374-Block-Ticking-API.patch rename to patches/api/0372-Block-Ticking-API.patch diff --git a/patches/api/0375-Add-NamespacedKey-biome-methods.patch b/patches/api/0373-Add-NamespacedKey-biome-methods.patch similarity index 100% rename from patches/api/0375-Add-NamespacedKey-biome-methods.patch rename to patches/api/0373-Add-NamespacedKey-biome-methods.patch diff --git a/patches/api/0376-Also-load-resources-from-LibraryLoader.patch b/patches/api/0374-Also-load-resources-from-LibraryLoader.patch similarity index 100% rename from patches/api/0376-Also-load-resources-from-LibraryLoader.patch rename to patches/api/0374-Also-load-resources-from-LibraryLoader.patch diff --git a/patches/api/0377-Added-byte-array-serialization-deserialization-for-P.patch b/patches/api/0375-Added-byte-array-serialization-deserialization-for-P.patch similarity index 81% rename from patches/api/0377-Added-byte-array-serialization-deserialization-for-P.patch rename to patches/api/0375-Added-byte-array-serialization-deserialization-for-P.patch index 161c82afe..24c9f5c0f 100644 --- a/patches/api/0377-Added-byte-array-serialization-deserialization-for-P.patch +++ b/patches/api/0375-Added-byte-array-serialization-deserialization-for-P.patch @@ -6,14 +6,15 @@ Subject: [PATCH] Added byte array serialization/deserialization for diff --git a/src/main/java/org/bukkit/persistence/PersistentDataContainer.java b/src/main/java/org/bukkit/persistence/PersistentDataContainer.java -index eebb3da156e2d95efbe22d4afa470b977ce19f10..57609b7793122e135fa0c3b926500849379637b2 100644 +index 6c156faf0148da13a44dabba7a807f68b3d50a36..da59e75267f43581bec6df73dda9f889347617d4 100644 --- a/src/main/java/org/bukkit/persistence/PersistentDataContainer.java +++ b/src/main/java/org/bukkit/persistence/PersistentDataContainer.java -@@ -164,5 +164,38 @@ public interface PersistentDataContainer { - * @throws NullPointerException if the key to look up is null +@@ -184,4 +184,39 @@ public interface PersistentDataContainer { */ - boolean has(@NotNull NamespacedKey key); + @NotNull + PersistentDataAdapterContext getAdapterContext(); + ++ // Paper start - byte array serialization + /** + * Serialize this {@link PersistentDataContainer} instance to a + * byte array. @@ -43,8 +44,8 @@ index eebb3da156e2d95efbe22d4afa470b977ce19f10..57609b7793122e135fa0c3b926500849 + * @param bytes the byte array to read from + * @throws java.io.IOException if the byte array has an invalid format + */ -+ default void readFromBytes(byte @NotNull [] bytes) throws java.io.IOException { ++ default void readFromBytes(final byte @NotNull [] bytes) throws java.io.IOException { + this.readFromBytes(bytes, true); + } - // Paper end ++ // Paper end - byte array serialization } diff --git a/patches/api/0378-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch b/patches/api/0376-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch similarity index 100% rename from patches/api/0378-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch rename to patches/api/0376-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch diff --git a/patches/api/0379-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch b/patches/api/0377-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch similarity index 100% rename from patches/api/0379-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch rename to patches/api/0377-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch diff --git a/patches/api/0380-Add-getDrops-to-BlockState.patch b/patches/api/0378-Add-getDrops-to-BlockState.patch similarity index 100% rename from patches/api/0380-Add-getDrops-to-BlockState.patch rename to patches/api/0378-Add-getDrops-to-BlockState.patch diff --git a/patches/api/0381-Add-PlayerInventorySlotChangeEvent.patch b/patches/api/0379-Add-PlayerInventorySlotChangeEvent.patch similarity index 100% rename from patches/api/0381-Add-PlayerInventorySlotChangeEvent.patch rename to patches/api/0379-Add-PlayerInventorySlotChangeEvent.patch diff --git a/patches/api/0382-Elder-Guardian-appearance-API.patch b/patches/api/0380-Elder-Guardian-appearance-API.patch similarity index 100% rename from patches/api/0382-Elder-Guardian-appearance-API.patch rename to patches/api/0380-Elder-Guardian-appearance-API.patch diff --git a/patches/api/0383-Allow-changing-bed-s-occupied-property.patch b/patches/api/0381-Allow-changing-bed-s-occupied-property.patch similarity index 100% rename from patches/api/0383-Allow-changing-bed-s-occupied-property.patch rename to patches/api/0381-Allow-changing-bed-s-occupied-property.patch diff --git a/patches/api/0384-Add-EquipmentSlot-convenience-methods.patch b/patches/api/0382-Add-EquipmentSlot-convenience-methods.patch similarity index 100% rename from patches/api/0384-Add-EquipmentSlot-convenience-methods.patch rename to patches/api/0382-Add-EquipmentSlot-convenience-methods.patch diff --git a/patches/api/0385-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch b/patches/api/0383-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch similarity index 100% rename from patches/api/0385-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch rename to patches/api/0383-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch diff --git a/patches/api/0386-Add-entity-knockback-API.patch b/patches/api/0384-Add-entity-knockback-API.patch similarity index 100% rename from patches/api/0386-Add-entity-knockback-API.patch rename to patches/api/0384-Add-entity-knockback-API.patch diff --git a/patches/api/0387-Added-EntityToggleSitEvent.patch b/patches/api/0385-Added-EntityToggleSitEvent.patch similarity index 100% rename from patches/api/0387-Added-EntityToggleSitEvent.patch rename to patches/api/0385-Added-EntityToggleSitEvent.patch diff --git a/patches/api/0388-Add-Moving-Piston-API.patch b/patches/api/0386-Add-Moving-Piston-API.patch similarity index 100% rename from patches/api/0388-Add-Moving-Piston-API.patch rename to patches/api/0386-Add-Moving-Piston-API.patch diff --git a/patches/api/0389-Add-PrePlayerAttackEntityEvent.patch b/patches/api/0387-Add-PrePlayerAttackEntityEvent.patch similarity index 100% rename from patches/api/0389-Add-PrePlayerAttackEntityEvent.patch rename to patches/api/0387-Add-PrePlayerAttackEntityEvent.patch diff --git a/patches/api/0390-Add-Player-Warden-Warning-API.patch b/patches/api/0388-Add-Player-Warden-Warning-API.patch similarity index 100% rename from patches/api/0390-Add-Player-Warden-Warning-API.patch rename to patches/api/0388-Add-Player-Warden-Warning-API.patch diff --git a/patches/api/0391-More-vanilla-friendly-methods-to-update-trades.patch b/patches/api/0389-More-vanilla-friendly-methods-to-update-trades.patch similarity index 100% rename from patches/api/0391-More-vanilla-friendly-methods-to-update-trades.patch rename to patches/api/0389-More-vanilla-friendly-methods-to-update-trades.patch diff --git a/patches/api/0392-Add-paper-dumplisteners-command.patch b/patches/api/0390-Add-paper-dumplisteners-command.patch similarity index 100% rename from patches/api/0392-Add-paper-dumplisteners-command.patch rename to patches/api/0390-Add-paper-dumplisteners-command.patch diff --git a/patches/api/0393-ItemStack-damage-API.patch b/patches/api/0391-ItemStack-damage-API.patch similarity index 100% rename from patches/api/0393-ItemStack-damage-API.patch rename to patches/api/0391-ItemStack-damage-API.patch diff --git a/patches/api/0394-Add-Tick-TemporalUnit.patch b/patches/api/0392-Add-Tick-TemporalUnit.patch similarity index 100% rename from patches/api/0394-Add-Tick-TemporalUnit.patch rename to patches/api/0392-Add-Tick-TemporalUnit.patch diff --git a/patches/api/0395-Friction-API.patch b/patches/api/0393-Friction-API.patch similarity index 100% rename from patches/api/0395-Friction-API.patch rename to patches/api/0393-Friction-API.patch diff --git a/patches/api/0396-Player-Entity-Tracking-Events.patch b/patches/api/0394-Player-Entity-Tracking-Events.patch similarity index 100% rename from patches/api/0396-Player-Entity-Tracking-Events.patch rename to patches/api/0394-Player-Entity-Tracking-Events.patch diff --git a/patches/api/0397-Add-missing-Fluid-type.patch b/patches/api/0395-Add-missing-Fluid-type.patch similarity index 100% rename from patches/api/0397-Add-missing-Fluid-type.patch rename to patches/api/0395-Add-missing-Fluid-type.patch diff --git a/patches/api/0398-fix-Instruments.patch b/patches/api/0396-fix-Instruments.patch similarity index 100% rename from patches/api/0398-fix-Instruments.patch rename to patches/api/0396-fix-Instruments.patch diff --git a/patches/api/0399-Add-BlockLockCheckEvent.patch b/patches/api/0397-Add-BlockLockCheckEvent.patch similarity index 100% rename from patches/api/0399-Add-BlockLockCheckEvent.patch rename to patches/api/0397-Add-BlockLockCheckEvent.patch diff --git a/patches/api/0400-Add-Sneaking-API-for-Entities.patch b/patches/api/0398-Add-Sneaking-API-for-Entities.patch similarity index 100% rename from patches/api/0400-Add-Sneaking-API-for-Entities.patch rename to patches/api/0398-Add-Sneaking-API-for-Entities.patch diff --git a/patches/api/0401-Improve-PortalEvents.patch b/patches/api/0399-Improve-PortalEvents.patch similarity index 100% rename from patches/api/0401-Improve-PortalEvents.patch rename to patches/api/0399-Improve-PortalEvents.patch diff --git a/patches/api/0402-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/api/0400-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch similarity index 100% rename from patches/api/0402-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch rename to patches/api/0400-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch diff --git a/patches/api/0403-Flying-Fall-Damage-API.patch b/patches/api/0401-Flying-Fall-Damage-API.patch similarity index 100% rename from patches/api/0403-Flying-Fall-Damage-API.patch rename to patches/api/0401-Flying-Fall-Damage-API.patch diff --git a/patches/api/0404-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/api/0402-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch similarity index 100% rename from patches/api/0404-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch rename to patches/api/0402-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch diff --git a/patches/api/0405-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch b/patches/api/0403-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch similarity index 100% rename from patches/api/0405-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch rename to patches/api/0403-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch diff --git a/patches/api/0406-Win-Screen-API.patch b/patches/api/0404-Win-Screen-API.patch similarity index 100% rename from patches/api/0406-Win-Screen-API.patch rename to patches/api/0404-Win-Screen-API.patch diff --git a/patches/api/0407-Add-Entity-Body-Yaw-API.patch b/patches/api/0405-Add-Entity-Body-Yaw-API.patch similarity index 100% rename from patches/api/0407-Add-Entity-Body-Yaw-API.patch rename to patches/api/0405-Add-Entity-Body-Yaw-API.patch diff --git a/patches/api/0408-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch b/patches/api/0406-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch similarity index 100% rename from patches/api/0408-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch rename to patches/api/0406-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch diff --git a/patches/api/0409-Add-EntityFertilizeEggEvent.patch b/patches/api/0407-Add-EntityFertilizeEggEvent.patch similarity index 100% rename from patches/api/0409-Add-EntityFertilizeEggEvent.patch rename to patches/api/0407-Add-EntityFertilizeEggEvent.patch diff --git a/patches/api/0410-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/api/0408-Add-CompostItemEvent-and-EntityCompostItemEvent.patch similarity index 100% rename from patches/api/0410-Add-CompostItemEvent-and-EntityCompostItemEvent.patch rename to patches/api/0408-Add-CompostItemEvent-and-EntityCompostItemEvent.patch diff --git a/patches/api/0411-Add-Shearable-API.patch b/patches/api/0409-Add-Shearable-API.patch similarity index 100% rename from patches/api/0411-Add-Shearable-API.patch rename to patches/api/0409-Add-Shearable-API.patch diff --git a/patches/api/0412-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/api/0410-Fix-SpawnEggMeta-get-setSpawnedType.patch similarity index 100% rename from patches/api/0412-Fix-SpawnEggMeta-get-setSpawnedType.patch rename to patches/api/0410-Fix-SpawnEggMeta-get-setSpawnedType.patch diff --git a/patches/api/0413-Add-Mob-Experience-reward-API.patch b/patches/api/0411-Add-Mob-Experience-reward-API.patch similarity index 100% rename from patches/api/0413-Add-Mob-Experience-reward-API.patch rename to patches/api/0411-Add-Mob-Experience-reward-API.patch diff --git a/patches/api/0414-Expand-PlayerItemMendEvent.patch b/patches/api/0412-Expand-PlayerItemMendEvent.patch similarity index 100% rename from patches/api/0414-Expand-PlayerItemMendEvent.patch rename to patches/api/0412-Expand-PlayerItemMendEvent.patch diff --git a/patches/api/0415-Add-transient-modifier-API.patch b/patches/api/0413-Add-transient-modifier-API.patch similarity index 100% rename from patches/api/0415-Add-transient-modifier-API.patch rename to patches/api/0413-Add-transient-modifier-API.patch diff --git a/patches/api/0416-Properly-remove-the-experimental-smithing-inventory-.patch b/patches/api/0414-Properly-remove-the-experimental-smithing-inventory-.patch similarity index 100% rename from patches/api/0416-Properly-remove-the-experimental-smithing-inventory-.patch rename to patches/api/0414-Properly-remove-the-experimental-smithing-inventory-.patch diff --git a/patches/api/0417-Add-method-to-remove-all-active-potion-effects.patch b/patches/api/0415-Add-method-to-remove-all-active-potion-effects.patch similarity index 100% rename from patches/api/0417-Add-method-to-remove-all-active-potion-effects.patch rename to patches/api/0415-Add-method-to-remove-all-active-potion-effects.patch diff --git a/patches/api/0418-Folia-scheduler-and-owned-region-API.patch b/patches/api/0416-Folia-scheduler-and-owned-region-API.patch similarity index 100% rename from patches/api/0418-Folia-scheduler-and-owned-region-API.patch rename to patches/api/0416-Folia-scheduler-and-owned-region-API.patch diff --git a/patches/api/0419-Add-event-for-player-editing-sign.patch b/patches/api/0417-Add-event-for-player-editing-sign.patch similarity index 100% rename from patches/api/0419-Add-event-for-player-editing-sign.patch rename to patches/api/0417-Add-event-for-player-editing-sign.patch diff --git a/patches/api/0420-Add-Sign-getInteractableSideFor.patch b/patches/api/0418-Add-Sign-getInteractableSideFor.patch similarity index 100% rename from patches/api/0420-Add-Sign-getInteractableSideFor.patch rename to patches/api/0418-Add-Sign-getInteractableSideFor.patch diff --git a/patches/api/0421-Fix-BanList-API.patch b/patches/api/0419-Fix-BanList-API.patch similarity index 100% rename from patches/api/0421-Fix-BanList-API.patch rename to patches/api/0419-Fix-BanList-API.patch diff --git a/patches/api/0422-Add-whitelist-events.patch b/patches/api/0420-Add-whitelist-events.patch similarity index 100% rename from patches/api/0422-Add-whitelist-events.patch rename to patches/api/0420-Add-whitelist-events.patch diff --git a/patches/api/0423-API-for-updating-recipes-on-clients.patch b/patches/api/0421-API-for-updating-recipes-on-clients.patch similarity index 100% rename from patches/api/0423-API-for-updating-recipes-on-clients.patch rename to patches/api/0421-API-for-updating-recipes-on-clients.patch diff --git a/patches/api/0424-Add-PlayerFailMoveEvent.patch b/patches/api/0422-Add-PlayerFailMoveEvent.patch similarity index 100% rename from patches/api/0424-Add-PlayerFailMoveEvent.patch rename to patches/api/0422-Add-PlayerFailMoveEvent.patch diff --git a/patches/api/0425-Fix-custom-statistic-criteria-creation.patch b/patches/api/0423-Fix-custom-statistic-criteria-creation.patch similarity index 100% rename from patches/api/0425-Fix-custom-statistic-criteria-creation.patch rename to patches/api/0423-Fix-custom-statistic-criteria-creation.patch diff --git a/patches/api/0426-SculkCatalyst-bloom-API.patch b/patches/api/0424-SculkCatalyst-bloom-API.patch similarity index 100% rename from patches/api/0426-SculkCatalyst-bloom-API.patch rename to patches/api/0424-SculkCatalyst-bloom-API.patch diff --git a/patches/api/0427-API-for-an-entity-s-scoreboard-name.patch b/patches/api/0425-API-for-an-entity-s-scoreboard-name.patch similarity index 100% rename from patches/api/0427-API-for-an-entity-s-scoreboard-name.patch rename to patches/api/0425-API-for-an-entity-s-scoreboard-name.patch diff --git a/patches/api/0428-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/api/0426-Deprecate-and-replace-methods-with-old-StructureType.patch similarity index 100% rename from patches/api/0428-Deprecate-and-replace-methods-with-old-StructureType.patch rename to patches/api/0426-Deprecate-and-replace-methods-with-old-StructureType.patch diff --git a/patches/api/0429-Add-Listing-API-for-Player.patch b/patches/api/0427-Add-Listing-API-for-Player.patch similarity index 100% rename from patches/api/0429-Add-Listing-API-for-Player.patch rename to patches/api/0427-Add-Listing-API-for-Player.patch diff --git a/patches/api/0430-Expose-clicked-BlockFace-during-BlockDamageEvent.patch b/patches/api/0428-Expose-clicked-BlockFace-during-BlockDamageEvent.patch similarity index 100% rename from patches/api/0430-Expose-clicked-BlockFace-during-BlockDamageEvent.patch rename to patches/api/0428-Expose-clicked-BlockFace-during-BlockDamageEvent.patch diff --git a/patches/api/0431-Fix-NPE-on-Boat-getStatus.patch b/patches/api/0429-Fix-NPE-on-Boat-getStatus.patch similarity index 100% rename from patches/api/0431-Fix-NPE-on-Boat-getStatus.patch rename to patches/api/0429-Fix-NPE-on-Boat-getStatus.patch diff --git a/patches/api/0432-Expand-Pose-API.patch b/patches/api/0430-Expand-Pose-API.patch similarity index 100% rename from patches/api/0432-Expand-Pose-API.patch rename to patches/api/0430-Expand-Pose-API.patch diff --git a/patches/api/0433-MerchantRecipe-add-copy-constructor.patch b/patches/api/0431-MerchantRecipe-add-copy-constructor.patch similarity index 100% rename from patches/api/0433-MerchantRecipe-add-copy-constructor.patch rename to patches/api/0431-MerchantRecipe-add-copy-constructor.patch diff --git a/patches/api/0434-More-DragonBattle-API.patch b/patches/api/0432-More-DragonBattle-API.patch similarity index 100% rename from patches/api/0434-More-DragonBattle-API.patch rename to patches/api/0432-More-DragonBattle-API.patch diff --git a/patches/api/0435-Add-PlayerPickItemEvent.patch b/patches/api/0433-Add-PlayerPickItemEvent.patch similarity index 100% rename from patches/api/0435-Add-PlayerPickItemEvent.patch rename to patches/api/0433-Add-PlayerPickItemEvent.patch diff --git a/patches/api/0436-Allow-trident-custom-damage.patch b/patches/api/0434-Allow-trident-custom-damage.patch similarity index 100% rename from patches/api/0436-Allow-trident-custom-damage.patch rename to patches/api/0434-Allow-trident-custom-damage.patch diff --git a/patches/api/0437-Expose-hand-during-BlockCanBuildEvent.patch b/patches/api/0435-Expose-hand-during-BlockCanBuildEvent.patch similarity index 100% rename from patches/api/0437-Expose-hand-during-BlockCanBuildEvent.patch rename to patches/api/0435-Expose-hand-during-BlockCanBuildEvent.patch diff --git a/patches/api/0438-Limit-setBurnTime-to-valid-short-values.patch b/patches/api/0436-Limit-setBurnTime-to-valid-short-values.patch similarity index 100% rename from patches/api/0438-Limit-setBurnTime-to-valid-short-values.patch rename to patches/api/0436-Limit-setBurnTime-to-valid-short-values.patch diff --git a/patches/api/0439-Add-OfflinePlayer-isConnected.patch b/patches/api/0437-Add-OfflinePlayer-isConnected.patch similarity index 100% rename from patches/api/0439-Add-OfflinePlayer-isConnected.patch rename to patches/api/0437-Add-OfflinePlayer-isConnected.patch diff --git a/patches/api/0440-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/api/0438-Add-titleOverride-to-InventoryOpenEvent.patch similarity index 100% rename from patches/api/0440-Add-titleOverride-to-InventoryOpenEvent.patch rename to patches/api/0438-Add-titleOverride-to-InventoryOpenEvent.patch diff --git a/patches/api/0441-Allow-proper-checking-of-empty-item-stacks.patch b/patches/api/0439-Allow-proper-checking-of-empty-item-stacks.patch similarity index 100% rename from patches/api/0441-Allow-proper-checking-of-empty-item-stacks.patch rename to patches/api/0439-Allow-proper-checking-of-empty-item-stacks.patch diff --git a/patches/api/0442-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch b/patches/api/0440-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch similarity index 100% rename from patches/api/0442-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch rename to patches/api/0440-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch diff --git a/patches/api/0443-Add-player-idle-duration-API.patch b/patches/api/0441-Add-player-idle-duration-API.patch similarity index 100% rename from patches/api/0443-Add-player-idle-duration-API.patch rename to patches/api/0441-Add-player-idle-duration-API.patch diff --git a/patches/api/0444-Add-API-to-get-the-collision-shape-of-a-block-before.patch b/patches/api/0442-Add-API-to-get-the-collision-shape-of-a-block-before.patch similarity index 100% rename from patches/api/0444-Add-API-to-get-the-collision-shape-of-a-block-before.patch rename to patches/api/0442-Add-API-to-get-the-collision-shape-of-a-block-before.patch diff --git a/patches/api/0445-Add-predicate-for-blocks-when-raytracing.patch b/patches/api/0443-Add-predicate-for-blocks-when-raytracing.patch similarity index 100% rename from patches/api/0445-Add-predicate-for-blocks-when-raytracing.patch rename to patches/api/0443-Add-predicate-for-blocks-when-raytracing.patch diff --git a/patches/api/0446-Add-hand-to-fish-event-for-all-player-interactions.patch b/patches/api/0444-Add-hand-to-fish-event-for-all-player-interactions.patch similarity index 100% rename from patches/api/0446-Add-hand-to-fish-event-for-all-player-interactions.patch rename to patches/api/0444-Add-hand-to-fish-event-for-all-player-interactions.patch diff --git a/patches/api/0447-Add-UUID-attribute-modifier-API.patch b/patches/api/0445-Add-UUID-attribute-modifier-API.patch similarity index 100% rename from patches/api/0447-Add-UUID-attribute-modifier-API.patch rename to patches/api/0445-Add-UUID-attribute-modifier-API.patch diff --git a/patches/api/0448-Expand-LingeringPotion-API.patch b/patches/api/0446-Expand-LingeringPotion-API.patch similarity index 100% rename from patches/api/0448-Expand-LingeringPotion-API.patch rename to patches/api/0446-Expand-LingeringPotion-API.patch diff --git a/patches/api/0449-Remove-unnecessary-durability-check-in-ItemStack-isS.patch b/patches/api/0447-Remove-unnecessary-durability-check-in-ItemStack-isS.patch similarity index 100% rename from patches/api/0449-Remove-unnecessary-durability-check-in-ItemStack-isS.patch rename to patches/api/0447-Remove-unnecessary-durability-check-in-ItemStack-isS.patch diff --git a/patches/api/0450-Add-Structure-check-API.patch b/patches/api/0448-Add-Structure-check-API.patch similarity index 100% rename from patches/api/0450-Add-Structure-check-API.patch rename to patches/api/0448-Add-Structure-check-API.patch diff --git a/patches/server/0018-Rewrite-chunk-system.patch b/patches/server/0018-Rewrite-chunk-system.patch index 2cf88b6a9..12fb0fd16 100644 --- a/patches/server/0018-Rewrite-chunk-system.patch +++ b/patches/server/0018-Rewrite-chunk-system.patch @@ -19532,7 +19532,7 @@ index 5cd680d2ed47aadb5e65a775d70bc662a92e3d7a..1ad6b62ee53e2ee4a710211dfc750780 } diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index e2990302d932a5dc089a25e831e11ac6468f6381..9969b66e39fb6ce8a9ba24ccbd7ef5d3e363197f 100644 +index 3851c1026b91b77a02dbb5df1a1eedb212ac2a06..0653b5abc89d0c5a54566e3e518cfd29db076b86 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -196,7 +196,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -19988,7 +19988,7 @@ index e2990302d932a5dc089a25e831e11ac6468f6381..9969b66e39fb6ce8a9ba24ccbd7ef5d3 return false; } else { this.addFreshEntityWithPassengers(entity, reason); // CraftBukkit -@@ -1736,7 +1970,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1746,7 +1980,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } @@ -19997,7 +19997,7 @@ index e2990302d932a5dc089a25e831e11ac6468f6381..9969b66e39fb6ce8a9ba24ccbd7ef5d3 bufferedwriter.write(String.format(Locale.ROOT, "block_entity_tickers: %d\n", this.blockEntityTickers.size())); bufferedwriter.write(String.format(Locale.ROOT, "block_ticks: %d\n", this.getBlockTicks().count())); bufferedwriter.write(String.format(Locale.ROOT, "fluid_ticks: %d\n", this.getFluidTicks().count())); -@@ -1785,7 +2019,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1795,7 +2029,7 @@ public class ServerLevel extends Level implements WorldGenLevel { BufferedWriter bufferedwriter2 = Files.newBufferedWriter(path1); try { @@ -20006,7 +20006,7 @@ index e2990302d932a5dc089a25e831e11ac6468f6381..9969b66e39fb6ce8a9ba24ccbd7ef5d3 } catch (Throwable throwable4) { if (bufferedwriter2 != null) { try { -@@ -1806,7 +2040,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1816,7 +2050,7 @@ public class ServerLevel extends Level implements WorldGenLevel { BufferedWriter bufferedwriter3 = Files.newBufferedWriter(path2); try { @@ -20015,7 +20015,7 @@ index e2990302d932a5dc089a25e831e11ac6468f6381..9969b66e39fb6ce8a9ba24ccbd7ef5d3 } catch (Throwable throwable6) { if (bufferedwriter3 != null) { try { -@@ -1948,7 +2182,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1958,7 +2192,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @VisibleForTesting public String getWatchdogStats() { @@ -20024,7 +20024,7 @@ index e2990302d932a5dc089a25e831e11ac6468f6381..9969b66e39fb6ce8a9ba24ccbd7ef5d3 return BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType()).toString(); }), this.blockEntityTickers.size(), ServerLevel.getTypeCount(this.blockEntityTickers, TickingBlockEntity::getType), this.getBlockTicks().count(), this.getFluidTicks().count(), this.gatherChunkSourceStats()); } -@@ -2008,15 +2242,15 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2018,15 +2252,15 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public LevelEntityGetter getEntities() { org.spigotmc.AsyncCatcher.catchOp("Chunk getEntities call"); // Spigot @@ -20045,7 +20045,7 @@ index e2990302d932a5dc089a25e831e11ac6468f6381..9969b66e39fb6ce8a9ba24ccbd7ef5d3 } public void startTickingChunk(LevelChunk chunk) { -@@ -2032,34 +2266,49 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2042,34 +2276,49 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public void close() throws IOException { super.close(); @@ -20102,7 +20102,7 @@ index e2990302d932a5dc089a25e831e11ac6468f6381..9969b66e39fb6ce8a9ba24ccbd7ef5d3 } @Override -@@ -2080,7 +2329,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2090,7 +2339,7 @@ public class ServerLevel extends Level implements WorldGenLevel { CrashReportCategory crashreportsystemdetails = super.fillReportDetails(report); crashreportsystemdetails.setDetail("Loaded entity count", () -> { diff --git a/patches/server/0033-Entity-Origin-API.patch b/patches/server/0033-Entity-Origin-API.patch index ab8af63f2..fa02bcb7c 100644 --- a/patches/server/0033-Entity-Origin-API.patch +++ b/patches/server/0033-Entity-Origin-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 9969b66e39fb6ce8a9ba24ccbd7ef5d3e363197f..363f94a2fb54b7a55f392cc65a6e4d68f313fb07 100644 +index 0653b5abc89d0c5a54566e3e518cfd29db076b86..bc2111031f277dc27b8ae673259a10999df1ec43 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2389,6 +2389,15 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2399,6 +2399,15 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.inWorld = true; // CraftBukkit - Mark entity as in world entity.valid = true; // CraftBukkit diff --git a/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch b/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch index 93df9d479..ff9af7572 100644 --- a/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch +++ b/patches/server/0078-Entity-AddTo-RemoveFrom-World-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index f9e9348a897d8f8bd5eb5bd951c6e2416e73562d..16abfc81d054cdc983500d3e498533ea8e8cc0be 100644 +index 9ac9f250d2f9b29ce520da93a9398113b2ff3e50..0523b0e70c10f7f02551be90cd02b6d8dabde673 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2401,6 +2401,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2411,6 +2411,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.setOrigin(entity.getOriginVector().toLocation(getWorld())); } // Paper end @@ -16,7 +16,7 @@ index f9e9348a897d8f8bd5eb5bd951c6e2416e73562d..16abfc81d054cdc983500d3e498533ea } public void onTrackingEnd(Entity entity) { -@@ -2476,6 +2477,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2486,6 +2487,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } } // CraftBukkit end diff --git a/patches/server/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/patches/server/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch index 9dfde61df..50da6bac6 100644 --- a/patches/server/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch +++ b/patches/server/0094-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch @@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system. Additionally, numerous issues to player position tracking on maps has been fixed. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6baf4caafbb4f7a09fe3a806bbff17c9f6105fbd..97554ab72743cf2b8e87c7f3c35579f669c2308a 100644 +index 4d89f0c8ba1454aedb759c367009ec25931b66d5..cc3a34afddac429b1ce75e54fdb284d7683a4310 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2422,6 +2422,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2432,6 +2432,7 @@ public class ServerLevel extends Level implements WorldGenLevel { { if ( iter.next().player == entity ) { diff --git a/patches/server/0123-PlayerTeleportEndGatewayEvent.patch b/patches/server/0123-PlayerTeleportEndGatewayEvent.patch index ff8a91075..27a0ab680 100644 --- a/patches/server/0123-PlayerTeleportEndGatewayEvent.patch +++ b/patches/server/0123-PlayerTeleportEndGatewayEvent.patch @@ -7,11 +7,11 @@ Allows you to access the Gateway being used in a teleport event Fix the offset used for player teleportation diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 97c57619ebcf31f17f8430ffb68043771d1377f9..020314dded2c6305bd5e9013b108bc74be25ccc1 100644 +index 8e63135d42d1a06cc7741e33eb3e057321ea53bc..8ae723c6500bb92f937a27730c2a5ec912247c0a 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java @@ -207,11 +207,11 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { - // CraftBukkit start - Fire PlayerTeleportEvent + // CraftBukkit start - Fire PlayerTeleportEvent/EntityTeleportEvent if (entity1 instanceof ServerPlayer) { org.bukkit.craftbukkit.entity.CraftPlayer player = (CraftPlayer) entity1.getBukkitEntity(); - org.bukkit.Location location = CraftLocation.toBukkit(blockposition1, world.getWorld()).add(0.5D, 0.5D, 0.5D); @@ -24,12 +24,12 @@ index 97c57619ebcf31f17f8430ffb68043771d1377f9..020314dded2c6305bd5e9013b108bc74 Bukkit.getPluginManager().callEvent(teleEvent); if (teleEvent.isCancelled()) { return; -@@ -226,7 +226,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { - // CraftBukkit end +@@ -224,7 +224,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { - entity1.setPortalCooldown(); -- entity1.teleportToWithTicket((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY(), (double) blockposition1.getZ() + 0.5D); -+ entity1.teleportToWithTicket((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY(), (double) blockposition1.getZ() + 0.5D); // Paper - diff on change - } + } - TheEndGatewayBlockEntity.triggerCooldown(world, pos, state, blockEntity); +- org.bukkit.event.entity.EntityTeleportEvent teleEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTeleportEvent(entity1, blockposition1.getX() + 0.5, blockposition1.getY() + 0.5, blockposition1.getZ() + 0.5); ++ org.bukkit.event.entity.EntityTeleportEvent teleEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTeleportEvent(entity1, blockposition1.getX() + 0.5, blockposition1.getY() + 0.5, blockposition1.getZ() + 0.5); // Paper - diff on change + if (teleEvent.isCancelled()) { + return; + } diff --git a/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch index 0d88c9181..3bc16e11c 100644 --- a/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch @@ -149,10 +149,10 @@ index 183d6146dec231629b4892fcb2fe96d88cc74b4c..2fe8f7dfefd6e1f9b06f1d4821894091 public static BlockState getBlockState(Material material, @Nullable CompoundTag blockEntityTag) { diff --git a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java -index 6377a053e5d407fdae061e796657711828c5586e..ae5091433fd605c46b9c57f07114923918fad506 100644 +index cf9f0a8a8d2582e17e9b54269966bbfd4d9ae2a0..268563389077f92921411e866ec26e312e33ee23 100644 --- a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java -@@ -156,4 +156,10 @@ public class CraftPersistentDataContainer implements PersistentDataContainer { +@@ -173,4 +173,10 @@ public class CraftPersistentDataContainer implements PersistentDataContainer { public String serialize() { return CraftNBTTagConfigSerializer.serialize(this.toTagCompound()); } diff --git a/patches/server/0190-Block-Enderpearl-Travel-Exploit.patch b/patches/server/0190-Block-Enderpearl-Travel-Exploit.patch index e3e488693..1fd6bf21f 100644 --- a/patches/server/0190-Block-Enderpearl-Travel-Exploit.patch +++ b/patches/server/0190-Block-Enderpearl-Travel-Exploit.patch @@ -16,10 +16,10 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner public net.minecraft.world.entity.projectile.Projectile ownerUUID diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 97554ab72743cf2b8e87c7f3c35579f669c2308a..6d75010bf837a791f5fe04aacb973246410bbd66 100644 +index cc3a34afddac429b1ce75e54fdb284d7683a4310..418f9ed95179a234a4f7df3ba5813e9642b5f44c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2354,6 +2354,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2364,6 +2364,12 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTickingEnd(Entity entity) { ServerLevel.this.entityTickList.remove(entity); diff --git a/patches/server/0200-Implement-EntityTeleportEndGatewayEvent.patch b/patches/server/0200-Implement-EntityTeleportEndGatewayEvent.patch index 10ec95312..99c2c303c 100644 --- a/patches/server/0200-Implement-EntityTeleportEndGatewayEvent.patch +++ b/patches/server/0200-Implement-EntityTeleportEndGatewayEvent.patch @@ -5,28 +5,23 @@ Subject: [PATCH] Implement EntityTeleportEndGatewayEvent diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index 020314dded2c6305bd5e9013b108bc74be25ccc1..85914124014b4e6f0a561cf560918af68682b6f5 100644 +index 8ae723c6500bb92f937a27730c2a5ec912247c0a..676c2a4c9423e37319b097b99a307dd0186061a0 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -@@ -224,9 +224,20 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { +@@ -224,8 +224,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { } - // CraftBukkit end + +- org.bukkit.event.entity.EntityTeleportEvent teleEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTeleportEvent(entity1, blockposition1.getX() + 0.5, blockposition1.getY() + 0.5, blockposition1.getZ() + 0.5); // Paper - diff on change +- if (teleEvent.isCancelled()) { + // Paper start - EntityTeleportEndGatewayEvent + org.bukkit.Location location = new org.bukkit.Location(world.getWorld(), blockposition1.getX() + 0.5D, blockposition1.getY(), blockposition1.getZ() + 0.5D); + location.setPitch(entity1.getXRot()); + location.setYaw(entity1.getBukkitYaw()); -+ + org.bukkit.entity.Entity bukkitEntity = entity1.getBukkitEntity(); -+ com.destroystokyo.paper.event.entity.EntityTeleportEndGatewayEvent event = new com.destroystokyo.paper.event.entity.EntityTeleportEndGatewayEvent(bukkitEntity, bukkitEntity.getLocation(), location, new org.bukkit.craftbukkit.block.CraftEndGateway(world.getWorld(), blockEntity)); -+ if (!event.callEvent()) { -+ return; -+ } -+ // Paper end ++ org.bukkit.event.entity.EntityTeleportEvent teleEvent = new com.destroystokyo.paper.event.entity.EntityTeleportEndGatewayEvent(bukkitEntity, bukkitEntity.getLocation(), location, new org.bukkit.craftbukkit.block.CraftEndGateway(world.getWorld(), blockEntity)); ++ if (!teleEvent.callEvent()) { ++ // Paper end - EntityTeleportEndGatewayEvent + return; + } - entity1.setPortalCooldown(); -- entity1.teleportToWithTicket((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY(), (double) blockposition1.getZ() + 0.5D); // Paper - diff on change -+ entity1.teleportToWithTicket(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ()); // Paper - } - - TheEndGatewayBlockEntity.triggerCooldown(world, pos, state, blockEntity); diff --git a/patches/server/0214-InventoryCloseEvent-Reason-API.patch b/patches/server/0214-InventoryCloseEvent-Reason-API.patch index 00812c2ab..710d13f9d 100644 --- a/patches/server/0214-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0214-InventoryCloseEvent-Reason-API.patch @@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers to "confirm" things based on if it was player triggered close or not. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0705a1bb63f056a228308d348bc5db87b0bee5a1..cc499b31cf186412e575373a5fb7cad54946b0a7 100644 +index 4190c31fae199e6b6481d2b840f15fe68615d720..2e1cabfc3131f43feadf8ce61d0027c18d7c78e6 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1470,7 +1470,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -19,7 +19,7 @@ index 0705a1bb63f056a228308d348bc5db87b0bee5a1..cc499b31cf186412e575373a5fb7cad5 } } } -@@ -2445,7 +2445,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2455,7 +2455,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) { diff --git a/patches/server/0310-Configurable-Keep-Spawn-Loaded-range-per-world.patch b/patches/server/0310-Configurable-Keep-Spawn-Loaded-range-per-world.patch index 231a82cca..9cda68fc7 100644 --- a/patches/server/0310-Configurable-Keep-Spawn-Loaded-range-per-world.patch +++ b/patches/server/0310-Configurable-Keep-Spawn-Loaded-range-per-world.patch @@ -63,10 +63,10 @@ index af90bb579429336cc4e99386fd620c898c23d274..96fd66ed2742a79064852af6e936830d // this.updateMobSpawningFlags(); worldserver.setSpawnSettings(this.isSpawningMonsters(), this.isSpawningAnimals()); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 3b7eea628d0b839900145b326a85733e9fec8aa0..f6d5b6e6ae6699de177ef5fca385bb27ccae70b1 100644 +index 45a6277c93f6d6370442664a8777b08977df0a6b..de4a35992002b962f680d3c43daf51f87f91fef0 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1883,12 +1883,84 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1893,12 +1893,84 @@ public class ServerLevel extends Level implements WorldGenLevel { return ((MapIndex) this.getServer().overworld().getDataStorage().computeIfAbsent(MapIndex.factory(), "idcounts")).getFreeAuxValueForMap(); } diff --git a/patches/server/0361-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch b/patches/server/0361-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch index 88a6fb43d..e76e1900f 100644 --- a/patches/server/0361-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch +++ b/patches/server/0361-Prevent-Double-PlayerChunkMap-adds-crashing-server.patch @@ -25,10 +25,10 @@ index bd15131b7506e965bcf64be20330731256a1e1f0..0e3c89b9d75160d0e8947d042a1568da EntityType entitytypes = entity.getType(); int i = entitytypes.clientTrackingRange() * 16; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 321f90a0ad7cdd3b0e8b136682947a467f2388b9..86015c6b289ce6fb6b9d1b0ca3f637e53192eea3 100644 +index 8b34c951a56832cb67f51235d3e94643dd1820c4..3bfab189f3c81b086712b85ab1d4dd3209a3f6b8 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2500,7 +2500,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2510,7 +2510,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public void onTrackingStart(Entity entity) { org.spigotmc.AsyncCatcher.catchOp("entity register"); // Spigot @@ -37,7 +37,7 @@ index 321f90a0ad7cdd3b0e8b136682947a467f2388b9..86015c6b289ce6fb6b9d1b0ca3f637e5 if (entity instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entity; -@@ -2535,6 +2535,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2545,6 +2545,7 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::add); entity.inWorld = true; // CraftBukkit - Mark entity as in world entity.valid = true; // CraftBukkit diff --git a/patches/server/0401-Maps-shouldn-t-load-chunks.patch b/patches/server/0401-Maps-shouldn-t-load-chunks.patch index ad607fc26..4c561b2a0 100644 --- a/patches/server/0401-Maps-shouldn-t-load-chunks.patch +++ b/patches/server/0401-Maps-shouldn-t-load-chunks.patch @@ -15,10 +15,10 @@ Previously maps would load all chunks in a certain radius depending on five ticks that movement occur in anyways. diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java -index 6b6132943123c209b4cb49c5aadd913f2a16837c..0e2aef26fb89a435da4907a530507a86c6caa746 100644 +index 5fadfa65b7db07648d88e53893e091024d120bed..e46ceae916f6396d96226db6d8e90bd29088f765 100644 --- a/src/main/java/net/minecraft/world/item/MapItem.java +++ b/src/main/java/net/minecraft/world/item/MapItem.java -@@ -134,9 +134,9 @@ public class MapItem extends ComplexItem { +@@ -126,9 +126,9 @@ public class MapItem extends ComplexItem { int j2 = (j / i + k1 - 64) * i; int k2 = (k / i + l1 - 64) * i; Multiset multiset = LinkedHashMultiset.create(); diff --git a/patches/server/0402-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch b/patches/server/0402-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch index f5095ceeb..2fe070866 100644 --- a/patches/server/0402-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch +++ b/patches/server/0402-Use-seed-based-lookup-for-Treasure-Maps-Fixes-lag-fr.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use seed based lookup for Treasure Maps - Fixes lag from diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java -index 0e2aef26fb89a435da4907a530507a86c6caa746..b27a464cecb0efc2656d85e3c546f262e79de9a4 100644 +index e46ceae916f6396d96226db6d8e90bd29088f765..d4b4da03dcd98336a15eaa045d6b0ce361b15b76 100644 --- a/src/main/java/net/minecraft/world/item/MapItem.java +++ b/src/main/java/net/minecraft/world/item/MapItem.java -@@ -250,14 +250,13 @@ public class MapItem extends ComplexItem { +@@ -242,14 +242,13 @@ public class MapItem extends ComplexItem { boolean[] aboolean = new boolean[16384]; int l = j / i - 64; int i1 = k / i - 64; diff --git a/patches/server/0444-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0444-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index ee513cdee..43a763325 100644 --- a/patches/server/0444-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0444-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 93a60c6dcbe29637e96aa57a76a5ceb544495fb5..8ee66b28ee350564f0595541b904d593a6e3c8d5 100644 +index 17802108f41c98b77c89922451ee56b5ba2dcde2..0bd086f67f5d1f06f66499ae961c71e780a8290a 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2020,9 +2020,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2030,9 +2030,11 @@ public class ServerLevel extends Level implements WorldGenLevel { public void setDefaultSpawnPos(BlockPos pos, float angle) { // Paper - configurable spawn radius BlockPos prevSpawn = this.getSharedSpawnPos(); diff --git a/patches/server/0524-Remove-stale-POIs.patch b/patches/server/0524-Remove-stale-POIs.patch index 7caaa1657..bea67cb13 100644 --- a/patches/server/0524-Remove-stale-POIs.patch +++ b/patches/server/0524-Remove-stale-POIs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove stale POIs diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 6b5f325f847c096a4092ef3591627b21246601a0..0b321185ed39bfa056298a1ddfb157b73c4ffa03 100644 +index 0fa23738e2a095f55960ebbcfe3198d4feff4b01..7b97230bfffd6cac128330cdfe451a62f0427a11 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2089,6 +2089,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2099,6 +2099,11 @@ public class ServerLevel extends Level implements WorldGenLevel { }); optional1.ifPresent((holder) -> { this.getServer().execute(() -> { diff --git a/patches/server/0621-Missing-Entity-API.patch b/patches/server/0621-Missing-Entity-API.patch index 6eadc3711..8961700c0 100644 --- a/patches/server/0621-Missing-Entity-API.patch +++ b/patches/server/0621-Missing-Entity-API.patch @@ -541,11 +541,11 @@ index cfff1be6a4a4936a2dadb2590abc3d33c123d048..3dac93b0ab5d5acf5b33dc4b0efed603 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java -index 94be7d7d88b38d73592a6a76ee9b9b755ba6c588..6c9531c018be29b5794d047b50007fde1b50b494 100644 +index b49d1e5c7389e1c2ccfe3a196b5325e5f5b190e7..0ccc20157fb9fdb9c99b942dcb4675db5f928b23 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java -@@ -64,4 +64,26 @@ public class CraftCat extends CraftTameableAnimal implements Cat { - .byId(bukkit.ordinal()); +@@ -66,4 +66,26 @@ public class CraftCat extends CraftTameableAnimal implements Cat { + return registry.get(CraftNamespacedKey.toMinecraft(bukkit.getKey())); } } + diff --git a/patches/server/0634-Fix-incosistency-issue-with-empty-map-items-in-CB.patch b/patches/server/0634-Fix-incosistency-issue-with-empty-map-items-in-CB.patch index d31acf438..d2553b189 100644 --- a/patches/server/0634-Fix-incosistency-issue-with-empty-map-items-in-CB.patch +++ b/patches/server/0634-Fix-incosistency-issue-with-empty-map-items-in-CB.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix incosistency issue with empty map items in CB diff --git a/src/main/java/net/minecraft/world/item/MapItem.java b/src/main/java/net/minecraft/world/item/MapItem.java -index b27a464cecb0efc2656d85e3c546f262e79de9a4..cd841f027edbe7e000d633034a2aa6a214c20b5b 100644 +index d4b4da03dcd98336a15eaa045d6b0ce361b15b76..797415866a7f182d804f6b8e57ceb07a6ac2a20a 100644 --- a/src/main/java/net/minecraft/world/item/MapItem.java +++ b/src/main/java/net/minecraft/world/item/MapItem.java -@@ -73,7 +73,7 @@ public class MapItem extends ComplexItem { +@@ -69,7 +69,7 @@ public class MapItem extends ComplexItem { public static Integer getMapId(ItemStack stack) { CompoundTag nbttagcompound = stack.getTag(); diff --git a/patches/server/0692-Fix-merchant-inventory-not-closing-on-entity-removal.patch b/patches/server/0692-Fix-merchant-inventory-not-closing-on-entity-removal.patch index 11b3f65cb..0542a5f89 100644 --- a/patches/server/0692-Fix-merchant-inventory-not-closing-on-entity-removal.patch +++ b/patches/server/0692-Fix-merchant-inventory-not-closing-on-entity-removal.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix merchant inventory not closing on entity removal diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a3ef919ff07655e835a1b423b3d4f71939a47db8..fa4a6f519a4611fe896210a97aeb334e1fae039d 100644 +index 424d6fee9f5663371082fce4e23b6dc9282a591f..9d17813757f968624231b53aa1f895f5d25ab5d8 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2682,6 +2682,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2692,6 +2692,11 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot end // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message diff --git a/patches/server/0742-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch b/patches/server/0742-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch new file mode 100644 index 000000000..08a8876b5 --- /dev/null +++ b/patches/server/0742-Add-missing-IAE-check-for-PersistentDataContainer-ha.patch @@ -0,0 +1,18 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: u9g +Date: Mon, 3 Jan 2022 23:32:42 -0500 +Subject: [PATCH] Add missing IAE check for PersistentDataContainer#has + + +diff --git a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java +index 268563389077f92921411e866ec26e312e33ee23..43545bac94fbf118a982b654fbe0d6afc6e25897 100644 +--- a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java ++++ b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java +@@ -56,6 +56,7 @@ public class CraftPersistentDataContainer implements PersistentDataContainer { + + @Override + public boolean has(NamespacedKey key) { ++ Preconditions.checkArgument(key != null, "The provided key for the custom value was null"); // Paper + return this.customDataTags.get(key.toString()) != null; + } + diff --git a/patches/server/0742-Add-new-overload-to-PersistentDataContainer-has.patch b/patches/server/0742-Add-new-overload-to-PersistentDataContainer-has.patch deleted file mode 100644 index ad9460d01..000000000 --- a/patches/server/0742-Add-new-overload-to-PersistentDataContainer-has.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: u9g -Date: Mon, 3 Jan 2022 23:32:42 -0500 -Subject: [PATCH] Add new overload to PersistentDataContainer#has - -Adds the new overload: PersistentDataContainer#has(NamespacedKey key) - -diff --git a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java -index ae5091433fd605c46b9c57f07114923918fad506..390d5843233d26b76f90651f49a2a1d68c0aa67f 100644 ---- a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java -+++ b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java -@@ -161,5 +161,12 @@ public class CraftPersistentDataContainer implements PersistentDataContainer { - public void clear() { - this.customDataTags.clear(); - } -+ -+ @Override -+ public boolean has(NamespacedKey key) { -+ Preconditions.checkArgument(key != null, "The provided key for the custom value was null"); -+ -+ return this.customDataTags.containsKey(key.toString()); -+ } - // Paper end - } diff --git a/patches/server/0801-Don-t-tick-markers.patch b/patches/server/0801-Don-t-tick-markers.patch index 18a68e85c..fa030b09e 100644 --- a/patches/server/0801-Don-t-tick-markers.patch +++ b/patches/server/0801-Don-t-tick-markers.patch @@ -23,10 +23,10 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af97115157147 } }); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index fa4a6f519a4611fe896210a97aeb334e1fae039d..91fdab7fc3afacfa58e91d5714f6bf7c3359278a 100644 +index 9d17813757f968624231b53aa1f895f5d25ab5d8..a96aa3568453aa2da8b5cd5b269fc0b3fec13938 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2591,6 +2591,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2601,6 +2601,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } public void onTickingStart(Entity entity) { diff --git a/patches/server/0811-Add-Alternate-Current-redstone-implementation.patch b/patches/server/0811-Add-Alternate-Current-redstone-implementation.patch index 5d52a6fab..41f7096da 100644 --- a/patches/server/0811-Add-Alternate-Current-redstone-implementation.patch +++ b/patches/server/0811-Add-Alternate-Current-redstone-implementation.patch @@ -2008,7 +2008,7 @@ index 0000000000000000000000000000000000000000..33cd90c30c22200a4e1ae64f40a0bf78 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 91fdab7fc3afacfa58e91d5714f6bf7c3359278a..a30bc2fd80439f65d3dcfcdcfa3d3b71b737afaf 100644 +index a96aa3568453aa2da8b5cd5b269fc0b3fec13938..4cf7e66dfee34a29894f53d17e7e13c46fb4b85e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -224,6 +224,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2019,7 +2019,7 @@ index 91fdab7fc3afacfa58e91d5714f6bf7c3359278a..a30bc2fd80439f65d3dcfcdcfa3d3b71 public static Throwable getAddToWorldStackTrace(Entity entity) { final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date()); io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr); -@@ -2580,6 +2581,13 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2590,6 +2591,13 @@ public class ServerLevel extends Level implements WorldGenLevel { return crashreportsystemdetails; } diff --git a/patches/server/0842-Added-byte-array-serialization-deserialization-for-P.patch b/patches/server/0842-Added-byte-array-serialization-deserialization-for-P.patch index 3e6734569..03ee24974 100644 --- a/patches/server/0842-Added-byte-array-serialization-deserialization-for-P.patch +++ b/patches/server/0842-Added-byte-array-serialization-deserialization-for-P.patch @@ -6,33 +6,34 @@ Subject: [PATCH] Added byte array serialization/deserialization for diff --git a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java -index 390d5843233d26b76f90651f49a2a1d68c0aa67f..3351962e85438ed05215ce0d159799ed4707afde 100644 +index 43545bac94fbf118a982b654fbe0d6afc6e25897..416d2ca909d30e267fb97082a0aaac90444510de 100644 --- a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java -@@ -168,5 +168,26 @@ public class CraftPersistentDataContainer implements PersistentDataContainer { - - return this.customDataTags.containsKey(key.toString()); +@@ -180,4 +180,27 @@ public class CraftPersistentDataContainer implements PersistentDataContainer { + this.customDataTags.clear(); } + // Paper end + ++ // Paper start - byte array serialization + @Override + public byte[] serializeToBytes() throws java.io.IOException { -+ net.minecraft.nbt.CompoundTag root = this.toTagCompound(); -+ java.io.ByteArrayOutputStream byteArrayOutput = new java.io.ByteArrayOutputStream(); -+ try (java.io.DataOutputStream dataOutput = new java.io.DataOutputStream(byteArrayOutput)) { ++ final net.minecraft.nbt.CompoundTag root = this.toTagCompound(); ++ final java.io.ByteArrayOutputStream byteArrayOutput = new java.io.ByteArrayOutputStream(); ++ try (final java.io.DataOutputStream dataOutput = new java.io.DataOutputStream(byteArrayOutput)) { + net.minecraft.nbt.NbtIo.write(root, dataOutput); + return byteArrayOutput.toByteArray(); + } + } + + @Override -+ public void readFromBytes(byte[] bytes, boolean clear) throws java.io.IOException { ++ public void readFromBytes(final byte[] bytes, final boolean clear) throws java.io.IOException { + if (clear) { + this.clear(); + } -+ try (java.io.DataInputStream dataInput = new java.io.DataInputStream(new java.io.ByteArrayInputStream(bytes))) { -+ net.minecraft.nbt.CompoundTag compound = net.minecraft.nbt.NbtIo.read(dataInput); ++ try (final java.io.DataInputStream dataInput = new java.io.DataInputStream(new java.io.ByteArrayInputStream(bytes))) { ++ final net.minecraft.nbt.CompoundTag compound = net.minecraft.nbt.NbtIo.read(dataInput); + this.putAll(compound); + } + } - // Paper end ++ // Paper end - byte array serialization } diff --git a/patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch b/patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch index b86bc6ba9..9a1368060 100644 --- a/patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch +++ b/patches/server/0851-Remove-unnecessary-onTrackingStart-during-navigation.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index ac9f42e8d88ca8cdb2882bd8d7676a793024599c..ab8c8643c48f6ac49f4b73eed6462cd62482b269 100644 +index 66eecf5155f8f526480511d2b3af1b6f87280474..22dd14b715f91c7771411a5375cf470fc2c940d5 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2627,7 +2627,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2637,7 +2637,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (entity instanceof Mob) { Mob entityinsentient = (Mob) entity; @@ -17,7 +17,7 @@ index ac9f42e8d88ca8cdb2882bd8d7676a793024599c..ab8c8643c48f6ac49f4b73eed6462cd6 String s = "onTrackingStart called during navigation iteration"; Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration")); -@@ -2713,7 +2713,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2723,7 +2723,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (entity instanceof Mob) { Mob entityinsentient = (Mob) entity; diff --git a/patches/server/0876-check-global-player-list-where-appropriate.patch b/patches/server/0876-check-global-player-list-where-appropriate.patch index d8d6a85a6..16808c971 100644 --- a/patches/server/0876-check-global-player-list-where-appropriate.patch +++ b/patches/server/0876-check-global-player-list-where-appropriate.patch @@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player instead of just checking players in their world. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index ab8c8643c48f6ac49f4b73eed6462cd62482b269..b3ffc58db60cbe0591086c3768ae6009ca7017c7 100644 +index 22dd14b715f91c7771411a5375cf470fc2c940d5..c04ba20ba3f07e96fba1697f17e36c47aae5fabf 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2750,4 +2750,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2760,4 +2760,12 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::move); } } diff --git a/patches/server/0995-Deep-clone-unhandled-nbt-tags.patch b/patches/server/0995-Deep-clone-unhandled-nbt-tags.patch index 06631c156..73640d521 100644 --- a/patches/server/0995-Deep-clone-unhandled-nbt-tags.patch +++ b/patches/server/0995-Deep-clone-unhandled-nbt-tags.patch @@ -44,18 +44,19 @@ index 039197efb05432b8139fbabe92338572c1bf078e..8762a7a22723150a1a42b3459f3744b8 clone.unbreakable = this.unbreakable; clone.damage = this.damage; diff --git a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java -index 3351962e85438ed05215ce0d159799ed4707afde..8d5789cc6001fdf68c2d3f7ee3dd8fcafb9c831f 100644 +index 416d2ca909d30e267fb97082a0aaac90444510de..9d61756689d1f5a71bcdb3ae4859cb0a60e7d850 100644 --- a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java +++ b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java -@@ -189,5 +189,11 @@ public class CraftPersistentDataContainer implements PersistentDataContainer { - this.putAll(compound); +@@ -203,4 +203,12 @@ public class CraftPersistentDataContainer implements PersistentDataContainer { } } + // Paper end - byte array serialization + ++ // Paper start - deep clone tags + public Map getTagsCloned() { + final Map tags = new HashMap<>(); + this.customDataTags.forEach((key, tag) -> tags.put(key, tag.copy())); + return tags; + } - // Paper end ++ // Paper end - deep clone tags } diff --git a/patches/server/1025-Fix-missing-map-initialize-event-call.patch b/patches/server/1025-Fix-missing-map-initialize-event-call.patch index 6b6864c31..cb7ba8687 100644 --- a/patches/server/1025-Fix-missing-map-initialize-event-call.patch +++ b/patches/server/1025-Fix-missing-map-initialize-event-call.patch @@ -3,16 +3,21 @@ From: Warrior <50800980+Warriorrrr@users.noreply.github.com> Date: Sun, 24 Sep 2023 18:35:28 +0200 Subject: [PATCH] Fix missing map initialize event call +== AT == +public net.minecraft.world.level.storage.DimensionDataStorage readSavedData(Ljava/util/function/Function;Lnet/minecraft/util/datafix/DataFixTypes;Ljava/lang/String;)Lnet/minecraft/world/level/saveddata/SavedData; diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 82e5a780c993991c00264f7874ccc7f333f3f590..f4d53d9bfe5b060158f69b5d9e4533a5b9869eed 100644 +index 8f85aafb181cadd2983b0f3735782729858226c6..b78a9628a88f2a495ef6de74446a02a14d41a1f6 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2129,7 +2129,23 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2129,13 +2129,25 @@ public class ServerLevel extends Level implements WorldGenLevel { @Nullable @Override public MapItemSavedData getMapData(String id) { -- return (MapItemSavedData) this.getServer().overworld().getDataStorage().get(MapItemSavedData.factory(), id); +- // CraftBukkit start +- MapItemSavedData worldmap = (MapItemSavedData) this.getServer().overworld().getDataStorage().get(MapItemSavedData.factory(), id); +- if (worldmap != null) { +- worldmap.id = id; + // Paper start - Call missing map initialize event & set id + final DimensionDataStorage storage = this.getServer().overworld().getDataStorage(); + @@ -26,23 +31,14 @@ index 82e5a780c993991c00264f7874ccc7f333f3f590..f4d53d9bfe5b060158f69b5d9e4533a5 + new MapInitializeEvent(map.mapView).callEvent(); + return map; + } -+ } ++ } else if (existing instanceof MapItemSavedData mapItemSavedData) { ++ mapItemSavedData.id = id; + } +- return worldmap; +- // CraftBukkit end + + return existing instanceof MapItemSavedData data ? data : null; + // Paper end } @Override -diff --git a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java -index 1aea6a257ffceb511368a6e8dee5051e120894ad..269c81cd60d98a94721c77d700af223bda15a61a 100644 ---- a/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java -+++ b/src/main/java/net/minecraft/world/level/storage/DimensionDataStorage.java -@@ -58,7 +58,7 @@ public class DimensionDataStorage { - } - - @Nullable -- private T readSavedData(Function readFunction, DataFixTypes dataFixTypes, String id) { -+ public T readSavedData(Function readFunction, DataFixTypes dataFixTypes, String id) { // Paper - try { - File file = this.getDataFile(id); - if (file.exists()) { diff --git a/work/Bukkit b/work/Bukkit index cdfe62e47..01bb6ba7d 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit cdfe62e472085016a8225f356eec9efede9d8b5a +Subproject commit 01bb6ba7d0add97af46db9ae8c2c991912033aa7 diff --git a/work/CraftBukkit b/work/CraftBukkit index 51eea725f..cb2ea54de 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 51eea725f7b2b683ce04c7d2aeb76705086d78e6 +Subproject commit cb2ea54def89e749d9d1f6a4a7ea029110f03a43