From ac554ad46dabb20bbfee5f3b576baa53485b2ac7 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Sat, 11 May 2024 14:48:37 -0700 Subject: [PATCH] Updated Upstream (Bukkit/CraftBukkit) (#10691) 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: fa99e752 PR-1007: Add ItemMeta#getAsComponentString() 94a91782 Fix copy-pasted BlockType.Typed documentation 9b34ac8c Largely restore deprecated PotionData API 51a6449b PR-1008: Deprecate ITEMS_TOOLS, removed in 1.20.5 702d15fe Fix Javadoc reference 42f6cdf4 PR-919: Add internal ItemType and BlockType, delegate Material methods to them 237bb37b SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent 035ea146 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it 8c7880fb PR-1004: Improve field rename handling and centralize conversion between bukkit and string more 87c90e93 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent CraftBukkit Changes: 4af0f22e8 SPIGOT-7664: Item meta should prevail over block states c2ccc46ec SPIGOT-7666: Fix access to llama and horse special slot 124ac66d7 SPIGOT-7665: Fix ThrownPotion#getEffects() implementation only bringing custom effects 66f1f439a Restore null page behaviour of signed books even though not strictly allowed by API 6118e5398 Fix regression listening to minecraft:brand custom payloads c1a26b366 Fix unnecessary and potential not thread-safe chat visibility check 12360a7ec Remove unused imports 147b098b4 PR-1397: Add ItemMeta#getAsComponentString() 428aefe0e Largely restore deprecated PotionData API afe5b5ee9 PR-1275: Add internal ItemType and BlockType, delegate Material methods to them 8afeafa7d SPIGOT-1166, SPIGOT-7647: Expose Damager BlockState in EntityDamageByBlockEvent 4e7d749d4 SPIGOT-6993: Allow #setVelocity to change the speed of a fireball and add a note to #setDirection about it 441880757 Support both entity_data and bucket_entity_data on axolotl/fish buckets 0e22fdd1e Fix custom direct BlockState being not correctly set in DamageSource f2182ed47 SPIGOT-7659: TropicalFishBucketMeta should use BUCKET_ENTITY_DATA 2a6207fe1 PR-1393: Improve field rename handling and centralize conversion between bukkit and string more c024a5039 SPIGOT-7650: Add DamageSource for EntityDeathEvent and PlayerDeathEvent 741b84480 PR-1390: Improve internal handling of damage sources 0364df4e1 SPIGOT-7657: Error when loading angry entities --- patches/api/0004-Code-Generation.patch | 17 +- patches/api/0006-Adventure.patch | 60 ++--- patches/api/0009-Paper-Plugins.patch | 9 +- patches/api/0011-Timings-v2.patch | 4 +- patches/api/0015-Version-Command-2.0.patch | 4 +- patches/api/0056-Fix-upstream-javadocs.patch | 43 +++- .../api/0066-Add-getI18NDisplayName-API.patch | 6 +- .../0067-ensureServerConversions-API.patch | 8 +- .../api/0087-Add-ArmorStand-Item-Meta.patch | 13 + .../api/0106-PotionEffect-clone-methods.patch | 4 +- ...0108-ItemStack-getMaxItemUseDuration.patch | 4 +- ...PI-additions-for-quantity-flags-lore.patch | 22 +- patches/api/0146-Improve-death-events.patch | 15 +- patches/api/0152-Material-API-additions.patch | 6 +- .../0172-Fix-Spigot-annotation-mistakes.patch | 44 ++-- ...0174-PlayerDeathEvent-getItemsToKeep.patch | 12 +- ...layerDeathEvent-shouldDropExperience.patch | 28 +-- ...Add-Raw-Byte-ItemStack-Serialization.patch | 8 +- .../0200-Support-components-in-ItemMeta.patch | 10 +- ...-Add-methods-to-get-translation-keys.patch | 18 +- ...y-Counter-to-allow-plugins-to-use-va.patch | 4 +- ...gistryAccess-for-managing-registries.patch | 36 ++- .../api/0244-Add-StructuresLocateEvent.patch | 4 +- ...atch => 0256-Add-worldborder-events.patch} | 0 ...Cache-the-result-of-Material-isBlock.patch | 38 --- ...=> 0257-added-PlayerNameEntityEvent.patch} | 0 ...h => 0258-Add-recipe-to-cook-events.patch} | 0 ...patch => 0259-Add-Block-isValidTool.patch} | 0 ....patch => 0260-Expand-world-key-API.patch} | 8 +- ...tch => 0261-Improve-Item-Rarity-API.patch} | 8 +- ...tch => 0262-Expose-protocol-version.patch} | 4 +- ...add-isDeeplySleeping-to-HumanEntity.patch} | 0 ...add-consumeFuel-to-FurnaceBurnEvent.patch} | 0 ...-set-drop-chance-to-EntityEquipment.patch} | 0 ... => 0266-Added-PlayerDeepSleepEvent.patch} | 0 ...ld-API.patch => 0267-More-World-API.patch} | 0 ... 0268-Added-PlayerBedFailEnterEvent.patch} | 0 ...acon-activation-deactivation-events.patch} | 0 ...> 0270-PlayerMoveEvent-Improvements.patch} | 0 ...-RespawnFlags-to-PlayerRespawnEvent.patch} | 0 ...> 0272-Add-more-WanderingTrader-API.patch} | 0 ...dd-EntityBlockStorage-clearEntities.patch} | 0 ...ssage-to-PlayerAdvancementDoneEvent.patch} | 0 ...close.patch => 0275-Inventory-close.patch} | 0 ...-in-sunlight-API-for-Phantoms-and-S.patch} | 0 ...atch => 0277-Add-basic-Datapack-API.patch} | 4 +- ...itions-to-PlayerGameModeChangeEvent.patch} | 0 ... => 0279-ItemStack-repair-check-API.patch} | 8 +- ....patch => 0280-More-Enchantment-API.patch} | 0 ...PI.patch => 0281-Add-Mob-lookAt-API.patch} | 0 ...ta.patch => 0282-ItemStack-editMeta.patch} | 4 +- ... => 0283-Add-EntityInsideBlockEvent.patch} | 0 ...84-Attributes-API-for-item-defaults.patch} | 4 +- ...ause-to-Weather-ThunderChangeEvents.patch} | 0 ...patch => 0286-More-Lidded-Block-API.patch} | 0 ... => 0287-Add-PlayerKickEvent-causes.patch} | 0 ...0288-Add-PufferFishStateChangeEvent.patch} | 0 ...h => 0289-Add-BellRevealRaiderEvent.patch} | 0 ...90-Add-ElderGuardianAppearanceEvent.patch} | 0 ...0291-Add-more-line-of-sight-methods.patch} | 0 ... => 0292-Add-WaterBottleSplashEvent.patch} | 0 ... => 0293-Add-more-LimitedRegion-API.patch} | 0 ...PI.patch => 0294-Missing-Entity-API.patch} | 8 +- ...ch => 0295-Adds-PlayerArmSwingEvent.patch} | 0 ...dd-PlayerSignCommandPreprocessEvent.patch} | 0 ...array-elements-in-command-arguments.patch} | 0 ...inger-API.patch => 0298-Stinger-API.patch} | 0 ...-to-contain-the-source-jars-in-stac.patch} | 0 ...tch => 0300-Add-PlayerSetSpawnEvent.patch} | 0 ...=> 0301-Added-EntityDamageItemEvent.patch} | 0 ...Make-EntityUnleashEvent-cancellable.patch} | 0 ...arget-without-changing-other-things.patch} | 0 ...ch => 0304-Add-BlockBreakBlockEvent.patch} | 0 ...pers-for-left-right-click-to-Action.patch} | 0 ...-data-components-copy-in-smithing-r.patch} | 0 ...patch => 0307-More-CommandBlock-API.patch} | 0 ...-missing-team-sidebar-display-slots.patch} | 0 ...0309-add-back-EntityPortalExitEvent.patch} | 0 ...-find-targets-for-lightning-strikes.patch} | 0 ... 0311-Get-entity-default-attributes.patch} | 4 +- ...d-API.patch => 0312-Left-handed-API.patch} | 0 ...tch => 0313-Add-critical-damage-API.patch} | 0 ...ch => 0314-Add-more-advancement-API.patch} | 0 ...0315-Fix-issues-with-mob-conversion.patch} | 0 ...ollidable-methods-to-various-places.patch} | 8 +- ...-ram-API.patch => 0317-Goat-ram-API.patch} | 0 ...dd-API-for-resetting-a-single-score.patch} | 0 ...9-Add-Raw-Byte-Entity-Serialization.patch} | 4 +- ...0320-Add-PlayerItemFrameChangeEvent.patch} | 0 ...low-delegation-to-vanilla-chunk-gen.patch} | 4 +- ...patch => 0322-Add-more-Campfire-API.patch} | 0 ...eCollisionEvent-move-HandlerList-up.patch} | 0 ... => 0324-Improve-scoreboard-entries.patch} | 0 ...ch => 0325-Entity-powdered-snow-API.patch} | 0 ...0326-Add-API-for-item-entity-health.patch} | 0 ...-canSmelt-methods-to-FurnaceInvento.patch} | 0 ...le-API.patch => 0328-Bucketable-API.patch} | 0 ...-for-default-config-comment-parsing.patch} | 0 ...anilla-BiomeProvider-from-WorldInfo.patch} | 0 ...1-Multiple-Entries-with-Scoreboards.patch} | 0 ...n-strange-EventHandler-return-types.patch} | 0 ...atch => 0333-Multi-Block-Change-API.patch} | 0 ...ent.patch => 0334-Fix-NotePlayEvent.patch} | 0 ....patch => 0335-Freeze-Tick-Lock-API.patch} | 0 ...lphin-API.patch => 0336-Dolphin-API.patch} | 0 ...h => 0337-More-PotionEffectType-API.patch} | 4 +- ...command-sender-which-forwards-feedb.patch} | 4 +- ...h => 0339-Implement-regenerateChunk.patch} | 0 ...gs.patch => 0340-Add-GameEvent-tags.patch} | 4 +- ...tch => 0341-Furnace-RecipesUsed-API.patch} | 0 ...gurable-sculk-sensor-listener-range.patch} | 0 ...d-missing-block-data-mins-and-maxes.patch} | 0 ...s.patch => 0344-Custom-Potion-Mixes.patch} | 0 ...Expose-furnace-minecart-push-values.patch} | 0 ...I.patch => 0346-More-Projectile-API.patch} | 0 ...ch => 0347-Add-getComputedBiome-API.patch} | 0 ...h => 0348-Add-enchantWithLevels-API.patch} | 6 +- ... 0349-Add-TameableDeathMessageEvent.patch} | 0 ...hange-the-podium-of-the-EnderDragon.patch} | 0 ...-blockstate-in-EntityBreakDoorEvent.patch} | 0 ...ing-amount-to-PlayerItemDamageEvent.patch} | 0 ...> 0353-WorldCreator-keepSpawnLoaded.patch} | 0 ...Event-and-CollarColorable-interface.patch} | 0 ...> 0355-Add-PlayerStopUsingItemEvent.patch} | 0 ...tch => 0356-Expand-FallingBlock-API.patch} | 0 ...dd-method-isTickingWorlds-to-Bukkit.patch} | 4 +- ... => 0358-Add-WardenAngerChangeEvent.patch} | 0 ...I.patch => 0359-Nameable-Banner-API.patch} | 0 ...atch => 0360-Add-Player-getFishHook.patch} | 0 ...API.patch => 0361-More-Teleport-API.patch} | 0 ... => 0362-Add-EntityPortalReadyEvent.patch} | 0 ...tom-Chat-Completion-Suggestions-API.patch} | 0 ...ion-API.patch => 0364-Collision-API.patch} | 0 ...API.patch => 0365-Block-Ticking-API.patch} | 0 ...366-Add-NamespacedKey-biome-methods.patch} | 4 +- ...o-load-resources-from-LibraryLoader.patch} | 0 ...serialization-deserialization-for-P.patch} | 0 ...rameter-to-ProjectileSource-launchP.patch} | 0 ...limit-in-YamlConfigOptions-and-incr.patch} | 0 ... => 0371-Add-getDrops-to-BlockState.patch} | 0 ...-Add-PlayerInventorySlotChangeEvent.patch} | 0 ... 0373-Elder-Guardian-appearance-API.patch} | 0 ...ow-changing-bed-s-occupied-property.patch} | 0 ...d-EquipmentSlot-convenience-methods.patch} | 2 +- ...swingHand-EquipmentSlot-convenience.patch} | 0 ...ch => 0377-Add-entity-knockback-API.patch} | 0 ... => 0378-Added-EntityToggleSitEvent.patch} | 0 ...patch => 0379-Add-Moving-Piston-API.patch} | 0 ...0380-Add-PrePlayerAttackEntityEvent.patch} | 0 ... 0381-Add-Player-Warden-Warning-API.patch} | 0 ...a-friendly-methods-to-update-trades.patch} | 0 ...383-Add-paper-dumplisteners-command.patch} | 0 ....patch => 0384-ItemStack-damage-API.patch} | 4 +- ...patch => 0385-Add-Tick-TemporalUnit.patch} | 0 ...tion-API.patch => 0386-Friction-API.patch} | 0 ... 0387-Player-Entity-Tracking-Events.patch} | 0 ...atch => 0388-Add-missing-Fluid-type.patch} | 0 ...ments.patch => 0389-fix-Instruments.patch} | 0 ...tch => 0390-Add-BlockLockCheckEvent.patch} | 0 ... 0391-Add-Sneaking-API-for-Entities.patch} | 0 ....patch => 0392-Improve-PortalEvents.patch} | 0 ...atch => 0393-Flying-Fall-Damage-API.patch} | 0 ...ck-state-to-EntityDamageByBlockEvent.patch | 83 ------- ...eplace-ItemFlag.HIDE_POTION_EFFECTS.patch} | 0 ...en-API.patch => 0395-Win-Screen-API.patch} | 0 ...tch => 0396-Add-Entity-Body-Yaw-API.patch} | 0 ...or-InventoryBlockStartEvent-subclas.patch} | 0 ...=> 0398-Add-EntityFertilizeEggEvent.patch} | 0 ...temEvent-and-EntityCompostItemEvent.patch} | 0 ...API.patch => 0400-Add-Shearable-API.patch} | 0 ...Fix-SpawnEggMeta-get-setSpawnedType.patch} | 0 ... 0402-Add-Mob-Experience-reward-API.patch} | 0 ... => 0403-Expand-PlayerItemMendEvent.patch} | 0 ... => 0404-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 ...8-Add-event-for-player-editing-sign.patch} | 0 ...409-Add-Sign-getInteractableSideFor.patch} | 0 ...t-API.patch => 0410-Fix-BanList-API.patch} | 0 ....patch => 0411-Add-whitelist-events.patch} | 0 ...API-for-updating-recipes-on-clients.patch} | 4 +- ...tch => 0413-Add-PlayerFailMoveEvent.patch} | 0 ...-custom-statistic-criteria-creation.patch} | 4 +- ...tch => 0415-SculkCatalyst-bloom-API.patch} | 0 ...API-for-an-entity-s-scoreboard-name.patch} | 0 ...lace-methods-with-old-StructureType.patch} | 4 +- ... => 0418-Add-Listing-API-for-Player.patch} | 0 ...d-BlockFace-during-BlockDamageEvent.patch} | 0 ...h => 0420-Fix-NPE-on-Boat-getStatus.patch} | 0 ...e-API.patch => 0421-Expand-Pose-API.patch} | 0 ...MerchantRecipe-add-copy-constructor.patch} | 0 ...patch => 0423-More-DragonBattle-API.patch} | 0 ...tch => 0424-Add-PlayerPickItemEvent.patch} | 0 ...=> 0425-Allow-trident-custom-damage.patch} | 0 ...pose-hand-during-BlockCanBuildEvent.patch} | 0 ...t-setBurnTime-to-valid-short-values.patch} | 0 ... 0428-Add-OfflinePlayer-isConnected.patch} | 0 ...titleOverride-to-InventoryOpenEvent.patch} | 0 ...roper-checking-of-empty-item-stacks.patch} | 4 +- ...dItemsEvent-throwing-exception-when.patch} | 0 ...> 0432-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 ...436-Add-UUID-attribute-modifier-API.patch} | 0 ... => 0437-Expand-LingeringPotion-API.patch} | 0 ...y-durability-check-in-ItemStack-isS.patch} | 4 +- ...tch => 0439-Add-Structure-check-API.patch} | 0 ...dd-missing-Experimental-annotations.patch} | 44 ++-- ...tch => 0441-Add-more-scoreboard-API.patch} | 0 ...stry.patch => 0442-Improve-Registry.patch} | 10 +- ...h => 0443-Add-experience-points-API.patch} | 0 ...h => 0444-Add-missing-InventoryType.patch} | 0 ...h => 0445-Add-drops-to-shear-events.patch} | 0 ... => 0446-Add-HiddenPotionEffect-API.patch} | 20 +- ...> 0447-Add-PlayerShieldDisableEvent.patch} | 0 ...mpty-String-in-NamespacedKey.fromSt.patch} | 0 ...-Add-BlockStateMeta-clearBlockState.patch} | 2 +- ...50-Expose-LootTable-of-DecoratedPot.patch} | 0 ...h => 0451-Add-ShulkerDuplicateEvent.patch} | 0 ...dd-api-for-spawn-egg-texture-colors.patch} | 4 +- ... => 0453-Add-Lifecycle-Event-system.patch} | 4 +- ...patch => 0454-ItemStack-Tooltip-API.patch} | 10 +- ...Snapshot-includeLightData-parameter.patch} | 0 ...PI.patch => 0456-Add-FluidState-API.patch} | 0 ...patch => 0457-add-number-format-api.patch} | 0 ...patch => 0458-improve-BanList-types.patch} | 4 +- ...=> 0459-Suspicious-Effect-Entry-API.patch} | 0 ....patch => 0460-Fix-DamageSource-API.patch} | 0 ...I.patch => 0461-Expanded-Hopper-API.patch} | 0 ...tables-to-prevent-unexpected-issues.patch} | 0 ...3-Add-BlockBreakProgressUpdateEvent.patch} | 0 ...=> 0464-Deprecate-ItemStack-setType.patch} | 6 +- ...s.patch => 0465-Item-Mutation-Fixes.patch} | 0 ...> 0466-API-for-checking-sent-chunks.patch} | 0 ...ch => 0467-Add-CartographyItemEvent.patch} | 0 ...aid-API.patch => 0468-More-Raid-API.patch} | 0 ...0469-Fix-SpawnerEntry-Equipment-API.patch} | 0 ...emFlags.patch => 0470-Fix-ItemFlags.patch} | 4 +- ...ifying-library-loader-jars-bytecode.patch} | 0 ...0472-Add-hook-to-remap-library-jars.patch} | 0 ...=> 0473-Add-GameMode-isInvulnerable.patch} | 0 ...74-Expose-hasColor-to-leather-armor.patch} | 0 ...Add-missing-wind-charge-damage-type.patch} | 0 ...-API-to-get-player-ha-proxy-address.patch} | 0 ....patch => 0477-More-Chest-Block-API.patch} | 0 ...=> 0478-Brigadier-based-command-API.patch} | 0 patches/server/0005-Paper-config-files.patch | 4 +- patches/server/0008-CB-fixes.patch | 17 +- patches/server/0009-MC-Utils.patch | 20 +- patches/server/0010-Adventure.patch | 89 +++---- ...oleAppender-for-console-improvements.patch | 4 +- patches/server/0017-Paper-command.patch | 6 +- patches/server/0019-Paper-Plugins.patch | 16 +- patches/server/0020-Plugin-remapping.patch | 4 +- ...ion-calls-in-plugins-using-internals.patch | 10 +- patches/server/0023-Timings-v2.patch | 28 +-- ...025-Further-improve-server-tick-loop.patch | 4 +- ...-option-to-load-extra-plugin-jars-no.patch | 4 +- .../0027-Support-components-in-ItemMeta.patch | 10 +- ...ient-crashes-server-lists-and-Mojang.patch | 4 +- .../0035-Implement-Paper-VersionChecker.patch | 6 +- .../0037-Player-affects-spawning-API.patch | 4 +- ...038-Only-refresh-abilities-if-needed.patch | 4 +- ...51-Implement-PlayerLocaleChangeEvent.patch | 6 +- ...058-Improve-Player-chat-API-handling.patch | 8 +- .../0060-Expose-server-CommandMap.patch | 4 +- .../server/0064-Add-velocity-warnings.patch | 4 +- .../0070-Complete-resource-pack-API.patch | 4 +- ...ading-permissions.yml-before-plugins.patch | 6 +- ...llow-Reloading-of-Custom-Permissions.patch | 4 +- .../0073-Remove-Metadata-on-reload.patch | 4 +- ...074-Handle-Item-Meta-Inconsistencies.patch | 32 +-- ...th-absorb-values-and-repair-bad-data.patch | 6 +- ...0087-Add-PlayerUseUnknownEntityEvent.patch | 8 +- ...setting-for-proxy-online-mode-status.patch | 4 +- patches/server/0112-Add-EntityZapEvent.patch | 4 +- ...5-Allow-Reloading-of-Command-Aliases.patch | 4 +- ...6-Add-source-to-PlayerExpChangeEvent.patch | 4 +- .../0117-Add-ProjectileCollideEvent.patch | 6 +- ...-to-control-if-armor-stands-can-move.patch | 4 +- ...n-option-to-prevent-player-names-fro.patch | 4 +- .../server/0140-Basic-PlayerProfile-API.patch | 10 +- .../server/0141-Add-UnknownCommandEvent.patch | 4 +- ...46-Improve-the-Saddle-API-for-Horses.patch | 6 +- .../server/0165-AsyncTabCompleteEvent.patch | 6 +- .../0173-Add-ArmorStand-Item-Meta.patch | 17 +- .../server/0181-getPlayerUniqueId-API.patch | 4 +- ...85-Flag-to-disable-the-channel-limit.patch | 4 +- .../server/0196-WitchReadyPotionEvent.patch | 4 +- .../0212-InventoryCloseEvent-Reason-API.patch | 14 +- ...nventory-when-cancelling-PlayerInter.patch | 4 +- ...1-Vanished-players-don-t-have-rights.patch | 4 +- ...-Allow-disabling-armor-stand-ticking.patch | 4 +- ...dd-Early-Warning-Feature-to-WatchDog.patch | 6 +- ...239-Optimize-CraftBlockData-Creation.patch | 4 +- ...e-attack-cooldown-methods-for-Player.patch | 4 +- .../server/0247-Improve-death-events.patch | 73 +++--- ...ault-permission-message-configurable.patch | 4 +- ...-Replace-OfflinePlayer-getLastPlayed.patch | 10 +- .../0284-Limit-Client-Sign-length-more.patch | 4 +- ...298-Expose-the-internal-current-tick.patch | 4 +- ...-Add-tick-times-API-and-mspt-command.patch | 4 +- ...334-Expose-MinecraftServer-isRunning.patch | 4 +- ...Add-Raw-Byte-ItemStack-Serialization.patch | 6 +- ...item-duplication-and-teleport-issues.patch | 24 +- patches/server/0358-Expose-game-version.patch | 4 +- .../server/0360-misc-debugging-dumps.patch | 4 +- .../server/0362-Implement-Mob-Goal-API.patch | 6 +- ...6-Fix-PotionEffect-ignores-icon-flag.patch | 6 +- ...Wait-for-Async-Tasks-during-shutdown.patch | 4 +- .../0380-Add-PlayerRecipeBookClickEvent.patch | 4 +- ...ld-Difficulty-Remembering-Difficulty.patch | 10 +- ...-Plugin-Tickets-to-API-Chunk-Methods.patch | 6 +- ...nvert-legacy-attributes-in-Item-Meta.patch | 4 +- ...o-not-accept-invalid-client-settings.patch | 4 +- .../server/0393-Add-PrepareResultEvent.patch | 8 +- patches/server/0404-Brand-support.patch | 8 +- ...-Add-methods-to-get-translation-keys.patch | 4 +- .../0419-Cache-block-data-strings.patch | 19 +- ...y-Counter-to-allow-plugins-to-use-va.patch | 8 +- .../server/0431-Optimise-getType-calls.patch | 4 +- ...-Add-getOfflinePlayerIfCached-String.patch | 4 +- ...ix-client-lag-on-advancement-loading.patch | 4 +- ...r-spawnParticle-x-y-z-precision-loss.patch | 4 +- .../server/0455-Limit-recipe-packets.patch | 4 +- .../0477-Add-BlockFailedDispenseEvent.patch | 4 +- ...gistryAccess-for-managing-Registries.patch | 225 +++++++++++++----- .../0486-Add-StructuresLocateEvent.patch | 4 +- .../0492-Add-BlockPreDispenseEvent.patch | 4 +- .../0496-Expand-EntityUnleashEvent.patch | 4 +- .../server/0515-Expand-world-key-API.patch | 14 +- .../server/0520-Expose-protocol-version.patch | 6 +- ...pawnEvent-fix-passed-parameter-issue.patch | 4 +- .../0541-Add-HiddenPotionEffect-API.patch | 6 +- .../server/0544-Add-basic-Datapack-API.patch | 8 +- ...546-Expand-PlayerGameModeChangeEvent.patch | 8 +- .../0547-ItemStack-repair-check-API.patch | 6 +- .../server/0548-More-Enchantment-API.patch | 6 +- .../0552-Add-Unix-domain-socket-support.patch | 4 +- ...0554-Fix-item-default-attributes-API.patch | 4 +- .../0558-Add-PlayerKickEvent-causes.patch | 14 +- patches/server/0573-Missing-Entity-API.patch | 10 +- .../0584-Add-System.out-err-catcher.patch | 4 +- ...d-missing-team-sidebar-display-slots.patch | 10 +- .../0602-Get-entity-default-attributes.patch | 6 +- .../server/0606-Add-critical-damage-API.patch | 16 +- ...Collidable-methods-to-various-places.patch | 6 +- ...11-Add-Raw-Byte-Entity-Serialization.patch | 6 +- ...aper-mobcaps-and-paper-playermobcaps.patch | 4 +- ...rnColor-on-tropical-fish-bucket-meta.patch | 4 +- ...llow-delegation-to-vanilla-chunk-gen.patch | 4 +- ...vanilla-BiomeProvider-from-WorldInfo.patch | 4 +- ...-command-sender-which-forwards-feedb.patch | 4 +- ...date-calls-to-CraftServer-getSpawnLi.patch | 4 +- patches/server/0682-Add-GameEvent-tags.patch | 6 +- ...o-worldlist-before-initing-the-world.patch | 4 +- patches/server/0690-Custom-Potion-Mixes.patch | 8 +- .../0701-Fix-saving-in-unloadWorld.patch | 4 +- ...lock-data-for-EntityChangeBlockEvent.patch | 4 +- patches/server/0707-cache-resource-keys.patch | 7 +- ...nt-tile-entity-copies-loading-chunks.patch | 4 +- .../0713-WorldCreator-keepSpawnLoaded.patch | 4 +- ...entity-loading-causing-async-lookups.patch | 16 +- ...n-on-world-create-while-being-ticked.patch | 8 +- ...broadcast-messages-to-command-blocks.patch | 4 +- ...2-Add-Velocity-IP-Forwarding-Support.patch | 4 +- ...0753-Add-NamespacedKey-biome-methods.patch | 6 +- .../0773-Elder-Guardian-appearance-API.patch | 4 +- .../0787-Add-Player-Warden-Warning-API.patch | 4 +- .../0805-Improve-logging-and-errors.patch | 6 +- patches/server/0810-Flying-Fall-Damage.patch | 4 +- ...ck-state-to-EntityDamageByBlockEvent.patch | 104 -------- ...onfig-for-disabling-entity-tag-tags.patch} | 0 ...e-player-info-update-packet-on-join.patch} | 4 +- ...k-items-during-EntityResurrectEvent.patch} | 2 +- ...en-API.patch => 0815-Win-Screen-API.patch} | 2 +- ...ItemStack-setAmount-null-assignment.patch} | 0 ...ix-force-opening-enchantment-tables.patch} | 0 ...tch => 0818-Add-Entity-Body-Yaw-API.patch} | 0 ...vent-sleeping-villagers-moving-towa.patch} | 0 ...=> 0820-Add-EntityFertilizeEggEvent.patch} | 6 +- ...ty-drop-not-updating-the-client-inv.patch} | 0 ...temEvent-and-EntityCompostItemEvent.patch} | 0 ...ctly-handle-ArmorStand-invisibility.patch} | 0 ...ancement-triggers-for-entity-damage.patch} | 2 +- ...825-Fix-text-display-error-on-spawn.patch} | 0 ...nventories-returning-null-Locations.patch} | 2 +- ...API.patch => 0827-Add-Shearable-API.patch} | 0 ...Fix-SpawnEggMeta-get-setSpawnedType.patch} | 2 +- ...g-to-bad-recipes-in-furnace-like-ti.patch} | 0 ...ence-violations-like-they-should-be.patch} | 2 +- ...uplicate-animate-packet-for-records.patch} | 0 ...xpired-keys-from-impacting-new-join.patch} | 4 +- ...ts-being-fired-from-unloaded-chunks.patch} | 2 +- ...0834-Use-array-for-gamerule-storage.patch} | 0 ...Fix-a-couple-of-upstream-bed-issues.patch} | 2 +- ...ix-demo-flag-not-enabling-demo-mode.patch} | 0 ... 0837-Add-Mob-Experience-reward-API.patch} | 0 ...redstone-on-top-of-trap-doors-early.patch} | 0 ...Lazy-Initialization-for-Enum-Fields.patch} | 0 ...40-More-accurate-isInOpenWater-impl.patch} | 0 ... => 0841-Expand-PlayerItemMendEvent.patch} | 6 +- ...sh-ProjectileSource-for-projectiles.patch} | 2 +- ... => 0843-Add-transient-modifier-API.patch} | 0 ...patch => 0844-Fix-block-place-logic.patch} | 0 ...nd-playing-for-BlockItem-ItemStacks.patch} | 0 ...l-BlockGrowEvent-for-missing-blocks.patch} | 0 ...nhasbukkit-default-if-alias-block-e.patch} | 4 +- ...pLike-spam-for-missing-key-selector.patch} | 0 ...-Fix-sniffer-removeExploredLocation.patch} | 0 ...to-remove-all-active-potion-effects.patch} | 0 ...rafting-result-amount-for-fireworks.patch} | 0 ...2-Add-event-for-player-editing-sign.patch} | 0 ...k-item-frames-if-players-can-see-it.patch} | 0 ...ermission-levels-for-command-blocks.patch} | 0 ...Add-option-to-disable-block-updates.patch} | 0 ...856-Call-missing-BlockDispenseEvent.patch} | 4 +- ...-chunks-for-supporting-block-checks.patch} | 2 +- ...Optimize-player-lookups-for-beacons.patch} | 0 ...859-Add-Sign-getInteractableSideFor.patch} | 0 ...0-fix-item-meta-for-tadpole-buckets.patch} | 4 +- ...t-API.patch => 0861-Fix-BanList-API.patch} | 4 +- ...d-water-fluid-explosion-resistance-.patch} | 0 ...x-possible-NPE-on-painting-creation.patch} | 0 ...imer-for-Wandering-Traders-spawned-.patch} | 0 ...nceOrb-should-call-EntitySpawnEvent.patch} | 2 +- ...t-throw-both-Spread-and-Grow-Events.patch} | 0 ....patch => 0867-Add-whitelist-events.patch} | 0 ... 0868-Implement-PlayerFailMoveEvent.patch} | 4 +- ...olia-scheduler-and-owned-region-API.patch} | 8 +- ...se-allay-memory-on-non-item-targets.patch} | 0 ...API-for-updating-recipes-on-clients.patch} | 10 +- ...tion-when-spawning-display-entities.patch} | 0 ...873-Only-capture-actual-tree-growth.patch} | 0 ...rce-for-mushroom-block-spread-event.patch} | 0 ...Data-on-more-entities-when-spawning.patch} | 0 ...-Use-correct-seed-on-api-world-load.patch} | 4 +- ...ta-neighbour-ticks-outside-of-range.patch} | 0 ...> 0878-Cache-map-ids-on-item-frames.patch} | 0 ...-custom-statistic-criteria-creation.patch} | 6 +- ...atch => 0880-Bandaid-fix-for-Effect.patch} | 2 +- ...tch => 0881-SculkCatalyst-bloom-API.patch} | 0 ...API-for-an-entity-s-scoreboard-name.patch} | 0 ...lace-methods-with-old-StructureType.patch} | 6 +- ...e-namespaced-commands-if-send-names.patch} | 2 +- ...-handle-BlockBreakEvent-isDropItems.patch} | 0 ...entity-death-event-for-ender-dragon.patch} | 4 +- ...tity-tracking-range-by-Y-coordinate.patch} | 0 ... => 0888-Add-Listing-API-for-Player.patch} | 4 +- ...figurable-Region-Compression-Format.patch} | 0 ...0-Add-BlockFace-to-BlockDamageEvent.patch} | 2 +- ...h => 0891-Fix-NPE-on-Boat-getStatus.patch} | 0 ...e-API.patch => 0892-Expand-Pose-API.patch} | 2 +- ...patch => 0893-More-DragonBattle-API.patch} | 0 ...tch => 0894-Add-PlayerPickItemEvent.patch} | 2 +- ...=> 0895-Allow-trident-custom-damage.patch} | 0 ...6-Expose-hand-in-BlockCanBuildEvent.patch} | 0 ...-nearest-structure-border-iteration.patch} | 0 ...Implement-OfflinePlayer-isConnected.patch} | 2 +- ....patch => 0899-Fix-inventory-desync.patch} | 0 ...titleOverride-to-InventoryOpenEvent.patch} | 8 +- ...01-Configure-sniffer-egg-hatch-time.patch} | 0 ...-proximity-check-before-entity-look.patch} | 0 ...kip-POI-finding-if-stuck-in-vehicle.patch} | 0 ...t-sanity-checks-in-container-clicks.patch} | 6 +- ...ll-BlockRedstoneEvents-for-lecterns.patch} | 0 ...roper-checking-of-empty-item-stacks.patch} | 0 ...ix-silent-equipment-change-for-mobs.patch} | 0 ...h => 0908-Fix-spigot-s-Forced-Stats.patch} | 0 ...ing-InventoryHolders-to-inventories.patch} | 6 +- ...entities-in-chunks-that-are-positio.patch} | 0 ...sing-logs-for-log-ips-config-option.patch} | 0 ...n-on-UpgradeData.BlockFixers-class-.patch} | 0 ...-AdvancementProgress-getDateAwarded.patch} | 0 ...idebar-objectives-not-being-cleared.patch} | 0 ...x-missing-map-initialize-event-call.patch} | 2 +- ...a-when-attaching-firework-to-entity.patch} | 0 ...17-Fix-UnsafeValues-loadAdvancement.patch} | 4 +- ...> 0918-Add-player-idle-duration-API.patch} | 4 +- ...-if-we-can-see-non-visible-entities.patch} | 0 ...NPE-in-SculkBloomEvent-world-access.patch} | 0 ...tack-for-Player-sendEquipmentChange.patch} | 2 +- ...Ints.patch => 0922-Optimize-VarInts.patch} | 0 ...e-collision-shape-of-a-block-before.patch} | 2 +- ...redicate-for-blocks-when-raytracing.patch} | 0 ...em-packets-with-collector-as-source.patch} | 2 +- ... => 0926-Expand-LingeringPotion-API.patch} | 0 ...ngEffect-powers-lightning-rods-and-.patch} | 0 ...h-event-for-all-player-interactions.patch} | 0 ...everal-issues-with-EntityBreedEvent.patch} | 0 ...930-Add-UUID-attribute-modifier-API.patch} | 0 ...-event-call-for-entity-teleport-API.patch} | 0 ...y-create-LootContext-for-criterions.patch} | 0 ...-t-fire-sync-events-during-worldgen.patch} | 6 +- ...tch => 0934-Add-Structure-check-API.patch} | 0 ...-getAttributeModifier-duplication-c.patch} | 4 +- ...store-vanilla-entity-drops-behavior.patch} | 46 ++-- ...-Dont-resend-blocks-on-interactions.patch} | 0 ...tch => 0938-add-more-scoreboard-API.patch} | 0 ...stry.patch => 0939-Improve-Registry.patch} | 10 +- ...on-null-loc-for-EntityTeleportEvent.patch} | 2 +- ...h => 0941-Add-experience-points-API.patch} | 2 +- ...h => 0942-Add-drops-to-shear-events.patch} | 4 +- ...> 0943-Add-PlayerShieldDisableEvent.patch} | 0 ...ate-ResourceLocation-in-NBT-reading.patch} | 2 +- ...-experience-dropping-on-block-break.patch} | 0 ...> 0946-Fixup-NamespacedKey-handling.patch} | 48 ++-- ...47-Expose-LootTable-of-DecoratedPot.patch} | 0 ...location-of-Vec3D-by-entity-tracker.patch} | 0 ...rTradeEvent-and-PlayerPurchaseEvent.patch} | 0 ...h => 0950-Add-ShulkerDuplicateEvent.patch} | 0 ...dd-api-for-spawn-egg-texture-colors.patch} | 6 +- ... => 0952-Add-Lifecycle-Event-system.patch} | 8 +- ...patch => 0953-ItemStack-Tooltip-API.patch} | 6 +- ...Snapshot-includeLightData-parameter.patch} | 0 ...PI.patch => 0955-Add-FluidState-API.patch} | 0 ...patch => 0956-add-number-format-api.patch} | 0 ...patch => 0957-improve-BanList-types.patch} | 4 +- ...I.patch => 0958-Expanded-Hopper-API.patch} | 0 ...9-Add-BlockBreakProgressUpdateEvent.patch} | 2 +- ...=> 0960-Deprecate-ItemStack-setType.patch} | 0 ...ch => 0961-Add-CartographyItemEvent.patch} | 4 +- ...aid-API.patch => 0962-More-Raid-API.patch} | 0 ...ng-message-for-initial-server-start.patch} | 6 +- ...-Configurable-max-block-fluid-ticks.patch} | 2 +- ...=> 0965-Fix-bees-aging-inside-hives.patch} | 0 ...6-Disable-memory-reserve-allocating.patch} | 0 ...ByEntityEvent-for-unowned-wither-sk.patch} | 0 ....patch => 0968-Fix-DamageSource-API.patch} | 99 ++++---- ...nvalid-block-entity-during-world-ge.patch} | 0 ...ackOverflowError-for-some-dispenses.patch} | 0 ...=> 0971-Improve-tag-parser-handling.patch} | 2 +- ...s.patch => 0972-Item-Mutation-Fixes.patch} | 6 +- ...-Per-world-ticks-per-spawn-settings.patch} | 0 ...e-changed-item-from-dispense-events.patch} | 0 ...> 0975-Rewrite-dataconverter-system.patch} | 6 +- ...=> 0976-Suspicious-Effect-Entry-API.patch} | 0 ...eck-if-itemstack-is-stackable-first.patch} | 0 ...78-disable-forced-empty-world-ticks.patch} | 2 +- ...0-Starlight.patch => 0979-Starlight.patch} | 0 ....patch => 0980-Rewrite-chunk-system.patch} | 16 +- ...incremental-chunk-and-player-saving.patch} | 6 +- ...dBounds-and-getBlockState-for-inlin.patch} | 0 ...tem-frames-performance-and-bug-fixe.patch} | 2 +- ...ing-for-EntityLiving-hasLineOfSight.patch} | 2 +- ...Manager-and-add-advanced-packet-sup.patch} | 0 ...86-Allow-Saving-of-Oversized-Chunks.patch} | 0 ...87-Fix-World-isChunkGenerated-calls.patch} | 0 ...988-Flat-bedrock-generator-settings.patch} | 0 ...=> 0989-Entity-Activation-Range-2.0.patch} | 2 +- ...0990-Optional-per-player-mob-spawns.patch} | 2 +- ...2-Anti-Xray.patch => 0991-Anti-Xray.patch} | 4 +- ...g-PreCreatureSpawnEvent-with-per-pl.patch} | 2 +- ...timize-Collision-to-not-load-chunks.patch} | 0 ...alSelector-Goal.Flag-Set-operations.patch} | 0 ...95-Entity-load-save-limit-per-chunk.patch} | 0 ...h => 0996-Improved-Watchdog-Support.patch} | 4 +- ...> 0997-Optimize-Voxel-Shape-Merging.patch} | 0 ...nd-End-Portal-Frames-from-being-des.patch} | 2 +- ...ance-map-to-optimise-entity-tracker.patch} | 0 ...Optimize-Bit-Operations-by-inlining.patch} | 0 ...> 1001-Remove-streams-from-hot-code.patch} | 0 ...-Eigencraft-redstone-implementation.patch} | 0 ...er-Remove-Streams-Optimized-collect.patch} | 0 ...-Improve-boat-collision-performance.patch} | 2 +- ...=> 1005-Optimise-general-POI-access.patch} | 0 ...ementation-for-blockstate-state-loo.patch} | 0 ...> 1007-Execute-chunk-tasks-mid-tick.patch} | 4 +- ... 1008-Optimise-random-block-ticking.patch} | 2 +- ...ulate-regionfile-header-if-it-is-co.patch} | 0 ...city-compression-and-cipher-natives.patch} | 0 ...-more-information-in-watchdog-dumps.patch} | 2 +- ...tch => 1012-Collision-optimisations.patch} | 4 +- ...n-checking-in-player-move-packet-ha.patch} | 2 +- ...e-disarming-not-working-as-intended.patch} | 0 ...-type-tags-suggestions-in-selectors.patch} | 0 ...ate-Current-redstone-implementation.patch} | 2 +- ...17-optimize-dirt-and-snow-spreading.patch} | 0 ...ch => 1018-Properly-resend-entities.patch} | 6 +- ...pers.patch => 1019-Optimize-Hoppers.patch} | 2 +- ...-Improve-performance-of-mass-crafts.patch} | 0 ...> 1021-Actually-optimise-explosions.patch} | 2 +- ... 1022-Optimise-chunk-tick-iteration.patch} | 2 +- ...atch => 1023-Lag-compensation-ticks.patch} | 6 +- ...24-Optimise-nearby-player-retrieval.patch} | 2 +- ... 1025-Distance-manager-tick-timings.patch} | 0 ...-Oversized-block-entities-in-chunks.patch} | 0 ...packets-for-hard-colliding-entities.patch} | 0 ...-and-optimise-world-force-upgrading.patch} | 8 +- ...> 1029-API-for-checking-sent-chunks.patch} | 4 +- ...-for-mobs-immune-to-default-effects.patch} | 0 ... => 1031-Deep-clone-nbt-tags-in-PDC.patch} | 6 +- ...ng-old-serialized-names-to-new-names.patch | 37 --- ...032-Support-old-UUID-format-for-NBT.patch} | 0 ...33-Fix-shield-disable-inconsistency.patch} | 2 +- ...ch => 1034-Write-SavedData-IO-async.patch} | 2 +- ...removed-data-components-in-ItemMeta.patch} | 8 +- ...-experimental-improved-give-command.patch} | 0 ...-Large-Packets-disconnecting-client.patch} | 0 ...emFlags.patch => 1038-Fix-ItemFlags.patch} | 26 +- ...et-damage-reduction-inconsistencies.patch} | 4 +- ...-handling-of-LivingEntity-actuallyH.patch} | 2 +- ...e-checking-handled-tags-in-itemmeta.patch} | 47 ++-- ...atch => 1042-General-ItemMeta-fixes.patch} | 56 +++-- ...43-Expose-hasColor-to-leather-armor.patch} | 0 ...-API-to-get-player-ha-proxy-address.patch} | 2 +- ....patch => 1045-More-Chest-Block-API.patch} | 0 ...ta-component-type-on-encoding-error.patch} | 2 +- ...r-desync-when-new-players-are-added.patch} | 0 ...=> 1048-Brigadier-based-command-API.patch} | 20 +- work/Bukkit | 2 +- work/CraftBukkit | 2 +- 614 files changed, 1328 insertions(+), 1440 deletions(-) rename patches/api/{0257-Add-worldborder-events.patch => 0256-Add-worldborder-events.patch} (100%) delete mode 100644 patches/api/0256-Cache-the-result-of-Material-isBlock.patch rename patches/api/{0258-added-PlayerNameEntityEvent.patch => 0257-added-PlayerNameEntityEvent.patch} (100%) rename patches/api/{0259-Add-recipe-to-cook-events.patch => 0258-Add-recipe-to-cook-events.patch} (100%) rename patches/api/{0260-Add-Block-isValidTool.patch => 0259-Add-Block-isValidTool.patch} (100%) rename patches/api/{0261-Expand-world-key-API.patch => 0260-Expand-world-key-API.patch} (95%) rename patches/api/{0262-Improve-Item-Rarity-API.patch => 0261-Improve-Item-Rarity-API.patch} (93%) rename patches/api/{0263-Expose-protocol-version.patch => 0262-Expose-protocol-version.patch} (81%) rename patches/api/{0264-add-isDeeplySleeping-to-HumanEntity.patch => 0263-add-isDeeplySleeping-to-HumanEntity.patch} (100%) rename patches/api/{0265-add-consumeFuel-to-FurnaceBurnEvent.patch => 0264-add-consumeFuel-to-FurnaceBurnEvent.patch} (100%) rename patches/api/{0266-add-get-set-drop-chance-to-EntityEquipment.patch => 0265-add-get-set-drop-chance-to-EntityEquipment.patch} (100%) rename patches/api/{0267-Added-PlayerDeepSleepEvent.patch => 0266-Added-PlayerDeepSleepEvent.patch} (100%) rename patches/api/{0268-More-World-API.patch => 0267-More-World-API.patch} (100%) rename patches/api/{0269-Added-PlayerBedFailEnterEvent.patch => 0268-Added-PlayerBedFailEnterEvent.patch} (100%) rename patches/api/{0270-Introduce-beacon-activation-deactivation-events.patch => 0269-Introduce-beacon-activation-deactivation-events.patch} (100%) rename patches/api/{0271-PlayerMoveEvent-Improvements.patch => 0270-PlayerMoveEvent-Improvements.patch} (100%) rename patches/api/{0272-add-RespawnFlags-to-PlayerRespawnEvent.patch => 0271-add-RespawnFlags-to-PlayerRespawnEvent.patch} (100%) rename patches/api/{0273-Add-more-WanderingTrader-API.patch => 0272-Add-more-WanderingTrader-API.patch} (100%) rename patches/api/{0274-Add-EntityBlockStorage-clearEntities.patch => 0273-Add-EntityBlockStorage-clearEntities.patch} (100%) rename patches/api/{0275-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch => 0274-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch} (100%) rename patches/api/{0276-Inventory-close.patch => 0275-Inventory-close.patch} (100%) rename patches/api/{0277-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch => 0276-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch} (100%) rename patches/api/{0278-Add-basic-Datapack-API.patch => 0277-Add-basic-Datapack-API.patch} (96%) rename patches/api/{0279-additions-to-PlayerGameModeChangeEvent.patch => 0278-additions-to-PlayerGameModeChangeEvent.patch} (100%) rename patches/api/{0280-ItemStack-repair-check-API.patch => 0279-ItemStack-repair-check-API.patch} (88%) rename patches/api/{0281-More-Enchantment-API.patch => 0280-More-Enchantment-API.patch} (100%) rename patches/api/{0282-Add-Mob-lookAt-API.patch => 0281-Add-Mob-lookAt-API.patch} (100%) rename patches/api/{0283-ItemStack-editMeta.patch => 0282-ItemStack-editMeta.patch} (94%) rename patches/api/{0284-Add-EntityInsideBlockEvent.patch => 0283-Add-EntityInsideBlockEvent.patch} (100%) rename patches/api/{0285-Attributes-API-for-item-defaults.patch => 0284-Attributes-API-for-item-defaults.patch} (89%) rename patches/api/{0286-Add-cause-to-Weather-ThunderChangeEvents.patch => 0285-Add-cause-to-Weather-ThunderChangeEvents.patch} (100%) rename patches/api/{0287-More-Lidded-Block-API.patch => 0286-More-Lidded-Block-API.patch} (100%) rename patches/api/{0288-Add-PlayerKickEvent-causes.patch => 0287-Add-PlayerKickEvent-causes.patch} (100%) rename patches/api/{0289-Add-PufferFishStateChangeEvent.patch => 0288-Add-PufferFishStateChangeEvent.patch} (100%) rename patches/api/{0290-Add-BellRevealRaiderEvent.patch => 0289-Add-BellRevealRaiderEvent.patch} (100%) rename patches/api/{0291-Add-ElderGuardianAppearanceEvent.patch => 0290-Add-ElderGuardianAppearanceEvent.patch} (100%) rename patches/api/{0292-Add-more-line-of-sight-methods.patch => 0291-Add-more-line-of-sight-methods.patch} (100%) rename patches/api/{0293-Add-WaterBottleSplashEvent.patch => 0292-Add-WaterBottleSplashEvent.patch} (100%) rename patches/api/{0294-Add-more-LimitedRegion-API.patch => 0293-Add-more-LimitedRegion-API.patch} (100%) rename patches/api/{0295-Missing-Entity-API.patch => 0294-Missing-Entity-API.patch} (99%) rename patches/api/{0296-Adds-PlayerArmSwingEvent.patch => 0295-Adds-PlayerArmSwingEvent.patch} (100%) rename patches/api/{0297-Add-PlayerSignCommandPreprocessEvent.patch => 0296-Add-PlayerSignCommandPreprocessEvent.patch} (100%) rename patches/api/{0298-fix-empty-array-elements-in-command-arguments.patch => 0297-fix-empty-array-elements-in-command-arguments.patch} (100%) rename patches/api/{0299-Stinger-API.patch => 0298-Stinger-API.patch} (100%) rename patches/api/{0300-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch => 0299-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch} (100%) rename patches/api/{0301-Add-PlayerSetSpawnEvent.patch => 0300-Add-PlayerSetSpawnEvent.patch} (100%) rename patches/api/{0302-Added-EntityDamageItemEvent.patch => 0301-Added-EntityDamageItemEvent.patch} (100%) rename patches/api/{0303-Make-EntityUnleashEvent-cancellable.patch => 0302-Make-EntityUnleashEvent-cancellable.patch} (100%) rename patches/api/{0304-Change-EnderEye-target-without-changing-other-things.patch => 0303-Change-EnderEye-target-without-changing-other-things.patch} (100%) rename patches/api/{0305-Add-BlockBreakBlockEvent.patch => 0304-Add-BlockBreakBlockEvent.patch} (100%) rename patches/api/{0306-Add-helpers-for-left-right-click-to-Action.patch => 0305-Add-helpers-for-left-right-click-to-Action.patch} (100%) rename patches/api/{0307-Option-to-prevent-data-components-copy-in-smithing-r.patch => 0306-Option-to-prevent-data-components-copy-in-smithing-r.patch} (100%) rename patches/api/{0308-More-CommandBlock-API.patch => 0307-More-CommandBlock-API.patch} (100%) rename patches/api/{0309-Add-missing-team-sidebar-display-slots.patch => 0308-Add-missing-team-sidebar-display-slots.patch} (100%) rename patches/api/{0310-add-back-EntityPortalExitEvent.patch => 0309-add-back-EntityPortalExitEvent.patch} (100%) rename patches/api/{0311-Add-methods-to-find-targets-for-lightning-strikes.patch => 0310-Add-methods-to-find-targets-for-lightning-strikes.patch} (100%) rename patches/api/{0312-Get-entity-default-attributes.patch => 0311-Get-entity-default-attributes.patch} (95%) rename patches/api/{0313-Left-handed-API.patch => 0312-Left-handed-API.patch} (100%) rename patches/api/{0314-Add-critical-damage-API.patch => 0313-Add-critical-damage-API.patch} (100%) rename patches/api/{0315-Add-more-advancement-API.patch => 0314-Add-more-advancement-API.patch} (100%) rename patches/api/{0316-Fix-issues-with-mob-conversion.patch => 0315-Fix-issues-with-mob-conversion.patch} (100%) rename patches/api/{0317-Add-isCollidable-methods-to-various-places.patch => 0316-Add-isCollidable-methods-to-various-places.patch} (90%) rename patches/api/{0318-Goat-ram-API.patch => 0317-Goat-ram-API.patch} (100%) rename patches/api/{0319-Add-API-for-resetting-a-single-score.patch => 0318-Add-API-for-resetting-a-single-score.patch} (100%) rename patches/api/{0320-Add-Raw-Byte-Entity-Serialization.patch => 0319-Add-Raw-Byte-Entity-Serialization.patch} (94%) rename patches/api/{0321-Add-PlayerItemFrameChangeEvent.patch => 0320-Add-PlayerItemFrameChangeEvent.patch} (100%) rename patches/api/{0322-Allow-delegation-to-vanilla-chunk-gen.patch => 0321-Allow-delegation-to-vanilla-chunk-gen.patch} (95%) rename patches/api/{0323-Add-more-Campfire-API.patch => 0322-Add-more-Campfire-API.patch} (100%) rename patches/api/{0324-Extend-VehicleCollisionEvent-move-HandlerList-up.patch => 0323-Extend-VehicleCollisionEvent-move-HandlerList-up.patch} (100%) rename patches/api/{0325-Improve-scoreboard-entries.patch => 0324-Improve-scoreboard-entries.patch} (100%) rename patches/api/{0326-Entity-powdered-snow-API.patch => 0325-Entity-powdered-snow-API.patch} (100%) rename patches/api/{0327-Add-API-for-item-entity-health.patch => 0326-Add-API-for-item-entity-health.patch} (100%) rename patches/api/{0328-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch => 0327-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch} (100%) rename patches/api/{0329-Bucketable-API.patch => 0328-Bucketable-API.patch} (100%) rename patches/api/{0330-System-prop-for-default-config-comment-parsing.patch => 0329-System-prop-for-default-config-comment-parsing.patch} (100%) rename patches/api/{0331-Expose-vanilla-BiomeProvider-from-WorldInfo.patch => 0330-Expose-vanilla-BiomeProvider-from-WorldInfo.patch} (100%) rename patches/api/{0332-Multiple-Entries-with-Scoreboards.patch => 0331-Multiple-Entries-with-Scoreboards.patch} (100%) rename patches/api/{0333-Warn-on-strange-EventHandler-return-types.patch => 0332-Warn-on-strange-EventHandler-return-types.patch} (100%) rename patches/api/{0334-Multi-Block-Change-API.patch => 0333-Multi-Block-Change-API.patch} (100%) rename patches/api/{0335-Fix-NotePlayEvent.patch => 0334-Fix-NotePlayEvent.patch} (100%) rename patches/api/{0336-Freeze-Tick-Lock-API.patch => 0335-Freeze-Tick-Lock-API.patch} (100%) rename patches/api/{0337-Dolphin-API.patch => 0336-Dolphin-API.patch} (100%) rename patches/api/{0338-More-PotionEffectType-API.patch => 0337-More-PotionEffectType-API.patch} (97%) rename patches/api/{0339-API-for-creating-command-sender-which-forwards-feedb.patch => 0338-API-for-creating-command-sender-which-forwards-feedb.patch} (91%) rename patches/api/{0340-Implement-regenerateChunk.patch => 0339-Implement-regenerateChunk.patch} (100%) rename patches/api/{0341-Add-GameEvent-tags.patch => 0340-Add-GameEvent-tags.patch} (89%) rename patches/api/{0342-Furnace-RecipesUsed-API.patch => 0341-Furnace-RecipesUsed-API.patch} (100%) rename patches/api/{0343-Configurable-sculk-sensor-listener-range.patch => 0342-Configurable-sculk-sensor-listener-range.patch} (100%) rename patches/api/{0344-Add-missing-block-data-mins-and-maxes.patch => 0343-Add-missing-block-data-mins-and-maxes.patch} (100%) rename patches/api/{0345-Custom-Potion-Mixes.patch => 0344-Custom-Potion-Mixes.patch} (100%) rename patches/api/{0346-Expose-furnace-minecart-push-values.patch => 0345-Expose-furnace-minecart-push-values.patch} (100%) rename patches/api/{0347-More-Projectile-API.patch => 0346-More-Projectile-API.patch} (100%) rename patches/api/{0348-Add-getComputedBiome-API.patch => 0347-Add-getComputedBiome-API.patch} (100%) rename patches/api/{0349-Add-enchantWithLevels-API.patch => 0348-Add-enchantWithLevels-API.patch} (95%) rename patches/api/{0350-Add-TameableDeathMessageEvent.patch => 0349-Add-TameableDeathMessageEvent.patch} (100%) rename patches/api/{0351-Allow-to-change-the-podium-of-the-EnderDragon.patch => 0350-Allow-to-change-the-podium-of-the-EnderDragon.patch} (100%) rename patches/api/{0352-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch => 0351-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch} (100%) rename patches/api/{0353-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch => 0352-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch} (100%) rename patches/api/{0354-WorldCreator-keepSpawnLoaded.patch => 0353-WorldCreator-keepSpawnLoaded.patch} (100%) rename patches/api/{0355-Add-EntityDyeEvent-and-CollarColorable-interface.patch => 0354-Add-EntityDyeEvent-and-CollarColorable-interface.patch} (100%) rename patches/api/{0356-Add-PlayerStopUsingItemEvent.patch => 0355-Add-PlayerStopUsingItemEvent.patch} (100%) rename patches/api/{0357-Expand-FallingBlock-API.patch => 0356-Expand-FallingBlock-API.patch} (100%) rename patches/api/{0358-Add-method-isTickingWorlds-to-Bukkit.patch => 0357-Add-method-isTickingWorlds-to-Bukkit.patch} (96%) rename patches/api/{0359-Add-WardenAngerChangeEvent.patch => 0358-Add-WardenAngerChangeEvent.patch} (100%) rename patches/api/{0360-Nameable-Banner-API.patch => 0359-Nameable-Banner-API.patch} (100%) rename patches/api/{0361-Add-Player-getFishHook.patch => 0360-Add-Player-getFishHook.patch} (100%) rename patches/api/{0362-More-Teleport-API.patch => 0361-More-Teleport-API.patch} (100%) rename patches/api/{0363-Add-EntityPortalReadyEvent.patch => 0362-Add-EntityPortalReadyEvent.patch} (100%) rename patches/api/{0364-Custom-Chat-Completion-Suggestions-API.patch => 0363-Custom-Chat-Completion-Suggestions-API.patch} (100%) rename patches/api/{0365-Collision-API.patch => 0364-Collision-API.patch} (100%) rename patches/api/{0366-Block-Ticking-API.patch => 0365-Block-Ticking-API.patch} (100%) rename patches/api/{0367-Add-NamespacedKey-biome-methods.patch => 0366-Add-NamespacedKey-biome-methods.patch} (92%) rename patches/api/{0368-Also-load-resources-from-LibraryLoader.patch => 0367-Also-load-resources-from-LibraryLoader.patch} (100%) rename patches/api/{0369-Added-byte-array-serialization-deserialization-for-P.patch => 0368-Added-byte-array-serialization-deserialization-for-P.patch} (100%) rename patches/api/{0370-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch => 0369-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch} (100%) rename patches/api/{0371-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch => 0370-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch} (100%) rename patches/api/{0372-Add-getDrops-to-BlockState.patch => 0371-Add-getDrops-to-BlockState.patch} (100%) rename patches/api/{0373-Add-PlayerInventorySlotChangeEvent.patch => 0372-Add-PlayerInventorySlotChangeEvent.patch} (100%) rename patches/api/{0374-Elder-Guardian-appearance-API.patch => 0373-Elder-Guardian-appearance-API.patch} (100%) rename patches/api/{0375-Allow-changing-bed-s-occupied-property.patch => 0374-Allow-changing-bed-s-occupied-property.patch} (100%) rename patches/api/{0376-Add-EquipmentSlot-convenience-methods.patch => 0375-Add-EquipmentSlot-convenience-methods.patch} (94%) rename patches/api/{0377-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch => 0376-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch} (100%) rename patches/api/{0378-Add-entity-knockback-API.patch => 0377-Add-entity-knockback-API.patch} (100%) rename patches/api/{0379-Added-EntityToggleSitEvent.patch => 0378-Added-EntityToggleSitEvent.patch} (100%) rename patches/api/{0380-Add-Moving-Piston-API.patch => 0379-Add-Moving-Piston-API.patch} (100%) rename patches/api/{0381-Add-PrePlayerAttackEntityEvent.patch => 0380-Add-PrePlayerAttackEntityEvent.patch} (100%) rename patches/api/{0382-Add-Player-Warden-Warning-API.patch => 0381-Add-Player-Warden-Warning-API.patch} (100%) rename patches/api/{0383-More-vanilla-friendly-methods-to-update-trades.patch => 0382-More-vanilla-friendly-methods-to-update-trades.patch} (100%) rename patches/api/{0384-Add-paper-dumplisteners-command.patch => 0383-Add-paper-dumplisteners-command.patch} (100%) rename patches/api/{0385-ItemStack-damage-API.patch => 0384-ItemStack-damage-API.patch} (96%) rename patches/api/{0386-Add-Tick-TemporalUnit.patch => 0385-Add-Tick-TemporalUnit.patch} (100%) rename patches/api/{0387-Friction-API.patch => 0386-Friction-API.patch} (100%) rename patches/api/{0388-Player-Entity-Tracking-Events.patch => 0387-Player-Entity-Tracking-Events.patch} (100%) rename patches/api/{0389-Add-missing-Fluid-type.patch => 0388-Add-missing-Fluid-type.patch} (100%) rename patches/api/{0390-fix-Instruments.patch => 0389-fix-Instruments.patch} (100%) rename patches/api/{0391-Add-BlockLockCheckEvent.patch => 0390-Add-BlockLockCheckEvent.patch} (100%) rename patches/api/{0392-Add-Sneaking-API-for-Entities.patch => 0391-Add-Sneaking-API-for-Entities.patch} (100%) rename patches/api/{0393-Improve-PortalEvents.patch => 0392-Improve-PortalEvents.patch} (100%) rename patches/api/{0395-Flying-Fall-Damage-API.patch => 0393-Flying-Fall-Damage-API.patch} (100%) delete mode 100644 patches/api/0394-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch rename patches/api/{0396-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch => 0394-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch} (100%) rename patches/api/{0397-Win-Screen-API.patch => 0395-Win-Screen-API.patch} (100%) rename patches/api/{0398-Add-Entity-Body-Yaw-API.patch => 0396-Add-Entity-Body-Yaw-API.patch} (100%) rename patches/api/{0399-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch => 0397-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch} (100%) rename patches/api/{0400-Add-EntityFertilizeEggEvent.patch => 0398-Add-EntityFertilizeEggEvent.patch} (100%) rename patches/api/{0401-Add-CompostItemEvent-and-EntityCompostItemEvent.patch => 0399-Add-CompostItemEvent-and-EntityCompostItemEvent.patch} (100%) rename patches/api/{0402-Add-Shearable-API.patch => 0400-Add-Shearable-API.patch} (100%) rename patches/api/{0403-Fix-SpawnEggMeta-get-setSpawnedType.patch => 0401-Fix-SpawnEggMeta-get-setSpawnedType.patch} (100%) rename patches/api/{0404-Add-Mob-Experience-reward-API.patch => 0402-Add-Mob-Experience-reward-API.patch} (100%) rename patches/api/{0405-Expand-PlayerItemMendEvent.patch => 0403-Expand-PlayerItemMendEvent.patch} (100%) rename patches/api/{0406-Add-transient-modifier-API.patch => 0404-Add-transient-modifier-API.patch} (100%) rename patches/api/{0407-Properly-remove-the-experimental-smithing-inventory-.patch => 0405-Properly-remove-the-experimental-smithing-inventory-.patch} (100%) rename patches/api/{0408-Add-method-to-remove-all-active-potion-effects.patch => 0406-Add-method-to-remove-all-active-potion-effects.patch} (100%) rename patches/api/{0409-Folia-scheduler-and-owned-region-API.patch => 0407-Folia-scheduler-and-owned-region-API.patch} (100%) rename patches/api/{0410-Add-event-for-player-editing-sign.patch => 0408-Add-event-for-player-editing-sign.patch} (100%) rename patches/api/{0411-Add-Sign-getInteractableSideFor.patch => 0409-Add-Sign-getInteractableSideFor.patch} (100%) rename patches/api/{0412-Fix-BanList-API.patch => 0410-Fix-BanList-API.patch} (100%) rename patches/api/{0413-Add-whitelist-events.patch => 0411-Add-whitelist-events.patch} (100%) rename patches/api/{0414-API-for-updating-recipes-on-clients.patch => 0412-API-for-updating-recipes-on-clients.patch} (97%) rename patches/api/{0415-Add-PlayerFailMoveEvent.patch => 0413-Add-PlayerFailMoveEvent.patch} (100%) rename patches/api/{0416-Fix-custom-statistic-criteria-creation.patch => 0414-Fix-custom-statistic-criteria-creation.patch} (90%) rename patches/api/{0417-SculkCatalyst-bloom-API.patch => 0415-SculkCatalyst-bloom-API.patch} (100%) rename patches/api/{0418-API-for-an-entity-s-scoreboard-name.patch => 0416-API-for-an-entity-s-scoreboard-name.patch} (100%) rename patches/api/{0419-Deprecate-and-replace-methods-with-old-StructureType.patch => 0417-Deprecate-and-replace-methods-with-old-StructureType.patch} (97%) rename patches/api/{0420-Add-Listing-API-for-Player.patch => 0418-Add-Listing-API-for-Player.patch} (100%) rename patches/api/{0421-Expose-clicked-BlockFace-during-BlockDamageEvent.patch => 0419-Expose-clicked-BlockFace-during-BlockDamageEvent.patch} (100%) rename patches/api/{0422-Fix-NPE-on-Boat-getStatus.patch => 0420-Fix-NPE-on-Boat-getStatus.patch} (100%) rename patches/api/{0423-Expand-Pose-API.patch => 0421-Expand-Pose-API.patch} (100%) rename patches/api/{0424-MerchantRecipe-add-copy-constructor.patch => 0422-MerchantRecipe-add-copy-constructor.patch} (100%) rename patches/api/{0425-More-DragonBattle-API.patch => 0423-More-DragonBattle-API.patch} (100%) rename patches/api/{0426-Add-PlayerPickItemEvent.patch => 0424-Add-PlayerPickItemEvent.patch} (100%) rename patches/api/{0427-Allow-trident-custom-damage.patch => 0425-Allow-trident-custom-damage.patch} (100%) rename patches/api/{0428-Expose-hand-during-BlockCanBuildEvent.patch => 0426-Expose-hand-during-BlockCanBuildEvent.patch} (100%) rename patches/api/{0429-Limit-setBurnTime-to-valid-short-values.patch => 0427-Limit-setBurnTime-to-valid-short-values.patch} (100%) rename patches/api/{0430-Add-OfflinePlayer-isConnected.patch => 0428-Add-OfflinePlayer-isConnected.patch} (100%) rename patches/api/{0431-Add-titleOverride-to-InventoryOpenEvent.patch => 0429-Add-titleOverride-to-InventoryOpenEvent.patch} (100%) rename patches/api/{0432-Allow-proper-checking-of-empty-item-stacks.patch => 0430-Allow-proper-checking-of-empty-item-stacks.patch} (89%) rename patches/api/{0433-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch => 0431-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch} (100%) rename patches/api/{0434-Add-player-idle-duration-API.patch => 0432-Add-player-idle-duration-API.patch} (100%) rename patches/api/{0435-Add-API-to-get-the-collision-shape-of-a-block-before.patch => 0433-Add-API-to-get-the-collision-shape-of-a-block-before.patch} (100%) rename patches/api/{0436-Add-predicate-for-blocks-when-raytracing.patch => 0434-Add-predicate-for-blocks-when-raytracing.patch} (100%) rename patches/api/{0437-Add-hand-to-fish-event-for-all-player-interactions.patch => 0435-Add-hand-to-fish-event-for-all-player-interactions.patch} (100%) rename patches/api/{0438-Add-UUID-attribute-modifier-API.patch => 0436-Add-UUID-attribute-modifier-API.patch} (100%) rename patches/api/{0439-Expand-LingeringPotion-API.patch => 0437-Expand-LingeringPotion-API.patch} (100%) rename patches/api/{0440-Remove-unnecessary-durability-check-in-ItemStack-isS.patch => 0438-Remove-unnecessary-durability-check-in-ItemStack-isS.patch} (92%) rename patches/api/{0441-Add-Structure-check-API.patch => 0439-Add-Structure-check-API.patch} (100%) rename patches/api/{0442-add-missing-Experimental-annotations.patch => 0440-add-missing-Experimental-annotations.patch} (97%) rename patches/api/{0443-Add-more-scoreboard-API.patch => 0441-Add-more-scoreboard-API.patch} (100%) rename patches/api/{0444-Improve-Registry.patch => 0442-Improve-Registry.patch} (95%) rename patches/api/{0445-Add-experience-points-API.patch => 0443-Add-experience-points-API.patch} (100%) rename patches/api/{0446-Add-missing-InventoryType.patch => 0444-Add-missing-InventoryType.patch} (100%) rename patches/api/{0447-Add-drops-to-shear-events.patch => 0445-Add-drops-to-shear-events.patch} (100%) rename patches/api/{0448-Add-HiddenPotionEffect-API.patch => 0446-Add-HiddenPotionEffect-API.patch} (91%) rename patches/api/{0449-Add-PlayerShieldDisableEvent.patch => 0447-Add-PlayerShieldDisableEvent.patch} (100%) rename patches/api/{0450-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch => 0448-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch} (100%) rename patches/api/{0451-Add-BlockStateMeta-clearBlockState.patch => 0449-Add-BlockStateMeta-clearBlockState.patch} (90%) rename patches/api/{0452-Expose-LootTable-of-DecoratedPot.patch => 0450-Expose-LootTable-of-DecoratedPot.patch} (100%) rename patches/api/{0453-Add-ShulkerDuplicateEvent.patch => 0451-Add-ShulkerDuplicateEvent.patch} (100%) rename patches/api/{0454-Add-api-for-spawn-egg-texture-colors.patch => 0452-Add-api-for-spawn-egg-texture-colors.patch} (88%) rename patches/api/{0455-Add-Lifecycle-Event-system.patch => 0453-Add-Lifecycle-Event-system.patch} (99%) rename patches/api/{0456-ItemStack-Tooltip-API.patch => 0454-ItemStack-Tooltip-API.patch} (90%) rename patches/api/{0457-Add-getChunkSnapshot-includeLightData-parameter.patch => 0455-Add-getChunkSnapshot-includeLightData-parameter.patch} (100%) rename patches/api/{0458-Add-FluidState-API.patch => 0456-Add-FluidState-API.patch} (100%) rename patches/api/{0459-add-number-format-api.patch => 0457-add-number-format-api.patch} (100%) rename patches/api/{0460-improve-BanList-types.patch => 0458-improve-BanList-types.patch} (96%) rename patches/api/{0461-Suspicious-Effect-Entry-API.patch => 0459-Suspicious-Effect-Entry-API.patch} (100%) rename patches/api/{0462-Fix-DamageSource-API.patch => 0460-Fix-DamageSource-API.patch} (100%) rename patches/api/{0463-Expanded-Hopper-API.patch => 0461-Expanded-Hopper-API.patch} (100%) rename patches/api/{0464-Clone-mutables-to-prevent-unexpected-issues.patch => 0462-Clone-mutables-to-prevent-unexpected-issues.patch} (100%) rename patches/api/{0465-Add-BlockBreakProgressUpdateEvent.patch => 0463-Add-BlockBreakProgressUpdateEvent.patch} (100%) rename patches/api/{0466-Deprecate-ItemStack-setType.patch => 0464-Deprecate-ItemStack-setType.patch} (90%) rename patches/api/{0467-Item-Mutation-Fixes.patch => 0465-Item-Mutation-Fixes.patch} (100%) rename patches/api/{0468-API-for-checking-sent-chunks.patch => 0466-API-for-checking-sent-chunks.patch} (100%) rename patches/api/{0469-Add-CartographyItemEvent.patch => 0467-Add-CartographyItemEvent.patch} (100%) rename patches/api/{0470-More-Raid-API.patch => 0468-More-Raid-API.patch} (100%) rename patches/api/{0471-Fix-SpawnerEntry-Equipment-API.patch => 0469-Fix-SpawnerEntry-Equipment-API.patch} (100%) rename patches/api/{0472-Fix-ItemFlags.patch => 0470-Fix-ItemFlags.patch} (94%) rename patches/api/{0473-Allow-modifying-library-loader-jars-bytecode.patch => 0471-Allow-modifying-library-loader-jars-bytecode.patch} (100%) rename patches/api/{0474-Add-hook-to-remap-library-jars.patch => 0472-Add-hook-to-remap-library-jars.patch} (100%) rename patches/api/{0475-Add-GameMode-isInvulnerable.patch => 0473-Add-GameMode-isInvulnerable.patch} (100%) rename patches/api/{0476-Expose-hasColor-to-leather-armor.patch => 0474-Expose-hasColor-to-leather-armor.patch} (100%) rename patches/api/{0477-Add-missing-wind-charge-damage-type.patch => 0475-Add-missing-wind-charge-damage-type.patch} (100%) rename patches/api/{0478-Added-API-to-get-player-ha-proxy-address.patch => 0476-Added-API-to-get-player-ha-proxy-address.patch} (100%) rename patches/api/{0479-More-Chest-Block-API.patch => 0477-More-Chest-Block-API.patch} (100%) rename patches/api/{0480-Brigadier-based-command-API.patch => 0478-Brigadier-based-command-API.patch} (100%) delete mode 100644 patches/server/0812-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch rename patches/server/{0813-config-for-disabling-entity-tag-tags.patch => 0812-config-for-disabling-entity-tag-tags.patch} (100%) rename patches/server/{0814-Use-single-player-info-update-packet-on-join.patch => 0813-Use-single-player-info-update-packet-on-join.patch} (95%) rename patches/server/{0815-Correctly-shrink-items-during-EntityResurrectEvent.patch => 0814-Correctly-shrink-items-during-EntityResurrectEvent.patch} (95%) rename patches/server/{0816-Win-Screen-API.patch => 0815-Win-Screen-API.patch} (93%) rename patches/server/{0817-Remove-CraftItemStack-setAmount-null-assignment.patch => 0816-Remove-CraftItemStack-setAmount-null-assignment.patch} (100%) rename patches/server/{0818-Fix-force-opening-enchantment-tables.patch => 0817-Fix-force-opening-enchantment-tables.patch} (100%) rename patches/server/{0819-Add-Entity-Body-Yaw-API.patch => 0818-Add-Entity-Body-Yaw-API.patch} (100%) rename patches/server/{0820-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch => 0819-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch} (100%) rename patches/server/{0821-Add-EntityFertilizeEggEvent.patch => 0820-Add-EntityFertilizeEggEvent.patch} (96%) rename patches/server/{0822-Fix-HumanEntity-drop-not-updating-the-client-inv.patch => 0821-Fix-HumanEntity-drop-not-updating-the-client-inv.patch} (100%) rename patches/server/{0823-Add-CompostItemEvent-and-EntityCompostItemEvent.patch => 0822-Add-CompostItemEvent-and-EntityCompostItemEvent.patch} (100%) rename patches/server/{0824-Correctly-handle-ArmorStand-invisibility.patch => 0823-Correctly-handle-ArmorStand-invisibility.patch} (100%) rename patches/server/{0825-Fix-advancement-triggers-for-entity-damage.patch => 0824-Fix-advancement-triggers-for-entity-damage.patch} (97%) rename patches/server/{0826-Fix-text-display-error-on-spawn.patch => 0825-Fix-text-display-error-on-spawn.patch} (100%) rename patches/server/{0827-Fix-inventories-returning-null-Locations.patch => 0826-Fix-inventories-returning-null-Locations.patch} (97%) rename patches/server/{0828-Add-Shearable-API.patch => 0827-Add-Shearable-API.patch} (100%) rename patches/server/{0829-Fix-SpawnEggMeta-get-setSpawnedType.patch => 0828-Fix-SpawnEggMeta-get-setSpawnedType.patch} (94%) rename patches/server/{0830-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch => 0829-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch} (100%) rename patches/server/{0831-Treat-sequence-violations-like-they-should-be.patch => 0830-Treat-sequence-violations-like-they-should-be.patch} (92%) rename patches/server/{0832-remove-duplicate-animate-packet-for-records.patch => 0831-remove-duplicate-animate-packet-for-records.patch} (100%) rename patches/server/{0833-Prevent-causing-expired-keys-from-impacting-new-join.patch => 0832-Prevent-causing-expired-keys-from-impacting-new-join.patch} (96%) rename patches/server/{0834-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch => 0833-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch} (91%) rename patches/server/{0835-Use-array-for-gamerule-storage.patch => 0834-Use-array-for-gamerule-storage.patch} (100%) rename patches/server/{0836-Fix-a-couple-of-upstream-bed-issues.patch => 0835-Fix-a-couple-of-upstream-bed-issues.patch} (95%) rename patches/server/{0837-Fix-demo-flag-not-enabling-demo-mode.patch => 0836-Fix-demo-flag-not-enabling-demo-mode.patch} (100%) rename patches/server/{0838-Add-Mob-Experience-reward-API.patch => 0837-Add-Mob-Experience-reward-API.patch} (100%) rename patches/server/{0839-Break-redstone-on-top-of-trap-doors-early.patch => 0838-Break-redstone-on-top-of-trap-doors-early.patch} (100%) rename patches/server/{0840-Avoid-Lazy-Initialization-for-Enum-Fields.patch => 0839-Avoid-Lazy-Initialization-for-Enum-Fields.patch} (100%) rename patches/server/{0841-More-accurate-isInOpenWater-impl.patch => 0840-More-accurate-isInOpenWater-impl.patch} (100%) rename patches/server/{0842-Expand-PlayerItemMendEvent.patch => 0841-Expand-PlayerItemMendEvent.patch} (95%) rename patches/server/{0843-Refresh-ProjectileSource-for-projectiles.patch => 0842-Refresh-ProjectileSource-for-projectiles.patch} (97%) rename patches/server/{0844-Add-transient-modifier-API.patch => 0843-Add-transient-modifier-API.patch} (100%) rename patches/server/{0845-Fix-block-place-logic.patch => 0844-Fix-block-place-logic.patch} (100%) rename patches/server/{0846-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch => 0845-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch} (100%) rename patches/server/{0847-Call-BlockGrowEvent-for-missing-blocks.patch => 0846-Call-BlockGrowEvent-for-missing-blocks.patch} (100%) rename patches/server/{0848-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch => 0847-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch} (90%) rename patches/server/{0849-fix-MapLike-spam-for-missing-key-selector.patch => 0848-fix-MapLike-spam-for-missing-key-selector.patch} (100%) rename patches/server/{0850-Fix-sniffer-removeExploredLocation.patch => 0849-Fix-sniffer-removeExploredLocation.patch} (100%) rename patches/server/{0851-Add-method-to-remove-all-active-potion-effects.patch => 0850-Add-method-to-remove-all-active-potion-effects.patch} (100%) rename patches/server/{0852-Fix-incorrect-crafting-result-amount-for-fireworks.patch => 0851-Fix-incorrect-crafting-result-amount-for-fireworks.patch} (100%) rename patches/server/{0853-Add-event-for-player-editing-sign.patch => 0852-Add-event-for-player-editing-sign.patch} (100%) rename patches/server/{0854-Only-tick-item-frames-if-players-can-see-it.patch => 0853-Only-tick-item-frames-if-players-can-see-it.patch} (100%) rename patches/server/{0855-Fix-cmd-permission-levels-for-command-blocks.patch => 0854-Fix-cmd-permission-levels-for-command-blocks.patch} (100%) rename patches/server/{0856-Add-option-to-disable-block-updates.patch => 0855-Add-option-to-disable-block-updates.patch} (100%) rename patches/server/{0857-Call-missing-BlockDispenseEvent.patch => 0856-Call-missing-BlockDispenseEvent.patch} (97%) rename patches/server/{0858-Don-t-load-chunks-for-supporting-block-checks.patch => 0857-Don-t-load-chunks-for-supporting-block-checks.patch} (90%) rename patches/server/{0859-Optimize-player-lookups-for-beacons.patch => 0858-Optimize-player-lookups-for-beacons.patch} (100%) rename patches/server/{0860-Add-Sign-getInteractableSideFor.patch => 0859-Add-Sign-getInteractableSideFor.patch} (100%) rename patches/server/{0861-fix-item-meta-for-tadpole-buckets.patch => 0860-fix-item-meta-for-tadpole-buckets.patch} (96%) rename patches/server/{0862-Fix-BanList-API.patch => 0861-Fix-BanList-API.patch} (99%) rename patches/server/{0863-Determine-lava-and-water-fluid-explosion-resistance-.patch => 0862-Determine-lava-and-water-fluid-explosion-resistance-.patch} (100%) rename patches/server/{0864-Fix-possible-NPE-on-painting-creation.patch => 0863-Fix-possible-NPE-on-painting-creation.patch} (100%) rename patches/server/{0865-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch => 0864-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch} (100%) rename patches/server/{0866-ExperienceOrb-should-call-EntitySpawnEvent.patch => 0865-ExperienceOrb-should-call-EntitySpawnEvent.patch} (93%) rename patches/server/{0867-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch => 0866-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch} (100%) rename patches/server/{0868-Add-whitelist-events.patch => 0867-Add-whitelist-events.patch} (100%) rename patches/server/{0869-Implement-PlayerFailMoveEvent.patch => 0868-Implement-PlayerFailMoveEvent.patch} (98%) rename patches/server/{0870-Folia-scheduler-and-owned-region-API.patch => 0869-Folia-scheduler-and-owned-region-API.patch} (99%) rename patches/server/{0871-Only-erase-allay-memory-on-non-item-targets.patch => 0870-Only-erase-allay-memory-on-non-item-targets.patch} (100%) rename patches/server/{0872-API-for-updating-recipes-on-clients.patch => 0871-API-for-updating-recipes-on-clients.patch} (92%) rename patches/server/{0873-Fix-rotation-when-spawning-display-entities.patch => 0872-Fix-rotation-when-spawning-display-entities.patch} (100%) rename patches/server/{0874-Only-capture-actual-tree-growth.patch => 0873-Only-capture-actual-tree-growth.patch} (100%) rename patches/server/{0875-Use-correct-source-for-mushroom-block-spread-event.patch => 0874-Use-correct-source-for-mushroom-block-spread-event.patch} (100%) rename patches/server/{0876-Respect-randomizeData-on-more-entities-when-spawning.patch => 0875-Respect-randomizeData-on-more-entities-when-spawning.patch} (100%) rename patches/server/{0877-Use-correct-seed-on-api-world-load.patch => 0876-Use-correct-seed-on-api-world-load.patch} (87%) rename patches/server/{0878-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch => 0877-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch} (100%) rename patches/server/{0879-Cache-map-ids-on-item-frames.patch => 0878-Cache-map-ids-on-item-frames.patch} (100%) rename patches/server/{0880-Fix-custom-statistic-criteria-creation.patch => 0879-Fix-custom-statistic-criteria-creation.patch} (87%) rename patches/server/{0881-Bandaid-fix-for-Effect.patch => 0880-Bandaid-fix-for-Effect.patch} (98%) rename patches/server/{0882-SculkCatalyst-bloom-API.patch => 0881-SculkCatalyst-bloom-API.patch} (100%) rename patches/server/{0883-API-for-an-entity-s-scoreboard-name.patch => 0882-API-for-an-entity-s-scoreboard-name.patch} (100%) rename patches/server/{0884-Deprecate-and-replace-methods-with-old-StructureType.patch => 0883-Deprecate-and-replace-methods-with-old-StructureType.patch} (92%) rename patches/server/{0885-Don-t-tab-complete-namespaced-commands-if-send-names.patch => 0884-Don-t-tab-complete-namespaced-commands-if-send-names.patch} (95%) rename patches/server/{0886-Properly-handle-BlockBreakEvent-isDropItems.patch => 0885-Properly-handle-BlockBreakEvent-isDropItems.patch} (100%) rename patches/server/{0887-Fire-entity-death-event-for-ender-dragon.patch => 0886-Fire-entity-death-event-for-ender-dragon.patch} (90%) rename patches/server/{0888-Configurable-entity-tracking-range-by-Y-coordinate.patch => 0887-Configurable-entity-tracking-range-by-Y-coordinate.patch} (100%) rename patches/server/{0889-Add-Listing-API-for-Player.patch => 0888-Add-Listing-API-for-Player.patch} (98%) rename patches/server/{0890-Configurable-Region-Compression-Format.patch => 0889-Configurable-Region-Compression-Format.patch} (100%) rename patches/server/{0891-Add-BlockFace-to-BlockDamageEvent.patch => 0890-Add-BlockFace-to-BlockDamageEvent.patch} (96%) rename patches/server/{0892-Fix-NPE-on-Boat-getStatus.patch => 0891-Fix-NPE-on-Boat-getStatus.patch} (100%) rename patches/server/{0893-Expand-Pose-API.patch => 0892-Expand-Pose-API.patch} (95%) rename patches/server/{0894-More-DragonBattle-API.patch => 0893-More-DragonBattle-API.patch} (100%) rename patches/server/{0895-Add-PlayerPickItemEvent.patch => 0894-Add-PlayerPickItemEvent.patch} (96%) rename patches/server/{0896-Allow-trident-custom-damage.patch => 0895-Allow-trident-custom-damage.patch} (100%) rename patches/server/{0897-Expose-hand-in-BlockCanBuildEvent.patch => 0896-Expose-hand-in-BlockCanBuildEvent.patch} (100%) rename patches/server/{0898-Optimize-nearest-structure-border-iteration.patch => 0897-Optimize-nearest-structure-border-iteration.patch} (100%) rename patches/server/{0899-Implement-OfflinePlayer-isConnected.patch => 0898-Implement-OfflinePlayer-isConnected.patch} (94%) rename patches/server/{0900-Fix-inventory-desync.patch => 0899-Fix-inventory-desync.patch} (100%) rename patches/server/{0901-Add-titleOverride-to-InventoryOpenEvent.patch => 0900-Add-titleOverride-to-InventoryOpenEvent.patch} (96%) rename patches/server/{0902-Configure-sniffer-egg-hatch-time.patch => 0901-Configure-sniffer-egg-hatch-time.patch} (100%) rename patches/server/{0903-Do-crystal-portal-proximity-check-before-entity-look.patch => 0902-Do-crystal-portal-proximity-check-before-entity-look.patch} (100%) rename patches/server/{0904-Skip-POI-finding-if-stuck-in-vehicle.patch => 0903-Skip-POI-finding-if-stuck-in-vehicle.patch} (100%) rename patches/server/{0905-Add-slot-sanity-checks-in-container-clicks.patch => 0904-Add-slot-sanity-checks-in-container-clicks.patch} (93%) rename patches/server/{0906-Call-BlockRedstoneEvents-for-lecterns.patch => 0905-Call-BlockRedstoneEvents-for-lecterns.patch} (100%) rename patches/server/{0907-Allow-proper-checking-of-empty-item-stacks.patch => 0906-Allow-proper-checking-of-empty-item-stacks.patch} (100%) rename patches/server/{0908-Fix-silent-equipment-change-for-mobs.patch => 0907-Fix-silent-equipment-change-for-mobs.patch} (100%) rename patches/server/{0909-Fix-spigot-s-Forced-Stats.patch => 0908-Fix-spigot-s-Forced-Stats.patch} (100%) rename patches/server/{0910-Add-missing-InventoryHolders-to-inventories.patch => 0909-Add-missing-InventoryHolders-to-inventories.patch} (98%) rename patches/server/{0911-Do-not-read-tile-entities-in-chunks-that-are-positio.patch => 0910-Do-not-read-tile-entities-in-chunks-that-are-positio.patch} (100%) rename patches/server/{0912-Add-missing-logs-for-log-ips-config-option.patch => 0911-Add-missing-logs-for-log-ips-config-option.patch} (100%) rename patches/server/{0913-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch => 0912-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch} (100%) rename patches/server/{0914-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch => 0913-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch} (100%) rename patches/server/{0915-Fix-team-sidebar-objectives-not-being-cleared.patch => 0914-Fix-team-sidebar-objectives-not-being-cleared.patch} (100%) rename patches/server/{0916-Fix-missing-map-initialize-event-call.patch => 0915-Fix-missing-map-initialize-event-call.patch} (95%) rename patches/server/{0917-Update-entity-data-when-attaching-firework-to-entity.patch => 0916-Update-entity-data-when-attaching-firework-to-entity.patch} (100%) rename patches/server/{0918-Fix-UnsafeValues-loadAdvancement.patch => 0917-Fix-UnsafeValues-loadAdvancement.patch} (93%) rename patches/server/{0919-Add-player-idle-duration-API.patch => 0918-Add-player-idle-duration-API.patch} (85%) rename patches/server/{0920-Don-t-check-if-we-can-see-non-visible-entities.patch => 0919-Don-t-check-if-we-can-see-non-visible-entities.patch} (100%) rename patches/server/{0921-Fix-NPE-in-SculkBloomEvent-world-access.patch => 0920-Fix-NPE-in-SculkBloomEvent-world-access.patch} (100%) rename patches/server/{0922-Allow-null-itemstack-for-Player-sendEquipmentChange.patch => 0921-Allow-null-itemstack-for-Player-sendEquipmentChange.patch} (90%) rename patches/server/{0923-Optimize-VarInts.patch => 0922-Optimize-VarInts.patch} (100%) rename patches/server/{0924-Add-API-to-get-the-collision-shape-of-a-block-before.patch => 0923-Add-API-to-get-the-collision-shape-of-a-block-before.patch} (94%) rename patches/server/{0925-Add-predicate-for-blocks-when-raytracing.patch => 0924-Add-predicate-for-blocks-when-raytracing.patch} (100%) rename patches/server/{0926-Broadcast-take-item-packets-with-collector-as-source.patch => 0925-Broadcast-take-item-packets-with-collector-as-source.patch} (92%) rename patches/server/{0927-Expand-LingeringPotion-API.patch => 0926-Expand-LingeringPotion-API.patch} (100%) rename patches/server/{0928-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch => 0927-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch} (100%) rename patches/server/{0929-Add-hand-to-fish-event-for-all-player-interactions.patch => 0928-Add-hand-to-fish-event-for-all-player-interactions.patch} (100%) rename patches/server/{0930-Fix-several-issues-with-EntityBreedEvent.patch => 0929-Fix-several-issues-with-EntityBreedEvent.patch} (100%) rename patches/server/{0931-Add-UUID-attribute-modifier-API.patch => 0930-Add-UUID-attribute-modifier-API.patch} (100%) rename patches/server/{0932-Fix-missing-event-call-for-entity-teleport-API.patch => 0931-Fix-missing-event-call-for-entity-teleport-API.patch} (100%) rename patches/server/{0933-Lazily-create-LootContext-for-criterions.patch => 0932-Lazily-create-LootContext-for-criterions.patch} (100%) rename patches/server/{0934-Don-t-fire-sync-events-during-worldgen.patch => 0933-Don-t-fire-sync-events-during-worldgen.patch} (97%) rename patches/server/{0935-Add-Structure-check-API.patch => 0934-Add-Structure-check-API.patch} (100%) rename patches/server/{0936-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch => 0935-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch} (88%) rename patches/server/{0937-Restore-vanilla-entity-drops-behavior.patch => 0936-Restore-vanilla-entity-drops-behavior.patch} (83%) rename patches/server/{0938-Dont-resend-blocks-on-interactions.patch => 0937-Dont-resend-blocks-on-interactions.patch} (100%) rename patches/server/{0939-add-more-scoreboard-API.patch => 0938-add-more-scoreboard-API.patch} (100%) rename patches/server/{0940-Improve-Registry.patch => 0939-Improve-Registry.patch} (92%) rename patches/server/{0941-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch => 0940-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch} (97%) rename patches/server/{0942-Add-experience-points-API.patch => 0941-Add-experience-points-API.patch} (97%) rename patches/server/{0943-Add-drops-to-shear-events.patch => 0942-Add-drops-to-shear-events.patch} (99%) rename patches/server/{0944-Add-PlayerShieldDisableEvent.patch => 0943-Add-PlayerShieldDisableEvent.patch} (100%) rename patches/server/{0945-Validate-ResourceLocation-in-NBT-reading.patch => 0944-Validate-ResourceLocation-in-NBT-reading.patch} (99%) rename patches/server/{0946-Properly-handle-experience-dropping-on-block-break.patch => 0945-Properly-handle-experience-dropping-on-block-break.patch} (100%) rename patches/server/{0947-Fixup-NamespacedKey-handling.patch => 0946-Fixup-NamespacedKey-handling.patch} (79%) rename patches/server/{0948-Expose-LootTable-of-DecoratedPot.patch => 0947-Expose-LootTable-of-DecoratedPot.patch} (100%) rename patches/server/{0949-Reduce-allocation-of-Vec3D-by-entity-tracker.patch => 0948-Reduce-allocation-of-Vec3D-by-entity-tracker.patch} (100%) rename patches/server/{0950-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch => 0949-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch} (100%) rename patches/server/{0951-Add-ShulkerDuplicateEvent.patch => 0950-Add-ShulkerDuplicateEvent.patch} (100%) rename patches/server/{0952-Add-api-for-spawn-egg-texture-colors.patch => 0951-Add-api-for-spawn-egg-texture-colors.patch} (82%) rename patches/server/{0953-Add-Lifecycle-Event-system.patch => 0952-Add-Lifecycle-Event-system.patch} (99%) rename patches/server/{0954-ItemStack-Tooltip-API.patch => 0953-ItemStack-Tooltip-API.patch} (90%) rename patches/server/{0955-Add-getChunkSnapshot-includeLightData-parameter.patch => 0954-Add-getChunkSnapshot-includeLightData-parameter.patch} (100%) rename patches/server/{0956-Add-FluidState-API.patch => 0955-Add-FluidState-API.patch} (100%) rename patches/server/{0957-add-number-format-api.patch => 0956-add-number-format-api.patch} (100%) rename patches/server/{0958-improve-BanList-types.patch => 0957-improve-BanList-types.patch} (89%) rename patches/server/{0959-Expanded-Hopper-API.patch => 0958-Expanded-Hopper-API.patch} (100%) rename patches/server/{0960-Add-BlockBreakProgressUpdateEvent.patch => 0959-Add-BlockBreakProgressUpdateEvent.patch} (93%) rename patches/server/{0961-Deprecate-ItemStack-setType.patch => 0960-Deprecate-ItemStack-setType.patch} (100%) rename patches/server/{0962-Add-CartographyItemEvent.patch => 0961-Add-CartographyItemEvent.patch} (94%) rename patches/server/{0963-More-Raid-API.patch => 0962-More-Raid-API.patch} (100%) rename patches/server/{0964-Add-onboarding-message-for-initial-server-start.patch => 0963-Add-onboarding-message-for-initial-server-start.patch} (95%) rename patches/server/{0965-Configurable-max-block-fluid-ticks.patch => 0964-Configurable-max-block-fluid-ticks.patch} (92%) rename patches/server/{0966-Fix-bees-aging-inside-hives.patch => 0965-Fix-bees-aging-inside-hives.patch} (100%) rename patches/server/{0967-Disable-memory-reserve-allocating.patch => 0966-Disable-memory-reserve-allocating.patch} (100%) rename patches/server/{0968-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch => 0967-Fire-EntityDamageByEntityEvent-for-unowned-wither-sk.patch} (100%) rename patches/server/{0969-Fix-DamageSource-API.patch => 0968-Fix-DamageSource-API.patch} (74%) rename patches/server/{0970-Fix-creation-of-invalid-block-entity-during-world-ge.patch => 0969-Fix-creation-of-invalid-block-entity-during-world-ge.patch} (100%) rename patches/server/{0971-Fix-possible-StackOverflowError-for-some-dispenses.patch => 0970-Fix-possible-StackOverflowError-for-some-dispenses.patch} (100%) rename patches/server/{0972-Improve-tag-parser-handling.patch => 0971-Improve-tag-parser-handling.patch} (99%) rename patches/server/{0973-Item-Mutation-Fixes.patch => 0972-Item-Mutation-Fixes.patch} (90%) rename patches/server/{0974-Per-world-ticks-per-spawn-settings.patch => 0973-Per-world-ticks-per-spawn-settings.patch} (100%) rename patches/server/{0975-Properly-track-the-changed-item-from-dispense-events.patch => 0974-Properly-track-the-changed-item-from-dispense-events.patch} (100%) rename patches/server/{0976-Rewrite-dataconverter-system.patch => 0975-Rewrite-dataconverter-system.patch} (99%) rename patches/server/{0977-Suspicious-Effect-Entry-API.patch => 0976-Suspicious-Effect-Entry-API.patch} (100%) rename patches/server/{0978-check-if-itemstack-is-stackable-first.patch => 0977-check-if-itemstack-is-stackable-first.patch} (100%) rename patches/server/{0979-disable-forced-empty-world-ticks.patch => 0978-disable-forced-empty-world-ticks.patch} (92%) rename patches/server/{0980-Starlight.patch => 0979-Starlight.patch} (100%) rename patches/server/{0981-Rewrite-chunk-system.patch => 0980-Rewrite-chunk-system.patch} (99%) rename patches/server/{0982-incremental-chunk-and-player-saving.patch => 0981-incremental-chunk-and-player-saving.patch} (96%) rename patches/server/{0983-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch => 0982-Optimize-isInWorldBounds-and-getBlockState-for-inlin.patch} (100%) rename patches/server/{0984-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch => 0983-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch} (98%) rename patches/server/{0985-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch => 0984-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch} (98%) rename patches/server/{0986-Optimize-Network-Manager-and-add-advanced-packet-sup.patch => 0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch} (100%) rename patches/server/{0987-Allow-Saving-of-Oversized-Chunks.patch => 0986-Allow-Saving-of-Oversized-Chunks.patch} (100%) rename patches/server/{0988-Fix-World-isChunkGenerated-calls.patch => 0987-Fix-World-isChunkGenerated-calls.patch} (100%) rename patches/server/{0989-Flat-bedrock-generator-settings.patch => 0988-Flat-bedrock-generator-settings.patch} (100%) rename patches/server/{0990-Entity-Activation-Range-2.0.patch => 0989-Entity-Activation-Range-2.0.patch} (99%) rename patches/server/{0991-Optional-per-player-mob-spawns.patch => 0990-Optional-per-player-mob-spawns.patch} (99%) rename patches/server/{0992-Anti-Xray.patch => 0991-Anti-Xray.patch} (99%) rename patches/server/{0993-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch => 0992-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch} (98%) rename patches/server/{0994-Optimize-Collision-to-not-load-chunks.patch => 0993-Optimize-Collision-to-not-load-chunks.patch} (100%) rename patches/server/{0995-Optimize-GoalSelector-Goal.Flag-Set-operations.patch => 0994-Optimize-GoalSelector-Goal.Flag-Set-operations.patch} (100%) rename patches/server/{0996-Entity-load-save-limit-per-chunk.patch => 0995-Entity-load-save-limit-per-chunk.patch} (100%) rename patches/server/{0997-Improved-Watchdog-Support.patch => 0996-Improved-Watchdog-Support.patch} (99%) rename patches/server/{0998-Optimize-Voxel-Shape-Merging.patch => 0997-Optimize-Voxel-Shape-Merging.patch} (100%) rename patches/server/{0999-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch => 0998-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch} (99%) rename patches/server/{1000-Use-distance-map-to-optimise-entity-tracker.patch => 0999-Use-distance-map-to-optimise-entity-tracker.patch} (100%) rename patches/server/{1001-Optimize-Bit-Operations-by-inlining.patch => 1000-Optimize-Bit-Operations-by-inlining.patch} (100%) rename patches/server/{1002-Remove-streams-from-hot-code.patch => 1001-Remove-streams-from-hot-code.patch} (100%) rename patches/server/{1003-Eigencraft-redstone-implementation.patch => 1002-Eigencraft-redstone-implementation.patch} (100%) rename patches/server/{1004-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch => 1003-Optimize-Pathfinder-Remove-Streams-Optimized-collect.patch} (100%) rename patches/server/{1005-Improve-boat-collision-performance.patch => 1004-Improve-boat-collision-performance.patch} (97%) rename patches/server/{1006-Optimise-general-POI-access.patch => 1005-Optimise-general-POI-access.patch} (100%) rename patches/server/{1007-Custom-table-implementation-for-blockstate-state-loo.patch => 1006-Custom-table-implementation-for-blockstate-state-loo.patch} (100%) rename patches/server/{1008-Execute-chunk-tasks-mid-tick.patch => 1007-Execute-chunk-tasks-mid-tick.patch} (97%) rename patches/server/{1009-Optimise-random-block-ticking.patch => 1008-Optimise-random-block-ticking.patch} (99%) rename patches/server/{1010-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch => 1009-Attempt-to-recalculate-regionfile-header-if-it-is-co.patch} (100%) rename patches/server/{1011-Use-Velocity-compression-and-cipher-natives.patch => 1010-Use-Velocity-compression-and-cipher-natives.patch} (100%) rename patches/server/{1012-Detail-more-information-in-watchdog-dumps.patch => 1011-Detail-more-information-in-watchdog-dumps.patch} (99%) rename patches/server/{1013-Collision-optimisations.patch => 1012-Collision-optimisations.patch} (99%) rename patches/server/{1014-Optimise-collision-checking-in-player-move-packet-ha.patch => 1013-Optimise-collision-checking-in-player-move-packet-ha.patch} (99%) rename patches/server/{1015-Fix-tripwire-disarming-not-working-as-intended.patch => 1014-Fix-tripwire-disarming-not-working-as-intended.patch} (100%) rename patches/server/{1016-Fix-entity-type-tags-suggestions-in-selectors.patch => 1015-Fix-entity-type-tags-suggestions-in-selectors.patch} (100%) rename patches/server/{1017-Add-Alternate-Current-redstone-implementation.patch => 1016-Add-Alternate-Current-redstone-implementation.patch} (99%) rename patches/server/{1018-optimize-dirt-and-snow-spreading.patch => 1017-optimize-dirt-and-snow-spreading.patch} (100%) rename patches/server/{1019-Properly-resend-entities.patch => 1018-Properly-resend-entities.patch} (98%) rename patches/server/{1020-Optimize-Hoppers.patch => 1019-Optimize-Hoppers.patch} (99%) rename patches/server/{1021-Improve-performance-of-mass-crafts.patch => 1020-Improve-performance-of-mass-crafts.patch} (100%) rename patches/server/{1022-Actually-optimise-explosions.patch => 1021-Actually-optimise-explosions.patch} (99%) rename patches/server/{1023-Optimise-chunk-tick-iteration.patch => 1022-Optimise-chunk-tick-iteration.patch} (99%) rename patches/server/{1024-Lag-compensation-ticks.patch => 1023-Lag-compensation-ticks.patch} (96%) rename patches/server/{1025-Optimise-nearby-player-retrieval.patch => 1024-Optimise-nearby-player-retrieval.patch} (99%) rename patches/server/{1026-Distance-manager-tick-timings.patch => 1025-Distance-manager-tick-timings.patch} (100%) rename patches/server/{1027-Handle-Oversized-block-entities-in-chunks.patch => 1026-Handle-Oversized-block-entities-in-chunks.patch} (100%) rename patches/server/{1028-Send-full-pos-packets-for-hard-colliding-entities.patch => 1027-Send-full-pos-packets-for-hard-colliding-entities.patch} (100%) rename patches/server/{1029-Fix-and-optimise-world-force-upgrading.patch => 1028-Fix-and-optimise-world-force-upgrading.patch} (98%) rename patches/server/{1030-API-for-checking-sent-chunks.patch => 1029-API-for-checking-sent-chunks.patch} (94%) rename patches/server/{1032-Add-config-for-mobs-immune-to-default-effects.patch => 1030-Add-config-for-mobs-immune-to-default-effects.patch} (100%) rename patches/server/{1033-Deep-clone-nbt-tags-in-PDC.patch => 1031-Deep-clone-nbt-tags-in-PDC.patch} (91%) delete mode 100644 patches/server/1031-handle-converting-old-serialized-names-to-new-names.patch rename patches/server/{1034-Support-old-UUID-format-for-NBT.patch => 1032-Support-old-UUID-format-for-NBT.patch} (100%) rename patches/server/{1035-Fix-shield-disable-inconsistency.patch => 1033-Fix-shield-disable-inconsistency.patch} (93%) rename patches/server/{1036-Write-SavedData-IO-async.patch => 1034-Write-SavedData-IO-async.patch} (99%) rename patches/server/{1037-Don-t-lose-removed-data-components-in-ItemMeta.patch => 1035-Don-t-lose-removed-data-components-in-ItemMeta.patch} (87%) rename patches/server/{1038-Add-experimental-improved-give-command.patch => 1036-Add-experimental-improved-give-command.patch} (100%) rename patches/server/{1039-Handle-Large-Packets-disconnecting-client.patch => 1037-Handle-Large-Packets-disconnecting-client.patch} (100%) rename patches/server/{1040-Fix-ItemFlags.patch => 1038-Fix-ItemFlags.patch} (93%) rename patches/server/{1041-Fix-helmet-damage-reduction-inconsistencies.patch => 1039-Fix-helmet-damage-reduction-inconsistencies.patch} (88%) rename patches/server/{1042-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch => 1040-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch} (94%) rename patches/server/{1043-improve-checking-handled-tags-in-itemmeta.patch => 1041-improve-checking-handled-tags-in-itemmeta.patch} (96%) rename patches/server/{1044-General-ItemMeta-fixes.patch => 1042-General-ItemMeta-fixes.patch} (93%) rename patches/server/{1045-Expose-hasColor-to-leather-armor.patch => 1043-Expose-hasColor-to-leather-armor.patch} (100%) rename patches/server/{1046-Added-API-to-get-player-ha-proxy-address.patch => 1044-Added-API-to-get-player-ha-proxy-address.patch} (97%) rename patches/server/{1047-More-Chest-Block-API.patch => 1045-More-Chest-Block-API.patch} (100%) rename patches/server/{1048-Print-data-component-type-on-encoding-error.patch => 1046-Print-data-component-type-on-encoding-error.patch} (92%) rename patches/server/{1049-Fix-entity-tracker-desync-when-new-players-are-added.patch => 1047-Fix-entity-tracker-desync-when-new-players-are-added.patch} (100%) rename patches/server/{1050-Brigadier-based-command-API.patch => 1048-Brigadier-based-command-API.patch} (99%) diff --git a/patches/api/0004-Code-Generation.patch b/patches/api/0004-Code-Generation.patch index 718ff4eb87..464836b995 100644 --- a/patches/api/0004-Code-Generation.patch +++ b/patches/api/0004-Code-Generation.patch @@ -85,10 +85,10 @@ index 0000000000000000000000000000000000000000..2512dba27edfdccbc4430815b6cba048 +} diff --git a/src/main/java/io/papermc/paper/registry/RegistryKey.java b/src/main/java/io/papermc/paper/registry/RegistryKey.java new file mode 100644 -index 0000000000000000000000000000000000000000..a505064565f7f029be8727b1951d9ef67c3acf2c +index 0000000000000000000000000000000000000000..7b79bf33074355020e0b3b5ef40c7f2e6ba644b4 --- /dev/null +++ b/src/main/java/io/papermc/paper/registry/RegistryKey.java -@@ -0,0 +1,128 @@ +@@ -0,0 +1,141 @@ +package io.papermc.paper.registry; + +import net.kyori.adventure.key.Keyed; @@ -100,6 +100,7 @@ index 0000000000000000000000000000000000000000..a505064565f7f029be8727b1951d9ef6 +import org.bukkit.Sound; +import org.bukkit.attribute.Attribute; +import org.bukkit.block.Biome; ++import org.bukkit.block.BlockType; +import org.bukkit.block.banner.PatternType; +import org.bukkit.damage.DamageType; +import org.bukkit.enchantments.Enchantment; @@ -111,11 +112,13 @@ index 0000000000000000000000000000000000000000..a505064565f7f029be8727b1951d9ef6 +import org.bukkit.entity.memory.MemoryKey; +import org.bukkit.generator.structure.Structure; +import org.bukkit.generator.structure.StructureType; ++import org.bukkit.inventory.ItemType; +import org.bukkit.inventory.meta.trim.TrimMaterial; +import org.bukkit.inventory.meta.trim.TrimPattern; +import org.bukkit.map.MapCursor; +import org.bukkit.potion.PotionEffectType; +import org.bukkit.potion.PotionType; ++import org.jetbrains.annotations.ApiStatus; + +import static io.papermc.paper.registry.RegistryKeyImpl.create; + @@ -162,6 +165,16 @@ index 0000000000000000000000000000000000000000..a505064565f7f029be8727b1951d9ef6 + * @see io.papermc.paper.registry.keys.MobEffectKeys + */ + RegistryKey MOB_EFFECT = create("mob_effect"); ++ /** ++ * @apiNote DO NOT USE ++ */ ++ @ApiStatus.Internal ++ RegistryKey BLOCK = create("block"); ++ /** ++ * @apiNote DO NOT USE ++ */ ++ @ApiStatus.Internal ++ RegistryKey ITEM = create("item"); + + + /* ********************** * diff --git a/patches/api/0006-Adventure.patch b/patches/api/0006-Adventure.patch index ff05fe4f7f..9abc41c659 100644 --- a/patches/api/0006-Adventure.patch +++ b/patches/api/0006-Adventure.patch @@ -1491,7 +1491,7 @@ index ac5e263d737973af077e3406a84a84baca4370db..2d91924b7f5ef16a91d40cdc1bfc3d68 + // Paper end } diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index ef3c0410ba4f88ec8b51e79abdc97777fdc00d31..913cf8308840ca1f365eb1f456f64b96046ed060 100644 +index ce9bb54a6ef8a7d31804ec63aa1f6cbbd6ae2d54..baf49da3dd46039da2f24a4af8b1b8617bb25501 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -30,6 +30,15 @@ import org.jetbrains.annotations.Nullable; @@ -3170,10 +3170,10 @@ index f4ac033ff8794a61c82a49dc6c3f863f3291455d..d944d67f544494355f03c5bc9afd8ea7 /** diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java -index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..03b4e0300d228e3f3a9f4f75c96e0cf9ed1a7d2d 100644 +index 133760be6c73436512ba684a3ac77a514b2d8765..9473303bd8ab1f6b63b6999a5f5ff3eca1cc23d6 100644 --- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java +++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java -@@ -11,26 +11,49 @@ import org.jetbrains.annotations.Nullable; +@@ -12,26 +12,49 @@ import org.jetbrains.annotations.Nullable; */ public class PlayerDeathEvent extends EntityDeathEvent { private int newExp = 0; @@ -3185,18 +3185,18 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..03b4e0300d228e3f3a9f4f75c96e0cf9 private boolean keepInventory = false; + // Paper start - adventure + @org.jetbrains.annotations.ApiStatus.Internal -+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull List drops, final int droppedExp, final @Nullable net.kyori.adventure.text.Component deathMessage) { -+ this(player, drops, droppedExp, 0, deathMessage); ++ public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List drops, final int droppedExp, final @Nullable net.kyori.adventure.text.Component deathMessage) { ++ this(player, damageSource, drops, droppedExp, 0, deathMessage); + } + + @org.jetbrains.annotations.ApiStatus.Internal -+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull List drops, final int droppedExp, final int newExp, final @Nullable net.kyori.adventure.text.Component deathMessage) { -+ this(player, drops, droppedExp, newExp, 0, 0, deathMessage); ++ public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List drops, final int droppedExp, final int newExp, final @Nullable net.kyori.adventure.text.Component deathMessage) { ++ this(player, damageSource, drops, droppedExp, newExp, 0, 0, deathMessage); + } + + @org.jetbrains.annotations.ApiStatus.Internal -+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage) { -+ super(player, drops, droppedExp); ++ public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage) { ++ super(player, damageSource, drops, droppedExp); + this.newExp = newExp; + this.newTotalExp = newTotalExp; + this.newLevel = newLevel; @@ -3205,18 +3205,18 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..03b4e0300d228e3f3a9f4f75c96e0cf9 + // Paper end - adventure + @Deprecated // Paper - public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, @Nullable final String deathMessage) { - this(player, drops, droppedExp, 0, deathMessage); + public PlayerDeathEvent(@NotNull final Player player, @NotNull DamageSource damageSource, @NotNull final List drops, final int droppedExp, @Nullable final String deathMessage) { + this(player, damageSource, drops, droppedExp, 0, deathMessage); } + @Deprecated // Paper - public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, @Nullable final String deathMessage) { - this(player, drops, droppedExp, newExp, 0, 0, deathMessage); + public PlayerDeathEvent(@NotNull final Player player, @NotNull DamageSource damageSource, @NotNull final List drops, final int droppedExp, final int newExp, @Nullable final String deathMessage) { + this(player, damageSource, drops, droppedExp, newExp, 0, 0, deathMessage); } + @Deprecated // Paper - public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) { - super(player, drops, droppedExp); + public PlayerDeathEvent(@NotNull final Player player, @NotNull DamageSource damageSource, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) { + super(player, damageSource, drops, droppedExp); this.newExp = newExp; this.newTotalExp = newTotalExp; this.newLevel = newLevel; @@ -3225,7 +3225,7 @@ index 3c2ea8fec3a748cab7f5ad9100d12bd8213ec6c9..03b4e0300d228e3f3a9f4f75c96e0cf9 } @NotNull -@@ -39,25 +62,49 @@ public class PlayerDeathEvent extends EntityDeathEvent { +@@ -40,25 +63,49 @@ public class PlayerDeathEvent extends EntityDeathEvent { return (Player) entity; } @@ -4294,7 +4294,7 @@ index e12996492c1558fed9fab30de9f8018e0ed7fac3..002acfbdce1db10f7ba1b6a013e678f5 /** diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index 60ebfab9596f26cfd2d75a43f3f88f2dd56575f3..dbaf54018a7dd392378869a5a302a880c7a56338 100644 +index b8bb11544bdfb5b9272c2c3c33c95a4c1c7fdf12..86fbc3902989a3baca851ab8c3866af445451787 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java @@ -215,4 +215,24 @@ public interface ItemFactory { @@ -4323,10 +4323,10 @@ index 60ebfab9596f26cfd2d75a43f3f88f2dd56575f3..dbaf54018a7dd392378869a5a302a880 + // Paper end - Adventure } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 257b5db1aa58d57cfbf5bd1f17f9df6c509bef90..53cc84d1ef6e281e8637ec7406236e1185ad7d82 100644 +index 692f67c4e27cf62451130479510d06c89274ad23..22e883c8d737cf9f799c6160ff63d90f99250020 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -23,7 +23,7 @@ import org.jetbrains.annotations.Nullable; +@@ -26,7 +26,7 @@ import org.jetbrains.annotations.Nullable; * use this class to encapsulate Materials for which {@link Material#isItem()} * returns false. */ @@ -4335,7 +4335,7 @@ index 257b5db1aa58d57cfbf5bd1f17f9df6c509bef90..53cc84d1ef6e281e8637ec7406236e11 private Material type = Material.AIR; private int amount = 0; private MaterialData data = null; -@@ -617,4 +617,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -624,4 +624,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat public String getTranslationKey() { return Bukkit.getUnsafe().getTranslationKey(this); } @@ -4596,10 +4596,10 @@ index 9bab73c3c2ca759b8e1c7d07d98cc593c961666a..f0c6943da3f783101ca647b75b3230fa throw new UnsupportedOperationException("Not supported yet."); } diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aeebb9a6fd6 100644 +index 3a87089ba78f1e603ef582fcda3eb915d11f21a5..a23d030d2204098be17d8b18021fd0bb79b4431b 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -@@ -34,6 +34,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -35,6 +35,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste */ boolean hasDisplayName(); @@ -4624,7 +4624,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee /** * Gets the display name that is set. *

-@@ -41,7 +59,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -42,7 +60,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste * before calling this method. * * @return the display name that is set @@ -4634,7 +4634,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee @NotNull String getDisplayName(); -@@ -49,7 +69,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -50,7 +70,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste * Sets the display name. * * @param name the name to set @@ -4644,7 +4644,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee void setDisplayName(@Nullable String name); /** -@@ -62,6 +84,32 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -63,6 +85,32 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste */ boolean hasItemName(); @@ -4677,7 +4677,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee /** * Gets the item name that is set. *
-@@ -72,7 +120,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -73,7 +121,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste * calling this method. * * @return the item name that is set @@ -4687,7 +4687,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee @NotNull String getItemName(); -@@ -83,7 +133,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -84,7 +134,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste * anvil, is not styled with italics, and does not show labels. * * @param name the name to set @@ -4697,7 +4697,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee void setItemName(@Nullable String name); /** -@@ -124,6 +176,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -125,6 +177,24 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste */ boolean hasLore(); @@ -4722,7 +4722,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee /** * Gets the lore that is set. *

-@@ -131,7 +201,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -132,7 +202,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste * calling this method. * * @return a list of lore that is set @@ -4732,7 +4732,7 @@ index 255f79d5bca15620cb17d7b54ffebb6ff00bff6b..18c2864c99d4dfae16cdb35143486aee @Nullable List getLore(); -@@ -140,7 +212,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -141,7 +213,9 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste * Removes lore when given null. * * @param lore the lore that will be set diff --git a/patches/api/0009-Paper-Plugins.patch b/patches/api/0009-Paper-Plugins.patch index 743e64e643..90a7f08ba1 100644 --- a/patches/api/0009-Paper-Plugins.patch +++ b/patches/api/0009-Paper-Plugins.patch @@ -1347,13 +1347,14 @@ index 0000000000000000000000000000000000000000..6bf3d212a6156ad9ab0e82d1ca0a04f8 + +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 913cf8308840ca1f365eb1f456f64b96046ed060..6e46302c272b468375f2de3f7f992f55f13805b8 100644 +index baf49da3dd46039da2f24a4af8b1b8617bb25501..7cf61228754527ddaa6b39b5f1426e0527cdaac9 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -129,4 +129,13 @@ public interface UnsafeValues { +@@ -137,4 +137,14 @@ public interface UnsafeValues { + @ApiStatus.Internal - @NotNull - DamageSource.Builder createDamageSourceBuilder(@NotNull DamageType damageType); + B get(Registry registry, NamespacedKey key); ++ + // Paper start + @Deprecated(forRemoval = true) + boolean isSupportedApiVersion(String apiVersion); diff --git a/patches/api/0011-Timings-v2.patch b/patches/api/0011-Timings-v2.patch index 5b729d09d2..e01da158fc 100644 --- a/patches/api/0011-Timings-v2.patch +++ b/patches/api/0011-Timings-v2.patch @@ -2897,7 +2897,7 @@ index 3bf7db7eac81e3cc6f5c6700637d10d1b4b7a47b..77f8b0889cd7039bf041fc052fba33b6 * Sends the component to the player * diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 6e46302c272b468375f2de3f7f992f55f13805b8..01e796e487cc16710f51b457466a37ba70e1e665 100644 +index 7cf61228754527ddaa6b39b5f1426e0527cdaac9..9082e67324f810857db26bb89ecea7e9f866f80d 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -40,6 +40,7 @@ public interface UnsafeValues { @@ -2908,7 +2908,7 @@ index 6e46302c272b468375f2de3f7f992f55f13805b8..01e796e487cc16710f51b457466a37ba Material toLegacy(Material material); Material fromLegacy(Material material); -@@ -138,4 +139,12 @@ public interface UnsafeValues { +@@ -147,4 +148,12 @@ public interface UnsafeValues { return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion()); } // Paper end diff --git a/patches/api/0015-Version-Command-2.0.patch b/patches/api/0015-Version-Command-2.0.patch index 32edafcf60..500312dc32 100644 --- a/patches/api/0015-Version-Command-2.0.patch +++ b/patches/api/0015-Version-Command-2.0.patch @@ -56,10 +56,10 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7 + } +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 01e796e487cc16710f51b457466a37ba70e1e665..d69e5fa40702c283c370a2f712b51dc2ea3a1fa0 100644 +index 9082e67324f810857db26bb89ecea7e9f866f80d..da997507b96908027c49dabc6daf7c787dcad95d 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -146,5 +146,12 @@ public interface UnsafeValues { +@@ -155,5 +155,12 @@ public interface UnsafeValues { * @return name */ String getTimingsServerName(); diff --git a/patches/api/0056-Fix-upstream-javadocs.patch b/patches/api/0056-Fix-upstream-javadocs.patch index 3a13e0e863..3e5ba4ab0e 100644 --- a/patches/api/0056-Fix-upstream-javadocs.patch +++ b/patches/api/0056-Fix-upstream-javadocs.patch @@ -356,10 +356,10 @@ index 91fc11dda99de506be83d40df8929bf7cd8e8d85..7dc631ebd009f5f5c3ac1699c3f3515c // Paper end } diff --git a/src/main/java/org/bukkit/entity/Arrow.java b/src/main/java/org/bukkit/entity/Arrow.java -index bd1116adc891b2a4243da205127f5ece76089925..4d4c9efb81ac14950b24a07edcfe1c46ab3caf91 100644 +index a1615334cae50c7d64ca6d86cb7070405a26b332..e396f351a46e4220fa4df11eaa93d813dced664c 100644 --- a/src/main/java/org/bukkit/entity/Arrow.java +++ b/src/main/java/org/bukkit/entity/Arrow.java -@@ -73,7 +73,7 @@ public interface Arrow extends AbstractArrow { +@@ -93,7 +93,7 @@ public interface Arrow extends AbstractArrow { * Removes a custom potion effect from this arrow. * * @param type the potion effect type to remove @@ -613,7 +613,7 @@ index a0f6f1af304190b4c5db4b284d460f625eeb7801..7e21548cac8515c281ec86853e9272ab * The Block is already broken as this event is called, so #getBlock() will be * AIR in most cases. Use #getBlockState() for more Information about the broken diff --git a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java -index e534954457a9961a26dbec7ac035bec07e1d6694..8309b030c2120f1496d244f3ebc1094def41c869 100644 +index e534954457a9961a26dbec7ac035bec07e1d6694..a7c297364805c58ae16895055d8eae0484384b7d 100644 --- a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java @@ -13,6 +13,9 @@ import org.jetbrains.annotations.NotNull; @@ -626,6 +626,14 @@ index e534954457a9961a26dbec7ac035bec07e1d6694..8309b030c2120f1496d244f3ebc1094d */ public class BlockExplodeEvent extends BlockEvent implements Cancellable { private static final HandlerList handlers = new HandlerList(); +@@ -29,6 +32,7 @@ public class BlockExplodeEvent extends BlockEvent implements Cancellable { + this.cancel = false; + } + ++ @io.papermc.paper.annotation.DoNotUse // Paper + @Deprecated(forRemoval = true) + public BlockExplodeEvent(@NotNull final Block what, @NotNull final List blocks, final float yield) { + this(what, what.getState(), blocks, yield); diff --git a/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java b/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java index 340fa397e68c024df380a28db21545a0c83d9fa6..79ac8a5db689cf9f8e2ff4cb7c06df6989128d10 100644 --- a/src/main/java/org/bukkit/event/block/BlockPistonRetractEvent.java @@ -697,6 +705,31 @@ index e9de00e9e434d36117a672fa9fbfc7c52f284b67..4065432c884324b107d04f4ccd486085 */ EXPLOSION, /** +diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java +index 573165ddf3368a96e1ffc6476eb27c9e29a6f86e..148c4aad384ae8e3b8b22d264a84bddfbcafdf1e 100644 +--- a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java ++++ b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java +@@ -12,6 +12,10 @@ import org.jetbrains.annotations.Nullable; + + /** + * Called when an entity is damaged by a block ++ *

++ * For explosions, the Block returned by {@link #getDamager()} has ++ * already been cleared. See {@link #getDamagerBlockState()} for a snapshot ++ * of the block if it has already been changed. + */ + public class EntityDamageByBlockEvent extends EntityDamageEvent { + private final Block damager; +@@ -51,6 +55,9 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent { + + /** + * Returns the captured BlockState of the block that damaged the player. ++ *

++ * This block state is not placed so {@link org.bukkit.block.BlockState#isPlaced} ++ * will be false. + * + * @return the block state + */ diff --git a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java b/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java index 10d0e18dfd423b108fe381e8142867eb10399359..099efafa14c10910e4ed04abb1823f0c1a96b6a6 100644 --- a/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java @@ -1466,10 +1499,10 @@ index e7d905b1146b2bdd2da5bdeb6bf3541fb181d59e..c7d3041221742f6655155f19ef2addca void setBlockState(@NotNull BlockState blockState); } diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index 18c2864c99d4dfae16cdb35143486aeebb9a6fd6..d66857825528ee772219440dffa28ad8e820493b 100644 +index a23d030d2204098be17d8b18021fd0bb79b4431b..f427334c6e875a13aa53052ac1b5a746186b4ffe 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -@@ -513,7 +513,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -514,7 +514,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste /** * Return an immutable copy of all {@link Attribute}s and their * {@link AttributeModifier}s for a given {@link EquipmentSlot}.
diff --git a/patches/api/0066-Add-getI18NDisplayName-API.patch b/patches/api/0066-Add-getI18NDisplayName-API.patch index fcb5e4ceb1..b35373c8db 100644 --- a/patches/api/0066-Add-getI18NDisplayName-API.patch +++ b/patches/api/0066-Add-getI18NDisplayName-API.patch @@ -8,7 +8,7 @@ Currently the server only supports the English language. To override this, You must replace the language file embedded in the server jar. diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index dbaf54018a7dd392378869a5a302a880c7a56338..213e3f3de731d85f788a4bfa8d912e1b59c3c045 100644 +index 86fbc3902989a3baca851ab8c3866af445451787..aea393247c60037fb70cd8d5b8814c9849c85e03 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java @@ -235,4 +235,20 @@ public interface ItemFactory { @@ -33,10 +33,10 @@ index dbaf54018a7dd392378869a5a302a880c7a56338..213e3f3de731d85f788a4bfa8d912e1b + // Paper end - add getI18NDisplayName } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 53cc84d1ef6e281e8637ec7406236e1185ad7d82..22bb39a8f124d55b1dce1bcb981a94d763959e59 100644 +index 22e883c8d737cf9f799c6160ff63d90f99250020..551f31fc91b91702b3093bec20113bee9660a3ec 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -633,5 +633,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -640,5 +640,20 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat public net.kyori.adventure.text.@NotNull Component displayName() { return Bukkit.getServer().getItemFactory().displayName(this); } diff --git a/patches/api/0067-ensureServerConversions-API.patch b/patches/api/0067-ensureServerConversions-API.patch index 411fc2d532..d89b871b42 100644 --- a/patches/api/0067-ensureServerConversions-API.patch +++ b/patches/api/0067-ensureServerConversions-API.patch @@ -7,7 +7,7 @@ This will take a Bukkit ItemStack and run it through any conversions a server pr to ensure it meets latest minecraft expectations. diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index 213e3f3de731d85f788a4bfa8d912e1b59c3c045..898c256140cc7fee2c0cc65cca33a0e86275f115 100644 +index aea393247c60037fb70cd8d5b8814c9849c85e03..b6b90f2ef735407ac41efa21371cfd6b07c2c66e 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java @@ -251,4 +251,18 @@ public interface ItemFactory { @@ -30,10 +30,10 @@ index 213e3f3de731d85f788a4bfa8d912e1b59c3c045..898c256140cc7fee2c0cc65cca33a0e8 + // Paper end - ensure server conversions API } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 22bb39a8f124d55b1dce1bcb981a94d763959e59..0586a64b780f0dee9899a42ca4ee28d12efd749a 100644 +index 551f31fc91b91702b3093bec20113bee9660a3ec..76b6c21c68bc55d28b77dd53c988b40c9ae41258 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -552,7 +552,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -559,7 +559,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat } } @@ -42,7 +42,7 @@ index 22bb39a8f124d55b1dce1bcb981a94d763959e59..0586a64b780f0dee9899a42ca4ee28d1 } /** -@@ -634,6 +634,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -641,6 +641,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat return Bukkit.getServer().getItemFactory().displayName(this); } diff --git a/patches/api/0087-Add-ArmorStand-Item-Meta.patch b/patches/api/0087-Add-ArmorStand-Item-Meta.patch index 6287ef49e7..9c5c6218ea 100644 --- a/patches/api/0087-Add-ArmorStand-Item-Meta.patch +++ b/patches/api/0087-Add-ArmorStand-Item-Meta.patch @@ -94,3 +94,16 @@ index 0000000000000000000000000000000000000000..7e4acfff16db80a75e1ff2fee1972b16 + */ + void setMarker(boolean marker); +} +diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java +index 8dc744f253be42191ca04f8e2942c4c618655fa8..aa0f66b7187c800cd22905bfa43af3ffb53edb5f 100644 +--- a/src/main/java/org/bukkit/inventory/ItemType.java ++++ b/src/main/java/org/bukkit/inventory/ItemType.java +@@ -1879,7 +1879,7 @@ public interface ItemType extends Keyed, Translatable { + ItemType.Typed RABBIT_STEW = getItemType("rabbit_stew"); + ItemType.Typed RABBIT_FOOT = getItemType("rabbit_foot"); + ItemType.Typed RABBIT_HIDE = getItemType("rabbit_hide"); +- ItemType.Typed ARMOR_STAND = getItemType("armor_stand"); ++ ItemType.Typed ARMOR_STAND = getItemType("armor_stand"); + ItemType.Typed IRON_HORSE_ARMOR = getItemType("iron_horse_armor"); + ItemType.Typed GOLDEN_HORSE_ARMOR = getItemType("golden_horse_armor"); + ItemType.Typed DIAMOND_HORSE_ARMOR = getItemType("diamond_horse_armor"); diff --git a/patches/api/0106-PotionEffect-clone-methods.patch b/patches/api/0106-PotionEffect-clone-methods.patch index 201a73d2b8..d1fac16047 100644 --- a/patches/api/0106-PotionEffect-clone-methods.patch +++ b/patches/api/0106-PotionEffect-clone-methods.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PotionEffect clone methods diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java -index 88f720aba13961b08e54b3fd35dbaabc5dd9a4c2..037af5fd6d71a526c0e6620f2db0cd6df9625261 100644 +index 89d49ce1e9475bf2d3748e483360451359e8cef8..575156c089e45a3d6a43ca6b7adfbc7b473a60ab 100644 --- a/src/main/java/org/bukkit/potion/PotionEffect.java +++ b/src/main/java/org/bukkit/potion/PotionEffect.java -@@ -107,6 +107,33 @@ public class PotionEffect implements ConfigurationSerializable { +@@ -109,6 +109,33 @@ public class PotionEffect implements ConfigurationSerializable { this(getEffectType(map), getInt(map, DURATION), getInt(map, AMPLIFIER), getBool(map, AMBIENT, false), getBool(map, PARTICLES, true), getBool(map, ICON, getBool(map, PARTICLES, true))); } diff --git a/patches/api/0108-ItemStack-getMaxItemUseDuration.patch b/patches/api/0108-ItemStack-getMaxItemUseDuration.patch index 8252cb46b2..5f88a3de3a 100644 --- a/patches/api/0108-ItemStack-getMaxItemUseDuration.patch +++ b/patches/api/0108-ItemStack-getMaxItemUseDuration.patch @@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 0586a64b780f0dee9899a42ca4ee28d12efd749a..b92a86e9d128b1ce6f02962574e30ced74e44bc8 100644 +index 76b6c21c68bc55d28b77dd53c988b40c9ae41258..8cf07089bc3c60262ff1c4c6740310b48aa4169d 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -661,5 +661,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -668,5 +668,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat public String getI18NDisplayName() { return Bukkit.getServer().getItemFactory().getI18NDisplayName(this); } diff --git a/patches/api/0116-ItemStack-API-additions-for-quantity-flags-lore.patch b/patches/api/0116-ItemStack-API-additions-for-quantity-flags-lore.patch index 44ecc5cfdc..3ff1a2b33e 100644 --- a/patches/api/0116-ItemStack-API-additions-for-quantity-flags-lore.patch +++ b/patches/api/0116-ItemStack-API-additions-for-quantity-flags-lore.patch @@ -5,18 +5,10 @@ Subject: [PATCH] ItemStack API additions for quantity/flags/lore diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index b92a86e9d128b1ce6f02962574e30ced74e44bc8..e388239d6d960af2102111d2ae90b2a655b2a94a 100644 +index 8cf07089bc3c60262ff1c4c6740310b48aa4169d..bb77d65fd42f9b53ef88537e814bea652bb230de 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -3,6 +3,7 @@ package org.bukkit.inventory; - import com.google.common.base.Preconditions; - import com.google.common.collect.ImmutableMap; - import java.util.LinkedHashMap; -+import java.util.List; // Paper - import java.util.Map; - import org.bukkit.Bukkit; - import org.bukkit.Material; -@@ -669,5 +670,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -676,5 +676,185 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat // Requires access to NMS return ensureServerConversions().getMaxItemUseDuration(); } @@ -90,7 +82,7 @@ index b92a86e9d128b1ce6f02962574e30ced74e44bc8..e388239d6d960af2102111d2ae90b2a6 + * @deprecated in favor of {@link #lore()} + */ + @Deprecated -+ public @Nullable List getLore() { ++ public @Nullable java.util.List getLore() { + if (!hasItemMeta()) { + return null; + } @@ -105,7 +97,7 @@ index b92a86e9d128b1ce6f02962574e30ced74e44bc8..e388239d6d960af2102111d2ae90b2a6 + * If the item has lore, returns it, else it will return null + * @return The lore, or null + */ -+ public @Nullable List lore() { ++ public @Nullable java.util.List lore() { + if (!this.hasItemMeta()) { + return null; + } @@ -121,10 +113,10 @@ index b92a86e9d128b1ce6f02962574e30ced74e44bc8..e388239d6d960af2102111d2ae90b2a6 + * Removes lore when given null. + * + * @param lore the lore that will be set -+ * @deprecated in favour of {@link #lore(List)} ++ * @deprecated in favour of {@link #lore(java.util.List)} + */ + @Deprecated -+ public void setLore(@Nullable List lore) { ++ public void setLore(@Nullable java.util.List lore) { + ItemMeta itemMeta = getItemMeta(); + if (itemMeta == null) { + throw new IllegalStateException("Cannot set lore on " + getType()); @@ -139,7 +131,7 @@ index b92a86e9d128b1ce6f02962574e30ced74e44bc8..e388239d6d960af2102111d2ae90b2a6 + * + * @param lore the lore that will be set + */ -+ public void lore(@Nullable List lore) { ++ public void lore(@Nullable java.util.List lore) { + ItemMeta itemMeta = getItemMeta(); + if (itemMeta == null) { + throw new IllegalStateException("Cannot set lore on " + getType()); diff --git a/patches/api/0146-Improve-death-events.patch b/patches/api/0146-Improve-death-events.patch index 90a6bdde24..3f91458a84 100644 --- a/patches/api/0146-Improve-death-events.patch +++ b/patches/api/0146-Improve-death-events.patch @@ -15,10 +15,10 @@ items and experience which is otherwise only properly possible by using internal code. diff --git a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java -index a5984ab06cce95d30e70511e125f69339b574c04..130cf9e5981f701dff4fa72e71e0b5dc8295bfc8 100644 +index b0c069f65da29c6e9eff8e0490fda43a6bed307c..81a3067ff5ae22943b66051f4613ab9fe095720c 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityDeathEvent.java -@@ -5,14 +5,24 @@ import org.bukkit.entity.LivingEntity; +@@ -6,15 +6,25 @@ import org.bukkit.entity.LivingEntity; import org.bukkit.event.HandlerList; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; @@ -30,6 +30,7 @@ index a5984ab06cce95d30e70511e125f69339b574c04..130cf9e5981f701dff4fa72e71e0b5dc -public class EntityDeathEvent extends EntityEvent { +public class EntityDeathEvent extends EntityEvent implements org.bukkit.event.Cancellable { // Paper - make cancellable private static final HandlerList handlers = new HandlerList(); + private final DamageSource damageSource; private final List drops; private int dropExp = 0; + // Paper start - make cancellable @@ -42,9 +43,9 @@ index a5984ab06cce95d30e70511e125f69339b574c04..130cf9e5981f701dff4fa72e71e0b5dc + private float deathSoundPitch; + // Paper end - public EntityDeathEvent(@NotNull final LivingEntity entity, @NotNull final List drops) { - this(entity, drops, 0); -@@ -74,4 +84,133 @@ public class EntityDeathEvent extends EntityEvent { + public EntityDeathEvent(@NotNull final LivingEntity entity, @NotNull DamageSource damageSource, @NotNull final List drops) { + this(entity, damageSource, drops, 0); +@@ -87,4 +97,133 @@ public class EntityDeathEvent extends EntityEvent { public static HandlerList getHandlerList() { return handlers; } @@ -179,10 +180,10 @@ index a5984ab06cce95d30e70511e125f69339b574c04..130cf9e5981f701dff4fa72e71e0b5dc + // Paper end } diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java -index 03b4e0300d228e3f3a9f4f75c96e0cf9ed1a7d2d..38f81772edacb178e21c3f273e8c41ed46177d6d 100644 +index 9473303bd8ab1f6b63b6999a5f5ff3eca1cc23d6..76f00e386110f361549690d20dc0f73884a2fdda 100644 --- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java +++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java -@@ -62,6 +62,19 @@ public class PlayerDeathEvent extends EntityDeathEvent { +@@ -63,6 +63,19 @@ public class PlayerDeathEvent extends EntityDeathEvent { return (Player) entity; } diff --git a/patches/api/0152-Material-API-additions.patch b/patches/api/0152-Material-API-additions.patch index 9405b650d1..d64d21c758 100644 --- a/patches/api/0152-Material-API-additions.patch +++ b/patches/api/0152-Material-API-additions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Material API additions diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 2750e143a3ac20797e16a15b687952157197d562..c2808db693647bdf3b9617cb6c665e8499874485 100644 +index 0a5dfd728a1988d8bc937ea5122dff4cbe546cfe..fb6e030af69b085946a029d89347b19b121f6a14 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -125,6 +125,7 @@ import org.jetbrains.annotations.Nullable; +@@ -128,6 +128,7 @@ import org.jetbrains.annotations.Nullable; /** * An enum of all material IDs accepted by the official server and client */ @@ -16,7 +16,7 @@ index 2750e143a3ac20797e16a15b687952157197d562..c2808db693647bdf3b9617cb6c665e84 public enum Material implements Keyed, Translatable { // AIR(9648, 0), -@@ -4725,6 +4726,22 @@ public enum Material implements Keyed, Translatable { +@@ -4728,6 +4729,22 @@ public enum Material implements Keyed, Translatable { } } diff --git a/patches/api/0172-Fix-Spigot-annotation-mistakes.patch b/patches/api/0172-Fix-Spigot-annotation-mistakes.patch index 6dc3d96c0b..74b42863cd 100644 --- a/patches/api/0172-Fix-Spigot-annotation-mistakes.patch +++ b/patches/api/0172-Fix-Spigot-annotation-mistakes.patch @@ -300,10 +300,10 @@ index 02b4ffa6b918269bd64f7c518fcceef1f6990737..f0878c7539696cc0676e6010e88914d3 if (this.world == null) { return null; diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index c2808db693647bdf3b9617cb6c665e8499874485..c605da711c032f7091390e50b4a5d332c992d3d1 100644 +index fb6e030af69b085946a029d89347b19b121f6a14..feebabf946913263461e1d0f13a478cf4bfd0f68 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -4746,20 +4746,20 @@ public enum Material implements Keyed, Translatable { +@@ -4749,20 +4749,20 @@ public enum Material implements Keyed, Translatable { * Do not use for any reason. * * @return ID of this material @@ -328,7 +328,7 @@ index c2808db693647bdf3b9617cb6c665e8499874485..c605da711c032f7091390e50b4a5d332 public boolean isLegacy() { return legacy; } -@@ -4835,8 +4835,10 @@ public enum Material implements Keyed, Translatable { +@@ -4838,8 +4838,10 @@ public enum Material implements Keyed, Translatable { * Gets the MaterialData class associated with this Material * * @return MaterialData associated with this Material @@ -339,7 +339,7 @@ index c2808db693647bdf3b9617cb6c665e8499874485..c605da711c032f7091390e50b4a5d332 public Class getData() { Preconditions.checkArgument(legacy, "Cannot get data class of Modern Material"); return ctor.getDeclaringClass(); -@@ -9103,7 +9105,11 @@ public enum Material implements Keyed, Translatable { +@@ -5295,7 +5297,11 @@ public enum Material implements Keyed, Translatable { * material. * * @return true if this material can be interacted with. @@ -349,8 +349,8 @@ index c2808db693647bdf3b9617cb6c665e8499874485..c605da711c032f7091390e50b4a5d332 */ + @Deprecated // Paper public boolean isInteractable() { - switch (this) { - // + BlockType type = asBlockType(); + return type != null && type.isInteractable(); diff --git a/src/main/java/org/bukkit/NamespacedKey.java b/src/main/java/org/bukkit/NamespacedKey.java index 9b61129c3ef83d0bfceba54aba2effa12bc90678..cbdaa121dbc1876d0cd55f4b7b57f283ecaa8f1a 100644 --- a/src/main/java/org/bukkit/NamespacedKey.java @@ -453,10 +453,10 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f return note; } diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 4f8c54a84c9f737dad3feff9ffd7daf22854e97f..a04d279561676e825905f5512c399d14a3d8f828 100644 +index 57dfc408fcf9036808af26bd1255afe104d40286..62a7748b7509907ac8c8c0026f0cc5911f530eb7 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -201,14 +201,12 @@ public interface Registry extends Iterable { +@@ -219,14 +219,12 @@ public interface Registry extends Iterable { * * @see TrimMaterial */ @@ -471,7 +471,7 @@ index 4f8c54a84c9f737dad3feff9ffd7daf22854e97f..a04d279561676e825905f5512c399d14 Registry TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class); /** * Damage types. -@@ -310,8 +308,11 @@ public interface Registry extends Iterable { +@@ -328,8 +326,11 @@ public interface Registry extends Iterable { * * @param input non-null input * @return registered object or null if does not exist @@ -498,7 +498,7 @@ index 6277451c3c6c551078c237cd767b6d70c4f585ea..10f5cfb1885833a1d2c1027c03974da4 CRACKED(0x0), GLYPHED(0x1), diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 69f236d965c631510b008a7eb38aa1b62a4e196a..2382322bc4f30ff3163b2941650692d9a13328ac 100644 +index 3d5ef29bcfed92dc7fb3bb6d59538ba4a4e3de5f..43f8cdd600aa2c2e33136068b3c4b4b81a6544d4 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -730,9 +730,8 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @@ -1399,7 +1399,7 @@ index 002acfbdce1db10f7ba1b6a013e678f504ac6e69..8d14426eb1ebea27058d5f22ea652f22 return getPlayer().getItemOnCursor(); } diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index 898c256140cc7fee2c0cc65cca33a0e86275f115..e34c89a945a0f12cdc4be8cc232c8de986474372 100644 +index b6b90f2ef735407ac41efa21371cfd6b07c2c66e..4c4e52b2c200408c4e33a141e1eed78126ceaaee 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java @@ -30,7 +30,7 @@ public interface ItemFactory { @@ -1412,18 +1412,18 @@ index 898c256140cc7fee2c0cc65cca33a0e86275f115..e34c89a945a0f12cdc4be8cc232c8de9 /** diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index e388239d6d960af2102111d2ae90b2a655b2a94a..276cfd52817115981fe7dc46363278f8b8c5aee3 100644 +index bb77d65fd42f9b53ef88537e814bea652bb230de..d758cea1d8e88937678dbfd0ac72d49b6c160fe0 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -8,6 +8,7 @@ import java.util.Map; - import org.bukkit.Bukkit; - import org.bukkit.Material; +@@ -10,6 +10,7 @@ import org.bukkit.Material; + import org.bukkit.NamespacedKey; + import org.bukkit.Registry; import org.bukkit.Translatable; +import org.bukkit.UndefinedNullability; import org.bukkit.Utility; import org.bukkit.configuration.serialization.ConfigurationSerializable; import org.bukkit.enchantments.Enchantment; -@@ -170,8 +171,10 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -172,8 +173,10 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat * Gets the MaterialData for this stack of items * * @return MaterialData for this item @@ -1434,7 +1434,7 @@ index e388239d6d960af2102111d2ae90b2a655b2a94a..276cfd52817115981fe7dc46363278f8 public MaterialData getData() { Material mat = Bukkit.getUnsafe().toLegacy(getType()); if (data == null && mat != null && mat.getData() != null) { -@@ -185,7 +188,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -187,7 +190,9 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat * Sets the MaterialData for this stack of items * * @param data New MaterialData for this item @@ -1444,7 +1444,7 @@ index e388239d6d960af2102111d2ae90b2a655b2a94a..276cfd52817115981fe7dc46363278f8 public void setData(@Nullable MaterialData data) { if (data == null) { this.data = data; -@@ -561,7 +566,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -567,7 +572,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat * * @return a copy of the current ItemStack's ItemData */ @@ -1587,10 +1587,10 @@ index 597a18a767b68b47e81454b7d44613c7178c1366..bc3440eb72127824b3961fbdae583bb6 public ItemStack getInput() { return this.ingredient.getItemStack(); diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index d66857825528ee772219440dffa28ad8e820493b..3ddd52b135f339ff006b5d53f46487bfbe1ff7fd 100644 +index f427334c6e875a13aa53052ac1b5a746186b4ffe..abe5c56c09a29cb3dcd35936045938c1b88c8500 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -@@ -141,6 +141,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -142,6 +142,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste /** * Checks for existence of a localized name. * @@ -1598,7 +1598,7 @@ index d66857825528ee772219440dffa28ad8e820493b..3ddd52b135f339ff006b5d53f46487bf * @return true if this has a localized name * @deprecated meta no longer exists */ -@@ -153,6 +154,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -154,6 +155,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste * Plugins should check that hasLocalizedName() returns true * before calling this method. * @@ -1606,7 +1606,7 @@ index d66857825528ee772219440dffa28ad8e820493b..3ddd52b135f339ff006b5d53f46487bf * @return the localized name that is set * @deprecated meta no longer exists */ -@@ -163,6 +165,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -164,6 +166,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste /** * Sets the localized name. * diff --git a/patches/api/0174-PlayerDeathEvent-getItemsToKeep.patch b/patches/api/0174-PlayerDeathEvent-getItemsToKeep.patch index cf8c6281f8..4d28221bcd 100644 --- a/patches/api/0174-PlayerDeathEvent-getItemsToKeep.patch +++ b/patches/api/0174-PlayerDeathEvent-getItemsToKeep.patch @@ -8,18 +8,10 @@ Exposes a mutable array on items a player should keep on death Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4 diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java -index 38f81772edacb178e21c3f273e8c41ed46177d6d..9719e183036c361b909b203593c067a551b82264 100644 +index 76f00e386110f361549690d20dc0f73884a2fdda..edf14dac359e996f76e0af551a81a4dd8e48bd6c 100644 --- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java +++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java -@@ -37,7 +37,6 @@ public class PlayerDeathEvent extends EntityDeathEvent { - } - // Paper end - adventure - -- @Deprecated // Paper - public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, @Nullable final String deathMessage) { - this(player, drops, droppedExp, 0, deathMessage); - } -@@ -56,6 +55,41 @@ public class PlayerDeathEvent extends EntityDeathEvent { +@@ -57,6 +57,41 @@ public class PlayerDeathEvent extends EntityDeathEvent { this.deathMessage = net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserializeOrNull(deathMessage); // Paper } diff --git a/patches/api/0182-PlayerDeathEvent-shouldDropExperience.patch b/patches/api/0182-PlayerDeathEvent-shouldDropExperience.patch index fafa02c732..9f043baab6 100644 --- a/patches/api/0182-PlayerDeathEvent-shouldDropExperience.patch +++ b/patches/api/0182-PlayerDeathEvent-shouldDropExperience.patch @@ -5,28 +5,28 @@ Subject: [PATCH] PlayerDeathEvent#shouldDropExperience diff --git a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java -index 9719e183036c361b909b203593c067a551b82264..66e9d65a8dd05bed05d0ab46ec64206a6dae0507 100644 +index edf14dac359e996f76e0af551a81a4dd8e48bd6c..bba3821d1215eb00489f841195c890a3f3353912 100644 --- a/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java +++ b/src/main/java/org/bukkit/event/entity/PlayerDeathEvent.java -@@ -16,6 +16,7 @@ public class PlayerDeathEvent extends EntityDeathEvent { +@@ -17,6 +17,7 @@ public class PlayerDeathEvent extends EntityDeathEvent { private int newTotalExp = 0; private boolean keepLevel = false; private boolean keepInventory = false; + private boolean doExpDrop; // Paper - shouldDropExperience API // Paper start - adventure @org.jetbrains.annotations.ApiStatus.Internal - public PlayerDeathEvent(final @NotNull Player player, final @NotNull List drops, final int droppedExp, final @Nullable net.kyori.adventure.text.Component deathMessage) { -@@ -29,11 +30,18 @@ public class PlayerDeathEvent extends EntityDeathEvent { + public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List drops, final int droppedExp, final @Nullable net.kyori.adventure.text.Component deathMessage) { +@@ -30,11 +31,18 @@ public class PlayerDeathEvent extends EntityDeathEvent { @org.jetbrains.annotations.ApiStatus.Internal - public PlayerDeathEvent(final @NotNull Player player, final @NotNull List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage) { + public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage) { + // Paper start - shouldDropExperience API -+ this(player, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true); ++ this(player, damageSource, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true); + } + @org.jetbrains.annotations.ApiStatus.Internal -+ public PlayerDeathEvent(final @NotNull Player player, final @NotNull List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage, final boolean doExpDrop) { ++ public PlayerDeathEvent(final @NotNull Player player, final @NotNull DamageSource damageSource, final @NotNull List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, final @Nullable net.kyori.adventure.text.Component deathMessage, final boolean doExpDrop) { + // Paper end - shouldDropExperience API - super(player, drops, droppedExp); + super(player, damageSource, drops, droppedExp); this.newExp = newExp; this.newTotalExp = newTotalExp; this.newLevel = newLevel; @@ -35,18 +35,18 @@ index 9719e183036c361b909b203593c067a551b82264..66e9d65a8dd05bed05d0ab46ec64206a } // Paper end - adventure -@@ -48,11 +56,19 @@ public class PlayerDeathEvent extends EntityDeathEvent { +@@ -50,11 +58,19 @@ public class PlayerDeathEvent extends EntityDeathEvent { @Deprecated // Paper - public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) { + public PlayerDeathEvent(@NotNull final Player player, @NotNull DamageSource damageSource, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage) { + // Paper start - shouldDropExperience API -+ this(player, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true); ++ this(player, damageSource, drops, droppedExp, newExp, newTotalExp, newLevel, deathMessage, true); + } + + @Deprecated // Paper -+ public PlayerDeathEvent(@NotNull final Player player, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage, boolean doExpDrop) { ++ public PlayerDeathEvent(@NotNull final Player player, final @NotNull DamageSource damageSource, @NotNull final List drops, final int droppedExp, final int newExp, final int newTotalExp, final int newLevel, @Nullable final String deathMessage, boolean doExpDrop) { + // Paper end - shouldDropExperience API - super(player, drops, droppedExp); + super(player, damageSource, drops, droppedExp); this.newExp = newExp; this.newTotalExp = newTotalExp; this.newLevel = newLevel; @@ -55,7 +55,7 @@ index 9719e183036c361b909b203593c067a551b82264..66e9d65a8dd05bed05d0ab46ec64206a } @Deprecated // Paper -@@ -90,6 +106,22 @@ public class PlayerDeathEvent extends EntityDeathEvent { +@@ -92,6 +108,22 @@ public class PlayerDeathEvent extends EntityDeathEvent { } // Paper end diff --git a/patches/api/0188-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/api/0188-Add-Raw-Byte-ItemStack-Serialization.patch index dc654da7f0..8035d3ac56 100644 --- a/patches/api/0188-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/patches/api/0188-Add-Raw-Byte-ItemStack-Serialization.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization Serializes using NBT which is safer for server data migrations than bukkits format. diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index d69e5fa40702c283c370a2f712b51dc2ea3a1fa0..30d869a7c4bba79b4c05de7860b31c14f47b341a 100644 +index da997507b96908027c49dabc6daf7c787dcad95d..cb7aef53cbffc76dea9fec28445ea8aefcb29d62 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -153,5 +153,9 @@ public interface UnsafeValues { +@@ -162,5 +162,9 @@ public interface UnsafeValues { default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher(); } @@ -20,10 +20,10 @@ index d69e5fa40702c283c370a2f712b51dc2ea3a1fa0..30d869a7c4bba79b4c05de7860b31c14 // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 276cfd52817115981fe7dc46363278f8b8c5aee3..e82eeadc7cb53572351670761c4e592a33345c6b 100644 +index d758cea1d8e88937678dbfd0ac72d49b6c160fe0..066f99a1f4cc42cf0e87d495f97a0685817dfa18 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -653,6 +653,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -659,6 +659,30 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat return Bukkit.getServer().getItemFactory().ensureServerConversions(this); } diff --git a/patches/api/0200-Support-components-in-ItemMeta.patch b/patches/api/0200-Support-components-in-ItemMeta.patch index 8a3122ea24..470cc2be97 100644 --- a/patches/api/0200-Support-components-in-ItemMeta.patch +++ b/patches/api/0200-Support-components-in-ItemMeta.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Support components in ItemMeta diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java -index 3ddd52b135f339ff006b5d53f46487bfbe1ff7fd..ed12e27a0ed75caa8aa46c3e965ed566a97865cf 100644 +index abe5c56c09a29cb3dcd35936045938c1b88c8500..a317111df3b6cda00dc700c68f4c2b789c51885d 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java @@ -5,6 +5,7 @@ import java.util.Collection; @@ -16,7 +16,7 @@ index 3ddd52b135f339ff006b5d53f46487bfbe1ff7fd..ed12e27a0ed75caa8aa46c3e965ed566 import org.bukkit.attribute.Attribute; import org.bukkit.attribute.AttributeModifier; import org.bukkit.configuration.serialization.ConfigurationSerializable; -@@ -65,6 +66,20 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -66,6 +67,20 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste @NotNull String getDisplayName(); @@ -37,7 +37,7 @@ index 3ddd52b135f339ff006b5d53f46487bfbe1ff7fd..ed12e27a0ed75caa8aa46c3e965ed566 /** * Sets the display name. * -@@ -74,6 +89,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -75,6 +90,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste @Deprecated // Paper void setDisplayName(@Nullable String name); @@ -54,7 +54,7 @@ index 3ddd52b135f339ff006b5d53f46487bfbe1ff7fd..ed12e27a0ed75caa8aa46c3e965ed566 /** * Checks for existence of an item name. *
-@@ -210,6 +235,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -211,6 +236,19 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste @Nullable List getLore(); @@ -74,7 +74,7 @@ index 3ddd52b135f339ff006b5d53f46487bfbe1ff7fd..ed12e27a0ed75caa8aa46c3e965ed566 /** * Sets the lore for this item. * Removes lore when given null. -@@ -220,6 +258,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste +@@ -221,6 +259,16 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable, Persiste @Deprecated // Paper void setLore(@Nullable List lore); diff --git a/patches/api/0209-Add-methods-to-get-translation-keys.patch b/patches/api/0209-Add-methods-to-get-translation-keys.patch index 282a4c0520..d504fbdf2a 100644 --- a/patches/api/0209-Add-methods-to-get-translation-keys.patch +++ b/patches/api/0209-Add-methods-to-get-translation-keys.patch @@ -144,10 +144,10 @@ index dc66bd69646ac949d1386ce8f6ff913e9475439d..4482e8f2c617c2f51b2b53762e775d11 + // Paper end } diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index c605da711c032f7091390e50b4a5d332c992d3d1..61e0739f002a949a204c7591dfa3074560d1459e 100644 +index feebabf946913263461e1d0f13a478cf4bfd0f68..d6e2ec415eab4f55fd925a3b0982e869befbd088 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -126,7 +126,7 @@ import org.jetbrains.annotations.Nullable; +@@ -129,7 +129,7 @@ import org.jetbrains.annotations.Nullable; * An enum of all material IDs accepted by the official server and client */ @SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper @@ -156,7 +156,7 @@ index c605da711c032f7091390e50b4a5d332c992d3d1..61e0739f002a949a204c7591dfa30745 // AIR(9648, 0), STONE(22948), -@@ -4740,6 +4740,15 @@ public enum Material implements Keyed, Translatable { +@@ -4743,6 +4743,15 @@ public enum Material implements Keyed, Translatable { } return false; } @@ -172,7 +172,7 @@ index c605da711c032f7091390e50b4a5d332c992d3d1..61e0739f002a949a204c7591dfa30745 // Paper end /** -@@ -11481,9 +11490,11 @@ public enum Material implements Keyed, Translatable { +@@ -5494,9 +5503,11 @@ public enum Material implements Keyed, Translatable { * material * @see #getBlockTranslationKey() * @see #getItemTranslationKey() @@ -183,7 +183,7 @@ index c605da711c032f7091390e50b4a5d332c992d3d1..61e0739f002a949a204c7591dfa30745 + @Deprecated(forRemoval = true) // Paper public String getTranslationKey() { if (this.isItem()) { - return Bukkit.getUnsafe().getItemTranslationKey(this); + return asItemType().getTranslationKey(); diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java index eae90e72b1dff5ab3b1a4fdcfe57187e85fe4d49..62d2b3f950860dee0898d77b0a29635c3f9a7e23 100644 --- a/src/main/java/org/bukkit/MusicInstrument.java @@ -480,10 +480,10 @@ index 5bd252c0ae3b09fe141d131360c67bb9bfbf5422..78587d9fabe6371a23a7963917b054db + } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index e82eeadc7cb53572351670761c4e592a33345c6b..645cff10eef90826bb44bbe937b141289f182cde 100644 +index 066f99a1f4cc42cf0e87d495f97a0685817dfa18..23686519b8c1338dd6e9f1c5a0e73467c0b59a4f 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -25,7 +25,7 @@ import org.jetbrains.annotations.Nullable; +@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable; * use this class to encapsulate Materials for which {@link Material#isItem()} * returns false.
*/ @@ -492,7 +492,7 @@ index e82eeadc7cb53572351670761c4e592a33345c6b..645cff10eef90826bb44bbe937b14128 private Material type = Material.AIR; private int amount = 0; private MaterialData data = null; -@@ -620,6 +620,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -626,6 +626,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat @Override @NotNull @@ -500,7 +500,7 @@ index e82eeadc7cb53572351670761c4e592a33345c6b..645cff10eef90826bb44bbe937b14128 public String getTranslationKey() { return Bukkit.getUnsafe().getTranslationKey(this); } -@@ -879,5 +880,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -885,5 +886,16 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat ItemMeta itemMeta = getItemMeta(); return itemMeta != null && itemMeta.hasItemFlag(flag); } diff --git a/patches/api/0212-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/api/0212-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index 75dff33979..01127fef5b 100644 --- a/patches/api/0212-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/api/0212-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 30d869a7c4bba79b4c05de7860b31c14f47b341a..241cb853476ea35dad73d0234b2d030e9af23476 100644 +index cb7aef53cbffc76dea9fec28445ea8aefcb29d62..fb1efc7dfcfbfb823c8ad8fe2943adb99104aefe 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -157,5 +157,12 @@ public interface UnsafeValues { +@@ -166,5 +166,12 @@ public interface UnsafeValues { byte[] serializeItem(ItemStack item); ItemStack deserializeItem(byte[] data); diff --git a/patches/api/0243-Add-RegistryAccess-for-managing-registries.patch b/patches/api/0243-Add-RegistryAccess-for-managing-registries.patch index 17ce5cc911..62f2578f51 100644 --- a/patches/api/0243-Add-RegistryAccess-for-managing-registries.patch +++ b/patches/api/0243-Add-RegistryAccess-for-managing-registries.patch @@ -206,10 +206,19 @@ index 732ed3724e784ad659cb4411dbd73b42a8330a2c..7be6710d28dea19bd0f9054c1c2e32da return server.getRegistry(tClass); } diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f288ba27a40 100644 +index 62a7748b7509907ac8c8c0026f0cc5911f530eb7..e5393d3204f4d04d8e9640a45c6b4ba6a912079b 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -129,7 +129,7 @@ public interface Registry extends Iterable { +@@ -101,7 +101,7 @@ public interface Registry extends Iterable { + * @apiNote BlockType is not ready for public usage yet + */ + @ApiStatus.Internal +- Registry BLOCK = Objects.requireNonNull(Bukkit.getRegistry(BlockType.class), "No registry present for BlockType. This is a bug."); ++ Registry BLOCK = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.BLOCK); // Paper + /** + * Custom boss bars. + * +@@ -139,7 +139,7 @@ public interface Registry extends Iterable { * * @see Enchantment */ @@ -218,16 +227,25 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28 /** * Server entity types. * -@@ -141,7 +141,7 @@ public interface Registry extends Iterable { +@@ -151,7 +151,7 @@ public interface Registry extends Iterable { * * @see MusicInstrument */ - Registry INSTRUMENT = Objects.requireNonNull(Bukkit.getRegistry(MusicInstrument.class), "No registry present for MusicInstrument. This is a bug."); + Registry INSTRUMENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.INSTRUMENT); // Paper /** - * Default server loot tables. + * Server item types. * @@ -159,7 +159,7 @@ public interface Registry extends Iterable { + * @apiNote ItemType is not ready for public usage yet + */ + @ApiStatus.Internal +- Registry ITEM = Objects.requireNonNull(Bukkit.getRegistry(ItemType.class), "No registry present for ItemType. This is a bug."); ++ Registry ITEM = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.ITEM); // Paper + /** + * Default server loot tables. + * +@@ -177,7 +177,7 @@ public interface Registry extends Iterable { * * @see PotionEffectType */ @@ -236,7 +254,7 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28 /** * Server particles. * -@@ -182,14 +182,16 @@ public interface Registry extends Iterable { +@@ -200,14 +200,16 @@ public interface Registry extends Iterable { * Server structures. * * @see Structure @@ -255,7 +273,7 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28 /** * Sound keys. * -@@ -200,21 +202,26 @@ public interface Registry extends Iterable { +@@ -218,21 +220,26 @@ public interface Registry extends Iterable { * Trim materials. * * @see TrimMaterial @@ -286,7 +304,7 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28 /** * Villager profession. * -@@ -268,8 +275,10 @@ public interface Registry extends Iterable { +@@ -286,8 +293,10 @@ public interface Registry extends Iterable { * Wolf variants. * * @see Wolf.Variant @@ -298,7 +316,7 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28 /** * Map cursor types. * -@@ -282,7 +291,7 @@ public interface Registry extends Iterable { +@@ -300,7 +309,7 @@ public interface Registry extends Iterable { * * @see GameEvent */ @@ -308,7 +326,7 @@ index a04d279561676e825905f5512c399d14a3d8f828..91117cad12eee0bdaac8e0398a0f7f28 * Get the object by its key. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 395f7910f535bfd33a5676b011ab62a53e30e140..5644af8154373923791e3ed5f8b01c3f5d357b9c 100644 +index f0c1d16c6bee58826a3cde3c4988e02690207fce..c53268bc4c3ae275ad8765f0848e46e1d6c7372d 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -2046,8 +2046,11 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/api/0244-Add-StructuresLocateEvent.patch b/patches/api/0244-Add-StructuresLocateEvent.patch index 10ef586cce..4c155ca54a 100644 --- a/patches/api/0244-Add-StructuresLocateEvent.patch +++ b/patches/api/0244-Add-StructuresLocateEvent.patch @@ -513,10 +513,10 @@ index 0000000000000000000000000000000000000000..1e7b53f9bc13dcd5a0a4a40004591e4f + } +} diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 91117cad12eee0bdaac8e0398a0f7f288ba27a40..43f410326d6d68242113e2fefe31af256889ed9c 100644 +index e5393d3204f4d04d8e9640a45c6b4ba6a912079b..d573d8e36fbe6b7f5a298fb64910feba9cba0697 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -292,6 +292,15 @@ public interface Registry extends Iterable { +@@ -310,6 +310,15 @@ public interface Registry extends Iterable { * @see GameEvent */ Registry GAME_EVENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.GAME_EVENT); // Paper diff --git a/patches/api/0257-Add-worldborder-events.patch b/patches/api/0256-Add-worldborder-events.patch similarity index 100% rename from patches/api/0257-Add-worldborder-events.patch rename to patches/api/0256-Add-worldborder-events.patch diff --git a/patches/api/0256-Cache-the-result-of-Material-isBlock.patch b/patches/api/0256-Cache-the-result-of-Material-isBlock.patch deleted file mode 100644 index b2322c2c4a..0000000000 --- a/patches/api/0256-Cache-the-result-of-Material-isBlock.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> -Date: Tue, 2 Mar 2021 15:24:58 -0800 -Subject: [PATCH] Cache the result of Material#isBlock - - -diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 61e0739f002a949a204c7591dfa3074560d1459e..5aa595860c73e78cf3c9f2a8984c62744cfe5612 100644 ---- a/src/main/java/org/bukkit/Material.java -+++ b/src/main/java/org/bukkit/Material.java -@@ -4684,6 +4684,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla - public final Class data; - private final boolean legacy; - private final NamespacedKey key; -+ private boolean isBlock; // Paper - - private Material(final int id) { - this(id, 64); -@@ -4887,6 +4888,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla - * @return true if this material is a block - */ - public boolean isBlock() { -+ // Paper start - cache isBlock -+ return this.isBlock; -+ } -+ private boolean isBlock0() { -+ // Paper end - switch (this) { - // - case ACACIA_BUTTON: -@@ -6131,6 +6137,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla - static { - for (Material material : values()) { - BY_NAME.put(material.name(), material); -+ material.isBlock = material.isBlock0(); // Paper - } - } - diff --git a/patches/api/0258-added-PlayerNameEntityEvent.patch b/patches/api/0257-added-PlayerNameEntityEvent.patch similarity index 100% rename from patches/api/0258-added-PlayerNameEntityEvent.patch rename to patches/api/0257-added-PlayerNameEntityEvent.patch diff --git a/patches/api/0259-Add-recipe-to-cook-events.patch b/patches/api/0258-Add-recipe-to-cook-events.patch similarity index 100% rename from patches/api/0259-Add-recipe-to-cook-events.patch rename to patches/api/0258-Add-recipe-to-cook-events.patch diff --git a/patches/api/0260-Add-Block-isValidTool.patch b/patches/api/0259-Add-Block-isValidTool.patch similarity index 100% rename from patches/api/0260-Add-Block-isValidTool.patch rename to patches/api/0259-Add-Block-isValidTool.patch diff --git a/patches/api/0261-Expand-world-key-API.patch b/patches/api/0260-Expand-world-key-API.patch similarity index 95% rename from patches/api/0261-Expand-world-key-API.patch rename to patches/api/0260-Expand-world-key-API.patch index 0beb2158ec..e26cc12b26 100644 --- a/patches/api/0261-Expand-world-key-API.patch +++ b/patches/api/0260-Expand-world-key-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expand world key API diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index 732ed3724e784ad659cb4411dbd73b42a8330a2c..d078ea797cf4c6ab291aec3ad7fbd4740017286c 100644 +index 7be6710d28dea19bd0f9054c1c2e32dacd355c45..8fd1de659777595d9d8198e7ee638ad5500a6317 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -864,6 +864,18 @@ public final class Bukkit { @@ -56,7 +56,7 @@ index 27eff0826d5b5b48697fefd9571886e7bbce74b1..d8b1fa79dc24138dc71e32c14bda71c1 // Paper end } diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 395f7910f535bfd33a5676b011ab62a53e30e140..e6598c36cfc98282f30a57105986a295f1c94676 100644 +index c53268bc4c3ae275ad8765f0848e46e1d6c7372d..e1ab2090c1b219f12af382079907e440e9cf4379 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -722,6 +722,17 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi @@ -78,10 +78,10 @@ index 395f7910f535bfd33a5676b011ab62a53e30e140..e6598c36cfc98282f30a57105986a295 * Create a new virtual {@link WorldBorder}. *

diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 241cb853476ea35dad73d0234b2d030e9af23476..5de86f8cd3cc7f7e8ebc4a22d3921273378704f2 100644 +index fb1efc7dfcfbfb823c8ad8fe2943adb99104aefe..1b2b0e6d10393b4f4d0716256aa4c87b57affbe1 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -164,5 +164,10 @@ public interface UnsafeValues { +@@ -173,5 +173,10 @@ public interface UnsafeValues { * Use this when sending custom packets, so that there are no collisions on the client or server. */ public int nextEntityId(); diff --git a/patches/api/0262-Improve-Item-Rarity-API.patch b/patches/api/0261-Improve-Item-Rarity-API.patch similarity index 93% rename from patches/api/0262-Improve-Item-Rarity-API.patch rename to patches/api/0261-Improve-Item-Rarity-API.patch index 6080352888..3c1ddd5e14 100644 --- a/patches/api/0262-Improve-Item-Rarity-API.patch +++ b/patches/api/0261-Improve-Item-Rarity-API.patch @@ -43,10 +43,10 @@ index 0000000000000000000000000000000000000000..f1cd5a4f37eee8975ac3d0421b524afc + } +} diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 5aa595860c73e78cf3c9f2a8984c62744cfe5612..1e4ebe9bdc6aadf18029377e7ce70ca0d88bd1a1 100644 +index d6e2ec415eab4f55fd925a3b0982e869befbd088..044c563daee7898c676bd6ba58ee395c52eda121 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -4750,6 +4750,19 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -4752,6 +4752,19 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla return Bukkit.getUnsafe().getBlockTranslationKey(this); } } @@ -108,10 +108,10 @@ index e7931f73f10fe35ebd5fe4a04b036d53bb117ebd..cbce835ed6d44e5b8c9aaae4e36a77f8 + // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 645cff10eef90826bb44bbe937b141289f182cde..a92421bbf0ee40ecbe4f272459c6a918dc45344c 100644 +index 23686519b8c1338dd6e9f1c5a0e73467c0b59a4f..f0221815cbd30f3ccaacc87a57403491b55de128 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -891,5 +891,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -897,5 +897,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat public @NotNull String translationKey() { return Bukkit.getUnsafe().getTranslationKey(this); } diff --git a/patches/api/0263-Expose-protocol-version.patch b/patches/api/0262-Expose-protocol-version.patch similarity index 81% rename from patches/api/0263-Expose-protocol-version.patch rename to patches/api/0262-Expose-protocol-version.patch index 0450fa0966..ac67e3a922 100644 --- a/patches/api/0263-Expose-protocol-version.patch +++ b/patches/api/0262-Expose-protocol-version.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 5de86f8cd3cc7f7e8ebc4a22d3921273378704f2..a874faec93468c83fc475b60629fc36f933bd11c 100644 +index 1b2b0e6d10393b4f4d0716256aa4c87b57affbe1..8635846c9f672e39f0929eec7bf83b22536ed284 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -169,5 +169,12 @@ public interface UnsafeValues { +@@ -178,5 +178,12 @@ public interface UnsafeValues { * Just don't use it. */ @org.jetbrains.annotations.NotNull String getMainLevelName(); diff --git a/patches/api/0264-add-isDeeplySleeping-to-HumanEntity.patch b/patches/api/0263-add-isDeeplySleeping-to-HumanEntity.patch similarity index 100% rename from patches/api/0264-add-isDeeplySleeping-to-HumanEntity.patch rename to patches/api/0263-add-isDeeplySleeping-to-HumanEntity.patch diff --git a/patches/api/0265-add-consumeFuel-to-FurnaceBurnEvent.patch b/patches/api/0264-add-consumeFuel-to-FurnaceBurnEvent.patch similarity index 100% rename from patches/api/0265-add-consumeFuel-to-FurnaceBurnEvent.patch rename to patches/api/0264-add-consumeFuel-to-FurnaceBurnEvent.patch diff --git a/patches/api/0266-add-get-set-drop-chance-to-EntityEquipment.patch b/patches/api/0265-add-get-set-drop-chance-to-EntityEquipment.patch similarity index 100% rename from patches/api/0266-add-get-set-drop-chance-to-EntityEquipment.patch rename to patches/api/0265-add-get-set-drop-chance-to-EntityEquipment.patch diff --git a/patches/api/0267-Added-PlayerDeepSleepEvent.patch b/patches/api/0266-Added-PlayerDeepSleepEvent.patch similarity index 100% rename from patches/api/0267-Added-PlayerDeepSleepEvent.patch rename to patches/api/0266-Added-PlayerDeepSleepEvent.patch diff --git a/patches/api/0268-More-World-API.patch b/patches/api/0267-More-World-API.patch similarity index 100% rename from patches/api/0268-More-World-API.patch rename to patches/api/0267-More-World-API.patch diff --git a/patches/api/0269-Added-PlayerBedFailEnterEvent.patch b/patches/api/0268-Added-PlayerBedFailEnterEvent.patch similarity index 100% rename from patches/api/0269-Added-PlayerBedFailEnterEvent.patch rename to patches/api/0268-Added-PlayerBedFailEnterEvent.patch diff --git a/patches/api/0270-Introduce-beacon-activation-deactivation-events.patch b/patches/api/0269-Introduce-beacon-activation-deactivation-events.patch similarity index 100% rename from patches/api/0270-Introduce-beacon-activation-deactivation-events.patch rename to patches/api/0269-Introduce-beacon-activation-deactivation-events.patch diff --git a/patches/api/0271-PlayerMoveEvent-Improvements.patch b/patches/api/0270-PlayerMoveEvent-Improvements.patch similarity index 100% rename from patches/api/0271-PlayerMoveEvent-Improvements.patch rename to patches/api/0270-PlayerMoveEvent-Improvements.patch diff --git a/patches/api/0272-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/api/0271-add-RespawnFlags-to-PlayerRespawnEvent.patch similarity index 100% rename from patches/api/0272-add-RespawnFlags-to-PlayerRespawnEvent.patch rename to patches/api/0271-add-RespawnFlags-to-PlayerRespawnEvent.patch diff --git a/patches/api/0273-Add-more-WanderingTrader-API.patch b/patches/api/0272-Add-more-WanderingTrader-API.patch similarity index 100% rename from patches/api/0273-Add-more-WanderingTrader-API.patch rename to patches/api/0272-Add-more-WanderingTrader-API.patch diff --git a/patches/api/0274-Add-EntityBlockStorage-clearEntities.patch b/patches/api/0273-Add-EntityBlockStorage-clearEntities.patch similarity index 100% rename from patches/api/0274-Add-EntityBlockStorage-clearEntities.patch rename to patches/api/0273-Add-EntityBlockStorage-clearEntities.patch diff --git a/patches/api/0275-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch b/patches/api/0274-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch similarity index 100% rename from patches/api/0275-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch rename to patches/api/0274-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch diff --git a/patches/api/0276-Inventory-close.patch b/patches/api/0275-Inventory-close.patch similarity index 100% rename from patches/api/0276-Inventory-close.patch rename to patches/api/0275-Inventory-close.patch diff --git a/patches/api/0277-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/api/0276-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch similarity index 100% rename from patches/api/0277-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch rename to patches/api/0276-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch diff --git a/patches/api/0278-Add-basic-Datapack-API.patch b/patches/api/0277-Add-basic-Datapack-API.patch similarity index 96% rename from patches/api/0278-Add-basic-Datapack-API.patch rename to patches/api/0277-Add-basic-Datapack-API.patch index c8c0b5b665..25a17a8105 100644 --- a/patches/api/0278-Add-basic-Datapack-API.patch +++ b/patches/api/0277-Add-basic-Datapack-API.patch @@ -144,10 +144,10 @@ index 3d5af25a399589f1bdf95b77f584ae0ae5c26f02..ab512c7ee9d2442055b719d02d0d0ecc /** diff --git a/src/main/java/org/bukkit/packs/DataPackManager.java b/src/main/java/org/bukkit/packs/DataPackManager.java -index d7fb6310e6b1050c496d748388310bc6f8d78e23..2cd505046277febe010e9476539b064321d8b2ec 100644 +index c33ca7b86426223200efa7df53faef061c3c7c0b..5ec17312564e245e6d482e89c2ef2a886d463154 100644 --- a/src/main/java/org/bukkit/packs/DataPackManager.java +++ b/src/main/java/org/bukkit/packs/DataPackManager.java -@@ -11,8 +11,10 @@ import org.jetbrains.annotations.Nullable; +@@ -13,8 +13,10 @@ import org.jetbrains.annotations.Nullable; /** * Manager of data packs. diff --git a/patches/api/0279-additions-to-PlayerGameModeChangeEvent.patch b/patches/api/0278-additions-to-PlayerGameModeChangeEvent.patch similarity index 100% rename from patches/api/0279-additions-to-PlayerGameModeChangeEvent.patch rename to patches/api/0278-additions-to-PlayerGameModeChangeEvent.patch diff --git a/patches/api/0280-ItemStack-repair-check-API.patch b/patches/api/0279-ItemStack-repair-check-API.patch similarity index 88% rename from patches/api/0280-ItemStack-repair-check-API.patch rename to patches/api/0279-ItemStack-repair-check-API.patch index eff25d7f58..6348f33164 100644 --- a/patches/api/0280-ItemStack-repair-check-API.patch +++ b/patches/api/0279-ItemStack-repair-check-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index a874faec93468c83fc475b60629fc36f933bd11c..4130481843c9e0b847bd656622b0c1107ac1297b 100644 +index 8635846c9f672e39f0929eec7bf83b22536ed284..51f1a09164d501de6d2561ed90175f2c24a668c1 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -176,5 +176,15 @@ public interface UnsafeValues { +@@ -185,5 +185,15 @@ public interface UnsafeValues { * @return the server's protocol version */ int getProtocolVersion(); @@ -25,10 +25,10 @@ index a874faec93468c83fc475b60629fc36f933bd11c..4130481843c9e0b847bd656622b0c110 // Paper end } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index a92421bbf0ee40ecbe4f272459c6a918dc45344c..04ff6579282708c48edee419381c698707fe0a3b 100644 +index f0221815cbd30f3ccaacc87a57403491b55de128..ca2dac7b377ea098158ff3c84fd47f405b636869 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -903,5 +903,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -909,5 +909,27 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat public io.papermc.paper.inventory.ItemRarity getRarity() { return io.papermc.paper.inventory.ItemRarity.valueOf(this.getItemMeta().getRarity().name()); } diff --git a/patches/api/0281-More-Enchantment-API.patch b/patches/api/0280-More-Enchantment-API.patch similarity index 100% rename from patches/api/0281-More-Enchantment-API.patch rename to patches/api/0280-More-Enchantment-API.patch diff --git a/patches/api/0282-Add-Mob-lookAt-API.patch b/patches/api/0281-Add-Mob-lookAt-API.patch similarity index 100% rename from patches/api/0282-Add-Mob-lookAt-API.patch rename to patches/api/0281-Add-Mob-lookAt-API.patch diff --git a/patches/api/0283-ItemStack-editMeta.patch b/patches/api/0282-ItemStack-editMeta.patch similarity index 94% rename from patches/api/0283-ItemStack-editMeta.patch rename to patches/api/0282-ItemStack-editMeta.patch index d2c36b432c..c1ce9b264d 100644 --- a/patches/api/0283-ItemStack-editMeta.patch +++ b/patches/api/0282-ItemStack-editMeta.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack#editMeta diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 04ff6579282708c48edee419381c698707fe0a3b..351f5c0feec38377fccf09bfc1cef2df88fc2dcd 100644 +index ca2dac7b377ea098158ff3c84fd47f405b636869..5fb8f7c1b79bd256925cb68cccfe0b974fb84043 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -561,6 +561,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -567,6 +567,50 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat return result.ensureServerConversions(); // Paper } diff --git a/patches/api/0284-Add-EntityInsideBlockEvent.patch b/patches/api/0283-Add-EntityInsideBlockEvent.patch similarity index 100% rename from patches/api/0284-Add-EntityInsideBlockEvent.patch rename to patches/api/0283-Add-EntityInsideBlockEvent.patch diff --git a/patches/api/0285-Attributes-API-for-item-defaults.patch b/patches/api/0284-Attributes-API-for-item-defaults.patch similarity index 89% rename from patches/api/0285-Attributes-API-for-item-defaults.patch rename to patches/api/0284-Attributes-API-for-item-defaults.patch index db30aff62c..7fbe487dca 100644 --- a/patches/api/0285-Attributes-API-for-item-defaults.patch +++ b/patches/api/0284-Attributes-API-for-item-defaults.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Attributes API for item defaults (Now replaced by upstream's API) diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 1e4ebe9bdc6aadf18029377e7ce70ca0d88bd1a1..3cb658023d738617a310099fa3759af253a9f4c2 100644 +index 044c563daee7898c676bd6ba58ee395c52eda121..f6c3a4de2f07348d599e44d0b3173b8674ee85ac 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -4763,6 +4763,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -4765,6 +4765,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla public io.papermc.paper.inventory.ItemRarity getItemRarity() { return new org.bukkit.inventory.ItemStack(this).getRarity(); } diff --git a/patches/api/0286-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/api/0285-Add-cause-to-Weather-ThunderChangeEvents.patch similarity index 100% rename from patches/api/0286-Add-cause-to-Weather-ThunderChangeEvents.patch rename to patches/api/0285-Add-cause-to-Weather-ThunderChangeEvents.patch diff --git a/patches/api/0287-More-Lidded-Block-API.patch b/patches/api/0286-More-Lidded-Block-API.patch similarity index 100% rename from patches/api/0287-More-Lidded-Block-API.patch rename to patches/api/0286-More-Lidded-Block-API.patch diff --git a/patches/api/0288-Add-PlayerKickEvent-causes.patch b/patches/api/0287-Add-PlayerKickEvent-causes.patch similarity index 100% rename from patches/api/0288-Add-PlayerKickEvent-causes.patch rename to patches/api/0287-Add-PlayerKickEvent-causes.patch diff --git a/patches/api/0289-Add-PufferFishStateChangeEvent.patch b/patches/api/0288-Add-PufferFishStateChangeEvent.patch similarity index 100% rename from patches/api/0289-Add-PufferFishStateChangeEvent.patch rename to patches/api/0288-Add-PufferFishStateChangeEvent.patch diff --git a/patches/api/0290-Add-BellRevealRaiderEvent.patch b/patches/api/0289-Add-BellRevealRaiderEvent.patch similarity index 100% rename from patches/api/0290-Add-BellRevealRaiderEvent.patch rename to patches/api/0289-Add-BellRevealRaiderEvent.patch diff --git a/patches/api/0291-Add-ElderGuardianAppearanceEvent.patch b/patches/api/0290-Add-ElderGuardianAppearanceEvent.patch similarity index 100% rename from patches/api/0291-Add-ElderGuardianAppearanceEvent.patch rename to patches/api/0290-Add-ElderGuardianAppearanceEvent.patch diff --git a/patches/api/0292-Add-more-line-of-sight-methods.patch b/patches/api/0291-Add-more-line-of-sight-methods.patch similarity index 100% rename from patches/api/0292-Add-more-line-of-sight-methods.patch rename to patches/api/0291-Add-more-line-of-sight-methods.patch diff --git a/patches/api/0293-Add-WaterBottleSplashEvent.patch b/patches/api/0292-Add-WaterBottleSplashEvent.patch similarity index 100% rename from patches/api/0293-Add-WaterBottleSplashEvent.patch rename to patches/api/0292-Add-WaterBottleSplashEvent.patch diff --git a/patches/api/0294-Add-more-LimitedRegion-API.patch b/patches/api/0293-Add-more-LimitedRegion-API.patch similarity index 100% rename from patches/api/0294-Add-more-LimitedRegion-API.patch rename to patches/api/0293-Add-more-LimitedRegion-API.patch diff --git a/patches/api/0295-Missing-Entity-API.patch b/patches/api/0294-Missing-Entity-API.patch similarity index 99% rename from patches/api/0295-Missing-Entity-API.patch rename to patches/api/0294-Missing-Entity-API.patch index 582dafaea4..e5b5628d97 100644 --- a/patches/api/0295-Missing-Entity-API.patch +++ b/patches/api/0294-Missing-Entity-API.patch @@ -143,10 +143,10 @@ index 0d88dce9978243a1f995c5fb448c5d71b01136eb..8b1048c94dffd058eb9fd9144f7f59fc + // Paper end - Horse API } diff --git a/src/main/java/org/bukkit/entity/AreaEffectCloud.java b/src/main/java/org/bukkit/entity/AreaEffectCloud.java -index 3c65da551aca046986fc0302de3ccc149ee9526c..7f989f2025d16b368829c45f08b8cc8537c99e13 100644 +index 1df234d6538f08724297ed4ad916f6d488736171..3eba2a9f60636c7d58d311d46f0447bb6bcc5cfb 100644 --- a/src/main/java/org/bukkit/entity/AreaEffectCloud.java +++ b/src/main/java/org/bukkit/entity/AreaEffectCloud.java -@@ -239,4 +239,20 @@ public interface AreaEffectCloud extends Entity { +@@ -259,4 +259,20 @@ public interface AreaEffectCloud extends Entity { * @param source the {@link ProjectileSource} that threw the LingeringPotion */ public void setSource(@Nullable ProjectileSource source); @@ -462,10 +462,10 @@ index c7d6a328def83619dca9b6122aeb5870e4585e70..795e799fec7cfd65a0e08bb3f941148d * Mark the entity's removal. * diff --git a/src/main/java/org/bukkit/entity/Fireball.java b/src/main/java/org/bukkit/entity/Fireball.java -index 7a44707f2307dc4dbfea4de3f4baf3cc0490dc93..d0e82102425e54274be9c4769634d754319d6196 100644 +index ceaf263bc554a92a232bd3ed18ea67ce4e0b487a..dc8ed9164f22eb140e16b9b25a82f85b873ada42 100644 --- a/src/main/java/org/bukkit/entity/Fireball.java +++ b/src/main/java/org/bukkit/entity/Fireball.java -@@ -23,4 +23,32 @@ public interface Fireball extends Projectile, Explosive { +@@ -32,4 +32,32 @@ public interface Fireball extends Projectile, Explosive { @NotNull public Vector getDirection(); diff --git a/patches/api/0296-Adds-PlayerArmSwingEvent.patch b/patches/api/0295-Adds-PlayerArmSwingEvent.patch similarity index 100% rename from patches/api/0296-Adds-PlayerArmSwingEvent.patch rename to patches/api/0295-Adds-PlayerArmSwingEvent.patch diff --git a/patches/api/0297-Add-PlayerSignCommandPreprocessEvent.patch b/patches/api/0296-Add-PlayerSignCommandPreprocessEvent.patch similarity index 100% rename from patches/api/0297-Add-PlayerSignCommandPreprocessEvent.patch rename to patches/api/0296-Add-PlayerSignCommandPreprocessEvent.patch diff --git a/patches/api/0298-fix-empty-array-elements-in-command-arguments.patch b/patches/api/0297-fix-empty-array-elements-in-command-arguments.patch similarity index 100% rename from patches/api/0298-fix-empty-array-elements-in-command-arguments.patch rename to patches/api/0297-fix-empty-array-elements-in-command-arguments.patch diff --git a/patches/api/0299-Stinger-API.patch b/patches/api/0298-Stinger-API.patch similarity index 100% rename from patches/api/0299-Stinger-API.patch rename to patches/api/0298-Stinger-API.patch diff --git a/patches/api/0300-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/api/0299-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch similarity index 100% rename from patches/api/0300-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch rename to patches/api/0299-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch diff --git a/patches/api/0301-Add-PlayerSetSpawnEvent.patch b/patches/api/0300-Add-PlayerSetSpawnEvent.patch similarity index 100% rename from patches/api/0301-Add-PlayerSetSpawnEvent.patch rename to patches/api/0300-Add-PlayerSetSpawnEvent.patch diff --git a/patches/api/0302-Added-EntityDamageItemEvent.patch b/patches/api/0301-Added-EntityDamageItemEvent.patch similarity index 100% rename from patches/api/0302-Added-EntityDamageItemEvent.patch rename to patches/api/0301-Added-EntityDamageItemEvent.patch diff --git a/patches/api/0303-Make-EntityUnleashEvent-cancellable.patch b/patches/api/0302-Make-EntityUnleashEvent-cancellable.patch similarity index 100% rename from patches/api/0303-Make-EntityUnleashEvent-cancellable.patch rename to patches/api/0302-Make-EntityUnleashEvent-cancellable.patch diff --git a/patches/api/0304-Change-EnderEye-target-without-changing-other-things.patch b/patches/api/0303-Change-EnderEye-target-without-changing-other-things.patch similarity index 100% rename from patches/api/0304-Change-EnderEye-target-without-changing-other-things.patch rename to patches/api/0303-Change-EnderEye-target-without-changing-other-things.patch diff --git a/patches/api/0305-Add-BlockBreakBlockEvent.patch b/patches/api/0304-Add-BlockBreakBlockEvent.patch similarity index 100% rename from patches/api/0305-Add-BlockBreakBlockEvent.patch rename to patches/api/0304-Add-BlockBreakBlockEvent.patch diff --git a/patches/api/0306-Add-helpers-for-left-right-click-to-Action.patch b/patches/api/0305-Add-helpers-for-left-right-click-to-Action.patch similarity index 100% rename from patches/api/0306-Add-helpers-for-left-right-click-to-Action.patch rename to patches/api/0305-Add-helpers-for-left-right-click-to-Action.patch diff --git a/patches/api/0307-Option-to-prevent-data-components-copy-in-smithing-r.patch b/patches/api/0306-Option-to-prevent-data-components-copy-in-smithing-r.patch similarity index 100% rename from patches/api/0307-Option-to-prevent-data-components-copy-in-smithing-r.patch rename to patches/api/0306-Option-to-prevent-data-components-copy-in-smithing-r.patch diff --git a/patches/api/0308-More-CommandBlock-API.patch b/patches/api/0307-More-CommandBlock-API.patch similarity index 100% rename from patches/api/0308-More-CommandBlock-API.patch rename to patches/api/0307-More-CommandBlock-API.patch diff --git a/patches/api/0309-Add-missing-team-sidebar-display-slots.patch b/patches/api/0308-Add-missing-team-sidebar-display-slots.patch similarity index 100% rename from patches/api/0309-Add-missing-team-sidebar-display-slots.patch rename to patches/api/0308-Add-missing-team-sidebar-display-slots.patch diff --git a/patches/api/0310-add-back-EntityPortalExitEvent.patch b/patches/api/0309-add-back-EntityPortalExitEvent.patch similarity index 100% rename from patches/api/0310-add-back-EntityPortalExitEvent.patch rename to patches/api/0309-add-back-EntityPortalExitEvent.patch diff --git a/patches/api/0311-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/api/0310-Add-methods-to-find-targets-for-lightning-strikes.patch similarity index 100% rename from patches/api/0311-Add-methods-to-find-targets-for-lightning-strikes.patch rename to patches/api/0310-Add-methods-to-find-targets-for-lightning-strikes.patch diff --git a/patches/api/0312-Get-entity-default-attributes.patch b/patches/api/0311-Get-entity-default-attributes.patch similarity index 95% rename from patches/api/0312-Get-entity-default-attributes.patch rename to patches/api/0311-Get-entity-default-attributes.patch index f0dd49bec9..097ec3ec3b 100644 --- a/patches/api/0312-Get-entity-default-attributes.patch +++ b/patches/api/0311-Get-entity-default-attributes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Get entity default attributes diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 4130481843c9e0b847bd656622b0c1107ac1297b..a846f3c6e8dceb90e42db903b8be2c248f2f9d5c 100644 +index 51f1a09164d501de6d2561ed90175f2c24a668c1..cbc63144e5eb35799548209f8fbee70d0c20a53d 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -186,5 +186,22 @@ public interface UnsafeValues { +@@ -195,5 +195,22 @@ public interface UnsafeValues { * @return true if valid repair, false if not */ public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial); diff --git a/patches/api/0313-Left-handed-API.patch b/patches/api/0312-Left-handed-API.patch similarity index 100% rename from patches/api/0313-Left-handed-API.patch rename to patches/api/0312-Left-handed-API.patch diff --git a/patches/api/0314-Add-critical-damage-API.patch b/patches/api/0313-Add-critical-damage-API.patch similarity index 100% rename from patches/api/0314-Add-critical-damage-API.patch rename to patches/api/0313-Add-critical-damage-API.patch diff --git a/patches/api/0315-Add-more-advancement-API.patch b/patches/api/0314-Add-more-advancement-API.patch similarity index 100% rename from patches/api/0315-Add-more-advancement-API.patch rename to patches/api/0314-Add-more-advancement-API.patch diff --git a/patches/api/0316-Fix-issues-with-mob-conversion.patch b/patches/api/0315-Fix-issues-with-mob-conversion.patch similarity index 100% rename from patches/api/0316-Fix-issues-with-mob-conversion.patch rename to patches/api/0315-Fix-issues-with-mob-conversion.patch diff --git a/patches/api/0317-Add-isCollidable-methods-to-various-places.patch b/patches/api/0316-Add-isCollidable-methods-to-various-places.patch similarity index 90% rename from patches/api/0317-Add-isCollidable-methods-to-various-places.patch rename to patches/api/0316-Add-isCollidable-methods-to-various-places.patch index 0c56af5c5d..a5b82e6e22 100644 --- a/patches/api/0317-Add-isCollidable-methods-to-various-places.patch +++ b/patches/api/0316-Add-isCollidable-methods-to-various-places.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add isCollidable methods to various places diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 3cb658023d738617a310099fa3759af253a9f4c2..1ca448c9e3a3178663a033617d9414ec085c246a 100644 +index f6c3a4de2f07348d599e44d0b3173b8674ee85ac..4ad5f2d40c10e7b059a9096dcc6a3b0b618411a0 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -4778,6 +4778,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -4780,6 +4780,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla public Multimap getItemAttributes(@NotNull EquipmentSlot equipmentSlot) { return this.getDefaultAttributeModifiers(equipmentSlot); } @@ -26,10 +26,10 @@ index 3cb658023d738617a310099fa3759af253a9f4c2..1ca448c9e3a3178663a033617d9414ec /** diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index a846f3c6e8dceb90e42db903b8be2c248f2f9d5c..e1f9d80f0a6481824443339015049f96f3bf86f2 100644 +index cbc63144e5eb35799548209f8fbee70d0c20a53d..891204af265ac4ef1f654407421e9962c0ff549b 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -203,5 +203,14 @@ public interface UnsafeValues { +@@ -212,5 +212,14 @@ public interface UnsafeValues { * @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultEntityAttributes(NamespacedKey)} first) */ @org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey); diff --git a/patches/api/0318-Goat-ram-API.patch b/patches/api/0317-Goat-ram-API.patch similarity index 100% rename from patches/api/0318-Goat-ram-API.patch rename to patches/api/0317-Goat-ram-API.patch diff --git a/patches/api/0319-Add-API-for-resetting-a-single-score.patch b/patches/api/0318-Add-API-for-resetting-a-single-score.patch similarity index 100% rename from patches/api/0319-Add-API-for-resetting-a-single-score.patch rename to patches/api/0318-Add-API-for-resetting-a-single-score.patch diff --git a/patches/api/0320-Add-Raw-Byte-Entity-Serialization.patch b/patches/api/0319-Add-Raw-Byte-Entity-Serialization.patch similarity index 94% rename from patches/api/0320-Add-Raw-Byte-Entity-Serialization.patch rename to patches/api/0319-Add-Raw-Byte-Entity-Serialization.patch index b0a70d977f..f3a0ae6035 100644 --- a/patches/api/0320-Add-Raw-Byte-Entity-Serialization.patch +++ b/patches/api/0319-Add-Raw-Byte-Entity-Serialization.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index e1f9d80f0a6481824443339015049f96f3bf86f2..9245f50b2bac30e956ef6ddc11c551b9b68463ee 100644 +index 891204af265ac4ef1f654407421e9962c0ff549b..20ddbfdad6856135a4c6a4778f81caee953f0fb4 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -158,6 +158,14 @@ public interface UnsafeValues { +@@ -167,6 +167,14 @@ public interface UnsafeValues { ItemStack deserializeItem(byte[] data); diff --git a/patches/api/0321-Add-PlayerItemFrameChangeEvent.patch b/patches/api/0320-Add-PlayerItemFrameChangeEvent.patch similarity index 100% rename from patches/api/0321-Add-PlayerItemFrameChangeEvent.patch rename to patches/api/0320-Add-PlayerItemFrameChangeEvent.patch diff --git a/patches/api/0322-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/api/0321-Allow-delegation-to-vanilla-chunk-gen.patch similarity index 95% rename from patches/api/0322-Allow-delegation-to-vanilla-chunk-gen.patch rename to patches/api/0321-Allow-delegation-to-vanilla-chunk-gen.patch index 664279d84f..46674bdd76 100644 --- a/patches/api/0322-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/patches/api/0321-Allow-delegation-to-vanilla-chunk-gen.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index c3d3c7d05a03658157d49c6ff1ea1d7d085a6fd4..fa7a63ea108971790c28c4f32d280ee6f2a86c0b 100644 +index e62d46629305a268906cd2cd5d5977d063c2f484..8f88dc00c73810560070195fcf6e0f955e4ebdde 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -2105,6 +2105,24 @@ public final class Bukkit { @@ -34,7 +34,7 @@ index c3d3c7d05a03658157d49c6ff1ea1d7d085a6fd4..fa7a63ea108971790c28c4f32d280ee6 * Creates a boss bar instance to display to players. The progress * defaults to 1.0 diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 61ee087ec4a75ee8b10e204b4cdd1bab5f066819..90b1368303562e1b4af2e658e60ac564bd49ad5f 100644 +index e3a494b9d3727973d225de3042da93594f36ca12..8ccda3cbefcbf1d1b1d5dac195b3c5605058a040 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1779,6 +1779,22 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/api/0323-Add-more-Campfire-API.patch b/patches/api/0322-Add-more-Campfire-API.patch similarity index 100% rename from patches/api/0323-Add-more-Campfire-API.patch rename to patches/api/0322-Add-more-Campfire-API.patch diff --git a/patches/api/0324-Extend-VehicleCollisionEvent-move-HandlerList-up.patch b/patches/api/0323-Extend-VehicleCollisionEvent-move-HandlerList-up.patch similarity index 100% rename from patches/api/0324-Extend-VehicleCollisionEvent-move-HandlerList-up.patch rename to patches/api/0323-Extend-VehicleCollisionEvent-move-HandlerList-up.patch diff --git a/patches/api/0325-Improve-scoreboard-entries.patch b/patches/api/0324-Improve-scoreboard-entries.patch similarity index 100% rename from patches/api/0325-Improve-scoreboard-entries.patch rename to patches/api/0324-Improve-scoreboard-entries.patch diff --git a/patches/api/0326-Entity-powdered-snow-API.patch b/patches/api/0325-Entity-powdered-snow-API.patch similarity index 100% rename from patches/api/0326-Entity-powdered-snow-API.patch rename to patches/api/0325-Entity-powdered-snow-API.patch diff --git a/patches/api/0327-Add-API-for-item-entity-health.patch b/patches/api/0326-Add-API-for-item-entity-health.patch similarity index 100% rename from patches/api/0327-Add-API-for-item-entity-health.patch rename to patches/api/0326-Add-API-for-item-entity-health.patch diff --git a/patches/api/0328-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch b/patches/api/0327-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch similarity index 100% rename from patches/api/0328-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch rename to patches/api/0327-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch diff --git a/patches/api/0329-Bucketable-API.patch b/patches/api/0328-Bucketable-API.patch similarity index 100% rename from patches/api/0329-Bucketable-API.patch rename to patches/api/0328-Bucketable-API.patch diff --git a/patches/api/0330-System-prop-for-default-config-comment-parsing.patch b/patches/api/0329-System-prop-for-default-config-comment-parsing.patch similarity index 100% rename from patches/api/0330-System-prop-for-default-config-comment-parsing.patch rename to patches/api/0329-System-prop-for-default-config-comment-parsing.patch diff --git a/patches/api/0331-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/api/0330-Expose-vanilla-BiomeProvider-from-WorldInfo.patch similarity index 100% rename from patches/api/0331-Expose-vanilla-BiomeProvider-from-WorldInfo.patch rename to patches/api/0330-Expose-vanilla-BiomeProvider-from-WorldInfo.patch diff --git a/patches/api/0332-Multiple-Entries-with-Scoreboards.patch b/patches/api/0331-Multiple-Entries-with-Scoreboards.patch similarity index 100% rename from patches/api/0332-Multiple-Entries-with-Scoreboards.patch rename to patches/api/0331-Multiple-Entries-with-Scoreboards.patch diff --git a/patches/api/0333-Warn-on-strange-EventHandler-return-types.patch b/patches/api/0332-Warn-on-strange-EventHandler-return-types.patch similarity index 100% rename from patches/api/0333-Warn-on-strange-EventHandler-return-types.patch rename to patches/api/0332-Warn-on-strange-EventHandler-return-types.patch diff --git a/patches/api/0334-Multi-Block-Change-API.patch b/patches/api/0333-Multi-Block-Change-API.patch similarity index 100% rename from patches/api/0334-Multi-Block-Change-API.patch rename to patches/api/0333-Multi-Block-Change-API.patch diff --git a/patches/api/0335-Fix-NotePlayEvent.patch b/patches/api/0334-Fix-NotePlayEvent.patch similarity index 100% rename from patches/api/0335-Fix-NotePlayEvent.patch rename to patches/api/0334-Fix-NotePlayEvent.patch diff --git a/patches/api/0336-Freeze-Tick-Lock-API.patch b/patches/api/0335-Freeze-Tick-Lock-API.patch similarity index 100% rename from patches/api/0336-Freeze-Tick-Lock-API.patch rename to patches/api/0335-Freeze-Tick-Lock-API.patch diff --git a/patches/api/0337-Dolphin-API.patch b/patches/api/0336-Dolphin-API.patch similarity index 100% rename from patches/api/0337-Dolphin-API.patch rename to patches/api/0336-Dolphin-API.patch diff --git a/patches/api/0338-More-PotionEffectType-API.patch b/patches/api/0337-More-PotionEffectType-API.patch similarity index 97% rename from patches/api/0338-More-PotionEffectType-API.patch rename to patches/api/0337-More-PotionEffectType-API.patch index cad46c8765..b9dc5bb5d1 100644 --- a/patches/api/0338-More-PotionEffectType-API.patch +++ b/patches/api/0337-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 43f410326d6d68242113e2fefe31af256889ed9c..90ab3bef4c5b6b6e215e9c759c886ed6d0f3302b 100644 +index d573d8e36fbe6b7f5a298fb64910feba9cba0697..f301f81817409f0a6799885d4f0972ed9bf3e4df 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -300,6 +300,31 @@ public interface Registry extends Iterable { +@@ -318,6 +318,31 @@ public interface Registry extends Iterable { */ @Deprecated(forRemoval = true) Registry CONFIGURED_STRUCTURE = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.world.structure.ConfiguredStructure.class), "No registry present for ConfiguredStructure. This is a bug."); diff --git a/patches/api/0339-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/api/0338-API-for-creating-command-sender-which-forwards-feedb.patch similarity index 91% rename from patches/api/0339-API-for-creating-command-sender-which-forwards-feedb.patch rename to patches/api/0338-API-for-creating-command-sender-which-forwards-feedb.patch index 13d096a366..666b423f41 100644 --- a/patches/api/0339-API-for-creating-command-sender-which-forwards-feedb.patch +++ b/patches/api/0338-API-for-creating-command-sender-which-forwards-feedb.patch @@ -5,7 +5,7 @@ Subject: [PATCH] API for creating command sender which forwards feedback diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index fa7a63ea108971790c28c4f32d280ee6f2a86c0b..fb6a3b71cf3c304c5d0177747bc098e134b22d58 100644 +index 8f88dc00c73810560070195fcf6e0f955e4ebdde..1e96494c8080458f260ba94c4975ab18c4b4eefd 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -1583,6 +1583,20 @@ public final class Bukkit { @@ -30,7 +30,7 @@ index fa7a63ea108971790c28c4f32d280ee6f2a86c0b..fb6a3b71cf3c304c5d0177747bc098e1 * Gets the folder that contains all of the various {@link World}s. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 90b1368303562e1b4af2e658e60ac564bd49ad5f..43b049b68a8af548cd05c67dafc23dabd07bab27 100644 +index 8ccda3cbefcbf1d1b1d5dac195b3c5605058a040..31eaec316e0ee4021d0a67301d1bc91a2d3524d9 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1334,6 +1334,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/api/0340-Implement-regenerateChunk.patch b/patches/api/0339-Implement-regenerateChunk.patch similarity index 100% rename from patches/api/0340-Implement-regenerateChunk.patch rename to patches/api/0339-Implement-regenerateChunk.patch diff --git a/patches/api/0341-Add-GameEvent-tags.patch b/patches/api/0340-Add-GameEvent-tags.patch similarity index 89% rename from patches/api/0341-Add-GameEvent-tags.patch rename to patches/api/0340-Add-GameEvent-tags.patch index 73554bb169..361f439443 100644 --- a/patches/api/0341-Add-GameEvent-tags.patch +++ b/patches/api/0340-Add-GameEvent-tags.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add GameEvent tags diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java -index 298ae1294a122705bca6bd74ea540185839d1ed5..cb5890e0e7bccfee2ba32dd4776f1ae1fdd539e8 100644 +index 33c75db0fcbbd771a59764c5d90484cee27b60cf..eaec13dbe7be4dd6c5faa97c413e24d6e77cef62 100644 --- a/src/main/java/org/bukkit/Tag.java +++ b/src/main/java/org/bukkit/Tag.java -@@ -1306,6 +1306,25 @@ public interface Tag extends Keyed { +@@ -1311,6 +1311,25 @@ public interface Tag extends Keyed { */ Tag ENTITY_TYPES_REDIRECTABLE_PROJECTILE = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("redirectable_projectile"), EntityType.class); diff --git a/patches/api/0342-Furnace-RecipesUsed-API.patch b/patches/api/0341-Furnace-RecipesUsed-API.patch similarity index 100% rename from patches/api/0342-Furnace-RecipesUsed-API.patch rename to patches/api/0341-Furnace-RecipesUsed-API.patch diff --git a/patches/api/0343-Configurable-sculk-sensor-listener-range.patch b/patches/api/0342-Configurable-sculk-sensor-listener-range.patch similarity index 100% rename from patches/api/0343-Configurable-sculk-sensor-listener-range.patch rename to patches/api/0342-Configurable-sculk-sensor-listener-range.patch diff --git a/patches/api/0344-Add-missing-block-data-mins-and-maxes.patch b/patches/api/0343-Add-missing-block-data-mins-and-maxes.patch similarity index 100% rename from patches/api/0344-Add-missing-block-data-mins-and-maxes.patch rename to patches/api/0343-Add-missing-block-data-mins-and-maxes.patch diff --git a/patches/api/0345-Custom-Potion-Mixes.patch b/patches/api/0344-Custom-Potion-Mixes.patch similarity index 100% rename from patches/api/0345-Custom-Potion-Mixes.patch rename to patches/api/0344-Custom-Potion-Mixes.patch diff --git a/patches/api/0346-Expose-furnace-minecart-push-values.patch b/patches/api/0345-Expose-furnace-minecart-push-values.patch similarity index 100% rename from patches/api/0346-Expose-furnace-minecart-push-values.patch rename to patches/api/0345-Expose-furnace-minecart-push-values.patch diff --git a/patches/api/0347-More-Projectile-API.patch b/patches/api/0346-More-Projectile-API.patch similarity index 100% rename from patches/api/0347-More-Projectile-API.patch rename to patches/api/0346-More-Projectile-API.patch diff --git a/patches/api/0348-Add-getComputedBiome-API.patch b/patches/api/0347-Add-getComputedBiome-API.patch similarity index 100% rename from patches/api/0348-Add-getComputedBiome-API.patch rename to patches/api/0347-Add-getComputedBiome-API.patch diff --git a/patches/api/0349-Add-enchantWithLevels-API.patch b/patches/api/0348-Add-enchantWithLevels-API.patch similarity index 95% rename from patches/api/0349-Add-enchantWithLevels-API.patch rename to patches/api/0348-Add-enchantWithLevels-API.patch index 02d301e15a..7cc63d19c9 100644 --- a/patches/api/0349-Add-enchantWithLevels-API.patch +++ b/patches/api/0348-Add-enchantWithLevels-API.patch @@ -7,7 +7,7 @@ Deprecate upstream's newer and poorly implemented similar API. diff --git a/src/main/java/org/bukkit/inventory/ItemFactory.java b/src/main/java/org/bukkit/inventory/ItemFactory.java -index dbebaf8172ec6872f56958b9583affde4f8400a4..98a970a6582dca22e719a31559c7becea4725cb2 100644 +index 53b8934cb829f37971cb3ecd5652c9974dec6ab0..e20f64828548c647a29dad5a475f4596cad88cd8 100644 --- a/src/main/java/org/bukkit/inventory/ItemFactory.java +++ b/src/main/java/org/bukkit/inventory/ItemFactory.java @@ -185,8 +185,11 @@ public interface ItemFactory { @@ -70,10 +70,10 @@ index dbebaf8172ec6872f56958b9583affde4f8400a4..98a970a6582dca22e719a31559c7bece + // Paper end - enchantWithLevels API } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 351f5c0feec38377fccf09bfc1cef2df88fc2dcd..7eb4cf0b2f162d650252d81e9d38393f69a69046 100644 +index 5fb8f7c1b79bd256925cb68cccfe0b974fb84043..105cf1bf6e8b44846cdd3a8881fed36007daaa22 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -670,6 +670,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -676,6 +676,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat } // Paper start diff --git a/patches/api/0350-Add-TameableDeathMessageEvent.patch b/patches/api/0349-Add-TameableDeathMessageEvent.patch similarity index 100% rename from patches/api/0350-Add-TameableDeathMessageEvent.patch rename to patches/api/0349-Add-TameableDeathMessageEvent.patch diff --git a/patches/api/0351-Allow-to-change-the-podium-of-the-EnderDragon.patch b/patches/api/0350-Allow-to-change-the-podium-of-the-EnderDragon.patch similarity index 100% rename from patches/api/0351-Allow-to-change-the-podium-of-the-EnderDragon.patch rename to patches/api/0350-Allow-to-change-the-podium-of-the-EnderDragon.patch diff --git a/patches/api/0352-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch b/patches/api/0351-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch similarity index 100% rename from patches/api/0352-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch rename to patches/api/0351-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch diff --git a/patches/api/0353-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch b/patches/api/0352-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch similarity index 100% rename from patches/api/0353-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch rename to patches/api/0352-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch diff --git a/patches/api/0354-WorldCreator-keepSpawnLoaded.patch b/patches/api/0353-WorldCreator-keepSpawnLoaded.patch similarity index 100% rename from patches/api/0354-WorldCreator-keepSpawnLoaded.patch rename to patches/api/0353-WorldCreator-keepSpawnLoaded.patch diff --git a/patches/api/0355-Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/api/0354-Add-EntityDyeEvent-and-CollarColorable-interface.patch similarity index 100% rename from patches/api/0355-Add-EntityDyeEvent-and-CollarColorable-interface.patch rename to patches/api/0354-Add-EntityDyeEvent-and-CollarColorable-interface.patch diff --git a/patches/api/0356-Add-PlayerStopUsingItemEvent.patch b/patches/api/0355-Add-PlayerStopUsingItemEvent.patch similarity index 100% rename from patches/api/0356-Add-PlayerStopUsingItemEvent.patch rename to patches/api/0355-Add-PlayerStopUsingItemEvent.patch diff --git a/patches/api/0357-Expand-FallingBlock-API.patch b/patches/api/0356-Expand-FallingBlock-API.patch similarity index 100% rename from patches/api/0357-Expand-FallingBlock-API.patch rename to patches/api/0356-Expand-FallingBlock-API.patch diff --git a/patches/api/0358-Add-method-isTickingWorlds-to-Bukkit.patch b/patches/api/0357-Add-method-isTickingWorlds-to-Bukkit.patch similarity index 96% rename from patches/api/0358-Add-method-isTickingWorlds-to-Bukkit.patch rename to patches/api/0357-Add-method-isTickingWorlds-to-Bukkit.patch index eb982e565a..9627540551 100644 --- a/patches/api/0358-Add-method-isTickingWorlds-to-Bukkit.patch +++ b/patches/api/0357-Add-method-isTickingWorlds-to-Bukkit.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add method isTickingWorlds() to Bukkit. diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index eb6d59bad1e4f0b394290d683f5dfed6ba6dd75b..a2e5e917a7a0f6763f2ac13583dc28d9ea35ca64 100644 +index d56baf72235173121a694e8bb5331f2c515d3aa8..a1d9663730d5a63685d337f5eba40532b47ffbfc 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -808,12 +808,26 @@ public final class Bukkit { @@ -56,7 +56,7 @@ index eb6d59bad1e4f0b394290d683f5dfed6ba6dd75b..a2e5e917a7a0f6763f2ac13583dc28d9 * @param world the world to unload * @param save whether to save the chunks before unloading diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 6da6c20b684eba64b85d67db2482b4a968749070..708ea9556510b2e9de2f7f1c381572e3bde540d1 100644 +index 88ad9e596f801c2c137fe2d31653a841b9c01683..c1a46d13e61140c851f73f2ee7c6cec24ba8b3fa 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -675,34 +675,55 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/api/0359-Add-WardenAngerChangeEvent.patch b/patches/api/0358-Add-WardenAngerChangeEvent.patch similarity index 100% rename from patches/api/0359-Add-WardenAngerChangeEvent.patch rename to patches/api/0358-Add-WardenAngerChangeEvent.patch diff --git a/patches/api/0360-Nameable-Banner-API.patch b/patches/api/0359-Nameable-Banner-API.patch similarity index 100% rename from patches/api/0360-Nameable-Banner-API.patch rename to patches/api/0359-Nameable-Banner-API.patch diff --git a/patches/api/0361-Add-Player-getFishHook.patch b/patches/api/0360-Add-Player-getFishHook.patch similarity index 100% rename from patches/api/0361-Add-Player-getFishHook.patch rename to patches/api/0360-Add-Player-getFishHook.patch diff --git a/patches/api/0362-More-Teleport-API.patch b/patches/api/0361-More-Teleport-API.patch similarity index 100% rename from patches/api/0362-More-Teleport-API.patch rename to patches/api/0361-More-Teleport-API.patch diff --git a/patches/api/0363-Add-EntityPortalReadyEvent.patch b/patches/api/0362-Add-EntityPortalReadyEvent.patch similarity index 100% rename from patches/api/0363-Add-EntityPortalReadyEvent.patch rename to patches/api/0362-Add-EntityPortalReadyEvent.patch diff --git a/patches/api/0364-Custom-Chat-Completion-Suggestions-API.patch b/patches/api/0363-Custom-Chat-Completion-Suggestions-API.patch similarity index 100% rename from patches/api/0364-Custom-Chat-Completion-Suggestions-API.patch rename to patches/api/0363-Custom-Chat-Completion-Suggestions-API.patch diff --git a/patches/api/0365-Collision-API.patch b/patches/api/0364-Collision-API.patch similarity index 100% rename from patches/api/0365-Collision-API.patch rename to patches/api/0364-Collision-API.patch diff --git a/patches/api/0366-Block-Ticking-API.patch b/patches/api/0365-Block-Ticking-API.patch similarity index 100% rename from patches/api/0366-Block-Ticking-API.patch rename to patches/api/0365-Block-Ticking-API.patch diff --git a/patches/api/0367-Add-NamespacedKey-biome-methods.patch b/patches/api/0366-Add-NamespacedKey-biome-methods.patch similarity index 92% rename from patches/api/0367-Add-NamespacedKey-biome-methods.patch rename to patches/api/0366-Add-NamespacedKey-biome-methods.patch index 9b5cd7d737..d4c0137a3f 100644 --- a/patches/api/0367-Add-NamespacedKey-biome-methods.patch +++ b/patches/api/0366-Add-NamespacedKey-biome-methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 9245f50b2bac30e956ef6ddc11c551b9b68463ee..5d862c9221d1ce6d577295a5181f951c2f71a631 100644 +index 20ddbfdad6856135a4c6a4778f81caee953f0fb4..c49f73355da362abb1c0e52f867dcfad8d4680f3 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -220,5 +220,32 @@ public interface UnsafeValues { +@@ -229,5 +229,32 @@ public interface UnsafeValues { * @throws IllegalArgumentException if {@link Material#isBlock()} is false */ boolean isCollidable(@org.jetbrains.annotations.NotNull Material material); diff --git a/patches/api/0368-Also-load-resources-from-LibraryLoader.patch b/patches/api/0367-Also-load-resources-from-LibraryLoader.patch similarity index 100% rename from patches/api/0368-Also-load-resources-from-LibraryLoader.patch rename to patches/api/0367-Also-load-resources-from-LibraryLoader.patch diff --git a/patches/api/0369-Added-byte-array-serialization-deserialization-for-P.patch b/patches/api/0368-Added-byte-array-serialization-deserialization-for-P.patch similarity index 100% rename from patches/api/0369-Added-byte-array-serialization-deserialization-for-P.patch rename to patches/api/0368-Added-byte-array-serialization-deserialization-for-P.patch diff --git a/patches/api/0370-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch b/patches/api/0369-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch similarity index 100% rename from patches/api/0370-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch rename to patches/api/0369-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch diff --git a/patches/api/0371-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch b/patches/api/0370-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch similarity index 100% rename from patches/api/0371-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch rename to patches/api/0370-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch diff --git a/patches/api/0372-Add-getDrops-to-BlockState.patch b/patches/api/0371-Add-getDrops-to-BlockState.patch similarity index 100% rename from patches/api/0372-Add-getDrops-to-BlockState.patch rename to patches/api/0371-Add-getDrops-to-BlockState.patch diff --git a/patches/api/0373-Add-PlayerInventorySlotChangeEvent.patch b/patches/api/0372-Add-PlayerInventorySlotChangeEvent.patch similarity index 100% rename from patches/api/0373-Add-PlayerInventorySlotChangeEvent.patch rename to patches/api/0372-Add-PlayerInventorySlotChangeEvent.patch diff --git a/patches/api/0374-Elder-Guardian-appearance-API.patch b/patches/api/0373-Elder-Guardian-appearance-API.patch similarity index 100% rename from patches/api/0374-Elder-Guardian-appearance-API.patch rename to patches/api/0373-Elder-Guardian-appearance-API.patch diff --git a/patches/api/0375-Allow-changing-bed-s-occupied-property.patch b/patches/api/0374-Allow-changing-bed-s-occupied-property.patch similarity index 100% rename from patches/api/0375-Allow-changing-bed-s-occupied-property.patch rename to patches/api/0374-Allow-changing-bed-s-occupied-property.patch diff --git a/patches/api/0376-Add-EquipmentSlot-convenience-methods.patch b/patches/api/0375-Add-EquipmentSlot-convenience-methods.patch similarity index 94% rename from patches/api/0376-Add-EquipmentSlot-convenience-methods.patch rename to patches/api/0375-Add-EquipmentSlot-convenience-methods.patch index 14a97a21b4..f7e2301f31 100644 --- a/patches/api/0376-Add-EquipmentSlot-convenience-methods.patch +++ b/patches/api/0375-Add-EquipmentSlot-convenience-methods.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EquipmentSlot convenience methods diff --git a/src/main/java/org/bukkit/inventory/EquipmentSlot.java b/src/main/java/org/bukkit/inventory/EquipmentSlot.java -index 5642d8af60b6649497aba9b0f6ab7bba7702b9ee..a10d56b797e58b56bd4cef6de40691f7eac9b5b1 100644 +index 5642d8af60b6649497aba9b0f6ab7bba7702b9ee..c1c69ba4c361740f0ad422a7840a7f0f055c186a 100644 --- a/src/main/java/org/bukkit/inventory/EquipmentSlot.java +++ b/src/main/java/org/bukkit/inventory/EquipmentSlot.java @@ -33,4 +33,42 @@ public enum EquipmentSlot { diff --git a/patches/api/0377-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch b/patches/api/0376-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch similarity index 100% rename from patches/api/0377-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch rename to patches/api/0376-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch diff --git a/patches/api/0378-Add-entity-knockback-API.patch b/patches/api/0377-Add-entity-knockback-API.patch similarity index 100% rename from patches/api/0378-Add-entity-knockback-API.patch rename to patches/api/0377-Add-entity-knockback-API.patch diff --git a/patches/api/0379-Added-EntityToggleSitEvent.patch b/patches/api/0378-Added-EntityToggleSitEvent.patch similarity index 100% rename from patches/api/0379-Added-EntityToggleSitEvent.patch rename to patches/api/0378-Added-EntityToggleSitEvent.patch diff --git a/patches/api/0380-Add-Moving-Piston-API.patch b/patches/api/0379-Add-Moving-Piston-API.patch similarity index 100% rename from patches/api/0380-Add-Moving-Piston-API.patch rename to patches/api/0379-Add-Moving-Piston-API.patch diff --git a/patches/api/0381-Add-PrePlayerAttackEntityEvent.patch b/patches/api/0380-Add-PrePlayerAttackEntityEvent.patch similarity index 100% rename from patches/api/0381-Add-PrePlayerAttackEntityEvent.patch rename to patches/api/0380-Add-PrePlayerAttackEntityEvent.patch diff --git a/patches/api/0382-Add-Player-Warden-Warning-API.patch b/patches/api/0381-Add-Player-Warden-Warning-API.patch similarity index 100% rename from patches/api/0382-Add-Player-Warden-Warning-API.patch rename to patches/api/0381-Add-Player-Warden-Warning-API.patch diff --git a/patches/api/0383-More-vanilla-friendly-methods-to-update-trades.patch b/patches/api/0382-More-vanilla-friendly-methods-to-update-trades.patch similarity index 100% rename from patches/api/0383-More-vanilla-friendly-methods-to-update-trades.patch rename to patches/api/0382-More-vanilla-friendly-methods-to-update-trades.patch diff --git a/patches/api/0384-Add-paper-dumplisteners-command.patch b/patches/api/0383-Add-paper-dumplisteners-command.patch similarity index 100% rename from patches/api/0384-Add-paper-dumplisteners-command.patch rename to patches/api/0383-Add-paper-dumplisteners-command.patch diff --git a/patches/api/0385-ItemStack-damage-API.patch b/patches/api/0384-ItemStack-damage-API.patch similarity index 96% rename from patches/api/0385-ItemStack-damage-API.patch rename to patches/api/0384-ItemStack-damage-API.patch index ba61a1c399..6e2001f976 100644 --- a/patches/api/0385-ItemStack-damage-API.patch +++ b/patches/api/0384-ItemStack-damage-API.patch @@ -66,10 +66,10 @@ index 6bfc8a2148f504370df938447f4f6b757f1a516b..208bab1f5a3200f54141c38ee4272629 + // Paper end - ItemStack damage API } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 7eb4cf0b2f162d650252d81e9d38393f69a69046..6195ac25e7a46542659a263c85f7adac745c2ce4 100644 +index 105cf1bf6e8b44846cdd3a8881fed36007daaa22..ee5d2a30f634ccbe6f2cc2f82f9e56783939f5dd 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -987,5 +987,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -993,5 +993,19 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat public boolean canRepair(@NotNull ItemStack toBeRepaired) { return Bukkit.getUnsafe().isValidRepairItemStack(toBeRepaired, this); } diff --git a/patches/api/0386-Add-Tick-TemporalUnit.patch b/patches/api/0385-Add-Tick-TemporalUnit.patch similarity index 100% rename from patches/api/0386-Add-Tick-TemporalUnit.patch rename to patches/api/0385-Add-Tick-TemporalUnit.patch diff --git a/patches/api/0387-Friction-API.patch b/patches/api/0386-Friction-API.patch similarity index 100% rename from patches/api/0387-Friction-API.patch rename to patches/api/0386-Friction-API.patch diff --git a/patches/api/0388-Player-Entity-Tracking-Events.patch b/patches/api/0387-Player-Entity-Tracking-Events.patch similarity index 100% rename from patches/api/0388-Player-Entity-Tracking-Events.patch rename to patches/api/0387-Player-Entity-Tracking-Events.patch diff --git a/patches/api/0389-Add-missing-Fluid-type.patch b/patches/api/0388-Add-missing-Fluid-type.patch similarity index 100% rename from patches/api/0389-Add-missing-Fluid-type.patch rename to patches/api/0388-Add-missing-Fluid-type.patch diff --git a/patches/api/0390-fix-Instruments.patch b/patches/api/0389-fix-Instruments.patch similarity index 100% rename from patches/api/0390-fix-Instruments.patch rename to patches/api/0389-fix-Instruments.patch diff --git a/patches/api/0391-Add-BlockLockCheckEvent.patch b/patches/api/0390-Add-BlockLockCheckEvent.patch similarity index 100% rename from patches/api/0391-Add-BlockLockCheckEvent.patch rename to patches/api/0390-Add-BlockLockCheckEvent.patch diff --git a/patches/api/0392-Add-Sneaking-API-for-Entities.patch b/patches/api/0391-Add-Sneaking-API-for-Entities.patch similarity index 100% rename from patches/api/0392-Add-Sneaking-API-for-Entities.patch rename to patches/api/0391-Add-Sneaking-API-for-Entities.patch diff --git a/patches/api/0393-Improve-PortalEvents.patch b/patches/api/0392-Improve-PortalEvents.patch similarity index 100% rename from patches/api/0393-Improve-PortalEvents.patch rename to patches/api/0392-Improve-PortalEvents.patch diff --git a/patches/api/0395-Flying-Fall-Damage-API.patch b/patches/api/0393-Flying-Fall-Damage-API.patch similarity index 100% rename from patches/api/0395-Flying-Fall-Damage-API.patch rename to patches/api/0393-Flying-Fall-Damage-API.patch diff --git a/patches/api/0394-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch b/patches/api/0394-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch deleted file mode 100644 index 88530a6a65..0000000000 --- a/patches/api/0394-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch +++ /dev/null @@ -1,83 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic -Date: Fri, 22 Oct 2021 16:24:17 -0700 -Subject: [PATCH] Add exploded block state to EntityDamageByBlockEvent - - -diff --git a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java -index 8309b030c2120f1496d244f3ebc1094def41c869..a7c297364805c58ae16895055d8eae0484384b7d 100644 ---- a/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java -+++ b/src/main/java/org/bukkit/event/block/BlockExplodeEvent.java -@@ -32,6 +32,7 @@ public class BlockExplodeEvent extends BlockEvent implements Cancellable { - this.cancel = false; - } - -+ @io.papermc.paper.annotation.DoNotUse // Paper - @Deprecated(forRemoval = true) - public BlockExplodeEvent(@NotNull final Block what, @NotNull final List blocks, final float yield) { - this(what, what.getState(), blocks, yield); -diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java -index 467a0d6cabc5e860628be3b1e62de773efde5d2e..1fb15e2ade8ff3c4d662eca87b078b4577f786e1 100644 ---- a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java -+++ b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java -@@ -11,28 +11,35 @@ import org.jetbrains.annotations.Nullable; - - /** - * Called when an entity is damaged by a block -+ *

-+ * For explosions, the Block returned by {@link #getDamager()} has -+ * already been cleared. See {@link #getDamagerBlockState()} for a snapshot -+ * of the block if it has already been changed. - */ - public class EntityDamageByBlockEvent extends EntityDamageEvent { - private final Block damager; -+ private final org.bukkit.block.BlockState damagerBlockState; // Paper - - @Deprecated(forRemoval = true) - public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, final double damage) { -- this(damager, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), damage); -+ this(damager, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), damage, null); // Paper - } - -- public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, final double damage) { -+ public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, final double damage, final @Nullable org.bukkit.block.BlockState damagerBlockState) { // Paper - super(damagee, cause, damageSource, damage); - this.damager = damager; -+ this.damagerBlockState = damagerBlockState; // Paper - } - - @Deprecated(forRemoval = true) - public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final Map modifiers, @NotNull final Map> modifierFunctions) { -- this(damager, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), modifiers, modifierFunctions); -+ this(damager, damagee, cause, (damager != null) ? DamageSource.builder(DamageType.GENERIC).withDamageLocation(damager.getLocation()).build() : DamageSource.builder(DamageType.GENERIC).build(), modifiers, modifierFunctions, null); // Paper - } - -- public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, @NotNull final Map modifiers, @NotNull final Map> modifierFunctions) { -+ public EntityDamageByBlockEvent(@Nullable final Block damager, @NotNull final Entity damagee, @NotNull final DamageCause cause, @NotNull final DamageSource damageSource, @NotNull final Map modifiers, @NotNull final Map> modifierFunctions, final @Nullable org.bukkit.block.BlockState damagerBlockState) { // Paper - super(damagee, cause, damageSource, modifiers, modifierFunctions); - this.damager = damager; -+ this.damagerBlockState = damagerBlockState; // Paper - } - - /** -@@ -44,4 +51,20 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent { - public Block getDamager() { - return damager; - } -+ -+ // Paper start -+ /** -+ * Get a capture of the block that directly caused -+ * the damage, like a bed or respawn anchor. This -+ * block state is not placed so {@link org.bukkit.block.BlockState#isPlaced} -+ * will be false. -+ *

-+ * Can be null if the block wasn't changed before the event -+ * -+ * @return the damager block state or null if not applicable -+ */ -+ public @Nullable org.bukkit.block.BlockState getDamagerBlockState() { -+ return this.damagerBlockState; -+ } -+ // Paper end - } diff --git a/patches/api/0396-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch b/patches/api/0394-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch similarity index 100% rename from patches/api/0396-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch rename to patches/api/0394-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch diff --git a/patches/api/0397-Win-Screen-API.patch b/patches/api/0395-Win-Screen-API.patch similarity index 100% rename from patches/api/0397-Win-Screen-API.patch rename to patches/api/0395-Win-Screen-API.patch diff --git a/patches/api/0398-Add-Entity-Body-Yaw-API.patch b/patches/api/0396-Add-Entity-Body-Yaw-API.patch similarity index 100% rename from patches/api/0398-Add-Entity-Body-Yaw-API.patch rename to patches/api/0396-Add-Entity-Body-Yaw-API.patch diff --git a/patches/api/0399-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch b/patches/api/0397-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch similarity index 100% rename from patches/api/0399-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch rename to patches/api/0397-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch diff --git a/patches/api/0400-Add-EntityFertilizeEggEvent.patch b/patches/api/0398-Add-EntityFertilizeEggEvent.patch similarity index 100% rename from patches/api/0400-Add-EntityFertilizeEggEvent.patch rename to patches/api/0398-Add-EntityFertilizeEggEvent.patch diff --git a/patches/api/0401-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/api/0399-Add-CompostItemEvent-and-EntityCompostItemEvent.patch similarity index 100% rename from patches/api/0401-Add-CompostItemEvent-and-EntityCompostItemEvent.patch rename to patches/api/0399-Add-CompostItemEvent-and-EntityCompostItemEvent.patch diff --git a/patches/api/0402-Add-Shearable-API.patch b/patches/api/0400-Add-Shearable-API.patch similarity index 100% rename from patches/api/0402-Add-Shearable-API.patch rename to patches/api/0400-Add-Shearable-API.patch diff --git a/patches/api/0403-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/api/0401-Fix-SpawnEggMeta-get-setSpawnedType.patch similarity index 100% rename from patches/api/0403-Fix-SpawnEggMeta-get-setSpawnedType.patch rename to patches/api/0401-Fix-SpawnEggMeta-get-setSpawnedType.patch diff --git a/patches/api/0404-Add-Mob-Experience-reward-API.patch b/patches/api/0402-Add-Mob-Experience-reward-API.patch similarity index 100% rename from patches/api/0404-Add-Mob-Experience-reward-API.patch rename to patches/api/0402-Add-Mob-Experience-reward-API.patch diff --git a/patches/api/0405-Expand-PlayerItemMendEvent.patch b/patches/api/0403-Expand-PlayerItemMendEvent.patch similarity index 100% rename from patches/api/0405-Expand-PlayerItemMendEvent.patch rename to patches/api/0403-Expand-PlayerItemMendEvent.patch diff --git a/patches/api/0406-Add-transient-modifier-API.patch b/patches/api/0404-Add-transient-modifier-API.patch similarity index 100% rename from patches/api/0406-Add-transient-modifier-API.patch rename to patches/api/0404-Add-transient-modifier-API.patch diff --git a/patches/api/0407-Properly-remove-the-experimental-smithing-inventory-.patch b/patches/api/0405-Properly-remove-the-experimental-smithing-inventory-.patch similarity index 100% rename from patches/api/0407-Properly-remove-the-experimental-smithing-inventory-.patch rename to patches/api/0405-Properly-remove-the-experimental-smithing-inventory-.patch diff --git a/patches/api/0408-Add-method-to-remove-all-active-potion-effects.patch b/patches/api/0406-Add-method-to-remove-all-active-potion-effects.patch similarity index 100% rename from patches/api/0408-Add-method-to-remove-all-active-potion-effects.patch rename to patches/api/0406-Add-method-to-remove-all-active-potion-effects.patch diff --git a/patches/api/0409-Folia-scheduler-and-owned-region-API.patch b/patches/api/0407-Folia-scheduler-and-owned-region-API.patch similarity index 100% rename from patches/api/0409-Folia-scheduler-and-owned-region-API.patch rename to patches/api/0407-Folia-scheduler-and-owned-region-API.patch diff --git a/patches/api/0410-Add-event-for-player-editing-sign.patch b/patches/api/0408-Add-event-for-player-editing-sign.patch similarity index 100% rename from patches/api/0410-Add-event-for-player-editing-sign.patch rename to patches/api/0408-Add-event-for-player-editing-sign.patch diff --git a/patches/api/0411-Add-Sign-getInteractableSideFor.patch b/patches/api/0409-Add-Sign-getInteractableSideFor.patch similarity index 100% rename from patches/api/0411-Add-Sign-getInteractableSideFor.patch rename to patches/api/0409-Add-Sign-getInteractableSideFor.patch diff --git a/patches/api/0412-Fix-BanList-API.patch b/patches/api/0410-Fix-BanList-API.patch similarity index 100% rename from patches/api/0412-Fix-BanList-API.patch rename to patches/api/0410-Fix-BanList-API.patch diff --git a/patches/api/0413-Add-whitelist-events.patch b/patches/api/0411-Add-whitelist-events.patch similarity index 100% rename from patches/api/0413-Add-whitelist-events.patch rename to patches/api/0411-Add-whitelist-events.patch diff --git a/patches/api/0414-API-for-updating-recipes-on-clients.patch b/patches/api/0412-API-for-updating-recipes-on-clients.patch similarity index 97% rename from patches/api/0414-API-for-updating-recipes-on-clients.patch rename to patches/api/0412-API-for-updating-recipes-on-clients.patch index 60f206a340..1eb7bb0fc2 100644 --- a/patches/api/0414-API-for-updating-recipes-on-clients.patch +++ b/patches/api/0412-API-for-updating-recipes-on-clients.patch @@ -5,7 +5,7 @@ Subject: [PATCH] API for updating recipes on clients diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index e4f3f621c4c6d2653770c149db71587fc04e0991..b5455d03761ced30c94719deeee6788d7c6a8fb7 100644 +index 91476b9e5238caf49492cb23b549c9df6a45ed3e..d6be967c2fd480547bf9eb3938ca147382f835da 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -992,6 +992,26 @@ public final class Bukkit { @@ -82,7 +82,7 @@ index e4f3f621c4c6d2653770c149db71587fc04e0991..b5455d03761ced30c94719deeee6788d * Gets a list of command aliases defined in the server properties. * diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index 63cbc38217865be8f79890a0d8d6143461d344f3..c0ebbca69775775af22cf2c31b1516e5bf18df4a 100644 +index 954c8422567edcf6bf6db153b65dad776eea654f..8029aef07eb66989d61a8cce3fb98159c4bc2b89 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -838,6 +838,22 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/api/0415-Add-PlayerFailMoveEvent.patch b/patches/api/0413-Add-PlayerFailMoveEvent.patch similarity index 100% rename from patches/api/0415-Add-PlayerFailMoveEvent.patch rename to patches/api/0413-Add-PlayerFailMoveEvent.patch diff --git a/patches/api/0416-Fix-custom-statistic-criteria-creation.patch b/patches/api/0414-Fix-custom-statistic-criteria-creation.patch similarity index 90% rename from patches/api/0416-Fix-custom-statistic-criteria-creation.patch rename to patches/api/0414-Fix-custom-statistic-criteria-creation.patch index f8da658f51..bbfdc162d8 100644 --- a/patches/api/0416-Fix-custom-statistic-criteria-creation.patch +++ b/patches/api/0414-Fix-custom-statistic-criteria-creation.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix custom statistic criteria creation diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 5d862c9221d1ce6d577295a5181f951c2f71a631..e19434a0f5065987be087b6bd531c88be33d2917 100644 +index c49f73355da362abb1c0e52f867dcfad8d4680f3..289346bcd0ef42cfaf2afc270eeb7525e520ce80 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -247,5 +247,7 @@ public interface UnsafeValues { +@@ -256,5 +256,7 @@ public interface UnsafeValues { * @throws IllegalStateException if no biome by the given key is registered. */ void setBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey); diff --git a/patches/api/0417-SculkCatalyst-bloom-API.patch b/patches/api/0415-SculkCatalyst-bloom-API.patch similarity index 100% rename from patches/api/0417-SculkCatalyst-bloom-API.patch rename to patches/api/0415-SculkCatalyst-bloom-API.patch diff --git a/patches/api/0418-API-for-an-entity-s-scoreboard-name.patch b/patches/api/0416-API-for-an-entity-s-scoreboard-name.patch similarity index 100% rename from patches/api/0418-API-for-an-entity-s-scoreboard-name.patch rename to patches/api/0416-API-for-an-entity-s-scoreboard-name.patch diff --git a/patches/api/0419-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/api/0417-Deprecate-and-replace-methods-with-old-StructureType.patch similarity index 97% rename from patches/api/0419-Deprecate-and-replace-methods-with-old-StructureType.patch rename to patches/api/0417-Deprecate-and-replace-methods-with-old-StructureType.patch index 77b0ffe0a4..b9b94d0f4b 100644 --- a/patches/api/0419-Deprecate-and-replace-methods-with-old-StructureType.patch +++ b/patches/api/0417-Deprecate-and-replace-methods-with-old-StructureType.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index b5455d03761ced30c94719deeee6788d7c6a8fb7..c9fbbf0287cd663080fc09ac83b439780cbfae85 100644 +index d6be967c2fd480547bf9eb3938ca147382f835da..81203ad1460f3b64413a8426fb58a051b7d78f03 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -937,9 +937,6 @@ public final class Bukkit { @@ -84,7 +84,7 @@ index b5455d03761ced30c94719deeee6788d7c6a8fb7..c9fbbf0287cd663080fc09ac83b43978 /** * Reloads the server, refreshing settings and plugin information. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index c0ebbca69775775af22cf2c31b1516e5bf18df4a..c8395c8707e696f1e6fc8b0fd03f07203e01c157 100644 +index 8029aef07eb66989d61a8cce3fb98159c4bc2b89..dc985b54e1582629dffeebc56152eedaedae56d3 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -802,16 +802,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/api/0420-Add-Listing-API-for-Player.patch b/patches/api/0418-Add-Listing-API-for-Player.patch similarity index 100% rename from patches/api/0420-Add-Listing-API-for-Player.patch rename to patches/api/0418-Add-Listing-API-for-Player.patch diff --git a/patches/api/0421-Expose-clicked-BlockFace-during-BlockDamageEvent.patch b/patches/api/0419-Expose-clicked-BlockFace-during-BlockDamageEvent.patch similarity index 100% rename from patches/api/0421-Expose-clicked-BlockFace-during-BlockDamageEvent.patch rename to patches/api/0419-Expose-clicked-BlockFace-during-BlockDamageEvent.patch diff --git a/patches/api/0422-Fix-NPE-on-Boat-getStatus.patch b/patches/api/0420-Fix-NPE-on-Boat-getStatus.patch similarity index 100% rename from patches/api/0422-Fix-NPE-on-Boat-getStatus.patch rename to patches/api/0420-Fix-NPE-on-Boat-getStatus.patch diff --git a/patches/api/0423-Expand-Pose-API.patch b/patches/api/0421-Expand-Pose-API.patch similarity index 100% rename from patches/api/0423-Expand-Pose-API.patch rename to patches/api/0421-Expand-Pose-API.patch diff --git a/patches/api/0424-MerchantRecipe-add-copy-constructor.patch b/patches/api/0422-MerchantRecipe-add-copy-constructor.patch similarity index 100% rename from patches/api/0424-MerchantRecipe-add-copy-constructor.patch rename to patches/api/0422-MerchantRecipe-add-copy-constructor.patch diff --git a/patches/api/0425-More-DragonBattle-API.patch b/patches/api/0423-More-DragonBattle-API.patch similarity index 100% rename from patches/api/0425-More-DragonBattle-API.patch rename to patches/api/0423-More-DragonBattle-API.patch diff --git a/patches/api/0426-Add-PlayerPickItemEvent.patch b/patches/api/0424-Add-PlayerPickItemEvent.patch similarity index 100% rename from patches/api/0426-Add-PlayerPickItemEvent.patch rename to patches/api/0424-Add-PlayerPickItemEvent.patch diff --git a/patches/api/0427-Allow-trident-custom-damage.patch b/patches/api/0425-Allow-trident-custom-damage.patch similarity index 100% rename from patches/api/0427-Allow-trident-custom-damage.patch rename to patches/api/0425-Allow-trident-custom-damage.patch diff --git a/patches/api/0428-Expose-hand-during-BlockCanBuildEvent.patch b/patches/api/0426-Expose-hand-during-BlockCanBuildEvent.patch similarity index 100% rename from patches/api/0428-Expose-hand-during-BlockCanBuildEvent.patch rename to patches/api/0426-Expose-hand-during-BlockCanBuildEvent.patch diff --git a/patches/api/0429-Limit-setBurnTime-to-valid-short-values.patch b/patches/api/0427-Limit-setBurnTime-to-valid-short-values.patch similarity index 100% rename from patches/api/0429-Limit-setBurnTime-to-valid-short-values.patch rename to patches/api/0427-Limit-setBurnTime-to-valid-short-values.patch diff --git a/patches/api/0430-Add-OfflinePlayer-isConnected.patch b/patches/api/0428-Add-OfflinePlayer-isConnected.patch similarity index 100% rename from patches/api/0430-Add-OfflinePlayer-isConnected.patch rename to patches/api/0428-Add-OfflinePlayer-isConnected.patch diff --git a/patches/api/0431-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/api/0429-Add-titleOverride-to-InventoryOpenEvent.patch similarity index 100% rename from patches/api/0431-Add-titleOverride-to-InventoryOpenEvent.patch rename to patches/api/0429-Add-titleOverride-to-InventoryOpenEvent.patch diff --git a/patches/api/0432-Allow-proper-checking-of-empty-item-stacks.patch b/patches/api/0430-Allow-proper-checking-of-empty-item-stacks.patch similarity index 89% rename from patches/api/0432-Allow-proper-checking-of-empty-item-stacks.patch rename to patches/api/0430-Allow-proper-checking-of-empty-item-stacks.patch index 4b2d49be32..a77293644e 100644 --- a/patches/api/0432-Allow-proper-checking-of-empty-item-stacks.patch +++ b/patches/api/0430-Allow-proper-checking-of-empty-item-stacks.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow proper checking of empty item stacks This adds a method to check if an item stack is empty or not. This mirrors vanilla's implementation of the same method. diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 6195ac25e7a46542659a263c85f7adac745c2ce4..7cecb04de7d55dcdec1fa3dd255c844e92b1abdb 100644 +index ee5d2a30f634ccbe6f2cc2f82f9e56783939f5dd..e4dc17ec23d48591ff5742af5d23aa62bd9bfdbc 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -1001,5 +1001,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -1007,5 +1007,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat public @NotNull ItemStack damage(int amount, @NotNull org.bukkit.entity.LivingEntity livingEntity) { return livingEntity.damageItemStack(this, amount); } diff --git a/patches/api/0433-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch b/patches/api/0431-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch similarity index 100% rename from patches/api/0433-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch rename to patches/api/0431-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch diff --git a/patches/api/0434-Add-player-idle-duration-API.patch b/patches/api/0432-Add-player-idle-duration-API.patch similarity index 100% rename from patches/api/0434-Add-player-idle-duration-API.patch rename to patches/api/0432-Add-player-idle-duration-API.patch diff --git a/patches/api/0435-Add-API-to-get-the-collision-shape-of-a-block-before.patch b/patches/api/0433-Add-API-to-get-the-collision-shape-of-a-block-before.patch similarity index 100% rename from patches/api/0435-Add-API-to-get-the-collision-shape-of-a-block-before.patch rename to patches/api/0433-Add-API-to-get-the-collision-shape-of-a-block-before.patch diff --git a/patches/api/0436-Add-predicate-for-blocks-when-raytracing.patch b/patches/api/0434-Add-predicate-for-blocks-when-raytracing.patch similarity index 100% rename from patches/api/0436-Add-predicate-for-blocks-when-raytracing.patch rename to patches/api/0434-Add-predicate-for-blocks-when-raytracing.patch diff --git a/patches/api/0437-Add-hand-to-fish-event-for-all-player-interactions.patch b/patches/api/0435-Add-hand-to-fish-event-for-all-player-interactions.patch similarity index 100% rename from patches/api/0437-Add-hand-to-fish-event-for-all-player-interactions.patch rename to patches/api/0435-Add-hand-to-fish-event-for-all-player-interactions.patch diff --git a/patches/api/0438-Add-UUID-attribute-modifier-API.patch b/patches/api/0436-Add-UUID-attribute-modifier-API.patch similarity index 100% rename from patches/api/0438-Add-UUID-attribute-modifier-API.patch rename to patches/api/0436-Add-UUID-attribute-modifier-API.patch diff --git a/patches/api/0439-Expand-LingeringPotion-API.patch b/patches/api/0437-Expand-LingeringPotion-API.patch similarity index 100% rename from patches/api/0439-Expand-LingeringPotion-API.patch rename to patches/api/0437-Expand-LingeringPotion-API.patch diff --git a/patches/api/0440-Remove-unnecessary-durability-check-in-ItemStack-isS.patch b/patches/api/0438-Remove-unnecessary-durability-check-in-ItemStack-isS.patch similarity index 92% rename from patches/api/0440-Remove-unnecessary-durability-check-in-ItemStack-isS.patch rename to patches/api/0438-Remove-unnecessary-durability-check-in-ItemStack-isS.patch index 4974a88a57..2eed94d07c 100644 --- a/patches/api/0440-Remove-unnecessary-durability-check-in-ItemStack-isS.patch +++ b/patches/api/0438-Remove-unnecessary-durability-check-in-ItemStack-isS.patch @@ -9,10 +9,10 @@ By removing this check we avoid unnecessarily allocating useless `ItemMeta` obje This is a leftover from when checking for the item's durability was "free" because the durability was stored in the `ItemStack` itself, this [was changed in Minecraft 1.13](https://hub.spigotmc.org/stash/projects/SPIGOT/repos/bukkit/commits/f8b2086d60942eb2cd7ac25a2a1408cb790c222c#src/main/java/org/bukkit/inventory/ItemStack.java). diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 7cecb04de7d55dcdec1fa3dd255c844e92b1abdb..a1d0e479b9f28378f858f86ba8b0e9b7ddf71446 100644 +index e4dc17ec23d48591ff5742af5d23aa62bd9bfdbc..8975f6e8004d2ed65e20bb5b71bdbfa45713f78a 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -298,7 +298,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -300,7 +300,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat return true; } Material comparisonType = (this.type.isLegacy()) ? Bukkit.getUnsafe().fromLegacy(this.getData(), true) : this.type; // This may be called from legacy item stacks, try to get the right material diff --git a/patches/api/0441-Add-Structure-check-API.patch b/patches/api/0439-Add-Structure-check-API.patch similarity index 100% rename from patches/api/0441-Add-Structure-check-API.patch rename to patches/api/0439-Add-Structure-check-API.patch diff --git a/patches/api/0442-add-missing-Experimental-annotations.patch b/patches/api/0440-add-missing-Experimental-annotations.patch similarity index 97% rename from patches/api/0442-add-missing-Experimental-annotations.patch rename to patches/api/0440-add-missing-Experimental-annotations.patch index 0f29e5ede8..343675b768 100644 --- a/patches/api/0442-add-missing-Experimental-annotations.patch +++ b/patches/api/0440-add-missing-Experimental-annotations.patch @@ -27,10 +27,10 @@ index 6b68c92ec894451d99ded3e3df5965cb31d68ed2..fd5e433f930963c102c9c977523a0036 public static final FeatureFlag UPDATE_121 = Bukkit.getUnsafe().getFeatureFlag(NamespacedKey.minecraft("update_1_21")); } diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java -index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511cb07d5e66 100644 +index 4ad5f2d40c10e7b059a9096dcc6a3b0b618411a0..81f9ad99699a78b97e4accaaf1a98eacf29493ce 100644 --- a/src/main/java/org/bukkit/Material.java +++ b/src/main/java/org/bukkit/Material.java -@@ -148,54 +148,67 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -151,54 +151,67 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla * BlockData: {@link Slab} */ @MinecraftExperimental(Requires.UPDATE_1_21) @@ -98,7 +98,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c CHISELED_TUFF_BRICKS(8601), DRIPSTONE_BLOCK(26227), /** -@@ -302,6 +315,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -305,6 +318,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla * BlockData: {@link Waterlogged} */ @MinecraftExperimental(Requires.UPDATE_1_21) @@ -106,7 +106,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c HEAVY_CORE(15788, Waterlogged.class), AMETHYST_BLOCK(18919), BUDDING_AMETHYST(13963), -@@ -314,12 +328,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -317,12 +331,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla WEATHERED_COPPER(19699), OXIDIZED_COPPER(19490), @MinecraftExperimental(Requires.UPDATE_1_21) @@ -123,7 +123,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c OXIDIZED_CHISELED_COPPER(27719), CUT_COPPER(32519), EXPOSED_CUT_COPPER(18000), -@@ -362,12 +380,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -365,12 +383,16 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla WAXED_WEATHERED_COPPER(5960), WAXED_OXIDIZED_COPPER(25626), @MinecraftExperimental(Requires.UPDATE_1_21) @@ -140,7 +140,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c WAXED_OXIDIZED_CHISELED_COPPER(7735), WAXED_CUT_COPPER(11030), WAXED_EXPOSED_CUT_COPPER(30043), -@@ -2109,41 +2131,49 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -2112,41 +2134,49 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla * BlockData: {@link Door} */ @MinecraftExperimental(Requires.UPDATE_1_21) @@ -190,7 +190,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c WAXED_OXIDIZED_COPPER_DOOR(23888, Door.class), /** * BlockData: {@link TrapDoor} -@@ -2197,41 +2227,49 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -2200,41 +2230,49 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla * BlockData: {@link TrapDoor} */ @MinecraftExperimental(Requires.UPDATE_1_21) @@ -240,7 +240,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c WAXED_OXIDIZED_COPPER_TRAPDOOR(21450, TrapDoor.class), /** * BlockData: {@link Gate} -@@ -2533,6 +2571,8 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -2536,6 +2574,8 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla EGG(21603, 16), COMPASS(24139), RECOVERY_COMPASS(12710), @@ -249,7 +249,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c BUNDLE(16835, 1), FISHING_ROD(4167, 1, 64), CLOCK(14980), -@@ -2639,6 +2679,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -2642,6 +2682,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla * BlockData: {@link Crafter} */ @MinecraftExperimental(Requires.UPDATE_1_21) @@ -257,7 +257,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c CRAFTER(25243, Crafter.class), FILLED_MAP(23504), SHEARS(27971, 1, 238), -@@ -2679,8 +2720,10 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -2682,8 +2723,10 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla BEE_SPAWN_EGG(22924), BLAZE_SPAWN_EGG(4759), @MinecraftExperimental(Requires.UPDATE_1_21) @@ -268,7 +268,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c BREEZE_SPAWN_EGG(7580), CAT_SPAWN_EGG(29583), CAMEL_SPAWN_EGG(14760), -@@ -2757,10 +2800,12 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -2760,10 +2803,12 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla EXPERIENCE_BOTTLE(12858), FIRE_CHARGE(4842), @MinecraftExperimental(Requires.UPDATE_1_21) @@ -281,7 +281,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c MACE(4771, 1, 250), ITEM_FRAME(27318), GLOW_ITEM_FRAME(26473), -@@ -2938,7 +2983,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -2941,7 +2986,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla MOJANG_BANNER_PATTERN(11903, 1), GLOBE_BANNER_PATTERN(27753, 1), PIGLIN_BANNER_PATTERN(22028, 1), @@ -293,7 +293,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c GUSTER_BANNER_PATTERN(27267, 1), GOAT_HORN(28237, 1), /** -@@ -3159,8 +3208,10 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -3162,8 +3211,10 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla RAISER_ARMOR_TRIM_SMITHING_TEMPLATE(29116), HOST_ARMOR_TRIM_SMITHING_TEMPLATE(12165), @MinecraftExperimental(Requires.UPDATE_1_21) @@ -304,7 +304,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c BOLT_ARMOR_TRIM_SMITHING_TEMPLATE(9698), ANGLER_POTTERY_SHERD(9952), ARCHER_POTTERY_SHERD(21629), -@@ -3171,9 +3222,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -3174,9 +3225,11 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla DANGER_POTTERY_SHERD(30506), EXPLORER_POTTERY_SHERD(5124), @MinecraftExperimental(Requires.UPDATE_1_21) @@ -316,7 +316,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c GUSTER_POTTERY_SHERD(28193), HEART_POTTERY_SHERD(17607), HEARTBREAK_POTTERY_SHERD(21108), -@@ -3183,6 +3236,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -3186,6 +3239,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla PLENTY_POTTERY_SHERD(28236), PRIZE_POTTERY_SHERD(4341), @MinecraftExperimental(Requires.UPDATE_1_21) @@ -324,7 +324,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c SCRAPE_POTTERY_SHERD(30034), SHEAF_POTTERY_SHERD(23652), SHELTER_POTTERY_SHERD(28390), -@@ -3192,99 +3246,121 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla +@@ -3195,99 +3249,121 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla * BlockData: {@link Waterlogged} */ @MinecraftExperimental(Requires.UPDATE_1_21) @@ -447,7 +447,7 @@ index 1ca448c9e3a3178663a033617d9414ec085c246a..7a337fe908915f8ea487a0b9236c511c /** * BlockData: {@link Levelled} diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java -index b0ccd263cabe911d43cc13261011b64cacaeb7bb..82d75010cc86bbbbb9c094c2bac5e570c98582c9 100644 +index c5e3a8143a166d426d87fa3d0f0b3d4f3d4bff1a..50cc7a920bab32264d77f30d3af986b02229c749 100644 --- a/src/main/java/org/bukkit/Particle.java +++ b/src/main/java/org/bukkit/Particle.java @@ -130,33 +130,46 @@ public enum Particle implements Keyed { @@ -860,7 +860,7 @@ index 375172e05a78611deb3003f780867516cb6cd1a4..e31e7b6624ff9da7bec5d3b0548a4fa3 MUSIC_CREATIVE("music.creative"), MUSIC_CREDITS("music.credits"), diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java -index cb5890e0e7bccfee2ba32dd4776f1ae1fdd539e8..5ec7f1cae36189989db0a66ee05c22035e7daf7c 100644 +index eaec13dbe7be4dd6c5faa97c413e24d6e77cef62..4b037863bde8e3a167cfd94b0df0b357025dcf27 100644 --- a/src/main/java/org/bukkit/Tag.java +++ b/src/main/java/org/bukkit/Tag.java @@ -770,6 +770,8 @@ public interface Tag extends Keyed { @@ -872,7 +872,7 @@ index cb5890e0e7bccfee2ba32dd4776f1ae1fdd539e8..5ec7f1cae36189989db0a66ee05c2203 Tag BLOCKS_WIND_CHARGE_EXPLOSIONS = Bukkit.getTag(REGISTRY_BLOCKS, NamespacedKey.minecraft("blocks_wind_charge_explosions"), Material.class); /** * Vanilla block tag representing solid blocks which do not block hopper operation. -@@ -1141,6 +1143,8 @@ public interface Tag extends Keyed { +@@ -1146,6 +1148,8 @@ public interface Tag extends Keyed { /** * Vanilla item tag representing all items enchantable with mace enchantments. */ @@ -881,7 +881,7 @@ index cb5890e0e7bccfee2ba32dd4776f1ae1fdd539e8..5ec7f1cae36189989db0a66ee05c2203 Tag ITEMS_ENCHANTABLE_MACE = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("enchantable/mace"), Material.class); /** * Vanilla item tag representing all items that confer freeze immunity on -@@ -1234,6 +1238,8 @@ public interface Tag extends Keyed { +@@ -1239,6 +1243,8 @@ public interface Tag extends Keyed { /** * Vanilla tag representing entities which deflect projectiles. */ @@ -890,7 +890,7 @@ index cb5890e0e7bccfee2ba32dd4776f1ae1fdd539e8..5ec7f1cae36189989db0a66ee05c2203 Tag ENTITY_TYPES_DEFLECTS_PROJECTILES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("deflects_projectiles"), EntityType.class); /** * Vanilla tag representing entities which deflect arrows. -@@ -1244,6 +1250,8 @@ public interface Tag extends Keyed { +@@ -1249,6 +1255,8 @@ public interface Tag extends Keyed { /** * Vanilla tag representing entities which can turn in boats. */ @@ -899,7 +899,7 @@ index cb5890e0e7bccfee2ba32dd4776f1ae1fdd539e8..5ec7f1cae36189989db0a66ee05c2203 Tag ENTITY_TYPES_CAN_TURN_IN_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_turn_in_boats"), EntityType.class); /** * Vanilla tag representing all entities sensitive to illager enchantments. -@@ -1292,14 +1300,20 @@ public interface Tag extends Keyed { +@@ -1297,14 +1305,20 @@ public interface Tag extends Keyed { /** * Vanilla tag representing all entities which do not receive anger from wind charges. */ diff --git a/patches/api/0443-Add-more-scoreboard-API.patch b/patches/api/0441-Add-more-scoreboard-API.patch similarity index 100% rename from patches/api/0443-Add-more-scoreboard-API.patch rename to patches/api/0441-Add-more-scoreboard-API.patch diff --git a/patches/api/0444-Improve-Registry.patch b/patches/api/0442-Improve-Registry.patch similarity index 95% rename from patches/api/0444-Improve-Registry.patch rename to patches/api/0442-Improve-Registry.patch index 61744f44e9..aa0646669b 100644 --- a/patches/api/0444-Improve-Registry.patch +++ b/patches/api/0442-Improve-Registry.patch @@ -31,10 +31,10 @@ index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..704dba92f9246ef398ed8d162ebee3cf @Override public @NotNull String translationKey() { diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java -index 9a8be5c730802e5750de1fc31e65f254f5894e63..0f7f23738c57ebe37846714159bb49e5b61e9f3d 100644 +index f301f81817409f0a6799885d4f0972ed9bf3e4df..88bb3b9ae99fae97ec21972b75ec43cb6b7b22b5 100644 --- a/src/main/java/org/bukkit/Registry.java +++ b/src/main/java/org/bukkit/Registry.java -@@ -335,6 +335,49 @@ public interface Registry extends Iterable { +@@ -353,6 +353,49 @@ public interface Registry extends Iterable { @Nullable T get(@NotNull NamespacedKey key); @@ -84,9 +84,9 @@ index 9a8be5c730802e5750de1fc31e65f254f5894e63..0f7f23738c57ebe37846714159bb49e5 /** * Returns a new stream, which contains all registry items, which are registered to the registry. * -@@ -401,5 +444,12 @@ public interface Registry extends Iterable { - public Iterator iterator() { - return map.values().iterator(); +@@ -427,5 +470,12 @@ public interface Registry extends Iterable { + public Class getType() { + return this.type; } + + // Paper start - improve Registry diff --git a/patches/api/0445-Add-experience-points-API.patch b/patches/api/0443-Add-experience-points-API.patch similarity index 100% rename from patches/api/0445-Add-experience-points-API.patch rename to patches/api/0443-Add-experience-points-API.patch diff --git a/patches/api/0446-Add-missing-InventoryType.patch b/patches/api/0444-Add-missing-InventoryType.patch similarity index 100% rename from patches/api/0446-Add-missing-InventoryType.patch rename to patches/api/0444-Add-missing-InventoryType.patch diff --git a/patches/api/0447-Add-drops-to-shear-events.patch b/patches/api/0445-Add-drops-to-shear-events.patch similarity index 100% rename from patches/api/0447-Add-drops-to-shear-events.patch rename to patches/api/0445-Add-drops-to-shear-events.patch diff --git a/patches/api/0448-Add-HiddenPotionEffect-API.patch b/patches/api/0446-Add-HiddenPotionEffect-API.patch similarity index 91% rename from patches/api/0448-Add-HiddenPotionEffect-API.patch rename to patches/api/0446-Add-HiddenPotionEffect-API.patch index 30a7bc6c0e..8ac61db064 100644 --- a/patches/api/0448-Add-HiddenPotionEffect-API.patch +++ b/patches/api/0446-Add-HiddenPotionEffect-API.patch @@ -29,10 +29,10 @@ index 5f070c7563151c40cf4d691fc2a10d8a2766982a..b777e530122549455dcce6fac8d4a151 * @param effects the effects to add * @return whether all of the effects could be added diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java -index 037af5fd6d71a526c0e6620f2db0cd6df9625261..c8ab330ef171795d08fa201cf8320703c7f1c66b 100644 +index 575156c089e45a3d6a43ca6b7adfbc7b473a60ab..704b6d615e7490d433b703f5a6a8d3c40aa6425e 100644 --- a/src/main/java/org/bukkit/potion/PotionEffect.java +++ b/src/main/java/org/bukkit/potion/PotionEffect.java -@@ -26,6 +26,7 @@ public class PotionEffect implements ConfigurationSerializable { +@@ -28,6 +28,7 @@ public class PotionEffect implements ConfigurationSerializable { */ public static final int INFINITE_DURATION = -1; @@ -40,7 +40,7 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..c8ab330ef171795d08fa201cf8320703 private static final String AMPLIFIER = "amplifier"; private static final String DURATION = "duration"; private static final String TYPE = "effect"; -@@ -38,6 +39,7 @@ public class PotionEffect implements ConfigurationSerializable { +@@ -40,6 +41,7 @@ public class PotionEffect implements ConfigurationSerializable { private final boolean ambient; private final boolean particles; private final boolean icon; @@ -48,7 +48,7 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..c8ab330ef171795d08fa201cf8320703 /** * Creates a potion effect. -@@ -48,8 +50,11 @@ public class PotionEffect implements ConfigurationSerializable { +@@ -50,8 +52,11 @@ public class PotionEffect implements ConfigurationSerializable { * @param ambient the ambient status, see {@link PotionEffect#isAmbient()} * @param particles the particle status, see {@link PotionEffect#hasParticles()} * @param icon the icon status, see {@link PotionEffect#hasIcon()} @@ -61,7 +61,7 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..c8ab330ef171795d08fa201cf8320703 Preconditions.checkArgument(type != null, "effect type cannot be null"); this.type = type; this.duration = duration; -@@ -57,6 +62,23 @@ public class PotionEffect implements ConfigurationSerializable { +@@ -59,6 +64,23 @@ public class PotionEffect implements ConfigurationSerializable { this.ambient = ambient; this.particles = particles; this.icon = icon; @@ -85,7 +85,7 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..c8ab330ef171795d08fa201cf8320703 } /** -@@ -104,7 +126,7 @@ public class PotionEffect implements ConfigurationSerializable { +@@ -106,7 +128,7 @@ public class PotionEffect implements ConfigurationSerializable { * @param map the map to deserialize from */ public PotionEffect(@NotNull Map map) { @@ -94,7 +94,7 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..c8ab330ef171795d08fa201cf8320703 } // Paper start -@@ -132,6 +154,19 @@ public class PotionEffect implements ConfigurationSerializable { +@@ -134,6 +156,19 @@ public class PotionEffect implements ConfigurationSerializable { public PotionEffect withIcon(boolean icon) { return new PotionEffect(this.type, duration, amplifier, ambient, particles, icon); } @@ -114,7 +114,7 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..c8ab330ef171795d08fa201cf8320703 // Paper end @NotNull -@@ -169,19 +204,27 @@ public class PotionEffect implements ConfigurationSerializable { +@@ -170,19 +205,27 @@ public class PotionEffect implements ConfigurationSerializable { @Override @NotNull public Map serialize() { @@ -145,7 +145,7 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..c8ab330ef171795d08fa201cf8320703 * * @param entity The entity to add this effect to * @return Whether the effect could be added -@@ -200,7 +243,7 @@ public class PotionEffect implements ConfigurationSerializable { +@@ -201,7 +244,7 @@ public class PotionEffect implements ConfigurationSerializable { return false; } PotionEffect that = (PotionEffect) obj; @@ -154,7 +154,7 @@ index 037af5fd6d71a526c0e6620f2db0cd6df9625261..c8ab330ef171795d08fa201cf8320703 } /** -@@ -305,11 +348,12 @@ public class PotionEffect implements ConfigurationSerializable { +@@ -306,11 +349,12 @@ public class PotionEffect implements ConfigurationSerializable { hash ^= 0x22222222 >> (ambient ? 1 : -1); hash ^= 0x22222222 >> (particles ? 1 : -1); hash ^= 0x22222222 >> (icon ? 1 : -1); diff --git a/patches/api/0449-Add-PlayerShieldDisableEvent.patch b/patches/api/0447-Add-PlayerShieldDisableEvent.patch similarity index 100% rename from patches/api/0449-Add-PlayerShieldDisableEvent.patch rename to patches/api/0447-Add-PlayerShieldDisableEvent.patch diff --git a/patches/api/0450-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch b/patches/api/0448-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch similarity index 100% rename from patches/api/0450-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch rename to patches/api/0448-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch diff --git a/patches/api/0451-Add-BlockStateMeta-clearBlockState.patch b/patches/api/0449-Add-BlockStateMeta-clearBlockState.patch similarity index 90% rename from patches/api/0451-Add-BlockStateMeta-clearBlockState.patch rename to patches/api/0449-Add-BlockStateMeta-clearBlockState.patch index 1a81132aa8..7e8c47a8e2 100644 --- a/patches/api/0451-Add-BlockStateMeta-clearBlockState.patch +++ b/patches/api/0449-Add-BlockStateMeta-clearBlockState.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add BlockStateMeta#clearBlockState diff --git a/src/main/java/org/bukkit/inventory/meta/BlockStateMeta.java b/src/main/java/org/bukkit/inventory/meta/BlockStateMeta.java -index e7d905b1146b2bdd2da5bdeb6bf3541fb181d59e..9f08ce5e89ecb4e335f7459a4e600e638e71f963 100644 +index c7d3041221742f6655155f19ef2addcaf2401015..dedb33e3d7f99e12fddba438af0874e6973d9372 100644 --- a/src/main/java/org/bukkit/inventory/meta/BlockStateMeta.java +++ b/src/main/java/org/bukkit/inventory/meta/BlockStateMeta.java @@ -14,6 +14,13 @@ public interface BlockStateMeta extends ItemMeta { diff --git a/patches/api/0452-Expose-LootTable-of-DecoratedPot.patch b/patches/api/0450-Expose-LootTable-of-DecoratedPot.patch similarity index 100% rename from patches/api/0452-Expose-LootTable-of-DecoratedPot.patch rename to patches/api/0450-Expose-LootTable-of-DecoratedPot.patch diff --git a/patches/api/0453-Add-ShulkerDuplicateEvent.patch b/patches/api/0451-Add-ShulkerDuplicateEvent.patch similarity index 100% rename from patches/api/0453-Add-ShulkerDuplicateEvent.patch rename to patches/api/0451-Add-ShulkerDuplicateEvent.patch diff --git a/patches/api/0454-Add-api-for-spawn-egg-texture-colors.patch b/patches/api/0452-Add-api-for-spawn-egg-texture-colors.patch similarity index 88% rename from patches/api/0454-Add-api-for-spawn-egg-texture-colors.patch rename to patches/api/0452-Add-api-for-spawn-egg-texture-colors.patch index 6e3d91aff4..082f5a3005 100644 --- a/patches/api/0454-Add-api-for-spawn-egg-texture-colors.patch +++ b/patches/api/0452-Add-api-for-spawn-egg-texture-colors.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add api for spawn egg texture colors diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index e19434a0f5065987be087b6bd531c88be33d2917..80947c6862a906dec9c039b5dff993461d4d831b 100644 +index 289346bcd0ef42cfaf2afc270eeb7525e520ce80..ffb22192e08b9d47ac2667efa0d62a548f14d46b 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -250,4 +250,17 @@ public interface UnsafeValues { +@@ -259,4 +259,17 @@ public interface UnsafeValues { String getStatisticCriteriaKey(@NotNull org.bukkit.Statistic statistic); // Paper end diff --git a/patches/api/0455-Add-Lifecycle-Event-system.patch b/patches/api/0453-Add-Lifecycle-Event-system.patch similarity index 99% rename from patches/api/0455-Add-Lifecycle-Event-system.patch rename to patches/api/0453-Add-Lifecycle-Event-system.patch index 4b36ba4885..b40399205b 100644 --- a/patches/api/0455-Add-Lifecycle-Event-system.patch +++ b/patches/api/0453-Add-Lifecycle-Event-system.patch @@ -528,10 +528,10 @@ index 0000000000000000000000000000000000000000..304f978e40e1759bb19704cc5cec3995 + } +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 80947c6862a906dec9c039b5dff993461d4d831b..7e6bdf3333537491b3421d196779a4eb502f7314 100644 +index ffb22192e08b9d47ac2667efa0d62a548f14d46b..6b67c32343876f345459300a4bb6b692412bfc52 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -263,4 +263,12 @@ public interface UnsafeValues { +@@ -272,4 +272,12 @@ public interface UnsafeValues { */ @Nullable org.bukkit.Color getSpawnEggLayerColor(org.bukkit.entity.EntityType entityType, int layer); // Paper end - spawn egg color visibility diff --git a/patches/api/0456-ItemStack-Tooltip-API.patch b/patches/api/0454-ItemStack-Tooltip-API.patch similarity index 90% rename from patches/api/0456-ItemStack-Tooltip-API.patch rename to patches/api/0454-ItemStack-Tooltip-API.patch index aa6b6ddd15..3983a283cd 100644 --- a/patches/api/0456-ItemStack-Tooltip-API.patch +++ b/patches/api/0454-ItemStack-Tooltip-API.patch @@ -108,10 +108,10 @@ index 0000000000000000000000000000000000000000..1d9bed6691f581529c53b577b26f1d0f + } +} diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java -index 7e6bdf3333537491b3421d196779a4eb502f7314..a3ba9249e636d1fb8dad98fab413436009fe04df 100644 +index 6b67c32343876f345459300a4bb6b692412bfc52..0857a65ecbc36e0e4b8a7d0cda52be35f238f660 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java -@@ -271,4 +271,6 @@ public interface UnsafeValues { +@@ -280,4 +280,6 @@ public interface UnsafeValues { @org.jetbrains.annotations.ApiStatus.Internal io.papermc.paper.plugin.lifecycle.event.LifecycleEventManager createPluginLifecycleEventManager(final org.bukkit.plugin.java.JavaPlugin plugin, final java.util.function.BooleanSupplier registrationCheck); // Paper end - lifecycle event API @@ -119,10 +119,10 @@ index 7e6bdf3333537491b3421d196779a4eb502f7314..a3ba9249e636d1fb8dad98fab4134360 + @NotNull java.util.List computeTooltipLines(@NotNull ItemStack itemStack, @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, @Nullable org.bukkit.entity.Player player); // Paper - expose itemstack tooltip lines } diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index a1d0e479b9f28378f858f86ba8b0e9b7ddf71446..b669df4bd1ff0ecba575d42415973e81bccddbbe 100644 +index 8975f6e8004d2ed65e20bb5b71bdbfa45713f78a..8db71bd075b8ece36c6f0dc0339841df9257038b 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -1021,4 +1021,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -1027,4 +1027,21 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat return type.isAir() || amount <= 0; } // Paper end @@ -139,7 +139,7 @@ index a1d0e479b9f28378f858f86ba8b0e9b7ddf71446..b669df4bd1ff0ecba575d42415973e81 + * @return an immutable list of components (can be empty) + */ + @SuppressWarnings("deprecation") // abusing unsafe as a bridge -+ public @NotNull @org.jetbrains.annotations.Unmodifiable List computeTooltipLines(final @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, final @Nullable org.bukkit.entity.Player player) { ++ public java.util.@NotNull @org.jetbrains.annotations.Unmodifiable List computeTooltipLines(final @NotNull io.papermc.paper.inventory.tooltip.TooltipContext tooltipContext, final @Nullable org.bukkit.entity.Player player) { + return Bukkit.getUnsafe().computeTooltipLines(this, tooltipContext, player); + } + // Paper end - expose itemstack tooltip lines diff --git a/patches/api/0457-Add-getChunkSnapshot-includeLightData-parameter.patch b/patches/api/0455-Add-getChunkSnapshot-includeLightData-parameter.patch similarity index 100% rename from patches/api/0457-Add-getChunkSnapshot-includeLightData-parameter.patch rename to patches/api/0455-Add-getChunkSnapshot-includeLightData-parameter.patch diff --git a/patches/api/0458-Add-FluidState-API.patch b/patches/api/0456-Add-FluidState-API.patch similarity index 100% rename from patches/api/0458-Add-FluidState-API.patch rename to patches/api/0456-Add-FluidState-API.patch diff --git a/patches/api/0459-add-number-format-api.patch b/patches/api/0457-add-number-format-api.patch similarity index 100% rename from patches/api/0459-add-number-format-api.patch rename to patches/api/0457-add-number-format-api.patch diff --git a/patches/api/0460-improve-BanList-types.patch b/patches/api/0458-improve-BanList-types.patch similarity index 96% rename from patches/api/0460-improve-BanList-types.patch rename to patches/api/0458-improve-BanList-types.patch index 2236f8bf3e..cee321426a 100644 --- a/patches/api/0460-improve-BanList-types.patch +++ b/patches/api/0458-improve-BanList-types.patch @@ -68,7 +68,7 @@ index a77c0411a68a9bad33ddfb335b7a996a843e478c..0e0baadde9e34d28db56dc68e66aaf66 /** * Banned player names diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java -index c9fbbf0287cd663080fc09ac83b439780cbfae85..687bd8f54c9bfb5f5ab1f7ad9d232daf2433cc76 100644 +index 81203ad1460f3b64413a8426fb58a051b7d78f03..5d1b55fdbcbe63f6b42b694d05211a3cc691a09d 100644 --- a/src/main/java/org/bukkit/Bukkit.java +++ b/src/main/java/org/bukkit/Bukkit.java @@ -1651,11 +1651,27 @@ public final class Bukkit { @@ -100,7 +100,7 @@ index c9fbbf0287cd663080fc09ac83b439780cbfae85..687bd8f54c9bfb5f5ab1f7ad9d232daf /** * Gets a set containing all player operators. diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java -index c8395c8707e696f1e6fc8b0fd03f07203e01c157..27084402cf0e46dcd171074629b7c4156e48aa44 100644 +index dc985b54e1582629dffeebc56152eedaedae56d3..c8595ffcfcbdd79794d464415287d46acef72b72 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1410,10 +1410,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi diff --git a/patches/api/0461-Suspicious-Effect-Entry-API.patch b/patches/api/0459-Suspicious-Effect-Entry-API.patch similarity index 100% rename from patches/api/0461-Suspicious-Effect-Entry-API.patch rename to patches/api/0459-Suspicious-Effect-Entry-API.patch diff --git a/patches/api/0462-Fix-DamageSource-API.patch b/patches/api/0460-Fix-DamageSource-API.patch similarity index 100% rename from patches/api/0462-Fix-DamageSource-API.patch rename to patches/api/0460-Fix-DamageSource-API.patch diff --git a/patches/api/0463-Expanded-Hopper-API.patch b/patches/api/0461-Expanded-Hopper-API.patch similarity index 100% rename from patches/api/0463-Expanded-Hopper-API.patch rename to patches/api/0461-Expanded-Hopper-API.patch diff --git a/patches/api/0464-Clone-mutables-to-prevent-unexpected-issues.patch b/patches/api/0462-Clone-mutables-to-prevent-unexpected-issues.patch similarity index 100% rename from patches/api/0464-Clone-mutables-to-prevent-unexpected-issues.patch rename to patches/api/0462-Clone-mutables-to-prevent-unexpected-issues.patch diff --git a/patches/api/0465-Add-BlockBreakProgressUpdateEvent.patch b/patches/api/0463-Add-BlockBreakProgressUpdateEvent.patch similarity index 100% rename from patches/api/0465-Add-BlockBreakProgressUpdateEvent.patch rename to patches/api/0463-Add-BlockBreakProgressUpdateEvent.patch diff --git a/patches/api/0466-Deprecate-ItemStack-setType.patch b/patches/api/0464-Deprecate-ItemStack-setType.patch similarity index 90% rename from patches/api/0466-Deprecate-ItemStack-setType.patch rename to patches/api/0464-Deprecate-ItemStack-setType.patch index 9f21ce5142..8883aeb309 100644 --- a/patches/api/0466-Deprecate-ItemStack-setType.patch +++ b/patches/api/0464-Deprecate-ItemStack-setType.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate ItemStack#setType diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index b669df4bd1ff0ecba575d42415973e81bccddbbe..1294f7ce50977dfe72daf535b611386844c205e0 100644 +index 8db71bd075b8ece36c6f0dc0339841df9257038b..4818b4e6583414fa98194bb6f3c5dbd4bd95be3a 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -134,8 +134,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -136,8 +136,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat * {@link Material#isItem()} returns false. * * @param type New type to set the items in this stack to @@ -27,7 +27,7 @@ index b669df4bd1ff0ecba575d42415973e81bccddbbe..1294f7ce50977dfe72daf535b6113868 public void setType(@NotNull Material type) { Preconditions.checkArgument(type != null, "Material cannot be null"); this.type = type; -@@ -148,6 +158,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -150,6 +160,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat this.data = null; } } diff --git a/patches/api/0467-Item-Mutation-Fixes.patch b/patches/api/0465-Item-Mutation-Fixes.patch similarity index 100% rename from patches/api/0467-Item-Mutation-Fixes.patch rename to patches/api/0465-Item-Mutation-Fixes.patch diff --git a/patches/api/0468-API-for-checking-sent-chunks.patch b/patches/api/0466-API-for-checking-sent-chunks.patch similarity index 100% rename from patches/api/0468-API-for-checking-sent-chunks.patch rename to patches/api/0466-API-for-checking-sent-chunks.patch diff --git a/patches/api/0469-Add-CartographyItemEvent.patch b/patches/api/0467-Add-CartographyItemEvent.patch similarity index 100% rename from patches/api/0469-Add-CartographyItemEvent.patch rename to patches/api/0467-Add-CartographyItemEvent.patch diff --git a/patches/api/0470-More-Raid-API.patch b/patches/api/0468-More-Raid-API.patch similarity index 100% rename from patches/api/0470-More-Raid-API.patch rename to patches/api/0468-More-Raid-API.patch diff --git a/patches/api/0471-Fix-SpawnerEntry-Equipment-API.patch b/patches/api/0469-Fix-SpawnerEntry-Equipment-API.patch similarity index 100% rename from patches/api/0471-Fix-SpawnerEntry-Equipment-API.patch rename to patches/api/0469-Fix-SpawnerEntry-Equipment-API.patch diff --git a/patches/api/0472-Fix-ItemFlags.patch b/patches/api/0470-Fix-ItemFlags.patch similarity index 94% rename from patches/api/0472-Fix-ItemFlags.patch rename to patches/api/0470-Fix-ItemFlags.patch index 007e003bc3..989af1fc2a 100644 --- a/patches/api/0472-Fix-ItemFlags.patch +++ b/patches/api/0470-Fix-ItemFlags.patch @@ -47,10 +47,10 @@ index a435f6c8947e4ac50b8c04f37b107055970937dd..92e30c281eab4801298b280bd388a039 /** * Setting to show/hide item-specific information, including, but not limited to: diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java -index 1294f7ce50977dfe72daf535b611386844c205e0..84a7bf0936d35bf42b5ed038d295d5c31740f472 100644 +index 4818b4e6583414fa98194bb6f3c5dbd4bd95be3a..c64413a6740b604282984dea2a8430a6e7478d68 100644 --- a/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/src/main/java/org/bukkit/inventory/ItemStack.java -@@ -575,6 +575,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat +@@ -581,6 +581,13 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat Object raw = args.get("meta"); if (raw instanceof ItemMeta) { ((ItemMeta) raw).setVersion(version); diff --git a/patches/api/0473-Allow-modifying-library-loader-jars-bytecode.patch b/patches/api/0471-Allow-modifying-library-loader-jars-bytecode.patch similarity index 100% rename from patches/api/0473-Allow-modifying-library-loader-jars-bytecode.patch rename to patches/api/0471-Allow-modifying-library-loader-jars-bytecode.patch diff --git a/patches/api/0474-Add-hook-to-remap-library-jars.patch b/patches/api/0472-Add-hook-to-remap-library-jars.patch similarity index 100% rename from patches/api/0474-Add-hook-to-remap-library-jars.patch rename to patches/api/0472-Add-hook-to-remap-library-jars.patch diff --git a/patches/api/0475-Add-GameMode-isInvulnerable.patch b/patches/api/0473-Add-GameMode-isInvulnerable.patch similarity index 100% rename from patches/api/0475-Add-GameMode-isInvulnerable.patch rename to patches/api/0473-Add-GameMode-isInvulnerable.patch diff --git a/patches/api/0476-Expose-hasColor-to-leather-armor.patch b/patches/api/0474-Expose-hasColor-to-leather-armor.patch similarity index 100% rename from patches/api/0476-Expose-hasColor-to-leather-armor.patch rename to patches/api/0474-Expose-hasColor-to-leather-armor.patch diff --git a/patches/api/0477-Add-missing-wind-charge-damage-type.patch b/patches/api/0475-Add-missing-wind-charge-damage-type.patch similarity index 100% rename from patches/api/0477-Add-missing-wind-charge-damage-type.patch rename to patches/api/0475-Add-missing-wind-charge-damage-type.patch diff --git a/patches/api/0478-Added-API-to-get-player-ha-proxy-address.patch b/patches/api/0476-Added-API-to-get-player-ha-proxy-address.patch similarity index 100% rename from patches/api/0478-Added-API-to-get-player-ha-proxy-address.patch rename to patches/api/0476-Added-API-to-get-player-ha-proxy-address.patch diff --git a/patches/api/0479-More-Chest-Block-API.patch b/patches/api/0477-More-Chest-Block-API.patch similarity index 100% rename from patches/api/0479-More-Chest-Block-API.patch rename to patches/api/0477-More-Chest-Block-API.patch diff --git a/patches/api/0480-Brigadier-based-command-API.patch b/patches/api/0478-Brigadier-based-command-API.patch similarity index 100% rename from patches/api/0480-Brigadier-based-command-API.patch rename to patches/api/0478-Brigadier-based-command-API.patch diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch index d10f5c55f6..9367e71755 100644 --- a/patches/server/0005-Paper-config-files.patch +++ b/patches/server/0005-Paper-config-files.patch @@ -5039,10 +5039,10 @@ index ecbb926986bbc0ad6fe108b782cdc17ee8a9f035..b06ffa8d5953c8f0a47daf056495cd42 this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 332d4e0771cf5a4eddd44b9a380df52fb8ab5d42..02ddd4e200a86d720297dbec508480fc0cd270d1 100644 +index 3d80f58524861ad808caa35964676f0561b25547..e51e40910c51ab5cdc599e614d2b3fa813691f10 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -927,6 +927,7 @@ public final class CraftServer implements Server { +@@ -928,6 +928,7 @@ public final class CraftServer implements Server { } org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot diff --git a/patches/server/0008-CB-fixes.patch b/patches/server/0008-CB-fixes.patch index f2dc166cda..2c625b3d58 100644 --- a/patches/server/0008-CB-fixes.patch +++ b/patches/server/0008-CB-fixes.patch @@ -68,10 +68,10 @@ index 9b90649f71849b3830ca9b6a3c5a722c66b02f1f..209c6b64e79c29ea3bb84ddbe89a8bff + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 02ddd4e200a86d720297dbec508480fc0cd270d1..080c0cf84d959e1acdde088f367bd005ea9c3bbd 100644 +index e51e40910c51ab5cdc599e614d2b3fa813691f10..ca10f5f6fa70b2e3f4f09a132c91df331a1de559 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2482,7 +2482,13 @@ public final class CraftServer implements Server { +@@ -2483,7 +2483,13 @@ public final class CraftServer implements Server { Preconditions.checkArgument(key != null, "NamespacedKey key cannot be null"); ReloadableServerRegistries.Holder registry = this.getServer().reloadableRegistries(); @@ -110,19 +110,6 @@ index 6b34a8d33faa49ffa9082995e67af10d3cb38c03..f0c817e27a602740bc979b2ebaec3917 return this.mapId; } -diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java -index 658f3962543a36bc8c16f306ccb3e254b5b3d0a8..9e1896199d10be606a6c6304d849c7c9eb3c9fa1 100644 ---- a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java -+++ b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java -@@ -82,7 +82,7 @@ public class FieldRename { - .change("DAMAGE_UNDEAD", "SMITE") - .change("DAMAGE_ARTHROPODS", "BANE_OF_ARTHROPODS") - .change("LOOT_BONUS_MOBS", "LOOTING") -- .change("SWEEPING_EDGE", "SWEEPING") -+ // .change("SWEEPING_EDGE", "SWEEPING") // Paper - this change is incorrect, sweeping edge is the correct name - .change("DIG_SPEED", "EFFICIENCY") - .change("DURABILITY", "UNBREAKING") - .change("LOOT_BONUS_BLOCKS", "FORTUNE") diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java index 905adf97c0d1f0d1c774a6835a5dffcfea884e58..c017ce2ca1bc535795c958a2e509af2adf88efa9 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch index 57c76efb81..d5ae6a2765 100644 --- a/patches/server/0009-MC-Utils.patch +++ b/patches/server/0009-MC-Utils.patch @@ -6950,7 +6950,7 @@ index c4bd9be9d1884be1f5040ff1417f44f8ac4b655f..319cb644c0a42e9cc0d3ce9d1cbaa93b public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) { // IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 374db2337574f8b799c1a6ffef1cf62a82c0f802..240d7831d7f05e245e4103ec22f4967657e1040b 100644 +index adccf79524d8a1003e2e700274b2e1b3353d9daf..a1d4d3a66c48abdddd2bcdd957417f81290c7a6e 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -276,6 +276,8 @@ public class ServerPlayer extends Player { @@ -7045,7 +7045,7 @@ index aede9b65e799a1f123f71f9390fb05acddda676b..2510589400b3012b827efcab477c6483 @Override public void tell(R runnable) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 803f8e80d616ac7f9a51e4cdd6a7a3ce690b791e..9c54bc3897d1fa3c88a5a7d55224eb4cc97f4e79 100644 +index b64ec67ebd3b30d29cca36086a7aa70a6dd1fac3..cc3304e2ea7f58b4649da09b68ac3749bad08b00 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -333,6 +333,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -7061,7 +7061,7 @@ index 803f8e80d616ac7f9a51e4cdd6a7a3ce690b791e..9c54bc3897d1fa3c88a5a7d55224eb4c public Entity(EntityType type, Level world) { this.id = Entity.ENTITY_COUNTER.incrementAndGet(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 24368386db4c4eb1f6b83730570146f50d6b389b..c675fe1c2363248b034bdc27bb3a6a0e65adf19c 100644 +index d5c3ebe351803c3dd24f0667aa87e13c6b420080..d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -270,6 +270,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -7751,10 +7751,10 @@ index 34933c5324126f9afdc5cba9dea997ace8f01806..219062cff8a05c765b092f1525043d9d return false; } else { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 080c0cf84d959e1acdde088f367bd005ea9c3bbd..9b299f74336ad0efecd05a4b771ac58549d5fb6a 100644 +index ca10f5f6fa70b2e3f4f09a132c91df331a1de559..4cc75d39dd1104805e96c1d442400f2c18a7af2a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2561,4 +2561,9 @@ public final class CraftServer implements Server { +@@ -2562,4 +2562,9 @@ public final class CraftServer implements Server { return this.spigot; } // Spigot end @@ -7845,10 +7845,10 @@ index fb8243b6202374b5a1b5197a6b7984e1cfb60500..6ce2b09c4bb7153c960a7eed865296a9 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index be0f10f8905cba30e26d61af879b054d3df5284b..13c3ac65f26e6cfc55ee3538b6308ef93f9936aa 100644 +index b6072ff647cf9d823924afb02759ab39f37b3e4f..654d4994bb2e65c5ca6b7190c15d2113eede9e5b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2400,4 +2400,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2397,4 +2397,34 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.spigot; } // Spigot end @@ -8131,10 +8131,10 @@ index 0000000000000000000000000000000000000000..909b2c98e7a9117d2f737245e4661792 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index cbbb404a6966fc72d17d0ec735d08c1be52b2d4f..3f91fce6df9b87a6e84df21ed04f25be3729814b 100644 +index 2166c420c47778caadf8f3140bbe3aebe06e130f..8a13d8ae4325854acb3be7083d022c08ba094df1 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -105,8 +105,17 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -109,8 +109,17 @@ public final class CraftMagicNumbers implements UnsafeValues { private static final Map ITEM_MATERIAL = new HashMap<>(); private static final Map MATERIAL_ITEM = new HashMap<>(); private static final Map MATERIAL_BLOCK = new HashMap<>(); @@ -8152,7 +8152,7 @@ index cbbb404a6966fc72d17d0ec735d08c1be52b2d4f..3f91fce6df9b87a6e84df21ed04f25be for (Block block : BuiltInRegistries.BLOCK) { BLOCK_MATERIAL.put(block, Material.getMaterial(BuiltInRegistries.BLOCK.getKey(block).getPath().toUpperCase(Locale.ROOT))); } -@@ -157,6 +166,14 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -161,6 +170,14 @@ public final class CraftMagicNumbers implements UnsafeValues { public static ResourceLocation key(Material mat) { return CraftNamespacedKey.toMinecraft(mat.getKey()); } diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index a8f126f3a8..f83b3b6f40 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -2682,7 +2682,7 @@ index 977275f767c374a1be9055e4aa9e124025d55828..953e28f0cf60412a4ec9e311daa98f9d public boolean logIPs() { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 240d7831d7f05e245e4103ec22f4967657e1040b..8292f45aa100e2788584f568430d76560c2fa9a8 100644 +index a1d4d3a66c48abdddd2bcdd957417f81290c7a6e..08b2d5c6fb6d236b805ca6556270ad1891b411f5 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -170,6 +170,7 @@ import net.minecraft.world.damagesource.CombatTracker; @@ -2721,8 +2721,8 @@ index 240d7831d7f05e245e4103ec22f4967657e1040b..8292f45aa100e2788584f568430d7656 String deathmessage = defaultMessage.getString(); this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel -- org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory); -+ org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, PaperAdventure.asAdventure(defaultMessage), keepInventory); // Paper - Adventure +- org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, damageSource, loot, deathmessage, keepInventory); ++ org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, damageSource, loot, PaperAdventure.asAdventure(defaultMessage), keepInventory); // Paper - Adventure // SPIGOT-943 - only call if they have an inventory open if (this.containerMenu != this.inventoryMenu) { @@ -2872,7 +2872,7 @@ index bd7107279ca004f35c932e5d6e82f8302ec781ae..970d1ddf0a014b47b0ac974404897061 @Override diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index dfeb64d614e0da9f1bc0df9dcae71b509cf4178f..97b5e3cc18dbf712f5f60d92a4f9beabd90f2e0f 100644 +index 912fe77278ba085ef9cea7187e43a3ad3bb2e0d5..7788f703c47480b009b26c23fa5e075b581c3aca 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -44,6 +44,7 @@ import net.minecraft.core.registries.Registries; @@ -2938,20 +2938,7 @@ index dfeb64d614e0da9f1bc0df9dcae71b509cf4178f..97b5e3cc18dbf712f5f60d92a4f9beab Player player = this.getCraftPlayer(); AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server)); String originalFormat = event.getFormat(), originalMessage = event.getMessage(); -@@ -2300,7 +2313,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl - - public void sendPlayerChatMessage(PlayerChatMessage message, ChatType.Bound params) { - // CraftBukkit start - SPIGOT-7262: if hidden we have to send as disguised message. Query whether we should send at all (but changing this may not be expected). -- if (!this.getCraftPlayer().canSee(message.link().sender())) { -+ // Paper start - Do not query the world for players, if they're not in the player list, then they're not in the world - don't query world state -+ // Also, mirror the logic for canSee in terms of "missing" players -+ final ServerPlayer sender = this.server.getPlayerList().getPlayer(message.link().sender()); -+ if (sender == null || !this.getCraftPlayer().canSee(sender.getBukkitEntity())) { -+ // Paper end - this.sendDisguisedChatMessage(message.decoratedContent(), params); - return; - } -@@ -2994,6 +3011,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2994,6 +3007,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl public void handleClientInformation(ServerboundClientInformationPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); this.player.updateOptions(packet.information()); @@ -3328,10 +3315,10 @@ index 3db3c6858d98d2eaf7c9bd8d395b83b22c447bb9..d42d39dff5aeb91c5b1e6a7fb967ce70 } collection = icons; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9b299f74336ad0efecd05a4b771ac58549d5fb6a..9e34d3f009184981e4f4cd34b0c0c75be9f541f3 100644 +index 4cc75d39dd1104805e96c1d442400f2c18a7af2a..a5c420721cd1905bb0d00f9e1e40e4fbdf98cce6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -610,8 +610,10 @@ public final class CraftServer implements Server { +@@ -611,8 +611,10 @@ public final class CraftServer implements Server { } @Override @@ -3342,7 +3329,7 @@ index 9b299f74336ad0efecd05a4b771ac58549d5fb6a..9e34d3f009184981e4f4cd34b0c0c75b } @Override -@@ -1586,7 +1588,15 @@ public final class CraftServer implements Server { +@@ -1587,7 +1589,15 @@ public final class CraftServer implements Server { return this.configuration.getInt("settings.spawn-radius", -1); } @@ -3358,7 +3345,7 @@ index 9b299f74336ad0efecd05a4b771ac58549d5fb6a..9e34d3f009184981e4f4cd34b0c0c75b public String getShutdownMessage() { return this.configuration.getString("settings.shutdown-message"); } -@@ -1760,7 +1770,20 @@ public final class CraftServer implements Server { +@@ -1761,7 +1771,20 @@ public final class CraftServer implements Server { } @Override @@ -3379,7 +3366,7 @@ index 9b299f74336ad0efecd05a4b771ac58549d5fb6a..9e34d3f009184981e4f4cd34b0c0c75b Set recipients = new HashSet<>(); for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) { if (permissible instanceof CommandSender && permissible.hasPermission(permission)) { -@@ -1768,14 +1791,14 @@ public final class CraftServer implements Server { +@@ -1769,14 +1792,14 @@ public final class CraftServer implements Server { } } @@ -3396,7 +3383,7 @@ index 9b299f74336ad0efecd05a4b771ac58549d5fb6a..9e34d3f009184981e4f4cd34b0c0c75b for (CommandSender recipient : recipients) { recipient.sendMessage(message); -@@ -2037,6 +2060,14 @@ public final class CraftServer implements Server { +@@ -2038,6 +2061,14 @@ public final class CraftServer implements Server { return CraftInventoryCreator.INSTANCE.createInventory(owner, type); } @@ -3411,7 +3398,7 @@ index 9b299f74336ad0efecd05a4b771ac58549d5fb6a..9e34d3f009184981e4f4cd34b0c0c75b @Override public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) { Preconditions.checkArgument(type != null, "InventoryType cannot be null"); -@@ -2051,13 +2082,28 @@ public final class CraftServer implements Server { +@@ -2052,13 +2083,28 @@ public final class CraftServer implements Server { return CraftInventoryCreator.INSTANCE.createInventory(owner, size); } @@ -3440,7 +3427,7 @@ index 9b299f74336ad0efecd05a4b771ac58549d5fb6a..9e34d3f009184981e4f4cd34b0c0c75b public Merchant createMerchant(String title) { return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title); } -@@ -2122,6 +2168,17 @@ public final class CraftServer implements Server { +@@ -2123,6 +2169,17 @@ public final class CraftServer implements Server { return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog) } @@ -3458,7 +3445,7 @@ index 9b299f74336ad0efecd05a4b771ac58549d5fb6a..9e34d3f009184981e4f4cd34b0c0c75b @Override public String getMotd() { return this.console.getMotd(); -@@ -2566,4 +2623,57 @@ public final class CraftServer implements Server { +@@ -2567,4 +2624,57 @@ public final class CraftServer implements Server { public double[] getTPS() { return new double[]{0, 0, 0}; // TODO } @@ -3979,10 +3966,10 @@ index 1e82312c24cb752d63b165926861fc178cd7849b..7f22950ae61436e91a59cd29a345809c + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index 276af7b86bf21843aaf7266baae37a8e7efabcbd..d839a0edf31f6803e5813b28a23fa17e20916b2c 100644 +index 85cef6c2ebe8f53c3a63c17055c48c2d46e6c680..5ed90ed0461165da02c7a1acae805c12466e38d6 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -@@ -140,6 +140,12 @@ public class CraftEnchantment extends Enchantment implements Handleable drops, String deathMessage, boolean keepInventory) { -+ public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, List drops, net.kyori.adventure.text.Component deathMessage, boolean keepInventory) { // Paper - Adventure +- public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, DamageSource damageSource, List drops, String deathMessage, boolean keepInventory) { ++ public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, DamageSource damageSource, List drops, net.kyori.adventure.text.Component deathMessage, boolean keepInventory) { // Paper - Adventure CraftPlayer entity = victim.getBukkitEntity(); - PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); - event.setKeepInventory(keepInventory); -@@ -932,7 +932,7 @@ public class CraftEventFactory { + CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource); + PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(), 0, deathMessage); +@@ -934,7 +934,7 @@ public class CraftEventFactory { * Server methods */ public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) { @@ -5005,7 +4992,7 @@ index 61ad00c38cfef8a1de61b4597ec1042428feccf4..4da38ebb7fdbdb0f8fa422ebcd2e3eec if (this.pages != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java -index 9c57b883783145ad4483481a2c2e7f0f188cd174..b653c2c80e8e8524ea6d7625c6a86f8204c50709 100644 +index 2e6f0a0f4bbe4ae3c7c85e679f6187e89d1298ff..c7360e2b2d6e50abc371c21b09cdadd63892f439 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java @@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.inventory; @@ -5141,10 +5128,10 @@ index 9c57b883783145ad4483481a2c2e7f0f188cd174..b653c2c80e8e8524ea6d7625c6a86f82 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 8abb72c2c38d9b28be6c4e6cfd502371eb3a27ed..899995f30b54db93a4f44313384b316825693e36 100644 +index 78653e2b669bee1f46fc9e8c4485ae4936244db7..8be2184fc6d04a722fd9fb27549ec8df906a12ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -853,6 +853,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -862,6 +862,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null); } @@ -5163,7 +5150,7 @@ index 8abb72c2c38d9b28be6c4e6cfd502371eb3a27ed..899995f30b54db93a4f44313384b3168 @Override public String getDisplayName() { return CraftChatMessage.fromComponent(this.displayName); -@@ -883,6 +895,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -892,6 +904,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.itemName != null; } @@ -5182,7 +5169,7 @@ index 8abb72c2c38d9b28be6c4e6cfd502371eb3a27ed..899995f30b54db93a4f44313384b3168 @Override public String getLocalizedName() { return this.getDisplayName(); -@@ -902,6 +926,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -911,6 +935,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.lore != null && !this.lore.isEmpty(); } @@ -5553,10 +5540,10 @@ index 4d586e1375ed8782939c9d480479e0dd981f8cbc..7900adb0b158bc17dd792dd082c33854 + } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java -index b963d471b33cacaeec385dba6b2bf369e3d4426f..51094fe6e37d3c0fad2682353f8de3d1b9c9aef5 100644 +index 64191fb2f238c6dacf894d88a703ced6e75a6054..cb6cc3896e862291a058d21fa9704dd1519ff5e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java -@@ -299,6 +299,7 @@ public final class CraftChatMessage { +@@ -307,6 +307,7 @@ public final class CraftChatMessage { public static String fromComponent(Component component) { if (component == null) return ""; @@ -5565,10 +5552,10 @@ index b963d471b33cacaeec385dba6b2bf369e3d4426f..51094fe6e37d3c0fad2682353f8de3d1 boolean hadFormat = false; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 3f91fce6df9b87a6e84df21ed04f25be3729814b..e57ba8af99f0ac0151ec1d4c4279393ace6826e4 100644 +index 8a13d8ae4325854acb3be7083d022c08ba094df1..311b4472f955cba658afa763b2f0b31023b53236 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -76,6 +76,43 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -80,6 +80,43 @@ public final class CraftMagicNumbers implements UnsafeValues { private CraftMagicNumbers() {} diff --git a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch index d9da8ba8fd..c6f83a6198 100644 --- a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -396,7 +396,7 @@ index 0ff094a90bf471ce57a3054c7701dc3d67742d9d..50f4b77c83854932050cc543c7c2deea this.bans = new UserBanList(PlayerList.USERBANLIST_FILE); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9e34d3f009184981e4f4cd34b0c0c75be9f541f3..7ed0aca2d6eeb03fd9888db2853488cd4e6e2a64 100644 +index a5c420721cd1905bb0d00f9e1e40e4fbdf98cce6..7d850ef45093ab5ca0dd29b29ed36f663f3fa2e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -42,7 +42,7 @@ import java.util.logging.Level; @@ -408,7 +408,7 @@ index 9e34d3f009184981e4f4cd34b0c0c75be9f541f3..7ed0aca2d6eeb03fd9888db2853488cd import net.minecraft.advancements.AdvancementHolder; import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.Commands; -@@ -1319,9 +1319,13 @@ public final class CraftServer implements Server { +@@ -1320,9 +1320,13 @@ public final class CraftServer implements Server { return this.logger; } diff --git a/patches/server/0017-Paper-command.patch b/patches/server/0017-Paper-command.patch index a6e9b24136..95f83e4745 100644 --- a/patches/server/0017-Paper-command.patch +++ b/patches/server/0017-Paper-command.patch @@ -617,10 +617,10 @@ index 21b8f1913ff54d2b1553826269355da8bdb7f702..b9c22f725f5aeaee469fe5b7d8c3a57d this.setPvpAllowed(dedicatedserverproperties.pvp); this.setFlightAllowed(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7ed0aca2d6eeb03fd9888db2853488cd4e6e2a64..3a0f3992e28c3057d598daf78c0b70b1437ae0b0 100644 +index 7d850ef45093ab5ca0dd29b29ed36f663f3fa2e2..4c177faf5eda2cb5a34f84586a4bf45be942e0d6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -951,6 +951,7 @@ public final class CraftServer implements Server { +@@ -952,6 +952,7 @@ public final class CraftServer implements Server { this.commandMap.clearCommands(); this.reloadData(); org.spigotmc.SpigotConfig.registerCommands(); // Spigot @@ -628,7 +628,7 @@ index 7ed0aca2d6eeb03fd9888db2853488cd4e6e2a64..3a0f3992e28c3057d598daf78c0b70b1 this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*"); this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); -@@ -2671,6 +2672,34 @@ public final class CraftServer implements Server { +@@ -2672,6 +2673,34 @@ public final class CraftServer implements Server { // Paper end // Paper start diff --git a/patches/server/0019-Paper-Plugins.patch b/patches/server/0019-Paper-Plugins.patch index b3ef03dd63..0cb91b48e5 100644 --- a/patches/server/0019-Paper-Plugins.patch +++ b/patches/server/0019-Paper-Plugins.patch @@ -7244,10 +7244,10 @@ index 5b4ac7b4fd0077e900e9f788963f1613bbc9a5d0..6afede80c10503a261d0f735c351d943 Bootstrap.validate(); Util.startTimerHackThread(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3a0f3992e28c3057d598daf78c0b70b1437ae0b0..45160b93a24dc74f6368441e2a4fe659ceaf5bf5 100644 +index 4c177faf5eda2cb5a34f84586a4bf45be942e0d6..5f0638e2dd945371b311f8364294adc80bde3186 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -274,7 +274,8 @@ public final class CraftServer implements Server { +@@ -275,7 +275,8 @@ public final class CraftServer implements Server { private final CraftCommandMap commandMap = new CraftCommandMap(this); private final SimpleHelpMap helpMap = new SimpleHelpMap(this); private final StandardMessenger messenger = new StandardMessenger(); @@ -7257,7 +7257,7 @@ index 3a0f3992e28c3057d598daf78c0b70b1437ae0b0..45160b93a24dc74f6368441e2a4fe659 private final StructureManager structureManager; protected final DedicatedServer console; protected final DedicatedPlayerList playerList; -@@ -420,24 +421,7 @@ public final class CraftServer implements Server { +@@ -421,24 +422,7 @@ public final class CraftServer implements Server { } public void loadPlugins() { @@ -7283,7 +7283,7 @@ index 3a0f3992e28c3057d598daf78c0b70b1437ae0b0..45160b93a24dc74f6368441e2a4fe659 } public void enablePlugins(PluginLoadOrder type) { -@@ -526,15 +510,17 @@ public final class CraftServer implements Server { +@@ -527,15 +511,17 @@ public final class CraftServer implements Server { private void enablePlugin(Plugin plugin) { try { List perms = plugin.getDescription().getPermissions(); @@ -7307,7 +7307,7 @@ index 3a0f3992e28c3057d598daf78c0b70b1437ae0b0..45160b93a24dc74f6368441e2a4fe659 this.pluginManager.enablePlugin(plugin); } catch (Throwable ex) { -@@ -975,6 +961,7 @@ public final class CraftServer implements Server { +@@ -976,6 +962,7 @@ public final class CraftServer implements Server { "This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin" )); } @@ -7333,10 +7333,10 @@ index 909b2c98e7a9117d2f737245e4661792ffafb744..d96399e9bf1a58db5a4a22e58abb99e7 @Override public FileConfiguration getConfig() { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index e57ba8af99f0ac0151ec1d4c4279393ace6826e4..c8c66f78335868100adbb4d044037168872d5f94 100644 +index 311b4472f955cba658afa763b2f0b31023b53236..81a11402fda54ff40039fa23c53abb3572dccadf 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -421,6 +421,16 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -425,6 +425,16 @@ public final class CraftMagicNumbers implements UnsafeValues { net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack); return nmsItemStack.getItem().getDescriptionId(nmsItemStack); } @@ -8147,7 +8147,7 @@ index 0000000000000000000000000000000000000000..ba271c35eb2804f94cfc893bf94affb9 + } +} diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java -index 02a8e6b45bf304b6e0f88043a25188aa16b3d6bf..7a4681155f740a98ecafa0b992eae1fb5524551f 100644 +index b8fe92fc75c611ee1efb82a8ab7089f28bf338ea..c94dae13e8edfdb0adf73a5b3fda4eb1bc97f4bc 100644 --- a/src/test/java/org/bukkit/support/DummyServer.java +++ b/src/test/java/org/bukkit/support/DummyServer.java @@ -54,7 +54,7 @@ public final class DummyServer { diff --git a/patches/server/0020-Plugin-remapping.patch b/patches/server/0020-Plugin-remapping.patch index 0c33852103..485c7b14f5 100644 --- a/patches/server/0020-Plugin-remapping.patch +++ b/patches/server/0020-Plugin-remapping.patch @@ -1904,10 +1904,10 @@ index 0000000000000000000000000000000000000000..73b20a92f330311e3fef8f03b51a0985 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 45160b93a24dc74f6368441e2a4fe659ceaf5bf5..48be9bd462abba1f82200fe3425c36bf8ec91beb 100644 +index 5f0638e2dd945371b311f8364294adc80bde3186..950ad0a46cadc11554b9cde84e633df7cc447dcd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -965,6 +965,7 @@ public final class CraftServer implements Server { +@@ -966,6 +966,7 @@ public final class CraftServer implements Server { this.loadPlugins(); this.enablePlugins(PluginLoadOrder.STARTUP); this.enablePlugins(PluginLoadOrder.POSTWORLD); diff --git a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch index 522e4a2446..7d71b53df2 100644 --- a/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch +++ b/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Remap reflection calls in plugins using internals Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> diff --git a/build.gradle.kts b/build.gradle.kts -index 5ffd1d7c130e01a4a7516b361e48bfaf41d4f321..e9498f78cb6c0973a820f093ff7a31bef44ba27f 100644 +index 2868eb8f9e577ce839d7ecf5ce8fed5bad957dbe..158779a3590f089c4224b2b128c2e653aef42a94 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -47,6 +47,12 @@ dependencies { @@ -645,7 +645,7 @@ index 242811578a786e3807a1a7019d472d5a68f87116..0b65fdf53124f3dd042b2363b1b8df8e return traceElements; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java -index 8420a53672cfb0f060d9c85c445d200b6701f521..fc04bfcb8b5dfa6d093c8d75b2f20c502ef94a63 100644 +index 3d3d77d66588aaf709a9f7688400ee661e181b4b..c6956b9241634e455a520f4fd3bd8c4b5a58eb9d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java @@ -76,36 +76,26 @@ public class Commodore { @@ -706,10 +706,10 @@ index 8420a53672cfb0f060d9c85c445d200b6701f521..fc04bfcb8b5dfa6d093c8d75b2f20c50 String className; boolean isInterface; diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index c8c66f78335868100adbb4d044037168872d5f94..beffeedee0afdb885558c832f8801cd713d741a3 100644 +index 81a11402fda54ff40039fa23c53abb3572dccadf..73616ac642c67d4591775fdef08e720c1ab612a4 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -356,7 +356,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -360,7 +360,7 @@ public final class CraftMagicNumbers implements UnsafeValues { throw new InvalidPluginException("Plugin API version " + pdf.getAPIVersion() + " is lower than the minimum allowed version. Please update or replace it."); } @@ -718,7 +718,7 @@ index c8c66f78335868100adbb4d044037168872d5f94..beffeedee0afdb885558c832f8801cd7 CraftLegacy.init(); } -@@ -371,6 +371,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -375,6 +375,7 @@ public final class CraftMagicNumbers implements UnsafeValues { @Override public byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz) { diff --git a/patches/server/0023-Timings-v2.patch b/patches/server/0023-Timings-v2.patch index 4e498beadf..31a2c10e53 100644 --- a/patches/server/0023-Timings-v2.patch +++ b/patches/server/0023-Timings-v2.patch @@ -1230,7 +1230,7 @@ index 319cb644c0a42e9cc0d3ce9d1cbaa93b9c3dcd5b..a6e78b8a6ced8ec84273e2c5d18ffcca this.entityManager.saveAll(); } else { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 97b5e3cc18dbf712f5f60d92a4f9beabd90f2e0f..72f3717d931a6635d991d93619c9896ea22e1912 100644 +index 7788f703c47480b009b26c23fa5e075b581c3aca..b700cd5ccf37f3592f7cb931101397fbc59dc60f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -330,7 +330,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -1301,7 +1301,7 @@ index 50f4b77c83854932050cc543c7c2deeae641794f..26a0f1ae6fb2acb62648b0cd7996505d public UserWhiteList getWhiteList() { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 9c54bc3897d1fa3c88a5a7d55224eb4cc97f4e79..09ce9511f52f7f8643fedc325c49580eba4e4645 100644 +index cc3304e2ea7f58b4649da09b68ac3749bad08b00..074292615a13cf1f42ee74d629109ec1be390da5 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -138,7 +138,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent; @@ -1379,7 +1379,7 @@ index 1099a85ab7e98d8652cdd1c318f269ca31f4d783..606dbc398745b689f957e62ebd9eaa56 } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index c675fe1c2363248b034bdc27bb3a6a0e65adf19c..a2cbe1fd8aef67cc9c71ef22bf4c7efd9d8d6a95 100644 +index d2f75ced3ad4ccb9d1d44307bfc98e69e5fc8c6f..856fb1a15279efc1e24a93fa289ca1ca8effd43e 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -149,7 +149,7 @@ import org.bukkit.event.entity.EntityTeleportEvent; @@ -1527,7 +1527,7 @@ index 991ebf07bc0608df0a12f1f26e581cc93255ae01..946001c57c326f2d2f0677bca954e855 private String descriptionId; @Nullable diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 099f85ec8b427392947e815e0b85d7ec49369bc3..fb495fcbf42be3825bfb785a9887148c54f5b00b 100644 +index f0b4b9828ec237e93d5a6bdf5cbea8b469ebff02..7fa49fcf5469276e25c40af4cd27943f665d8721 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java @@ -34,10 +34,12 @@ import org.bukkit.inventory.InventoryHolder; @@ -1591,10 +1591,10 @@ index 8199fd0a50e0f7d2e1f2a14ac525bc6bd9feeac4..b0518725a2e145d29bd5bc0aa7e6998a }; } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6573e72d041714ccc2bf0e3c8734bc212caf534e..7d2bb67867836e8f74b0583d36aed3966be8ed7d 100644 +index b34b3008b4330103b3ed835e962d7c05cbe5b688..b1605bcb0379f4b274db4c7aac50e1dae5bdc831 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -370,7 +370,7 @@ public final class CraftServer implements Server { +@@ -371,7 +371,7 @@ public final class CraftServer implements Server { this.saveCommandsConfig(); this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*"); this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions"); @@ -1603,7 +1603,7 @@ index 6573e72d041714ccc2bf0e3c8734bc212caf534e..7d2bb67867836e8f74b0583d36aed396 this.overrideSpawnLimits(); console.autosavePeriod = this.configuration.getInt("ticks-per.autosave"); this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose")); -@@ -2580,12 +2580,31 @@ public final class CraftServer implements Server { +@@ -2581,12 +2581,31 @@ public final class CraftServer implements Server { private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot() { @@ -1805,10 +1805,10 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000 - } -} diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0b15c8a3906221ef09261f3d42c0aa93de8c5570..27909f2aa7c1e56ae4fd4fe23678d45da5fba9cf 100644 +index 1c1f1db8cb8beff850103d998561d333823fe611..34fe109e3ab1e72b278218fad93c2de6b809020c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2762,6 +2762,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2759,6 +2759,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { CraftPlayer.this.getHandle().connection.send(new net.minecraft.network.protocol.game.ClientboundSystemChatPacket(components, position == net.md_5.bungee.api.ChatMessageType.ACTION_BAR)); } @@ -2005,10 +2005,10 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222 + } // Paper } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index beffeedee0afdb885558c832f8801cd713d741a3..beae45fb45eb0629ba36f8daabaf7d9cb9716b71 100644 +index 73616ac642c67d4591775fdef08e720c1ab612a4..e7b98cefde1e0ecfbd151ef968062a774a6ebf55 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -212,6 +212,12 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -216,6 +216,12 @@ public final class CraftMagicNumbers implements UnsafeValues { } // Paper end // ======================================================================== @@ -2021,7 +2021,7 @@ index beffeedee0afdb885558c832f8801cd713d741a3..beae45fb45eb0629ba36f8daabaf7d9c public static byte toLegacyData(BlockState data) { return CraftLegacy.toLegacyData(data); -@@ -462,6 +468,12 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -466,6 +472,12 @@ public final class CraftMagicNumbers implements UnsafeValues { public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) { return new CraftDamageSourceBuilder(damageType); } @@ -2032,8 +2032,8 @@ index beffeedee0afdb885558c832f8801cd713d741a3..beae45fb45eb0629ba36f8daabaf7d9c + } + // Paper end - /** - * This helper class represents the different NBT Tags. + @Override + public String get(Class aClass, String s) { diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java index ff422d4d4f2b764370f0ee2af13034853c1d3fe1..a5da6c1cae0afbde684be250e2fc3c0c32a1265b 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java diff --git a/patches/server/0025-Further-improve-server-tick-loop.patch b/patches/server/0025-Further-improve-server-tick-loop.patch index 1412b7295c..40e3716bef 100644 --- a/patches/server/0025-Further-improve-server-tick-loop.patch +++ b/patches/server/0025-Further-improve-server-tick-loop.patch @@ -146,10 +146,10 @@ index c91eb69bbab3ca563d77de7165d5ef39f0a6b532..8ead44e27598c01249f710e10a765dd1 this.startMetricsRecordingTick(); this.profiler.push("tick"); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7d2bb67867836e8f74b0583d36aed3966be8ed7d..a778954846bd6f7c63f1900e2189f47923c36c74 100644 +index b1605bcb0379f4b274db4c7aac50e1dae5bdc831..85e2293efd3f02234372f4ad3a07ffdf774bd13c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2633,7 +2633,11 @@ public final class CraftServer implements Server { +@@ -2634,7 +2634,11 @@ public final class CraftServer implements Server { @Override public double[] getTPS() { diff --git a/patches/server/0026-Add-command-line-option-to-load-extra-plugin-jars-no.patch b/patches/server/0026-Add-command-line-option-to-load-extra-plugin-jars-no.patch index abe1785661..274e520730 100644 --- a/patches/server/0026-Add-command-line-option-to-load-extra-plugin-jars-no.patch +++ b/patches/server/0026-Add-command-line-option-to-load-extra-plugin-jars-no.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a778954846bd6f7c63f1900e2189f47923c36c74..86d7bac35fca140cb0301ff0f44c4e908a1bc213 100644 +index 85e2293efd3f02234372f4ad3a07ffdf774bd13c..035c541290e5ff67d0db65fc0d68c612bba19840 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -424,6 +424,35 @@ public final class CraftServer implements Server { +@@ -425,6 +425,35 @@ public final class CraftServer implements Server { io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.INSTANCE.enter(io.papermc.paper.plugin.entrypoint.Entrypoint.PLUGIN); // Paper - replace implementation } diff --git a/patches/server/0027-Support-components-in-ItemMeta.patch b/patches/server/0027-Support-components-in-ItemMeta.patch index 172edf27e8..092af94f66 100644 --- a/patches/server/0027-Support-components-in-ItemMeta.patch +++ b/patches/server/0027-Support-components-in-ItemMeta.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Support components in ItemMeta diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 899995f30b54db93a4f44313384b316825693e36..3f309c255097f6778854d710a5a045fa960a953f 100644 +index 8be2184fc6d04a722fd9fb27549ec8df906a12ee..9e23cdef8bd166937093452009f50b86e683cc57 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -870,11 +870,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -879,11 +879,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return CraftChatMessage.fromComponent(this.displayName); } @@ -32,7 +32,7 @@ index 899995f30b54db93a4f44313384b316825693e36..3f309c255097f6778854d710a5a045fa @Override public boolean hasDisplayName() { return this.displayName != null; -@@ -1048,6 +1060,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1057,6 +1069,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this.lore == null ? null : new ArrayList(Lists.transform(this.lore, CraftChatMessage::fromComponent)); } @@ -47,7 +47,7 @@ index 899995f30b54db93a4f44313384b316825693e36..3f309c255097f6778854d710a5a045fa @Override public void setLore(List lore) { if (lore == null || lore.isEmpty()) { -@@ -1062,6 +1082,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1071,6 +1091,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -69,7 +69,7 @@ index 899995f30b54db93a4f44313384b316825693e36..3f309c255097f6778854d710a5a045fa @Override public boolean hasCustomModelData() { return this.customModelData != null; -@@ -1685,6 +1720,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1722,6 +1757,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } for (Object object : addFrom) { diff --git a/patches/server/0034-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch b/patches/server/0034-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch index e9ab7846ac..0827c86c18 100644 --- a/patches/server/0034-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch +++ b/patches/server/0034-Show-Paper-in-client-crashes-server-lists-and-Mojang.patch @@ -19,10 +19,10 @@ index 8ead44e27598c01249f710e10a765dd1796ed249..fcb2d06f088a938b5bb76e6b42581d8f public SystemReport fillSystemReport(SystemReport details) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 86d7bac35fca140cb0301ff0f44c4e908a1bc213..b43dae6ed6ebdd1978e35e9d43e07591f90dcb09 100644 +index 035c541290e5ff67d0db65fc0d68c612bba19840..a8a23daac1d102f9f5a17c9ed6aa821b16345f32 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -265,7 +265,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; +@@ -266,7 +266,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; import net.md_5.bungee.api.chat.BaseComponent; // Spigot public final class CraftServer implements Server { diff --git a/patches/server/0035-Implement-Paper-VersionChecker.patch b/patches/server/0035-Implement-Paper-VersionChecker.patch index 120f00fa55..27e99e60b6 100644 --- a/patches/server/0035-Implement-Paper-VersionChecker.patch +++ b/patches/server/0035-Implement-Paper-VersionChecker.patch @@ -140,10 +140,10 @@ index 0000000000000000000000000000000000000000..22a55be34fde453fedd987173d95b8b3 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index beae45fb45eb0629ba36f8daabaf7d9cb9716b71..d568c3c85c44efc0fd0a43e7758fcd6899a60000 100644 +index e7b98cefde1e0ecfbd151ef968062a774a6ebf55..5df312c8c663b51dcdfa69945050baadbc2f5f92 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -473,6 +473,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -477,6 +477,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public String getTimingsServerName() { return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName; } @@ -154,4 +154,4 @@ index beae45fb45eb0629ba36f8daabaf7d9cb9716b71..d568c3c85c44efc0fd0a43e7758fcd68 + } // Paper end - /** + @Override diff --git a/patches/server/0037-Player-affects-spawning-API.patch b/patches/server/0037-Player-affects-spawning-API.patch index 5c8acbaed6..344d53a4d2 100644 --- a/patches/server/0037-Player-affects-spawning-API.patch +++ b/patches/server/0037-Player-affects-spawning-API.patch @@ -135,10 +135,10 @@ index f38f62e777d88a783e1e3b7e1a48da921cc67cf4..77ae7882a08441d9a80b50492be5e484 for (Player player : this.players()) { if (EntitySelector.NO_SPECTATORS.test(player) && EntitySelector.LIVING_ENTITY_STILL_ALIVE.test(player)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 27909f2aa7c1e56ae4fd4fe23678d45da5fba9cf..77d62778ba5b7ff0af3234ac9bd6f6161881c028 100644 +index 34fe109e3ab1e72b278218fad93c2de6b809020c..a078655ad4d51075953c0f0f46ee41d1d76ba1d3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2405,6 +2405,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2402,6 +2402,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.getHandle().language; } diff --git a/patches/server/0038-Only-refresh-abilities-if-needed.patch b/patches/server/0038-Only-refresh-abilities-if-needed.patch index b49e75f193..08edf92e96 100644 --- a/patches/server/0038-Only-refresh-abilities-if-needed.patch +++ b/patches/server/0038-Only-refresh-abilities-if-needed.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Only refresh abilities if needed diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 77d62778ba5b7ff0af3234ac9bd6f6161881c028..adf76abd693d8cfba76a18d46fcd672fecd52f7e 100644 +index a078655ad4d51075953c0f0f46ee41d1d76ba1d3..8c98655a4d888e8511d094074e3e35bbba078b26 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2082,12 +2082,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2079,12 +2079,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setFlying(boolean value) { diff --git a/patches/server/0051-Implement-PlayerLocaleChangeEvent.patch b/patches/server/0051-Implement-PlayerLocaleChangeEvent.patch index 9695c37f76..68b2c72b6f 100644 --- a/patches/server/0051-Implement-PlayerLocaleChangeEvent.patch +++ b/patches/server/0051-Implement-PlayerLocaleChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 244be33d0000189556ce7c6714e5a9768c16ba6b..abc8c7928eed1ba385e9ebb0b0cd059c9048d439 100644 +index 5b33cc5c54ab38b32f232dae00684d8b1e276acf..29020296e4f3bbddc0faabb1eeaa07a921b5b68f 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -233,7 +233,7 @@ public class ServerPlayer extends Player { @@ -39,10 +39,10 @@ index 244be33d0000189556ce7c6714e5a9768c16ba6b..abc8c7928eed1ba385e9ebb0b0cd059c // CraftBukkit end this.language = clientOptions.language(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index adf76abd693d8cfba76a18d46fcd672fecd52f7e..a7ccce7b5036eb0602e6030be6fbaa9f032f78c2 100644 +index 8c98655a4d888e8511d094074e3e35bbba078b26..d76a6d003cdcc1d7489ee359a09e93db96061515 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2403,7 +2403,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2400,7 +2400,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public String getLocale() { diff --git a/patches/server/0058-Improve-Player-chat-API-handling.patch b/patches/server/0058-Improve-Player-chat-API-handling.patch index e8b9474487..5a08a8685a 100644 --- a/patches/server/0058-Improve-Player-chat-API-handling.patch +++ b/patches/server/0058-Improve-Player-chat-API-handling.patch @@ -17,7 +17,7 @@ Co-authored-by: Jake Potrebic Co-authored-by: SoSeDiK diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 72f3717d931a6635d991d93619c9896ea22e1912..255d39a57e6b440317cb885c1c40f3b116d916ed 100644 +index b700cd5ccf37f3592f7cb931101397fbc59dc60f..ad598e57feb2d9db1b71cb3a432df22212aab9b3 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1996,7 +1996,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -40,10 +40,10 @@ index 72f3717d931a6635d991d93619c9896ea22e1912..255d39a57e6b440317cb885c1c40f3b1 if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b43dae6ed6ebdd1978e35e9d43e07591f90dcb09..4a1305df41c42be65dbb0438066e148e0b22aaaf 100644 +index a8a23daac1d102f9f5a17c9ed6aa821b16345f32..0287b2a02a94fa0671ee242ad3f5dac44d62dbbd 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -897,7 +897,7 @@ public final class CraftServer implements Server { +@@ -898,7 +898,7 @@ public final class CraftServer implements Server { public boolean dispatchCommand(CommandSender sender, String commandLine) { Preconditions.checkArgument(sender != null, "sender cannot be null"); Preconditions.checkArgument(commandLine != null, "commandLine cannot be null"); @@ -53,7 +53,7 @@ index b43dae6ed6ebdd1978e35e9d43e07591f90dcb09..4a1305df41c42be65dbb0438066e148e if (this.commandMap.dispatch(sender, commandLine)) { return true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a7ccce7b5036eb0602e6030be6fbaa9f032f78c2..a51bce9252328df85b485a5af7786db0622a4672 100644 +index d76a6d003cdcc1d7489ee359a09e93db96061515..e4be5445045c28e0bf6c84f4b6695ff47f8df72e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -544,7 +544,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0060-Expose-server-CommandMap.patch b/patches/server/0060-Expose-server-CommandMap.patch index c930d0feae..c23d4895f5 100644 --- a/patches/server/0060-Expose-server-CommandMap.patch +++ b/patches/server/0060-Expose-server-CommandMap.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4a1305df41c42be65dbb0438066e148e0b22aaaf..603ad4841151234d3b8e0e6650a44d63ca9ed921 100644 +index 0287b2a02a94fa0671ee242ad3f5dac44d62dbbd..3218c620cb09e5da7ed75df125adc2d8ba41c306 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2140,6 +2140,7 @@ public final class CraftServer implements Server { +@@ -2141,6 +2141,7 @@ public final class CraftServer implements Server { return this.helpMap; } diff --git a/patches/server/0064-Add-velocity-warnings.patch b/patches/server/0064-Add-velocity-warnings.patch index b52433be2f..0776a543ef 100644 --- a/patches/server/0064-Add-velocity-warnings.patch +++ b/patches/server/0064-Add-velocity-warnings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add velocity warnings diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 603ad4841151234d3b8e0e6650a44d63ca9ed921..8461eb0ad3531cab7aa50226008a960937830fce 100644 +index 3218c620cb09e5da7ed75df125adc2d8ba41c306..2dd6af53220dcdc21d7f3d304a9fadaa22b61b86 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -302,6 +302,7 @@ public final class CraftServer implements Server { +@@ -303,6 +303,7 @@ public final class CraftServer implements Server { public boolean ignoreVanillaPermissions = false; private final List playerView; public int reloadCount; diff --git a/patches/server/0070-Complete-resource-pack-API.patch b/patches/server/0070-Complete-resource-pack-API.patch index cc03581dff..0ce7ea57c1 100644 --- a/patches/server/0070-Complete-resource-pack-API.patch +++ b/patches/server/0070-Complete-resource-pack-API.patch @@ -22,7 +22,7 @@ index 26b8a69a528db8a836b138a2a223c385508ce2c4..5f5d8ae29ff702eacc72341fae074a05 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 392d77e43d5add1fd71f35817435c2b3c6a7a8fa..9743f5b8b6e1cbbe43788a42c02bb7cfbdd8f380 100644 +index 24621c11ff91df8695eecc818e6a94a095c5a9cc..155f7053504874758d8d25a21f0ac613f81ca7d1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -206,6 +206,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -33,7 +33,7 @@ index 392d77e43d5add1fd71f35817435c2b3c6a7a8fa..9743f5b8b6e1cbbe43788a42c02bb7cf public CraftPlayer(CraftServer server, ServerPlayer entity) { super(server, entity); -@@ -2083,6 +2084,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2080,6 +2081,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end - adventure diff --git a/patches/server/0071-Default-loading-permissions.yml-before-plugins.patch b/patches/server/0071-Default-loading-permissions.yml-before-plugins.patch index 339b9641c0..ba81a22f2c 100644 --- a/patches/server/0071-Default-loading-permissions.yml-before-plugins.patch +++ b/patches/server/0071-Default-loading-permissions.yml-before-plugins.patch @@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe A config option has been added for those who depend on the previous behavior, but I don't expect that. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8461eb0ad3531cab7aa50226008a960937830fce..c9476989d21798713c65b4f0a580bde0a4457c21 100644 +index 2dd6af53220dcdc21d7f3d304a9fadaa22b61b86..39767d5de04c11ab0ccacad6a677209df301d3e9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -458,6 +458,7 @@ public final class CraftServer implements Server { +@@ -459,6 +459,7 @@ public final class CraftServer implements Server { if (type == PluginLoadOrder.STARTUP) { this.helpMap.clear(); this.helpMap.initializeGeneralTopics(); @@ -27,7 +27,7 @@ index 8461eb0ad3531cab7aa50226008a960937830fce..c9476989d21798713c65b4f0a580bde0 } Plugin[] plugins = this.pluginManager.getPlugins(); -@@ -477,7 +478,7 @@ public final class CraftServer implements Server { +@@ -478,7 +479,7 @@ public final class CraftServer implements Server { this.commandMap.registerServerAliases(); DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); diff --git a/patches/server/0072-Allow-Reloading-of-Custom-Permissions.patch b/patches/server/0072-Allow-Reloading-of-Custom-Permissions.patch index a9c2652319..24eb99a038 100644 --- a/patches/server/0072-Allow-Reloading-of-Custom-Permissions.patch +++ b/patches/server/0072-Allow-Reloading-of-Custom-Permissions.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions https://github.com/PaperMC/Paper/issues/49 diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c9476989d21798713c65b4f0a580bde0a4457c21..99e159386504ab8f3646b08adda12e18686c2641 100644 +index 39767d5de04c11ab0ccacad6a677209df301d3e9..8c3954a4b9adff7d41a772870d955e8f618a19cc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2751,5 +2751,23 @@ public final class CraftServer implements Server { +@@ -2752,5 +2752,23 @@ public final class CraftServer implements Server { } return this.adventure$audiences; } diff --git a/patches/server/0073-Remove-Metadata-on-reload.patch b/patches/server/0073-Remove-Metadata-on-reload.patch index cd2cb8fb9c..3f6a30810f 100644 --- a/patches/server/0073-Remove-Metadata-on-reload.patch +++ b/patches/server/0073-Remove-Metadata-on-reload.patch @@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive This will remove metadata on reload so it does not crash everything if a plugin uses it. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 99e159386504ab8f3646b08adda12e18686c2641..c625ed2039566a1a175a8100fb8a42566f1cfb1a 100644 +index 8c3954a4b9adff7d41a772870d955e8f618a19cc..219f34bf52d561ade27d9bb4876fc49ee2de30f6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -964,8 +964,16 @@ public final class CraftServer implements Server { +@@ -965,8 +965,16 @@ public final class CraftServer implements Server { world.spigotConfig.init(); // Spigot } diff --git a/patches/server/0074-Handle-Item-Meta-Inconsistencies.patch b/patches/server/0074-Handle-Item-Meta-Inconsistencies.patch index efd643e957..b7c0d2e42f 100644 --- a/patches/server/0074-Handle-Item-Meta-Inconsistencies.patch +++ b/patches/server/0074-Handle-Item-Meta-Inconsistencies.patch @@ -150,7 +150,7 @@ index b6521462d193bff83ace1dc694c6d957a7173969..d302767e8f01fdfcba9c22e2e35677af static Map getEnchantments(net.minecraft.world.item.ItemStack item) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 3f309c255097f6778854d710a5a045fa960a953f..c318552a2ac2710cea01ac449a469a0fc61f8161 100644 +index 9e23cdef8bd166937093452009f50b86e683cc57..a052c2dab5af99355737a88f75cb0b2e42a60177 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList; @@ -161,7 +161,7 @@ index 3f309c255097f6778854d710a5a045fa960a953f..c318552a2ac2710cea01ac449a469a0f import com.google.common.collect.Lists; import com.google.common.collect.Multimap; import com.google.common.collect.SetMultimap; -@@ -22,6 +23,7 @@ import java.util.Arrays; +@@ -23,6 +24,7 @@ import java.util.Arrays; import java.util.Base64; import java.util.Collection; import java.util.Collections; @@ -169,15 +169,7 @@ index 3f309c255097f6778854d710a5a045fa960a953f..c318552a2ac2710cea01ac449a469a0f import java.util.EnumSet; import java.util.HashMap; import java.util.Iterator; -@@ -32,6 +34,7 @@ import java.util.Map; - import java.util.Objects; - import java.util.Optional; - import java.util.Set; -+import java.util.TreeMap; // Paper - import java.util.logging.Level; - import java.util.logging.Logger; - import javax.annotation.Nonnull; -@@ -221,7 +224,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -236,7 +238,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { private List lore; // null and empty are two different states internally private Integer customModelData; private Map blockData; @@ -186,7 +178,7 @@ index 3f309c255097f6778854d710a5a045fa960a953f..c318552a2ac2710cea01ac449a469a0f private Multimap attributeModifiers; private int repairCost; private int hideFlag; -@@ -260,7 +263,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -275,7 +277,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.blockData = meta.blockData; if (meta.enchantments != null) { @@ -195,7 +187,7 @@ index 3f309c255097f6778854d710a5a045fa960a953f..c318552a2ac2710cea01ac449a469a0f } if (meta.hasAttributeModifiers()) { -@@ -391,8 +394,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -406,8 +408,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -206,7 +198,7 @@ index 3f309c255097f6778854d710a5a045fa960a953f..c318552a2ac2710cea01ac449a469a0f tag.entrySet().forEach((entry) -> { Holder id = entry.getKey(); -@@ -646,13 +649,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -661,13 +663,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return modifiers; } @@ -220,9 +212,9 @@ index 3f309c255097f6778854d710a5a045fa960a953f..c318552a2ac2710cea01ac449a469a0f - Map enchantments = new LinkedHashMap(ench.size()); + EnchantmentMap enchantments = new EnchantmentMap(); // Paper for (Map.Entry entry : ench.entrySet()) { - // Doctor older enchants - String enchantKey = entry.getKey().toString(); -@@ -973,14 +976,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + Enchantment enchantment = CraftEnchantment.stringToBukkit(entry.getKey().toString()); + if ((enchantment != null) && (entry.getValue() instanceof Integer)) { +@@ -982,14 +984,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public Map getEnchants() { @@ -239,7 +231,7 @@ index 3f309c255097f6778854d710a5a045fa960a953f..c318552a2ac2710cea01ac449a469a0f } if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) { -@@ -1516,7 +1519,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1553,7 +1555,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.customModelData = this.customModelData; clone.blockData = this.blockData; if (this.enchantments != null) { @@ -248,13 +240,13 @@ index 3f309c255097f6778854d710a5a045fa960a953f..c318552a2ac2710cea01ac449a469a0f } if (this.hasAttributeModifiers()) { clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); -@@ -1836,4 +1839,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1875,4 +1877,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return (result != null) ? result : Optional.empty(); } + + // Paper start -+ private static class EnchantmentMap extends TreeMap { ++ private static class EnchantmentMap extends java.util.TreeMap { + private EnchantmentMap(Map enchantments) { + this(); + putAll(enchantments); diff --git a/patches/server/0078-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/patches/server/0078-handle-NaN-health-absorb-values-and-repair-bad-data.patch index bb5ee99fa0..e36d19f9b0 100644 --- a/patches/server/0078-handle-NaN-health-absorb-values-and-repair-bad-data.patch +++ b/patches/server/0078-handle-NaN-health-absorb-values-and-repair-bad-data.patch @@ -5,7 +5,7 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 801577d2c9e6eacd8e3038f5b3cdb026c62a5d09..24e6d6c356cccf656cd20bcea069f5fdf123e4c8 100644 +index d710e20447df4767e10f9250ce91dcd3141eaab0..e1d34c666f88bdbead59aff0d349a49608a7b8cd 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -833,7 +833,13 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -44,10 +44,10 @@ index 801577d2c9e6eacd8e3038f5b3cdb026c62a5d09..24e6d6c356cccf656cd20bcea069f5fd protected void internalSetAbsorptionAmount(float absorptionAmount) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9743f5b8b6e1cbbe43788a42c02bb7cfbdd8f380..d616f6c1fe63e3fe9d811d670dbc78a44e7afcbd 100644 +index 155f7053504874758d8d25a21f0ac613f81ca7d1..4923e6bba9eb95c3e7f6fafef63961cec091e1f8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2327,6 +2327,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2324,6 +2324,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setRealHealth(double health) { diff --git a/patches/server/0087-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0087-Add-PlayerUseUnknownEntityEvent.patch index 94a03303d5..8a7921ae97 100644 --- a/patches/server/0087-Add-PlayerUseUnknownEntityEvent.patch +++ b/patches/server/0087-Add-PlayerUseUnknownEntityEvent.patch @@ -28,10 +28,10 @@ index 1e9c68cd1868d083e6a790d56006dd4aa432010a..8a0ee9564fc36a2badf1357f7e6c47b5 + // Paper end - PlayerUseUnknownEntityEvent } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 255d39a57e6b440317cb885c1c40f3b116d916ed..0d0bc67bd019c6a203cdb46a778d2963359e43f7 100644 +index ad598e57feb2d9db1b71cb3a432df22212aab9b3..555623fa4176c9ac4534cc7c5174d45f7c321ba1 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2480,7 +2480,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2476,7 +2476,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl }); } } @@ -59,10 +59,10 @@ index 255d39a57e6b440317cb885c1c40f3b116d916ed..0d0bc67bd019c6a203cdb46a778d2963 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 387305bb835dca0cee7ab398d5630e3522c6162f..ff95b1f9935311ec156e41bf9aa16005df23eb27 100644 +index 4c59520355a21249d2a3132dbaae97fd4e17c86b..76be4e52f7e140cf1951ae8be8a468e2bb7df20e 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1851,4 +1851,13 @@ public class CraftEventFactory { +@@ -1853,4 +1853,13 @@ public class CraftEventFactory { Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause)); } diff --git a/patches/server/0108-Add-setting-for-proxy-online-mode-status.patch b/patches/server/0108-Add-setting-for-proxy-online-mode-status.patch index f660a5693e..2c4efec1dc 100644 --- a/patches/server/0108-Add-setting-for-proxy-online-mode-status.patch +++ b/patches/server/0108-Add-setting-for-proxy-online-mode-status.patch @@ -60,10 +60,10 @@ index a0b0614ac7d2009db5c6c10ab4a5f09dd447c635..653856d0b8dcf2baf4cc77a276f17c8c } else { String[] astring1 = astring; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c625ed2039566a1a175a8100fb8a42566f1cfb1a..8624a530d534e45f5ff6f834d595137daa4ae453 100644 +index 219f34bf52d561ade27d9bb4876fc49ee2de30f6..902f985042136f9179f85c2be838ba7dec4f5ce9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1849,7 +1849,7 @@ public final class CraftServer implements Server { +@@ -1850,7 +1850,7 @@ public final class CraftServer implements Server { if (result == null) { GameProfile profile = null; // Only fetch an online UUID in online mode diff --git a/patches/server/0112-Add-EntityZapEvent.patch b/patches/server/0112-Add-EntityZapEvent.patch index a54599fb44..3d8af4f823 100644 --- a/patches/server/0112-Add-EntityZapEvent.patch +++ b/patches/server/0112-Add-EntityZapEvent.patch @@ -28,10 +28,10 @@ index 7d1386f2f4d4b5dcf63b6b4e678568b6744a99b5..0da329781f0afd4ec4a731889b892afe entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null); entitywitch.setNoAi(this.isNoAi()); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index ff95b1f9935311ec156e41bf9aa16005df23eb27..168f19c754e413286c69ae9cbcbfb3788f05d8ff 100644 +index 76be4e52f7e140cf1951ae8be8a468e2bb7df20e..df530fc847b9a302c8981caa32401a8eb3e927b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1193,6 +1193,14 @@ public class CraftEventFactory { +@@ -1195,6 +1195,14 @@ public class CraftEventFactory { return !event.isCancelled(); } diff --git a/patches/server/0115-Allow-Reloading-of-Command-Aliases.patch b/patches/server/0115-Allow-Reloading-of-Command-Aliases.patch index 84b11ff12b..fca05fd988 100644 --- a/patches/server/0115-Allow-Reloading-of-Command-Aliases.patch +++ b/patches/server/0115-Allow-Reloading-of-Command-Aliases.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases Reload the aliases stored in commands.yml diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8624a530d534e45f5ff6f834d595137daa4ae453..c49dfa14a95b495a615fcf2d400a1630f7a698dd 100644 +index 902f985042136f9179f85c2be838ba7dec4f5ce9..6ae881afc0fd5a5fe9f8970f99985a39e8cd37ce 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2777,5 +2777,24 @@ public final class CraftServer implements Server { +@@ -2778,5 +2778,24 @@ public final class CraftServer implements Server { DefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions(); } diff --git a/patches/server/0116-Add-source-to-PlayerExpChangeEvent.patch b/patches/server/0116-Add-source-to-PlayerExpChangeEvent.patch index 1a4c72d2eb..5d39447d9f 100644 --- a/patches/server/0116-Add-source-to-PlayerExpChangeEvent.patch +++ b/patches/server/0116-Add-source-to-PlayerExpChangeEvent.patch @@ -18,10 +18,10 @@ index 4d1001666204b2a2c2bf26231bb1b19f9a1bd8ed..1f29ed95ef3d1904a014715028d9d591 --this.count; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 168f19c754e413286c69ae9cbcbfb3788f05d8ff..3683cf6765741f6422f478fd09ce1ba6a75d6b99 100644 +index df530fc847b9a302c8981caa32401a8eb3e927b3..022c1b2e895af65fdf91710d836a4feba1edd0a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1146,6 +1146,17 @@ public class CraftEventFactory { +@@ -1148,6 +1148,17 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0117-Add-ProjectileCollideEvent.patch b/patches/server/0117-Add-ProjectileCollideEvent.patch index 72842141bf..ac05d08cbe 100644 --- a/patches/server/0117-Add-ProjectileCollideEvent.patch +++ b/patches/server/0117-Add-ProjectileCollideEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add ProjectileCollideEvent Deprecated now and replaced with ProjectileHitEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 3683cf6765741f6422f478fd09ce1ba6a75d6b99..f7c848aa883c1ad408e7e16e605f375ab75f8cfd 100644 +index 022c1b2e895af65fdf91710d836a4feba1edd0a5..a49abc180f76cb7aeb6eda86998acd00e9d3fdee 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1290,6 +1290,17 @@ public class CraftEventFactory { +@@ -1292,6 +1292,17 @@ public class CraftEventFactory { return CraftItemStack.asNMSCopy(bitem); } @@ -27,7 +27,7 @@ index 3683cf6765741f6422f478fd09ce1ba6a75d6b99..f7c848aa883c1ad408e7e16e605f375a public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) { Projectile bukkitEntity = (Projectile) entity.getBukkitEntity(); ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity); -@@ -1314,8 +1325,15 @@ public class CraftEventFactory { +@@ -1316,8 +1327,15 @@ public class CraftEventFactory { if (position.getType() == HitResult.Type.ENTITY) { hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity(); } diff --git a/patches/server/0122-Add-API-methods-to-control-if-armor-stands-can-move.patch b/patches/server/0122-Add-API-methods-to-control-if-armor-stands-can-move.patch index 0921060796..e164186ab4 100644 --- a/patches/server/0122-Add-API-methods-to-control-if-armor-stands-can-move.patch +++ b/patches/server/0122-Add-API-methods-to-control-if-armor-stands-can-move.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add API methods to control if armor stands can move diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 4caa354922110c8662549bae271f1f7cf1a2168f..d33c49c4a4b87a5203f9b4592deff9389e6e870d 100644 +index c443fef645702e2a3eae8dcd1526d4bc4d269b0f..dd7ecba4525d90e6b9509d1c3cab24c1615e37a9 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java @@ -96,6 +96,7 @@ public class ArmorStand extends LivingEntity { @@ -16,7 +16,7 @@ index 4caa354922110c8662549bae271f1f7cf1a2168f..d33c49c4a4b87a5203f9b4592deff938 public ArmorStand(EntityType type, Level world) { super(type, world); -@@ -936,4 +937,13 @@ public class ArmorStand extends LivingEntity { +@@ -942,4 +943,13 @@ public class ArmorStand extends LivingEntity { public boolean canBeSeenByAnyone() { return !this.isInvisible() && !this.isMarker(); } diff --git a/patches/server/0134-Add-configuration-option-to-prevent-player-names-fro.patch b/patches/server/0134-Add-configuration-option-to-prevent-player-names-fro.patch index 9d390326d1..f07dec53bd 100644 --- a/patches/server/0134-Add-configuration-option-to-prevent-player-names-fro.patch +++ b/patches/server/0134-Add-configuration-option-to-prevent-player-names-fro.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c49dfa14a95b495a615fcf2d400a1630f7a698dd..f6012feafe1dbbf9c52ac38965d9475896766657 100644 +index 6ae881afc0fd5a5fe9f8970f99985a39e8cd37ce..8903ae05a2671cf3d5894ba1c2664bb98fa4b8bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2796,5 +2796,10 @@ public final class CraftServer implements Server { +@@ -2797,5 +2797,10 @@ public final class CraftServer implements Server { commandMap.registerServerAliases(); return true; } diff --git a/patches/server/0140-Basic-PlayerProfile-API.patch b/patches/server/0140-Basic-PlayerProfile-API.patch index 76272eb077..74a8967162 100644 --- a/patches/server/0140-Basic-PlayerProfile-API.patch +++ b/patches/server/0140-Basic-PlayerProfile-API.patch @@ -623,10 +623,10 @@ index 416b26c2ab62b29d640169166980e398d5824b14..774d81c702edb76a2f6184d4dc53687d String s1 = name.toLowerCase(Locale.ROOT); GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f6012feafe1dbbf9c52ac38965d9475896766657..a7554f2028f93867360c27a51c9580a8b49f5b57 100644 +index 8903ae05a2671cf3d5894ba1c2664bb98fa4b8bf..17db4fa42f08a86b1c3e08f9a7e5692eab7011ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -264,6 +264,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; +@@ -265,6 +265,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException; import net.md_5.bungee.api.chat.BaseComponent; // Spigot @@ -636,7 +636,7 @@ index f6012feafe1dbbf9c52ac38965d9475896766657..a7554f2028f93867360c27a51c9580a8 public final class CraftServer implements Server { private final String serverName = "Paper"; // Paper private final String serverVersion; -@@ -307,6 +310,7 @@ public final class CraftServer implements Server { +@@ -308,6 +311,7 @@ public final class CraftServer implements Server { static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); ConfigurationSerialization.registerClass(CraftPlayerProfile.class); @@ -644,7 +644,7 @@ index f6012feafe1dbbf9c52ac38965d9475896766657..a7554f2028f93867360c27a51c9580a8 CraftItemFactory.instance(); CraftEntityFactory.instance(); } -@@ -2801,5 +2805,42 @@ public final class CraftServer implements Server { +@@ -2802,5 +2806,42 @@ public final class CraftServer implements Server { public boolean suggestPlayerNamesWhenNullTabCompletions() { return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions; } @@ -688,7 +688,7 @@ index f6012feafe1dbbf9c52ac38965d9475896766657..a7554f2028f93867360c27a51c9580a8 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java -index 6f0edd4d1c473179c03253326a3c7b5910ec53ad..e3a244dac35bf4d5d10e41c200aaa7f93e278ef9 100644 +index ab18b1d480f7ecc0ad9a51471d8f45b0da74d8cf..d2c121cc610b6c635e2de5059b147f5ee35096bd 100644 --- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java +++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java @@ -28,7 +28,7 @@ import org.bukkit.profile.PlayerProfile; diff --git a/patches/server/0141-Add-UnknownCommandEvent.patch b/patches/server/0141-Add-UnknownCommandEvent.patch index 16acb37865..a84a4cea15 100644 --- a/patches/server/0141-Add-UnknownCommandEvent.patch +++ b/patches/server/0141-Add-UnknownCommandEvent.patch @@ -78,10 +78,10 @@ index b81a4204a85e5b431cd6137fd8b80e43779c97b7..eec5279ac4386132fa053c57889e32e6 return null; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a7554f2028f93867360c27a51c9580a8b49f5b57..c8b123f3df533d1c7889fe44a2a47fdd08c7f715 100644 +index 17db4fa42f08a86b1c3e08f9a7e5692eab7011ab..5abb033ff78a0e1d79a71ed65d82774738aa9ba4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -911,7 +911,13 @@ public final class CraftServer implements Server { +@@ -912,7 +912,13 @@ public final class CraftServer implements Server { // Spigot start if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) { diff --git a/patches/server/0146-Improve-the-Saddle-API-for-Horses.patch b/patches/server/0146-Improve-the-Saddle-API-for-Horses.patch index 0621160522..ddf19f0208 100644 --- a/patches/server/0146-Improve-the-Saddle-API-for-Horses.patch +++ b/patches/server/0146-Improve-the-Saddle-API-for-Horses.patch @@ -27,7 +27,7 @@ index 3b7a355945adbc671b1c3b6381e6fbbcb9fe7294..5192fa2aeba7833fca456bded0deedde } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java -index 444de73d57b0c7a72eb84bff9f06d7ed14b9ab0a..547a05ba2b93c276a2c705e98a254e9015ce8b9d 100644 +index 5686c13b77f1c18b7d690859c6bea4f7b721ef13..07a304edc2a7b3450a55728e78a4fe37febdbadc 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java @@ -4,7 +4,7 @@ import net.minecraft.world.Container; @@ -37,8 +37,8 @@ index 444de73d57b0c7a72eb84bff9f06d7ed14b9ab0a..547a05ba2b93c276a2c705e98a254e90 -public class CraftInventoryHorse extends CraftInventoryAbstractHorse implements HorseInventory { +public class CraftInventoryHorse extends CraftSaddledInventory implements HorseInventory { - public CraftInventoryHorse(Container inventory) { - super(inventory); + private final Container bodyArmorInventory; + diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSaddledInventory.java new file mode 100644 index 0000000000000000000000000000000000000000..3a617c07d445bacf5a13e0e3ff6481823cfc8477 diff --git a/patches/server/0165-AsyncTabCompleteEvent.patch b/patches/server/0165-AsyncTabCompleteEvent.patch index 3ee3add615..002198becb 100644 --- a/patches/server/0165-AsyncTabCompleteEvent.patch +++ b/patches/server/0165-AsyncTabCompleteEvent.patch @@ -16,7 +16,7 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent Co-authored-by: Aikar diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 74c7a690f654558baf12ba2085d0e897a45c0baa..1b563aa6be76286c49ad3f037cb70b01d33c4458 100644 +index 196682a91c47ed2c4d2a8e1b71728200cc22191c..fffd671feb7a4e9805eafc473632b23225599b85 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -708,21 +708,58 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -80,10 +80,10 @@ index 74c7a690f654558baf12ba2085d0e897a45c0baa..1b563aa6be76286c49ad3f037cb70b01 this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c8b123f3df533d1c7889fe44a2a47fdd08c7f715..e188d020d0cefbabbe0c720b26233203fd84bcb1 100644 +index 5abb033ff78a0e1d79a71ed65d82774738aa9ba4..990fad51d6fc1800d8ad815708c26747f46cfef0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2250,7 +2250,7 @@ public final class CraftServer implements Server { +@@ -2251,7 +2251,7 @@ public final class CraftServer implements Server { offers = this.tabCompleteChat(player, message); } diff --git a/patches/server/0173-Add-ArmorStand-Item-Meta.patch b/patches/server/0173-Add-ArmorStand-Item-Meta.patch index 609dc1f9e1..189bb53dc0 100644 --- a/patches/server/0173-Add-ArmorStand-Item-Meta.patch +++ b/patches/server/0173-Add-ArmorStand-Item-Meta.patch @@ -12,6 +12,19 @@ starting point for future additions in this area. Fixes GH-559 +diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java +index 662cf08d1cb2b41da5b17dae3585333cdf605c0b..f5bb5802aae64773252c9399df0fbe9de3d1d121 100644 +--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java ++++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java +@@ -66,7 +66,7 @@ public class CraftItemType implements ItemType.Typed, Han + private Class getItemMetaClass(Item item) { + ItemMeta meta = new ItemStack(this.asMaterial()).getItemMeta(); + if (meta != null) { +- if (CraftMetaEntityTag.class != meta.getClass() && CraftMetaArmorStand.class != meta.getClass()) { ++ if (CraftMetaEntityTag.class != meta.getClass()/* && CraftMetaArmorStand.class != meta.getClass()*/) { // Paper - CraftMetaArmorStand is implemented in the API via ArmorStandMeta. + return (Class) meta.getClass().getInterfaces()[0]; + } + } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java index c4f12f96e39cb6189799a796b4cb2cb4f0b92392..84e09a934600df116206df1c3922a11ee969901a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java @@ -255,10 +268,10 @@ index c4f12f96e39cb6189799a796b4cb2cb4f0b92392..84e09a934600df116206df1c3922a11e + // Paper end } diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index 482fcd5abe687accc770722778952e1fd199b471..cf436c9e62a11b8c6cbf7638de0e5635c67459ac 100644 +index 99a555ca72cd95d760d68072242203deeddd0ce1..a1d8da4e0de3f84194f28d7d18fa795d53714590 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -@@ -362,6 +362,7 @@ public class ItemMetaTest extends AbstractTestingBase { +@@ -364,6 +364,7 @@ public class ItemMetaTest extends AbstractTestingBase { final CraftMetaArmorStand meta = (CraftMetaArmorStand) cleanStack.getItemMeta(); meta.entityTag = new CompoundTag(); meta.entityTag.putBoolean("Small", true); diff --git a/patches/server/0181-getPlayerUniqueId-API.patch b/patches/server/0181-getPlayerUniqueId-API.patch index 740edfaf0a..31d5e88327 100644 --- a/patches/server/0181-getPlayerUniqueId-API.patch +++ b/patches/server/0181-getPlayerUniqueId-API.patch @@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e188d020d0cefbabbe0c720b26233203fd84bcb1..cbdfb4168f23bbbd37675da6dc88acb3191d88d6 100644 +index 990fad51d6fc1800d8ad815708c26747f46cfef0..8429a11896a28831dfa27633f313068238cc0773 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1849,6 +1849,25 @@ public final class CraftServer implements Server { +@@ -1850,6 +1850,25 @@ public final class CraftServer implements Server { return recipients.size(); } diff --git a/patches/server/0185-Flag-to-disable-the-channel-limit.patch b/patches/server/0185-Flag-to-disable-the-channel-limit.patch index 1ec64fa716..93c6db28f5 100644 --- a/patches/server/0185-Flag-to-disable-the-channel-limit.patch +++ b/patches/server/0185-Flag-to-disable-the-channel-limit.patch @@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ea82243ea965ee70ef1f94cb699d9ab262415b7a..df351eb47360e94d6974950bf219989951426fa6 100644 +index a1e7fe7fb36e8ee9a76a50d6508c0d8150b6ddd3..aef403fc1a6af00dfdb55271ea3d0bc10ae6228e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -207,6 +207,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -20,7 +20,7 @@ index ea82243ea965ee70ef1f94cb699d9ab262415b7a..df351eb47360e94d6974950bf2199899 public CraftPlayer(CraftServer server, ServerPlayer entity) { super(server, entity); -@@ -2254,7 +2255,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2251,7 +2252,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { diff --git a/patches/server/0196-WitchReadyPotionEvent.patch b/patches/server/0196-WitchReadyPotionEvent.patch index f99a5b42df..0e12aa1c8a 100644 --- a/patches/server/0196-WitchReadyPotionEvent.patch +++ b/patches/server/0196-WitchReadyPotionEvent.patch @@ -22,10 +22,10 @@ index c7470a5b95ee25078296c0443630c88a371b8a6f..d286239d02b81624124c4e32ff4413bb this.setUsingItem(true); if (!this.isSilent()) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index f7c848aa883c1ad408e7e16e605f375ab75f8cfd..f3fd59843e7517eb38bfa06b58445728d2a80001 100644 +index a49abc180f76cb7aeb6eda86998acd00e9d3fdee..d4c44ff13f657343ec19de5e6cef7639330a5e88 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1897,4 +1897,14 @@ public class CraftEventFactory { +@@ -1899,4 +1899,14 @@ public class CraftEventFactory { ).callEvent(); } // Paper end - PlayerUseUnknownEntityEvent diff --git a/patches/server/0212-InventoryCloseEvent-Reason-API.patch b/patches/server/0212-InventoryCloseEvent-Reason-API.patch index 78d2e875de..d7351129b8 100644 --- a/patches/server/0212-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0212-InventoryCloseEvent-Reason-API.patch @@ -29,7 +29,7 @@ index 82947c9743433df9c03732e0a3229563de0ab53c..6f2e316480c4cd1ffb32e8d01009a18c } // Spigot End diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 785c7e56a053acffa79fb11a32849d99961e35a4..c8084bdb20f1f21efc713c58d441096a31d79988 100644 +index 53246654bf8154e723b26097e864f83fd203caa5..c96e761dd29dbad42d590a88f1742c9a494eebfc 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -698,7 +698,7 @@ public class ServerPlayer extends Player { @@ -75,10 +75,10 @@ index 785c7e56a053acffa79fb11a32849d99961e35a4..c8084bdb20f1f21efc713c58d441096a this.doCloseContainer(); } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c3bd22a0a4220d14aaad3821ffc920001c0b290b..b0066e5ccd5b11a3a31c41dce513905c23459088 100644 +index de772530d290d58c1d8270bd14915e37db8dbf42..a9b0f12a793c88258bf80b38d16c8b887d07df61 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2606,10 +2606,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2602,10 +2602,15 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleContainerClose(ServerboundContainerClosePacket packet) { @@ -165,7 +165,7 @@ index dd3377a4f69e5ac10905e52d0eecc2427e72d856..c79607a2f45b7a487a95cf98b9b0eb6b @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index df351eb47360e94d6974950bf219989951426fa6..e28f9563ce9e3c762b237013f322265c16484192 100644 +index aef403fc1a6af00dfdb55271ea3d0bc10ae6228e..59d19212487770304a9b273f1546a2cc199764ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1260,7 +1260,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -178,10 +178,10 @@ index df351eb47360e94d6974950bf219989951426fa6..e28f9563ce9e3c762b237013f322265c // Check if the fromWorld and toWorld are the same. diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index f3fd59843e7517eb38bfa06b58445728d2a80001..63fec320871781d92f5ec552aac7fc08b2009f59 100644 +index d4c44ff13f657343ec19de5e6cef7639330a5e88..6e5b736123e0a0e8176c309be17be3316c6408ac 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1259,7 +1259,7 @@ public class CraftEventFactory { +@@ -1261,7 +1261,7 @@ public class CraftEventFactory { public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container, boolean cancelled) { if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open @@ -190,7 +190,7 @@ index f3fd59843e7517eb38bfa06b58445728d2a80001..63fec320871781d92f5ec552aac7fc08 } CraftServer server = player.level().getCraftServer(); -@@ -1446,8 +1446,18 @@ public class CraftEventFactory { +@@ -1448,8 +1448,18 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0214-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/patches/server/0214-Refresh-player-inventory-when-cancelling-PlayerInter.patch index 38847f0bec..d41697f837 100644 --- a/patches/server/0214-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/patches/server/0214-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b0066e5ccd5b11a3a31c41dce513905c23459088..a8c48cc286807a742838d372dc6dc2d2bb843f89 100644 +index a9b0f12a793c88258bf80b38d16c8b887d07df61..096a7f51684fa1939a6b1b973fbbffe58775f003 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2483,6 +2483,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2479,6 +2479,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } if (event.isCancelled()) { diff --git a/patches/server/0221-Vanished-players-don-t-have-rights.patch b/patches/server/0221-Vanished-players-don-t-have-rights.patch index 5eead4a61f..19cd52d6f4 100644 --- a/patches/server/0221-Vanished-players-don-t-have-rights.patch +++ b/patches/server/0221-Vanished-players-don-t-have-rights.patch @@ -89,10 +89,10 @@ index 6e23e4d0477f361f2eb5bb93bd9dd2bf5073833c..be2220eff094c735bdb0c3e777bfbcfa public boolean isClientSide() { return this.isClientSide; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 63fec320871781d92f5ec552aac7fc08b2009f59..cecadd303f40a0e4a3e8315aa58226b6eb3ff7c3 100644 +index 6e5b736123e0a0e8176c309be17be3316c6408ac..f0f00d459ef93ac8e716067b2160fed1433ce0b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1296,6 +1296,14 @@ public class CraftEventFactory { +@@ -1298,6 +1298,14 @@ public class CraftEventFactory { Projectile projectile = (Projectile) entity.getBukkitEntity(); org.bukkit.entity.Entity collided = position.getEntity().getBukkitEntity(); com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided); diff --git a/patches/server/0222-Allow-disabling-armor-stand-ticking.patch b/patches/server/0222-Allow-disabling-armor-stand-ticking.patch index b0daae19fd..9b24c8fb78 100644 --- a/patches/server/0222-Allow-disabling-armor-stand-ticking.patch +++ b/patches/server/0222-Allow-disabling-armor-stand-ticking.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow disabling armor stand ticking diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 62d63883f6a9f4da099491f697b309d4194b6082..042968ff848da74be0c9fcf9bac3d0adfb135802 100644 +index 521ad674b42e40df30916cf02ae6ace42c0368a2..b1867bb5c07b70b1cc8e5d3065a78b37c235a11e 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java @@ -97,9 +97,16 @@ public class ArmorStand extends LivingEntity { @@ -84,7 +84,7 @@ index 62d63883f6a9f4da099491f697b309d4194b6082..042968ff848da74be0c9fcf9bac3d0ad Rotations vector3f = (Rotations) this.entityData.get(ArmorStand.DATA_HEAD_POSE); if (!this.headPose.equals(vector3f)) { -@@ -786,31 +823,37 @@ public class ArmorStand extends LivingEntity { +@@ -792,31 +829,37 @@ public class ArmorStand extends LivingEntity { public void setHeadPose(Rotations angle) { this.headPose = angle; this.entityData.set(ArmorStand.DATA_HEAD_POSE, angle); diff --git a/patches/server/0231-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0231-Add-Early-Warning-Feature-to-WatchDog.patch index 4a8f5a4941..b0978f4a22 100644 --- a/patches/server/0231-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/0231-Add-Early-Warning-Feature-to-WatchDog.patch @@ -33,10 +33,10 @@ index 0ffa25a6e41cc56e78c79e0cee45e3b811794129..1b47e228ad7365b31d6ddd8c572d3bc5 com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 77a9c54c77dd12df870eb60d15b381f12392e8d9..9ff04719f0b560c286d97c8ed99b04d3b32900e3 100644 +index 8429a11896a28831dfa27633f313068238cc0773..f9b2c9e3dae0af6b2992b290b1dac7a13c98d856 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -926,6 +926,7 @@ public final class CraftServer implements Server { +@@ -927,6 +927,7 @@ public final class CraftServer implements Server { @Override public void reload() { @@ -44,7 +44,7 @@ index 77a9c54c77dd12df870eb60d15b381f12392e8d9..9ff04719f0b560c286d97c8ed99b04d3 this.reloadCount++; this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile()); this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile()); -@@ -1016,6 +1017,7 @@ public final class CraftServer implements Server { +@@ -1017,6 +1018,7 @@ public final class CraftServer implements Server { this.enablePlugins(PluginLoadOrder.POSTWORLD); if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD)); diff --git a/patches/server/0239-Optimize-CraftBlockData-Creation.patch b/patches/server/0239-Optimize-CraftBlockData-Creation.patch index 127bebc309..990b35be96 100644 --- a/patches/server/0239-Optimize-CraftBlockData-Creation.patch +++ b/patches/server/0239-Optimize-CraftBlockData-Creation.patch @@ -26,10 +26,10 @@ index e8815210405152696a9f7ddae64f87ff456fa9bd..3e76f1baa321f1c2551a027a705bbeed private boolean calculateSolid() { if (((Block) this.owner).properties.forceSolidOn) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index d2ec2d11736a74f8d568e25e9b560605518af987..19fab0d8d8a6211782df1fd99b5d60681aecd2f5 100644 +index 6ff5da6fac47f5eb6e574665110c0f2649b842d3..c1c5750dd2e4a9af1a115996a87eaaa1ea552c74 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -571,7 +571,17 @@ public class CraftBlockData implements BlockData { +@@ -570,7 +570,17 @@ public class CraftBlockData implements BlockData { return craft; } diff --git a/patches/server/0246-Expose-attack-cooldown-methods-for-Player.patch b/patches/server/0246-Expose-attack-cooldown-methods-for-Player.patch index e382df3eff..f736e3418f 100644 --- a/patches/server/0246-Expose-attack-cooldown-methods-for-Player.patch +++ b/patches/server/0246-Expose-attack-cooldown-methods-for-Player.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e28f9563ce9e3c762b237013f322265c16484192..f00afc993fc343a1fbc6cf71f8b3e45f8d76e42b 100644 +index 59d19212487770304a9b273f1546a2cc199764ab..a787be4cc43a01c7a6d66fe507df2ab2b63019a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2956,6 +2956,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2953,6 +2953,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return this.adventure$pointers; } diff --git a/patches/server/0247-Improve-death-events.patch b/patches/server/0247-Improve-death-events.patch index 20e3960aea..0a2d60f7ee 100644 --- a/patches/server/0247-Improve-death-events.patch +++ b/patches/server/0247-Improve-death-events.patch @@ -19,7 +19,7 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou public net.minecraft.world.entity.LivingEntity getSoundVolume()F diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index c8084bdb20f1f21efc713c58d441096a31d79988..4c0afa2589606d2748e54961f2a25e28a5309073 100644 +index c96e761dd29dbad42d590a88f1742c9a494eebfc..a0801437d631b148d435b3700e60f97f95e2bb92 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -264,6 +264,10 @@ public class ServerPlayer extends Player { @@ -45,7 +45,7 @@ index c8084bdb20f1f21efc713c58d441096a31d79988..4c0afa2589606d2748e54961f2a25e28 @@ -915,6 +919,16 @@ public class ServerPlayer extends Player { String deathmessage = defaultMessage.getString(); this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel - org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, PaperAdventure.asAdventure(defaultMessage), keepInventory); // Paper - Adventure + org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, damageSource, loot, PaperAdventure.asAdventure(defaultMessage), keepInventory); // Paper - Adventure + // Paper start - cancellable death event + if (event.isCancelled()) { + // make compatible with plugins that might have already set the health in an event listener @@ -80,7 +80,7 @@ index c8084bdb20f1f21efc713c58d441096a31d79988..4c0afa2589606d2748e54961f2a25e28 } } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 337fda9f87ece1fc2264ae6a2af2b7abbb23d788..21d2c43a97122025edd91662e39d44cc867593a3 100644 +index 12e205a01366a5825fd1b99097f1cef75dc0408e..3b9bd1e1043d7388c03936d5b131e9e288fb8fec 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -271,6 +271,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -215,8 +215,8 @@ index 337fda9f87ece1fc2264ae6a2af2b7abbb23d788..21d2c43a97122025edd91662e39d44cc + this.clearEquipmentSlots = prev; // Paper } // CraftBukkit start - Call death event -- CraftEventFactory.callEntityDeathEvent(this, this.drops); -+ org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper +- CraftEventFactory.callEntityDeathEvent(this, source, this.drops); ++ org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, source, this.drops); // Paper + this.postDeathDropItems(deathEvent); // Paper this.drops = new ArrayList<>(); // CraftBukkit end @@ -339,7 +339,7 @@ index b93ea19186e9988b75fa55736df602fa7e5d1648..557d938b65af6b0e55571011bd1c50de @Override public void addAdditionalSaveData(CompoundTag nbt) { diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 042968ff848da74be0c9fcf9bac3d0adfb135802..cb3729509e50fed64b17f16797825c1d21f7bf5b 100644 +index b1867bb5c07b70b1cc8e5d3065a78b37c235a11e..029d5756f424dba57b4a974b09453c2f0cf0e8e2 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java @@ -499,8 +499,10 @@ public class ArmorStand extends LivingEntity { @@ -347,10 +347,10 @@ index 042968ff848da74be0c9fcf9bac3d0adfb135802..cb3729509e50fed64b17f16797825c1d // CraftBukkit end if (source.is(DamageTypeTags.IS_EXPLOSION)) { - this.brokenByAnything(source); -- this.kill(); +- this.kill(source); // CraftBukkit + // Paper start - avoid duplicate event call + org.bukkit.event.entity.EntityDeathEvent event = this.brokenByAnything(source); -+ if (!event.isCancelled()) this.kill(false); ++ if (!event.isCancelled()) this.kill(source, false); // CraftBukkit + // Paper end return false; } else if (source.is(DamageTypeTags.IGNITES_ARMOR_STANDS)) { @@ -363,7 +363,7 @@ index 042968ff848da74be0c9fcf9bac3d0adfb135802..cb3729509e50fed64b17f16797825c1d + org.bukkit.event.entity.EntityDeathEvent event = this.brokenByPlayer(source); // Paper this.showBreakingParticles(); - this.discard(EntityRemoveEvent.Cause.DEATH); // CraftBukkit - SPIGOT-4890: remain as this.discard() since above damagesource method will call death event -+ if (!event.isCancelled()) this.kill(false); // Paper - we still need to kill to follow vanilla logic (emit the game event etc...) ++ if (!event.isCancelled()) this.kill(source, false); // Paper - we still need to kill to follow vanilla logic (emit the game event etc...) } return true; @@ -372,10 +372,10 @@ index 042968ff848da74be0c9fcf9bac3d0adfb135802..cb3729509e50fed64b17f16797825c1d f1 -= amount; if (f1 <= 0.5F) { - this.brokenByAnything(damageSource); -- this.kill(); +- this.kill(damageSource); // CraftBukkit + // Paper start - avoid duplicate event call + org.bukkit.event.entity.EntityDeathEvent event = this.brokenByAnything(damageSource); -+ if (!event.isCancelled()) this.kill(false); ++ if (!event.isCancelled()) this.kill(damageSource, false); // CraftBukkit + // Paper end } else { this.setHealth(f1); @@ -408,29 +408,28 @@ index 042968ff848da74be0c9fcf9bac3d0adfb135802..cb3729509e50fed64b17f16797825c1d } -@@ -758,7 +762,16 @@ public class ArmorStand extends LivingEntity { - - @Override - public void kill() { -- org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, this.drops); // CraftBukkit - call event -+ // Paper start -+ kill(true); -+ } -+ -+ public void kill(boolean callEvent) { -+ if (callEvent) { -+ // Paper end -+ org.bukkit.event.entity.EntityDeathEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, this.drops); // CraftBukkit - call event // Paper - make cancellable -+ if (event.isCancelled()) return; // Paper - make cancellable -+ } // Paper - this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause - this.gameEvent(GameEvent.ENTITY_DIE); +@@ -763,7 +767,15 @@ public class ArmorStand extends LivingEntity { } + + public void kill(DamageSource damageSource) { +- org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, (damageSource == null ? this.damageSources().genericKill() : damageSource), this.drops); // CraftBukkit - call event ++ // Paper start - make cancellable ++ this.kill(damageSource, true); ++ } ++ public void kill(DamageSource damageSource, boolean callEvent) { ++ if (callEvent) { ++ org.bukkit.event.entity.EntityDeathEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, (damageSource == null ? this.damageSources().genericKill() : damageSource), this.drops); // CraftBukkit - call event ++ if (event.isCancelled()) return; ++ } ++ // Paper end + this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause + // CraftBukkit end + this.gameEvent(GameEvent.ENTITY_DIE); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f00afc993fc343a1fbc6cf71f8b3e45f8d76e42b..9d3cef9bb395a64ea934f4496ec8556b67d83bf2 100644 +index a787be4cc43a01c7a6d66fe507df2ab2b63019a0..3f8135387474c7fb2a7ceefff8dc213ea841a57d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2502,7 +2502,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2499,7 +2499,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void sendHealthUpdate() { FoodData foodData = this.getHandle().getFoodData(); @@ -447,13 +446,13 @@ index f00afc993fc343a1fbc6cf71f8b3e45f8d76e42b..9d3cef9bb395a64ea934f4496ec8556b public void injectScaledMaxHealth(Collection collection, boolean force) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index cecadd303f40a0e4a3e8315aa58226b6eb3ff7c3..e2d74bf7e888b5161b210393e72c484058a3657b 100644 +index f0f00d459ef93ac8e716067b2160fed1433ce0b3..6d947a11bc94cb8792a3ce0b5314d7226485e8ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -891,9 +891,16 @@ public class CraftEventFactory { - public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List drops) { +@@ -892,9 +892,16 @@ public class CraftEventFactory { CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); - EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); + CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource); + EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward()); + populateFields(victim, event); // Paper - make cancellable CraftWorld world = (CraftWorld) entity.getWorld(); Bukkit.getServer().getPluginManager().callEvent(event); @@ -467,8 +466,8 @@ index cecadd303f40a0e4a3e8315aa58226b6eb3ff7c3..e2d74bf7e888b5161b210393e72c4840 victim.expToDrop = event.getDroppedExp(); for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { -@@ -910,8 +917,15 @@ public class CraftEventFactory { - PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); +@@ -912,8 +919,15 @@ public class CraftEventFactory { + PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(), 0, deathMessage); event.setKeepInventory(keepInventory); event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel + populateFields(victim, event); // Paper - make cancellable @@ -483,7 +482,7 @@ index cecadd303f40a0e4a3e8315aa58226b6eb3ff7c3..e2d74bf7e888b5161b210393e72c4840 victim.keepLevel = event.getKeepLevel(); victim.newLevel = event.getNewLevel(); -@@ -928,6 +942,31 @@ public class CraftEventFactory { +@@ -930,6 +944,31 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0272-Make-the-default-permission-message-configurable.patch b/patches/server/0272-Make-the-default-permission-message-configurable.patch index 98a4c6ccc2..fb162cf290 100644 --- a/patches/server/0272-Make-the-default-permission-message-configurable.patch +++ b/patches/server/0272-Make-the-default-permission-message-configurable.patch @@ -18,10 +18,10 @@ index 6d06b772ffb9d47d6a717462a4b2b494544e80ae..69ffd6ea2ce7c6d4f211c6081fcea79a } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9c673642b7c35bc3c443bd66fbcd278073eeccc2..4d1d7fc503225be0aabc99f0285cc6d306e034ef 100644 +index f9b2c9e3dae0af6b2992b290b1dac7a13c98d856..f3fb47cd2c8302e21941f0ecb0bf8215f7d1b433 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2833,6 +2833,16 @@ public final class CraftServer implements Server { +@@ -2834,6 +2834,16 @@ public final class CraftServer implements Server { return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions; } diff --git a/patches/server/0277-Replace-OfflinePlayer-getLastPlayed.patch b/patches/server/0277-Replace-OfflinePlayer-getLastPlayed.patch index 0ccff4ef31..9c16ff2c94 100644 --- a/patches/server/0277-Replace-OfflinePlayer-getLastPlayed.patch +++ b/patches/server/0277-Replace-OfflinePlayer-getLastPlayed.patch @@ -16,7 +16,7 @@ intent to remove) and replace it with two new methods, clearly named and documented as to their purpose. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 91ce1788e2a019c15fba2daf9ee383618f874fd4..74da4c332045cb749104f2bc573e3116df91d01f 100644 +index 665fcf8382fbcb214eda16dae9e40e33e257ec6f..6267cd96191d771edafe1db7c7fc570b71a59f5f 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -264,6 +264,7 @@ public class ServerPlayer extends Player { @@ -106,7 +106,7 @@ index 461656e1cb095243bfe7a9ee2906e5b00574ae78..411b280ac3e27e72091db813c0c9b69b public Location getLastDeathLocation() { if (this.getData().contains("LastDeathLocation", 10)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9d3cef9bb395a64ea934f4496ec8556b67d83bf2..11c429225f3242a0bb4bcef8c47fad1cbb5c9a43 100644 +index 3f8135387474c7fb2a7ceefff8dc213ea841a57d..78d3e176f2cae7637ed62c2b732fd4ccf4e5f4cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -208,6 +208,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -117,7 +117,7 @@ index 9d3cef9bb395a64ea934f4496ec8556b67d83bf2..11c429225f3242a0bb4bcef8c47fad1c public CraftPlayer(CraftServer server, ServerPlayer entity) { super(server, entity); -@@ -2034,6 +2035,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2031,6 +2032,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index 9d3cef9bb395a64ea934f4496ec8556b67d83bf2..11c429225f3242a0bb4bcef8c47fad1c public void readExtraData(CompoundTag nbttagcompound) { this.hasPlayedBefore = true; if (nbttagcompound.contains("bukkit")) { -@@ -2056,6 +2069,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2053,6 +2066,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(CompoundTag nbttagcompound) { @@ -145,7 +145,7 @@ index 9d3cef9bb395a64ea934f4496ec8556b67d83bf2..11c429225f3242a0bb4bcef8c47fad1c if (!nbttagcompound.contains("bukkit")) { nbttagcompound.put("bukkit", new CompoundTag()); } -@@ -2070,6 +2085,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2067,6 +2082,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.putLong("firstPlayed", this.getFirstPlayed()); data.putLong("lastPlayed", System.currentTimeMillis()); data.putString("lastKnownName", handle.getScoreboardName()); diff --git a/patches/server/0284-Limit-Client-Sign-length-more.patch b/patches/server/0284-Limit-Client-Sign-length-more.patch index 4ebb76bc89..68d596c6cf 100644 --- a/patches/server/0284-Limit-Client-Sign-length-more.patch +++ b/patches/server/0284-Limit-Client-Sign-length-more.patch @@ -22,7 +22,7 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e241e0cae476ba963aff70b4f7ab038f07207303..fedc4654178a3771004394665914efd2b842432a 100644 +index 04a9c48b9a9895ffe6ec0721bdfafb1b524bf386..e728b9f317d12c3c452db70ba7d1e930c84e345d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -299,6 +299,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -33,7 +33,7 @@ index e241e0cae476ba963aff70b4f7ab038f07207303..fedc4654178a3771004394665914efd2 public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie clientData) { super(server, connection, clientData, player); // CraftBukkit -@@ -3138,7 +3139,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3134,7 +3135,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleSignUpdate(ServerboundSignUpdatePacket packet) { diff --git a/patches/server/0298-Expose-the-internal-current-tick.patch b/patches/server/0298-Expose-the-internal-current-tick.patch index b1d3de338b..4c03c5754a 100644 --- a/patches/server/0298-Expose-the-internal-current-tick.patch +++ b/patches/server/0298-Expose-the-internal-current-tick.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 4d1d7fc503225be0aabc99f0285cc6d306e034ef..0cf17dffced4d7317bbf12c87f3b9b7f1df358e8 100644 +index f3fb47cd2c8302e21941f0ecb0bf8215f7d1b433..2ceffbde4f12c5ac34c156e32c5fac3f9ecc8cc4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2879,5 +2879,10 @@ public final class CraftServer implements Server { +@@ -2880,5 +2880,10 @@ public final class CraftServer implements Server { profile.getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties()); return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile); } diff --git a/patches/server/0333-Add-tick-times-API-and-mspt-command.patch b/patches/server/0333-Add-tick-times-API-and-mspt-command.patch index b596499602..5596b1d188 100644 --- a/patches/server/0333-Add-tick-times-API-and-mspt-command.patch +++ b/patches/server/0333-Add-tick-times-API-and-mspt-command.patch @@ -184,10 +184,10 @@ index 91981ef15a9d8a46681f39ec8cf0f136f9931968..b260b197bc254d22a9fd0f1c2dd79993 + // Paper end - Add tick times API and /mspt command } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0cf17dffced4d7317bbf12c87f3b9b7f1df358e8..cf928e659570c0b091a6d36d9eddedee11353232 100644 +index 2ceffbde4f12c5ac34c156e32c5fac3f9ecc8cc4..e3743114309d94dcf04acee5d41019f38f51299e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2647,6 +2647,16 @@ public final class CraftServer implements Server { +@@ -2648,6 +2648,16 @@ public final class CraftServer implements Server { return CraftMagicNumbers.INSTANCE; } diff --git a/patches/server/0334-Expose-MinecraftServer-isRunning.patch b/patches/server/0334-Expose-MinecraftServer-isRunning.patch index 5f6a2398f3..088bb21907 100644 --- a/patches/server/0334-Expose-MinecraftServer-isRunning.patch +++ b/patches/server/0334-Expose-MinecraftServer-isRunning.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index cf928e659570c0b091a6d36d9eddedee11353232..15ff6476f1f86e3eac78f5cdcae9b71e124ee40f 100644 +index e3743114309d94dcf04acee5d41019f38f51299e..e7a56475d7fdeabe7a864bac06477051ef7aeda8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2894,5 +2894,10 @@ public final class CraftServer implements Server { +@@ -2895,5 +2895,10 @@ public final class CraftServer implements Server { public int getCurrentTick() { return net.minecraft.server.MinecraftServer.currentTick; } diff --git a/patches/server/0335-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/0335-Add-Raw-Byte-ItemStack-Serialization.patch index f1d09d375b..b294d74cc9 100644 --- a/patches/server/0335-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/patches/server/0335-Add-Raw-Byte-ItemStack-Serialization.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization Serializes using NBT which is safer for server data migrations than bukkits format. diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index d568c3c85c44efc0fd0a43e7758fcd6899a60000..54e5d76e5ec40912a5c09123d879cd5bef8da4b1 100644 +index 5df312c8c663b51dcdfa69945050baadbc2f5f92..ed736df71472578fbeb6a86123083d95a6cd7057 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -478,6 +478,53 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -482,6 +482,53 @@ public final class CraftMagicNumbers implements UnsafeValues { public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { return new com.destroystokyo.paper.PaperVersionFetcher(); } @@ -62,4 +62,4 @@ index d568c3c85c44efc0fd0a43e7758fcd6899a60000..54e5d76e5ec40912a5c09123d879cd5b + } // Paper end - /** + @Override diff --git a/patches/server/0355-Fix-item-duplication-and-teleport-issues.patch b/patches/server/0355-Fix-item-duplication-and-teleport-issues.patch index e1d2d1f039..b59b420d07 100644 --- a/patches/server/0355-Fix-item-duplication-and-teleport-issues.patch +++ b/patches/server/0355-Fix-item-duplication-and-teleport-issues.patch @@ -16,7 +16,7 @@ So even if something NEW comes up, it would be impossible to drop the same item twice because the source was destroyed. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 04bd6d6bc6af0e423f56329dc3554b04170932f9..af49ff55865b327c167efedcb7413c270824efe3 100644 +index 511208e323b26df24263b87eeb7d2645572d9ff8..c6877df96229eb922fa0d4029f31d9698eab78ab 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2447,11 +2447,12 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -80,7 +80,7 @@ index 04bd6d6bc6af0e423f56329dc3554b04170932f9..af49ff55865b327c167efedcb7413c27 public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 022ff3f125b7fe4f59b8c4bf75533d9b6cac4189..be1eff193cd0d581209d34e2ae81d1db67e5a153 100644 +index 2f3615cb8e4206ed2eb87c1341de4258879d3907..c640d68c35b4454bfa0ae1764dee341041d9c31e 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1740,9 +1740,9 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -101,9 +101,9 @@ index 022ff3f125b7fe4f59b8c4bf75533d9b6cac4189..be1eff193cd0d581209d34e2ae81d1db this.clearEquipmentSlots = prev; // Paper } - // CraftBukkit start - Call death event -- org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper +- org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, source, this.drops); // Paper + // CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment -+ org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops, () -> { ++ org.bukkit.event.entity.EntityDeathEvent deathEvent = CraftEventFactory.callEntityDeathEvent(this, source, this.drops, () -> { + final LivingEntity entityliving = this.getKillCredit(); + if (this.deathScore >= 0 && entityliving != null) { + entityliving.awardKillScore(this, this.deathScore, source); @@ -113,7 +113,7 @@ index 022ff3f125b7fe4f59b8c4bf75533d9b6cac4189..be1eff193cd0d581209d34e2ae81d1db this.drops = new ArrayList<>(); // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index cb3729509e50fed64b17f16797825c1d21f7bf5b..bf717b5bcd14291a99414eae5366c0b91ce68a68 100644 +index 029d5756f424dba57b4a974b09453c2f0cf0e8e2..e1f6853c450a2e6a0d7607f1faec7bc5c82d9621 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java @@ -628,7 +628,7 @@ public class ArmorStand extends LivingEntity { @@ -135,22 +135,22 @@ index cb3729509e50fed64b17f16797825c1d21f7bf5b..bf717b5bcd14291a99414eae5366c0b9 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index fae07957147ee22a91d5da925e834a0495021958..f39bfda4487114f5a0a720e328321485839dd790 100644 +index 74fc73549b504eb2b7fcaa141aa125f84a077ed9..ac4a8c9d4f727f3caa16f6dc5497d69f9db52aab 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -894,6 +894,11 @@ public class CraftEventFactory { } - public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List drops) { + public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List drops) { + // Paper start -+ return CraftEventFactory.callEntityDeathEvent(victim, drops, com.google.common.util.concurrent.Runnables.doNothing()); ++ return CraftEventFactory.callEntityDeathEvent(victim, damageSource, drops, com.google.common.util.concurrent.Runnables.doNothing()); + } -+ public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List drops, Runnable lootCheck) { ++ public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List drops, Runnable lootCheck) { + // Paper end CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); - EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); - populateFields(victim, event); // Paper - make cancellable -@@ -907,11 +912,13 @@ public class CraftEventFactory { + CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource); + EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward()); +@@ -908,11 +913,13 @@ public class CraftEventFactory { playDeathSound(victim, event); // Paper end victim.expToDrop = event.getDroppedExp(); diff --git a/patches/server/0358-Expose-game-version.patch b/patches/server/0358-Expose-game-version.patch index bd1a504019..ae948b246d 100644 --- a/patches/server/0358-Expose-game-version.patch +++ b/patches/server/0358-Expose-game-version.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose game version diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 15ff6476f1f86e3eac78f5cdcae9b71e124ee40f..2431f687fb0ad6c904448f47fad926b136cba815 100644 +index e7a56475d7fdeabe7a864bac06477051ef7aeda8..750c976c596ea149634229754984f2d95682874d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -578,6 +578,13 @@ public final class CraftServer implements Server { +@@ -579,6 +579,13 @@ public final class CraftServer implements Server { return this.bukkitVersion; } diff --git a/patches/server/0360-misc-debugging-dumps.patch b/patches/server/0360-misc-debugging-dumps.patch index 9e356eecb4..eaf88ad341 100644 --- a/patches/server/0360-misc-debugging-dumps.patch +++ b/patches/server/0360-misc-debugging-dumps.patch @@ -105,10 +105,10 @@ index 970d1ddf0a014b47b0ac97440489706137324991..e4086bea596e5f5d71491e0b7ad650d7 this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2431f687fb0ad6c904448f47fad926b136cba815..c62936e7070d794aeac7e5175757aa045a6afcae 100644 +index 750c976c596ea149634229754984f2d95682874d..c7d95adbd675af54dcd32773ab88c79e829df745 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1017,6 +1017,7 @@ public final class CraftServer implements Server { +@@ -1018,6 +1018,7 @@ public final class CraftServer implements Server { plugin.getDescription().getFullName(), "This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin" )); diff --git a/patches/server/0362-Implement-Mob-Goal-API.patch b/patches/server/0362-Implement-Mob-Goal-API.patch index 2e62f69cbb..494c441c11 100644 --- a/patches/server/0362-Implement-Mob-Goal-API.patch +++ b/patches/server/0362-Implement-Mob-Goal-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement Mob Goal API diff --git a/build.gradle.kts b/build.gradle.kts -index 158779a3590f089c4224b2b128c2e653aef42a94..4f8b8839f4d345f448d30de21ad9f3ad7422f98b 100644 +index 0d757b4a1b5d1bb68a48ec0a398019bf1f64c6a4..cab6f19bb69da3b51bf05fac7075675b2a55564b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -40,6 +40,7 @@ dependencies { @@ -773,10 +773,10 @@ index 6667ecc4b7eded4e20a415cef1e1b1179e6710b8..16f9a98b8a939e5ca7e2dc04f87134a7 LOOK, JUMP, diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 821e50c456679f69a9b6ae058f35b601bf3c759b..bd4c982ba919f0196723b4c45be102b47054a70f 100644 +index c7d95adbd675af54dcd32773ab88c79e829df745..8fa6496605c3f2ac7f16abd0e32190a189d6549a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2907,5 +2907,11 @@ public final class CraftServer implements Server { +@@ -2908,5 +2908,11 @@ public final class CraftServer implements Server { public boolean isStopping() { return net.minecraft.server.MinecraftServer.getServer().hasStopped(); } diff --git a/patches/server/0366-Fix-PotionEffect-ignores-icon-flag.patch b/patches/server/0366-Fix-PotionEffect-ignores-icon-flag.patch index a401f6eca3..ecd472e97b 100644 --- a/patches/server/0366-Fix-PotionEffect-ignores-icon-flag.patch +++ b/patches/server/0366-Fix-PotionEffect-ignores-icon-flag.patch @@ -37,10 +37,10 @@ index 539280a0265a4746ebc9ede6667df3699dfb8125..a5026d470b8651ddf4b79fc29cbc598a return effects; } diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java -index a91fd77d3a3aec302cb4a17e358d04bdf0cff6c3..068a9b2d7b6895f14077d9647a8c9fed3e3d3ade 100644 +index b7525f6ddc8f315ec9830b6b8f225d4839d306ad..01af4db5d0f17ea2943e5c464d4122a358503bc1 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java -@@ -10,7 +10,7 @@ public class CraftPotionUtil { +@@ -78,7 +78,7 @@ public class CraftPotionUtil { public static MobEffectInstance fromBukkit(PotionEffect effect) { Holder type = CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType()); @@ -49,7 +49,7 @@ index a91fd77d3a3aec302cb4a17e358d04bdf0cff6c3..068a9b2d7b6895f14077d9647a8c9fed } public static PotionEffect toBukkit(MobEffectInstance effect) { -@@ -19,7 +19,7 @@ public class CraftPotionUtil { +@@ -87,7 +87,7 @@ public class CraftPotionUtil { int duration = effect.getDuration(); boolean ambient = effect.isAmbient(); boolean particles = effect.isVisible(); diff --git a/patches/server/0368-Wait-for-Async-Tasks-during-shutdown.patch b/patches/server/0368-Wait-for-Async-Tasks-during-shutdown.patch index 6115960afb..8175c30658 100644 --- a/patches/server/0368-Wait-for-Async-Tasks-during-shutdown.patch +++ b/patches/server/0368-Wait-for-Async-Tasks-during-shutdown.patch @@ -22,10 +22,10 @@ index c0d467cc65c208aa1166a24dec753b1e2b3d995b..6da91e7236ee2d2a0bcbe1f3933b5624 // CraftBukkit end if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.shutdown(); // Paper - Plugin remapping diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 82d462fbc8936b70169ca3b55d488e1ef76aec40..a57322196c83b544062b671d93c8ae08563f902f 100644 +index 8fa6496605c3f2ac7f16abd0e32190a189d6549a..6d3e22ba084498beb46cdb7cd7737eee8bfe477c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1028,6 +1028,31 @@ public final class CraftServer implements Server { +@@ -1029,6 +1029,31 @@ public final class CraftServer implements Server { org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload } diff --git a/patches/server/0380-Add-PlayerRecipeBookClickEvent.patch b/patches/server/0380-Add-PlayerRecipeBookClickEvent.patch index 21e43aed85..2f223b4810 100644 --- a/patches/server/0380-Add-PlayerRecipeBookClickEvent.patch +++ b/patches/server/0380-Add-PlayerRecipeBookClickEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2e27141c6cc2dec758f294381da39a683c4e194d..a6cd53e08a0770b93876f98efa7ebfe5b77a2f15 100644 +index 7fab3281116aa917c96223c1a1caf6280293df65..591f4f43dd023facf0a8990682069190c388d64b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3045,16 +3045,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3041,16 +3041,40 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl if (!this.player.containerMenu.stillValid(this.player)) { ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu); } else { diff --git a/patches/server/0384-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0384-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index 5e0986e0dd..c69a9ef532 100644 --- a/patches/server/0384-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0384-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -76,7 +76,7 @@ index 3d33504eac6af17c8833de11226968d52f96232f..4d7c2832a9cd9a88b99c837a02df7fa9 @Override diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index a8c9a9cea8d527f2bb4393c0539b3c8f3b25e06e..7ecd6707c1325afb9f9c01699badefb4ea059501 100644 +index dde6d567521a08b416ee50b1249b653b0bf6e87a..9750c0309a9dae50b62bfbe5f29a2a6f3c981e62 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1238,7 +1238,7 @@ public class ServerPlayer extends Player { @@ -89,10 +89,10 @@ index a8c9a9cea8d527f2bb4393c0539b3c8f3b25e06e..7ecd6707c1325afb9f9c01699badefb4 playerlist.sendPlayerPermissionLevel(this); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 8011266f5fe082c0a81a7a828fe2cf7445fba0f7..688579464e1f6e34f07e37f80efcd31a1a8a0538 100644 +index 299a2e78f4a83d224038c80287636a5d6b9b7450..95d20facdc43a356fd2e82f5d597f52ee61791dc 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3248,7 +3248,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3244,7 +3244,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) { @@ -102,10 +102,10 @@ index 8011266f5fe082c0a81a7a828fe2cf7445fba0f7..688579464e1f6e34f07e37f80efcd31a } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a57322196c83b544062b671d93c8ae08563f902f..3788f4ddac343d1bb0c96f2072a1e0fb574484f1 100644 +index 6d3e22ba084498beb46cdb7cd7737eee8bfe477c..26ba33d1eeb77b73cff3c423c08675df7118265c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -966,8 +966,8 @@ public final class CraftServer implements Server { +@@ -967,8 +967,8 @@ public final class CraftServer implements Server { org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot this.console.paperConfigurations.reloadConfigs(this.console); for (ServerLevel world : this.console.getAllLevels()) { diff --git a/patches/server/0387-Add-Plugin-Tickets-to-API-Chunk-Methods.patch b/patches/server/0387-Add-Plugin-Tickets-to-API-Chunk-Methods.patch index deaa1e2a0d..642eac03a9 100644 --- a/patches/server/0387-Add-Plugin-Tickets-to-API-Chunk-Methods.patch +++ b/patches/server/0387-Add-Plugin-Tickets-to-API-Chunk-Methods.patch @@ -22,10 +22,10 @@ wants it to collect even faster, they can restore that setting back to 1 instead Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3788f4ddac343d1bb0c96f2072a1e0fb574484f1..0c7a3f0c3ae063d6fa0f76000826ebc3a49f5532 100644 +index 26ba33d1eeb77b73cff3c423c08675df7118265c..52733657a1bc8529fa68faaa212ea9b78b094793 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -379,7 +379,7 @@ public final class CraftServer implements Server { +@@ -380,7 +380,7 @@ public final class CraftServer implements Server { this.overrideSpawnLimits(); console.autosavePeriod = this.configuration.getInt("ticks-per.autosave"); this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose")); @@ -34,7 +34,7 @@ index 3788f4ddac343d1bb0c96f2072a1e0fb574484f1..0c7a3f0c3ae063d6fa0f76000826ebc3 this.minimumAPI = ApiVersion.getOrCreateVersion(this.configuration.getString("settings.minimum-api")); this.loadIcon(); -@@ -946,7 +946,7 @@ public final class CraftServer implements Server { +@@ -947,7 +947,7 @@ public final class CraftServer implements Server { this.console.setMotd(config.motd); this.overrideSpawnLimits(); this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose")); diff --git a/patches/server/0389-Convert-legacy-attributes-in-Item-Meta.patch b/patches/server/0389-Convert-legacy-attributes-in-Item-Meta.patch index 0572745730..dd8c5ba601 100644 --- a/patches/server/0389-Convert-legacy-attributes-in-Item-Meta.patch +++ b/patches/server/0389-Convert-legacy-attributes-in-Item-Meta.patch @@ -30,10 +30,10 @@ index de40e522960469b98f987bd688489740446d9f85..a0a34f680e21007ebf2c2497d2e6505e public CraftAttributeMap(AttributeMap handle) { this.handle = handle; diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 0c385b713234a74ceba802f67f74e4ecab93e269..0464c7b6cc6cb523fa833c870e4028c3f599ea65 100644 +index a052c2dab5af99355737a88f75cb0b2e42a60177..43fad0ad01712da8d8bdcd54078aaa7b5fbc2720 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -613,7 +613,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -627,7 +627,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier); diff --git a/patches/server/0390-Do-not-accept-invalid-client-settings.patch b/patches/server/0390-Do-not-accept-invalid-client-settings.patch index 4cc4ebcdec..0cfa8d4f81 100644 --- a/patches/server/0390-Do-not-accept-invalid-client-settings.patch +++ b/patches/server/0390-Do-not-accept-invalid-client-settings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Do not accept invalid client settings diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 688579464e1f6e34f07e37f80efcd31a1a8a0538..33c53c0b2dd755cb63288e9df5bb3dc11b3af55e 100644 +index 95d20facdc43a356fd2e82f5d597f52ee61791dc..bc9c68c4df11ece9a9cba9b8cff1182c1d21551f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3240,6 +3240,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3236,6 +3236,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handleClientInformation(ServerboundClientInformationPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); diff --git a/patches/server/0393-Add-PrepareResultEvent.patch b/patches/server/0393-Add-PrepareResultEvent.patch index 647dfc2399..aecbaf783c 100644 --- a/patches/server/0393-Add-PrepareResultEvent.patch +++ b/patches/server/0393-Add-PrepareResultEvent.patch @@ -94,10 +94,10 @@ index 9c2fe69ced7a46bbd8b0fbe10fa67d0a39b0f375..e40d9dbdbe5359c38af6d764d01c9be4 private void setupRecipeList(Container input, ItemStack stack) { diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 36999a5c603aef1dc1e79adb2f2f6801899bfacc..a5253dc7fc611e599ab83c08bf4ce71afc4ee3c5 100644 +index 1e9835647a0f9eb1e1a264467a62af85af664594..461b25d3d0660f973e6db670899bce05010e7c49 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1648,6 +1648,12 @@ public class CraftEventFactory { +@@ -1650,6 +1650,12 @@ public class CraftEventFactory { } public static PrepareAnvilEvent callPrepareAnvilEvent(InventoryView view, ItemStack item) { @@ -110,7 +110,7 @@ index 36999a5c603aef1dc1e79adb2f2f6801899bfacc..a5253dc7fc611e599ab83c08bf4ce71a PrepareAnvilEvent event = new PrepareAnvilEvent(view, CraftItemStack.asCraftMirror(item).clone()); event.getView().getPlayer().getServer().getPluginManager().callEvent(event); event.getInventory().setItem(2, event.getResult()); -@@ -1655,6 +1661,12 @@ public class CraftEventFactory { +@@ -1657,6 +1663,12 @@ public class CraftEventFactory { } public static PrepareGrindstoneEvent callPrepareGrindstoneEvent(InventoryView view, ItemStack item) { @@ -123,7 +123,7 @@ index 36999a5c603aef1dc1e79adb2f2f6801899bfacc..a5253dc7fc611e599ab83c08bf4ce71a PrepareGrindstoneEvent event = new PrepareGrindstoneEvent(view, CraftItemStack.asCraftMirror(item).clone()); event.getView().getPlayer().getServer().getPluginManager().callEvent(event); event.getInventory().setItem(2, event.getResult()); -@@ -1662,12 +1674,39 @@ public class CraftEventFactory { +@@ -1664,12 +1676,39 @@ public class CraftEventFactory { } public static PrepareSmithingEvent callPrepareSmithingEvent(InventoryView view, ItemStack item) { diff --git a/patches/server/0404-Brand-support.patch b/patches/server/0404-Brand-support.patch index 8d331cba7f..511e3bd37a 100644 --- a/patches/server/0404-Brand-support.patch +++ b/patches/server/0404-Brand-support.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Brand support diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 7ecd6707c1325afb9f9c01699badefb4ea059501..4b07b5f7a92a7bfe74f157fd69ecd864df38c495 100644 +index 9750c0309a9dae50b62bfbe5f29a2a6f3c981e62..38e62a9251b0b0cceb0a350a649897f357293428 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -290,6 +290,7 @@ public class ServerPlayer extends Player { @@ -17,7 +17,7 @@ index 7ecd6707c1325afb9f9c01699badefb4ea059501..4b07b5f7a92a7bfe74f157fd69ecd864 public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) { super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java -index 237e3d8d2fd539f1fc6cd466ff124890dfa644d6..d7ddfabcbacb077c337c789083a24ad82e08e82e 100644 +index 289a74e35836717bd20c777e9fc8c17722e90411..a5dce1e83e63292054b21ec693ec3006e08d3ff2 100644 --- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java @@ -77,6 +77,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack @@ -57,10 +57,10 @@ index 237e3d8d2fd539f1fc6cd466ff124890dfa644d6..d7ddfabcbacb077c337c789083a24ad8 } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 381207e020e5b06cacb98142663db5f2030615ce..a52fab6dc676ed1949e3e7db31d2543a6f5d1eba 100644 +index 4131b83117e399d7113442def85101d20c493d06..b614ee4e0e217f4adf45f45f53486376bee6533f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3115,6 +3115,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3112,6 +3112,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper end }; diff --git a/patches/server/0417-Add-methods-to-get-translation-keys.patch b/patches/server/0417-Add-methods-to-get-translation-keys.patch index e61dce6cd3..9e2c16ba64 100644 --- a/patches/server/0417-Add-methods-to-get-translation-keys.patch +++ b/patches/server/0417-Add-methods-to-get-translation-keys.patch @@ -26,10 +26,10 @@ index f041b5d80bff9c022b007e04ef1558e9116acc6b..a586442422a2b2c06b785af0d261d3e1 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index d839a0edf31f6803e5813b28a23fa17e20916b2c..bb8a3e670924ebcce48669c5dce57e2df03fad77 100644 +index 5ed90ed0461165da02c7a1acae805c12466e38d6..faf0f726453aa957d17b75dfd8de5b40d984e69c 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -@@ -145,6 +145,11 @@ public class CraftEnchantment extends Enchantment implements Handleable%s", nms, bukkit); } @@ -48,12 +48,11 @@ index 19fab0d8d8a6211782df1fd99b5d60681aecd2f5..b875bebb8b63c6f60301180fc2e3fc9c + } + // Paper end - cache block data strings + - public static CraftBlockData newData(Material material, String data) { - Preconditions.checkArgument(material == null || material.isBlock(), "Cannot get data for not block %s", material); - + public static CraftBlockData newData(BlockType blockType, String data) { ++ + // Paper start - cache block data strings -+ if (material != null) { -+ Block block = CraftBlockType.bukkitToMinecraft(material); ++ if (blockType != null) { ++ Block block = CraftBlockType.bukkitToMinecraftNew(blockType); + if (block != null) { + net.minecraft.resources.ResourceLocation key = BuiltInRegistries.BLOCK.getKey(block); + data = data == null ? key.toString() : key + data; @@ -64,8 +63,8 @@ index 19fab0d8d8a6211782df1fd99b5d60681aecd2f5..b875bebb8b63c6f60301180fc2e3fc9c + return (CraftBlockData) cached.clone(); + } + -+ private static CraftBlockData createNewData(Material material, String data) { ++ private static CraftBlockData createNewData(BlockType blockType, String data) { + // Paper end - cache block data strings net.minecraft.world.level.block.state.BlockState blockData; - Block block = CraftBlockType.bukkitToMinecraft(material); + Block block = blockType == null ? null : ((CraftBlockType) blockType).getHandle(); Map, Comparable> parsed = null; diff --git a/patches/server/0424-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0424-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index bb48638f5f..35fd51c448 100644 --- a/patches/server/0424-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/server/0424-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c8e4e37b706bd8cb9698ac2d13d0d8668e2d1d14..909575a02bf5f7040eb9c8edb034e7b6578e92b9 100644 +index cde8925d0754c2428cf830ac58d83b9420947e30..e40387e9a822603379fabb9a9c64c55e64c3bec3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -4439,4 +4439,10 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -21,10 +21,10 @@ index c8e4e37b706bd8cb9698ac2d13d0d8668e2d1d14..909575a02bf5f7040eb9c8edb034e7b6 + // Paper end - Expose entity id counter } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 54e5d76e5ec40912a5c09123d879cd5bef8da4b1..9b199fffb86cb04b9ad0013316a911ccf59d4051 100644 +index ed736df71472578fbeb6a86123083d95a6cd7057..7c864d7d70accc7d52e2b198c30be7f6a2f4e813 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -525,6 +525,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -529,6 +529,11 @@ public final class CraftMagicNumbers implements UnsafeValues { Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!"); return compound; } @@ -35,4 +35,4 @@ index 54e5d76e5ec40912a5c09123d879cd5bef8da4b1..9b199fffb86cb04b9ad0013316a911cc + } // Paper end - /** + @Override diff --git a/patches/server/0431-Optimise-getType-calls.patch b/patches/server/0431-Optimise-getType-calls.patch index 988e1865ce..1b14b0202b 100644 --- a/patches/server/0431-Optimise-getType-calls.patch +++ b/patches/server/0431-Optimise-getType-calls.patch @@ -66,10 +66,10 @@ index fabdec2d66cc6d676ed58fa570e2c318ab0927e2..1002123cd0c6f57cecc4e80f5f21cc6f public void setFlag(int flag) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index b875bebb8b63c6f60301180fc2e3fc9c1bc87193..2303525542daa933a8de5978ac43d16223c6e5fd 100644 +index 67ff2241aa8869b41abb0a93467b8694618264e2..9953b6b36cbcbfd1756bac478b568ca5700fc898 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -60,7 +60,7 @@ public class CraftBlockData implements BlockData { +@@ -61,7 +61,7 @@ public class CraftBlockData implements BlockData { @Override public Material getMaterial() { diff --git a/patches/server/0437-Add-getOfflinePlayerIfCached-String.patch b/patches/server/0437-Add-getOfflinePlayerIfCached-String.patch index 8965f3368d..7d32e46cbc 100644 --- a/patches/server/0437-Add-getOfflinePlayerIfCached-String.patch +++ b/patches/server/0437-Add-getOfflinePlayerIfCached-String.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String) diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 0c7a3f0c3ae063d6fa0f76000826ebc3a49f5532..1460060f2ff42ebaa7b2418b375ce661c73bd17f 100644 +index 52733657a1bc8529fa68faaa212ea9b78b094793..0a7eccd5d0bc6e2463f4e0f2fffad8f667d3e9a7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1932,6 +1932,28 @@ public final class CraftServer implements Server { +@@ -1933,6 +1933,28 @@ public final class CraftServer implements Server { return result; } diff --git a/patches/server/0440-Fix-client-lag-on-advancement-loading.patch b/patches/server/0440-Fix-client-lag-on-advancement-loading.patch index 07bc0e9c1c..a080a6665d 100644 --- a/patches/server/0440-Fix-client-lag-on-advancement-loading.patch +++ b/patches/server/0440-Fix-client-lag-on-advancement-loading.patch @@ -15,10 +15,10 @@ manually reload the advancement data for all players, which normally takes place as a part of the datapack reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 9b199fffb86cb04b9ad0013316a911ccf59d4051..a5e9000034444fb36864020453acb0b183272922 100644 +index 7c864d7d70accc7d52e2b198c30be7f6a2f4e813..336a245395f8802a1ed1d9e2f615effda85fc947 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -332,7 +332,13 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -336,7 +336,13 @@ public final class CraftMagicNumbers implements UnsafeValues { Bukkit.getLogger().log(Level.SEVERE, "Error saving advancement " + key, ex); } diff --git a/patches/server/0447-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/0447-Fix-Player-spawnParticle-x-y-z-precision-loss.patch index b837b1cf1f..204e3a83dd 100644 --- a/patches/server/0447-Fix-Player-spawnParticle-x-y-z-precision-loss.patch +++ b/patches/server/0447-Fix-Player-spawnParticle-x-y-z-precision-loss.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a52fab6dc676ed1949e3e7db31d2543a6f5d1eba..5550586022538be993a7b1d9f3d33c6785df73b5 100644 +index b614ee4e0e217f4adf45f45f53486376bee6533f..d04cf4eb55cf652d7ac7ae80b417b8cb592e75b7 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2682,7 +2682,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2679,7 +2679,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) { diff --git a/patches/server/0455-Limit-recipe-packets.patch b/patches/server/0455-Limit-recipe-packets.patch index 6ec29c0b17..ff56a355b5 100644 --- a/patches/server/0455-Limit-recipe-packets.patch +++ b/patches/server/0455-Limit-recipe-packets.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Limit recipe packets diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4f7c15bf80092d91038b42d91fcd6634375d4446..7ea22e99de646f439ae738354c1336b11a4c542f 100644 +index a1f17d1044d6ecb05c98af45e77f92229e377114..35c8aa3971de05be66acd49b6a0b76cba59f93ac 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -266,6 +266,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -24,7 +24,7 @@ index 4f7c15bf80092d91038b42d91fcd6634375d4446..7ea22e99de646f439ae738354c1336b1 /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -3057,6 +3059,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3053,6 +3055,14 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @Override public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) { diff --git a/patches/server/0477-Add-BlockFailedDispenseEvent.patch b/patches/server/0477-Add-BlockFailedDispenseEvent.patch index df51c962ab..b1c5648ed3 100644 --- a/patches/server/0477-Add-BlockFailedDispenseEvent.patch +++ b/patches/server/0477-Add-BlockFailedDispenseEvent.patch @@ -32,10 +32,10 @@ index e772b6f8f78ad1292b8fa268e8bb4001a38706c6..efa7cf50b5577f87a2dfa61b59bf8105 } else { ItemStack itemstack = tileentitydispenser.getItem(i); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 253563371aa05954c19607b98675e37450e772ef..13e4cb7af50b3a03523d84dd72ca6a122ca041ad 100644 +index e55dafab2f986e445d9499cecd346bc96673bc9c..b96b2f46a8a21d8e79516d13c06d9442cbca9905 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2034,4 +2034,12 @@ public class CraftEventFactory { +@@ -2036,4 +2036,12 @@ public class CraftEventFactory { return org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getPotion()); } // Paper end - WitchReadyPotionEvent diff --git a/patches/server/0485-Add-RegistryAccess-for-managing-Registries.patch b/patches/server/0485-Add-RegistryAccess-for-managing-Registries.patch index 04ed9f2f0e..a55a86910d 100644 --- a/patches/server/0485-Add-RegistryAccess-for-managing-Registries.patch +++ b/patches/server/0485-Add-RegistryAccess-for-managing-Registries.patch @@ -12,10 +12,10 @@ public net.minecraft.server.RegistryLayer STATIC_ACCESS diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java new file mode 100644 -index 0000000000000000000000000000000000000000..cc7d4924098eab9663cc52917e4b30d6ef4b02c7 +index 0000000000000000000000000000000000000000..4f4595356f2d17c261a84e13d37351f06433177b --- /dev/null +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java -@@ -0,0 +1,101 @@ +@@ -0,0 +1,108 @@ +package io.papermc.paper.registry; + +import io.papermc.paper.registry.entry.RegistryEntry; @@ -31,20 +31,25 @@ index 0000000000000000000000000000000000000000..cc7d4924098eab9663cc52917e4b30d6 +import org.bukkit.GameEvent; +import org.bukkit.Keyed; +import org.bukkit.MusicInstrument; ++import org.bukkit.block.BlockType; +import org.bukkit.craftbukkit.CraftGameEvent; +import org.bukkit.craftbukkit.CraftMusicInstrument; ++import org.bukkit.craftbukkit.block.CraftBlockType; +import org.bukkit.craftbukkit.damage.CraftDamageType; +import org.bukkit.craftbukkit.enchantments.CraftEnchantment; +import org.bukkit.craftbukkit.entity.CraftWolf; +import org.bukkit.craftbukkit.generator.structure.CraftStructure; +import org.bukkit.craftbukkit.generator.structure.CraftStructureType; ++import org.bukkit.craftbukkit.inventory.CraftItemType; +import org.bukkit.craftbukkit.inventory.trim.CraftTrimMaterial; +import org.bukkit.craftbukkit.inventory.trim.CraftTrimPattern; ++import org.bukkit.craftbukkit.legacy.FieldRename; +import org.bukkit.craftbukkit.potion.CraftPotionEffectType; +import org.bukkit.damage.DamageType; +import org.bukkit.entity.Wolf; +import org.bukkit.entity.memory.MemoryKey; +import org.bukkit.generator.structure.StructureType; ++import org.bukkit.inventory.ItemType; +import org.bukkit.inventory.meta.trim.TrimMaterial; +import org.bukkit.inventory.meta.trim.TrimPattern; +import org.bukkit.potion.PotionEffectType; @@ -64,11 +69,13 @@ index 0000000000000000000000000000000000000000..cc7d4924098eab9663cc52917e4b30d6 + static { + REGISTRY_ENTRIES = List.of( + // built-ins -+ entry(Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, Enchantment.class, CraftEnchantment::new), ++ entry(Registries.ENCHANTMENT, RegistryKey.ENCHANTMENT, Enchantment.class, CraftEnchantment::new).withSerializationUpdater(FieldRename.ENCHANTMENT_RENAME), + entry(Registries.GAME_EVENT, RegistryKey.GAME_EVENT, GameEvent.class, CraftGameEvent::new), + entry(Registries.INSTRUMENT, RegistryKey.INSTRUMENT, MusicInstrument.class, CraftMusicInstrument::new), + entry(Registries.MOB_EFFECT, RegistryKey.MOB_EFFECT, PotionEffectType.class, CraftPotionEffectType::new), + entry(Registries.STRUCTURE_TYPE, RegistryKey.STRUCTURE_TYPE, StructureType.class, CraftStructureType::new), ++ entry(Registries.BLOCK, RegistryKey.BLOCK, BlockType.class, CraftBlockType::new), ++ entry(Registries.ITEM, RegistryKey.ITEM, ItemType.class, CraftItemType::new), + + // data-drivens + entry(Registries.STRUCTURE, RegistryKey.STRUCTURE, Structure.class, CraftStructure::new).delayed(), @@ -368,10 +375,10 @@ index 0000000000000000000000000000000000000000..1be8a5feccd27779fcd8ebb2c362f17d +} diff --git a/src/main/java/io/papermc/paper/registry/entry/CraftRegistryEntry.java b/src/main/java/io/papermc/paper/registry/entry/CraftRegistryEntry.java new file mode 100644 -index 0000000000000000000000000000000000000000..d0023caafdb33d2f76bdd7bf6dfb3204069f52a0 +index 0000000000000000000000000000000000000000..46b2560de884ef381cb7fc8669cad8f5a1fa3645 --- /dev/null +++ b/src/main/java/io/papermc/paper/registry/entry/CraftRegistryEntry.java -@@ -0,0 +1,39 @@ +@@ -0,0 +1,49 @@ +package io.papermc.paper.registry.entry; + +import io.papermc.paper.registry.RegistryHolder; @@ -382,14 +389,18 @@ index 0000000000000000000000000000000000000000..d0023caafdb33d2f76bdd7bf6dfb3204 +import org.bukkit.Keyed; +import org.bukkit.NamespacedKey; +import org.bukkit.craftbukkit.CraftRegistry; ++import org.bukkit.craftbukkit.util.ApiVersion; +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.framework.qual.DefaultQualifier; + +@DefaultQualifier(NonNull.class) +public class CraftRegistryEntry extends BaseRegistryEntry> { // TODO remove Keyed + ++ private static final BiFunction EMPTY = (namespacedKey, apiVersion) -> namespacedKey; ++ + protected final Class classToPreload; + protected final BiFunction minecraftToBukkit; ++ private BiFunction updater = EMPTY; + + protected CraftRegistryEntry( + final ResourceKey> mcKey, @@ -403,20 +414,26 @@ index 0000000000000000000000000000000000000000..d0023caafdb33d2f76bdd7bf6dfb3204 + } + + @Override ++ public RegistryEntry> withSerializationUpdater(final BiFunction updater) { ++ this.updater = updater; ++ return this; ++ } ++ ++ @Override + public RegistryHolder createRegistryHolder(final Registry nmsRegistry) { + return new RegistryHolder.Memoized<>(() -> this.createApiRegistry(nmsRegistry)); + } + + private CraftRegistry createApiRegistry(final Registry nmsRegistry) { -+ return new CraftRegistry<>(this.classToPreload, nmsRegistry, this.minecraftToBukkit); ++ return new CraftRegistry<>(this.classToPreload, nmsRegistry, this.minecraftToBukkit, this.updater); + } +} diff --git a/src/main/java/io/papermc/paper/registry/entry/RegistryEntry.java b/src/main/java/io/papermc/paper/registry/entry/RegistryEntry.java new file mode 100644 -index 0000000000000000000000000000000000000000..3ca3938267bea86df1077c0ebeb8859a634cd042 +index 0000000000000000000000000000000000000000..c97bda87742852c921d73f4886721f1ee56b0a85 --- /dev/null +++ b/src/main/java/io/papermc/paper/registry/entry/RegistryEntry.java -@@ -0,0 +1,47 @@ +@@ -0,0 +1,52 @@ +package io.papermc.paper.registry.entry; + +import io.papermc.paper.registry.RegistryHolder; @@ -429,6 +446,7 @@ index 0000000000000000000000000000000000000000..3ca3938267bea86df1077c0ebeb8859a +import org.bukkit.Keyed; +import org.bukkit.NamespacedKey; +import org.bukkit.craftbukkit.CraftRegistry; ++import org.bukkit.craftbukkit.util.ApiVersion; +import org.checkerframework.checker.nullness.qual.NonNull; +import org.checkerframework.framework.qual.DefaultQualifier; + @@ -437,6 +455,10 @@ index 0000000000000000000000000000000000000000..3ca3938267bea86df1077c0ebeb8859a + + RegistryHolder createRegistryHolder(Registry nmsRegistry); + ++ default RegistryEntry withSerializationUpdater(final BiFunction updater) { ++ return this; ++ } ++ + /** + * This should only be used if the registry instance needs to exist early due to the need + * to populate a field in {@link org.bukkit.Registry}. Data-driven registries shouldn't exist @@ -673,10 +695,10 @@ index cf08819dd7ef6db807053a52aaf66a7fdea18ab6..69682d7be64a2163d574de939f5146f5 SimpleJsonResourceReloadListener.scanDirectory(resourceManager, type.directory(), GSON, map); map.forEach( diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -index 4209a45af2bfe772f678b07b49070522de4195a8..e2fcbeb8635280fcd2aeedff9803386c9bcabb0c 100644 +index 7c1304b42c6692cf66613fb2cf851b9df17f21e5..0b19ddf411933240f3cdc6b4e9ce3817c8d45af1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -@@ -100,55 +100,15 @@ public class CraftRegistry implements Registry { +@@ -111,57 +111,12 @@ public class CraftRegistry implements Registry { + ", this can happen if a plugin creates its own registry entry with out properly registering it."); } @@ -687,59 +709,90 @@ index 4209a45af2bfe772f678b07b49070522de4195a8..e2fcbeb8635280fcd2aeedff9803386c - * @param registryHolder the minecraft registry holder - * @return the bukkit registry of the provided class - */ -- public static Registry createRegistry(Class bukkitClass, RegistryAccess registryHolder) { +- public static Registry createRegistry(Class bukkitClass, RegistryAccess registryHolder) { - if (bukkitClass == Enchantment.class) { -- return new CraftRegistry<>(Enchantment.class, registryHolder.registryOrThrow(Registries.ENCHANTMENT), CraftEnchantment::new); +- return new CraftRegistry<>(Enchantment.class, registryHolder.registryOrThrow(Registries.ENCHANTMENT), CraftEnchantment::new, FieldRename.ENCHANTMENT_RENAME); - } - if (bukkitClass == GameEvent.class) { -- return new CraftRegistry<>(GameEvent.class, registryHolder.registryOrThrow(Registries.GAME_EVENT), CraftGameEvent::new); +- return new CraftRegistry<>(GameEvent.class, registryHolder.registryOrThrow(Registries.GAME_EVENT), CraftGameEvent::new, CraftRegistry.NONE); - } - if (bukkitClass == MusicInstrument.class) { -- return new CraftRegistry<>(MusicInstrument.class, registryHolder.registryOrThrow(Registries.INSTRUMENT), CraftMusicInstrument::new); +- return new CraftRegistry<>(MusicInstrument.class, registryHolder.registryOrThrow(Registries.INSTRUMENT), CraftMusicInstrument::new, CraftRegistry.NONE); - } - if (bukkitClass == PotionEffectType.class) { -- return new CraftRegistry<>(PotionEffectType.class, registryHolder.registryOrThrow(Registries.MOB_EFFECT), CraftPotionEffectType::new); +- return new CraftRegistry<>(PotionEffectType.class, registryHolder.registryOrThrow(Registries.MOB_EFFECT), CraftPotionEffectType::new, CraftRegistry.NONE); - } - if (bukkitClass == Structure.class) { -- return new CraftRegistry<>(Structure.class, registryHolder.registryOrThrow(Registries.STRUCTURE), CraftStructure::new); +- return new CraftRegistry<>(Structure.class, registryHolder.registryOrThrow(Registries.STRUCTURE), CraftStructure::new, CraftRegistry.NONE); - } - if (bukkitClass == StructureType.class) { -- return new CraftRegistry<>(StructureType.class, BuiltInRegistries.STRUCTURE_TYPE, CraftStructureType::new); +- return new CraftRegistry<>(StructureType.class, BuiltInRegistries.STRUCTURE_TYPE, CraftStructureType::new, CraftRegistry.NONE); - } - if (bukkitClass == TrimMaterial.class) { -- return new CraftRegistry<>(TrimMaterial.class, registryHolder.registryOrThrow(Registries.TRIM_MATERIAL), CraftTrimMaterial::new); +- return new CraftRegistry<>(TrimMaterial.class, registryHolder.registryOrThrow(Registries.TRIM_MATERIAL), CraftTrimMaterial::new, CraftRegistry.NONE); - } - if (bukkitClass == TrimPattern.class) { -- return new CraftRegistry<>(TrimPattern.class, registryHolder.registryOrThrow(Registries.TRIM_PATTERN), CraftTrimPattern::new); +- return new CraftRegistry<>(TrimPattern.class, registryHolder.registryOrThrow(Registries.TRIM_PATTERN), CraftTrimPattern::new, CraftRegistry.NONE); - } - if (bukkitClass == DamageType.class) { -- return new CraftRegistry<>(DamageType.class, registryHolder.registryOrThrow(Registries.DAMAGE_TYPE), CraftDamageType::new); +- return new CraftRegistry<>(DamageType.class, registryHolder.registryOrThrow(Registries.DAMAGE_TYPE), CraftDamageType::new, CraftRegistry.NONE); - } - if (bukkitClass == Wolf.Variant.class) { -- return new CraftRegistry<>(Wolf.Variant.class, registryHolder.registryOrThrow(Registries.WOLF_VARIANT), CraftWolf.CraftVariant::new); +- return new CraftRegistry<>(Wolf.Variant.class, registryHolder.registryOrThrow(Registries.WOLF_VARIANT), CraftWolf.CraftVariant::new, CraftRegistry.NONE); +- } +- if (bukkitClass == BlockType.class) { +- return new CraftRegistry<>(BlockType.class, registryHolder.registryOrThrow(Registries.BLOCK), CraftBlockType::new, CraftRegistry.NONE); +- } +- if (bukkitClass == ItemType.class) { +- return new CraftRegistry<>(ItemType.class, registryHolder.registryOrThrow(Registries.ITEM), CraftItemType::new, CraftRegistry.NONE); - } - - return null; - } + // Paper - move to PaperRegistries ++ // Paper - NOTE: As long as all uses of the method below relate to *serialization* via ConfigurationSerializable, it's fine + public static B get(Registry bukkit, NamespacedKey namespacedKey, ApiVersion apiVersion) { + if (bukkit instanceof CraftRegistry craft) { +- return craft.get(namespacedKey, apiVersion); ++ return craft.get(craft.serializationUpdater.apply(namespacedKey, apiVersion)); // Paper + } + + if (bukkit instanceof Registry.SimpleRegistry simple) { +@@ -187,23 +142,21 @@ public class CraftRegistry implements Registry { + return bukkit.get(namespacedKey); + } + - private final Class bukkitClass; + private final Class bukkitClass; // Paper - relax preload class private final Map cache = new HashMap<>(); private final net.minecraft.core.Registry minecraftRegistry; private final BiFunction minecraftToBukkit; +- private final BiFunction updater; ++ private final BiFunction serializationUpdater; // Paper - rename to make it *clear* what it is *only* for private boolean init; -- public CraftRegistry(Class bukkitClass, net.minecraft.core.Registry minecraftRegistry, BiFunction minecraftToBukkit) { -+ public CraftRegistry(Class bukkitClass, net.minecraft.core.Registry minecraftRegistry, BiFunction minecraftToBukkit) { // Paper - relax preload class +- public CraftRegistry(Class bukkitClass, net.minecraft.core.Registry minecraftRegistry, BiFunction minecraftToBukkit, BiFunction updater) { ++ public CraftRegistry(Class bukkitClass, net.minecraft.core.Registry minecraftRegistry, BiFunction minecraftToBukkit, BiFunction serializationUpdater) { // Paper - relax preload class this.bukkitClass = bukkitClass; this.minecraftRegistry = minecraftRegistry; this.minecraftToBukkit = minecraftToBukkit; +- this.updater = updater; ++ this.serializationUpdater = serializationUpdater; + } + +- public B get(NamespacedKey namespacedKey, ApiVersion apiVersion) { +- return this.get(this.updater.apply(namespacedKey, apiVersion)); +- } ++ // Paper - inline into CraftRegistry#get(Registry, NamespacedKey, ApiVersion) above + + @Override + public B get(NamespacedKey namespacedKey) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1460060f2ff42ebaa7b2418b375ce661c73bd17f..2c89ba2b518618640064ebea22d3d9595407bad7 100644 +index a25fd6ad9438bd80a9acc21d694d9e9129f4a897..85bad6c85c1662a0693765e235d3b5736cb3a553 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -283,7 +283,7 @@ public final class CraftServer implements Server { +@@ -284,7 +284,7 @@ public final class CraftServer implements Server { protected final DedicatedServer console; protected final DedicatedPlayerList playerList; private final Map worlds = new LinkedHashMap(); @@ -748,7 +801,7 @@ index 1460060f2ff42ebaa7b2418b375ce661c73bd17f..2c89ba2b518618640064ebea22d3d959 private YamlConfiguration configuration; private YamlConfiguration commandsConfiguration; private final Yaml yaml = new Yaml(new SafeConstructor(new LoaderOptions())); -@@ -2693,7 +2693,7 @@ public final class CraftServer implements Server { +@@ -2694,7 +2694,7 @@ public final class CraftServer implements Server { @Override public Registry getRegistry(Class aClass) { @@ -757,6 +810,28 @@ index 1460060f2ff42ebaa7b2418b375ce661c73bd17f..2c89ba2b518618640064ebea22d3d959 } @Deprecated +diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java +index d3c9b5b6651be7474f91c99fd31140f9641e579b..43d9f70769be4be6c07b0a3d689e43e9f6805a19 100644 +--- a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java ++++ b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java +@@ -53,10 +53,13 @@ public class FieldRename { + return Enum.valueOf(enumClass, FieldRename.rename(apiVersion, enumClass.getName().replace('.', '/'), name)); + } + +- public static T get(Registry registry, NamespacedKey namespacedKey) { +- // We don't have version-specific changes, so just use current, and don't inject a version +- return CraftRegistry.get(registry, namespacedKey, ApiVersion.CURRENT); +- } ++ // Paper start - absolutely not, having this as an expectation for plugin developers opens a huge ++ // can of worms in the future, especially if mojang comes back and reuses some old key ++ // public static T get(Registry registry, NamespacedKey namespacedKey) { ++ // // We don't have version-specific changes, so just use current, and don't inject a version ++ // return CraftRegistry.get(registry, namespacedKey, ApiVersion.CURRENT); ++ // } ++ // Paper end + + // PatternType + private static final FieldRenameData PATTERN_TYPE_DATA = FieldRenameData.Builder.newBuilder() diff --git a/src/main/resources/META-INF/services/io.papermc.paper.registry.RegistryAccess b/src/main/resources/META-INF/services/io.papermc.paper.registry.RegistryAccess new file mode 100644 index 0000000000000000000000000000000000000000..8a083d45004f82fc9c51c219fb20f34624adb501 @@ -852,10 +927,10 @@ index 4adaafafb7140e983a4e90f0ff0deaaf0887a9a5..0dd775ad1bd0bf9ba7ea05255d543a9d if (!loadedRegistries.remove(clazz)) { notFound.add(clazz); diff --git a/src/test/java/org/bukkit/registry/RegistryConversionTest.java b/src/test/java/org/bukkit/registry/RegistryConversionTest.java -index 8c6b7f9804cf56269cc5a1b5924db2d2bf556f88..782c2ce424fc124e18145615187dc1e9d33f80ae 100644 +index e48536683889cdea197746c55b0e67e7e4b9dc68..3216a3549011659a91cc4a0c656a56cdf4e45504 100644 --- a/src/test/java/org/bukkit/registry/RegistryConversionTest.java +++ b/src/test/java/org/bukkit/registry/RegistryConversionTest.java -@@ -37,9 +37,9 @@ public class RegistryConversionTest extends AbstractTestingBase { +@@ -40,9 +40,9 @@ public class RegistryConversionTest extends AbstractTestingBase { @Order(1) @RegistriesTest @@ -867,26 +942,26 @@ index 8c6b7f9804cf56269cc5a1b5924db2d2bf556f88..782c2ce424fc124e18145615187dc1e9 for (Keyed item : registry) { if (!(item instanceof Handleable)) { -@@ -59,7 +59,7 @@ public class RegistryConversionTest extends AbstractTestingBase { +@@ -62,7 +62,7 @@ public class RegistryConversionTest extends AbstractTestingBase { @Order(2) @RegistriesTest - public void testMinecraftToBukkitPresent(Class clazz, ResourceKey> registryKey, -+ public void testMinecraftToBukkitPresent(io.papermc.paper.registry.RegistryKey type, Class clazz, ResourceKey> registryKey, // Paper - Class craftClazz, Class minecraftClazz) { ++ public void testMinecraftToBukkitPresent(io.papermc.paper.registry.RegistryKey type, Class clazz, ResourceKey> registryKey, + Class craftClazz, Class minecraftClazz, boolean newMethod) { + String methodName = (newMethod) ? RegistryConversionTest.MINECRAFT_TO_BUKKIT_NEW : RegistryConversionTest.MINECRAFT_TO_BUKKIT; Method method = null; - try { -@@ -107,7 +107,7 @@ public class RegistryConversionTest extends AbstractTestingBase { +@@ -111,7 +111,7 @@ public class RegistryConversionTest extends AbstractTestingBase { @Order(2) @RegistriesTest - public void testBukkitToMinecraftPresent(Class clazz, ResourceKey> registryKey, -+ public void testBukkitToMinecraftPresent(io.papermc.paper.registry.RegistryKey type, Class clazz, ResourceKey> registryKey, // Paper - Class craftClazz, Class minecraftClazz) { ++ public void testBukkitToMinecraftPresent(io.papermc.paper.registry.RegistryKey type, Class clazz, ResourceKey> registryKey, + Class craftClazz, Class minecraftClazz, boolean newMethod) { + String methodName = (newMethod) ? RegistryConversionTest.BUKKIT_TO_MINECRAFT_NEW : RegistryConversionTest.BUKKIT_TO_MINECRAFT; Method method = null; - try { -@@ -153,9 +153,9 @@ public class RegistryConversionTest extends AbstractTestingBase { - """, minecraftClazz.getName(), clazz.getSimpleName()); +@@ -158,9 +158,9 @@ public class RegistryConversionTest extends AbstractTestingBase { + """, minecraftClazz.getName(), methodName, clazz.getSimpleName()); } - @Order(2) @@ -897,7 +972,7 @@ index 8c6b7f9804cf56269cc5a1b5924db2d2bf556f88..782c2ce424fc124e18145615187dc1e9 this.checkValidMinecraftToBukkit(clazz); try { -@@ -174,7 +174,7 @@ public class RegistryConversionTest extends AbstractTestingBase { +@@ -179,7 +179,7 @@ public class RegistryConversionTest extends AbstractTestingBase { @Order(3) @RegistriesTest @@ -906,7 +981,7 @@ index 8c6b7f9804cf56269cc5a1b5924db2d2bf556f88..782c2ce424fc124e18145615187dc1e9 this.checkValidBukkitToMinecraft(clazz); try { -@@ -193,14 +193,14 @@ public class RegistryConversionTest extends AbstractTestingBase { +@@ -198,14 +198,14 @@ public class RegistryConversionTest extends AbstractTestingBase { @Order(3) @RegistriesTest @@ -923,7 +998,7 @@ index 8c6b7f9804cf56269cc5a1b5924db2d2bf556f88..782c2ce424fc124e18145615187dc1e9 Keyed bukkit = (Keyed) arguments[0]; Object minecraft = arguments[1]; -@@ -224,14 +224,14 @@ public class RegistryConversionTest extends AbstractTestingBase { +@@ -229,14 +229,14 @@ public class RegistryConversionTest extends AbstractTestingBase { @Order(3) @RegistriesTest @@ -940,7 +1015,7 @@ index 8c6b7f9804cf56269cc5a1b5924db2d2bf556f88..782c2ce424fc124e18145615187dc1e9 Keyed bukkit = (Keyed) arguments[0]; Object minecraft = arguments[1]; -@@ -259,7 +259,7 @@ public class RegistryConversionTest extends AbstractTestingBase { +@@ -264,7 +264,7 @@ public class RegistryConversionTest extends AbstractTestingBase { */ @Order(3) @RegistriesTest @@ -950,7 +1025,7 @@ index 8c6b7f9804cf56269cc5a1b5924db2d2bf556f88..782c2ce424fc124e18145615187dc1e9 this.checkValidMinecraftToBukkit(clazz); diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java -index 7a4681155f740a98ecafa0b992eae1fb5524551f..bd56792fc674c4e3606a3179ebf5a84ef0a4e35c 100644 +index c94dae13e8edfdb0adf73a5b3fda4eb1bc97f4bc..f8e363e9c10e30598185a91cbb5cafc00b79ad3d 100644 --- a/src/test/java/org/bukkit/support/DummyServer.java +++ b/src/test/java/org/bukkit/support/DummyServer.java @@ -45,10 +45,7 @@ public final class DummyServer { @@ -966,7 +1041,7 @@ index 7a4681155f740a98ecafa0b992eae1fb5524551f..bd56792fc674c4e3606a3179ebf5a84e // Paper start - testing additions final Thread currentThread = Thread.currentThread(); diff --git a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java -index 342ea2914b361f39708bf0d8a39385c62d340c30..69a6a8419947a0617405e8931193f88d0dc5c3c4 100644 +index d57713c3f995e6b381f2a31ab7e93b073d42222d..24f01242513d6c815f60599d7118fe12bc577804 100644 --- a/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java +++ b/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java @@ -1,6 +1,7 @@ @@ -977,31 +1052,49 @@ index 342ea2914b361f39708bf0d8a39385c62d340c30..69a6a8419947a0617405e8931193f88d import java.util.List; import java.util.stream.Stream; import net.minecraft.core.registries.Registries; -@@ -37,16 +38,17 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { +@@ -41,28 +42,28 @@ public class RegistriesArgumentProvider implements ArgumentsProvider { + private static final List DATA = Lists.newArrayList(); static { - // Order: Bukkit class, Minecraft Registry key, CraftBukkit class, Minecraft class -- DATA.add(Arguments.of(Enchantment.class, Registries.ENCHANTMENT, CraftEnchantment.class, net.minecraft.world.item.enchantment.Enchantment.class)); -- DATA.add(Arguments.of(GameEvent.class, Registries.GAME_EVENT, CraftGameEvent.class, net.minecraft.world.level.gameevent.GameEvent.class)); -- DATA.add(Arguments.of(MusicInstrument.class, Registries.INSTRUMENT, CraftMusicInstrument.class, Instrument.class)); -- DATA.add(Arguments.of(PotionEffectType.class, Registries.MOB_EFFECT, CraftPotionEffectType.class, MobEffect.class)); -- DATA.add(Arguments.of(Structure.class, Registries.STRUCTURE, CraftStructure.class, net.minecraft.world.level.levelgen.structure.Structure.class)); -- DATA.add(Arguments.of(StructureType.class, Registries.STRUCTURE_TYPE, CraftStructureType.class, net.minecraft.world.level.levelgen.structure.StructureType.class)); -- DATA.add(Arguments.of(TrimMaterial.class, Registries.TRIM_MATERIAL, CraftTrimMaterial.class, net.minecraft.world.item.armortrim.TrimMaterial.class)); -- DATA.add(Arguments.of(TrimPattern.class, Registries.TRIM_PATTERN, CraftTrimPattern.class, net.minecraft.world.item.armortrim.TrimPattern.class)); -- DATA.add(Arguments.of(DamageType.class, Registries.DAMAGE_TYPE, CraftDamageType.class, net.minecraft.world.damagesource.DamageType.class)); -- DATA.add(Arguments.of(Wolf.Variant.class, Registries.WOLF_VARIANT, CraftWolf.CraftVariant.class, WolfVariant.class)); +- // Order: Bukkit class, Minecraft Registry key, CraftBukkit class, Minecraft class +- register(Enchantment.class, Registries.ENCHANTMENT, CraftEnchantment.class, net.minecraft.world.item.enchantment.Enchantment.class); +- register(GameEvent.class, Registries.GAME_EVENT, CraftGameEvent.class, net.minecraft.world.level.gameevent.GameEvent.class); +- register(MusicInstrument.class, Registries.INSTRUMENT, CraftMusicInstrument.class, Instrument.class); +- register(PotionEffectType.class, Registries.MOB_EFFECT, CraftPotionEffectType.class, MobEffect.class); +- register(Structure.class, Registries.STRUCTURE, CraftStructure.class, net.minecraft.world.level.levelgen.structure.Structure.class); +- register(StructureType.class, Registries.STRUCTURE_TYPE, CraftStructureType.class, net.minecraft.world.level.levelgen.structure.StructureType.class); +- register(TrimMaterial.class, Registries.TRIM_MATERIAL, CraftTrimMaterial.class, net.minecraft.world.item.armortrim.TrimMaterial.class); +- register(TrimPattern.class, Registries.TRIM_PATTERN, CraftTrimPattern.class, net.minecraft.world.item.armortrim.TrimPattern.class); +- register(DamageType.class, Registries.DAMAGE_TYPE, CraftDamageType.class, net.minecraft.world.damagesource.DamageType.class); +- register(Wolf.Variant.class, Registries.WOLF_VARIANT, CraftWolf.CraftVariant.class, WolfVariant.class); +- register(ItemType.class, Registries.ITEM, CraftItemType.class, net.minecraft.world.item.Item.class, true); +- register(BlockType.class, Registries.BLOCK, CraftBlockType.class, net.minecraft.world.level.block.Block.class, true); + // Order: RegistryKey, Bukkit class, Minecraft Registry key, CraftBukkit class, Minecraft class -+ DATA.add(Arguments.of(RegistryKey.ENCHANTMENT, Enchantment.class, Registries.ENCHANTMENT, CraftEnchantment.class, net.minecraft.world.item.enchantment.Enchantment.class)); -+ DATA.add(Arguments.of(RegistryKey.GAME_EVENT, GameEvent.class, Registries.GAME_EVENT, CraftGameEvent.class, net.minecraft.world.level.gameevent.GameEvent.class)); -+ DATA.add(Arguments.of(RegistryKey.INSTRUMENT, MusicInstrument.class, Registries.INSTRUMENT, CraftMusicInstrument.class, Instrument.class)); -+ DATA.add(Arguments.of(RegistryKey.MOB_EFFECT, PotionEffectType.class, Registries.MOB_EFFECT, CraftPotionEffectType.class, MobEffect.class)); -+ DATA.add(Arguments.of(RegistryKey.STRUCTURE, Structure.class, Registries.STRUCTURE, CraftStructure.class, net.minecraft.world.level.levelgen.structure.Structure.class)); -+ DATA.add(Arguments.of(RegistryKey.STRUCTURE_TYPE, StructureType.class, Registries.STRUCTURE_TYPE, CraftStructureType.class, net.minecraft.world.level.levelgen.structure.StructureType.class)); -+ DATA.add(Arguments.of(RegistryKey.TRIM_MATERIAL, TrimMaterial.class, Registries.TRIM_MATERIAL, CraftTrimMaterial.class, net.minecraft.world.item.armortrim.TrimMaterial.class)); -+ DATA.add(Arguments.of(RegistryKey.TRIM_PATTERN, TrimPattern.class, Registries.TRIM_PATTERN, CraftTrimPattern.class, net.minecraft.world.item.armortrim.TrimPattern.class)); -+ DATA.add(Arguments.of(RegistryKey.DAMAGE_TYPE, DamageType.class, Registries.DAMAGE_TYPE, CraftDamageType.class, net.minecraft.world.damagesource.DamageType.class)); -+ DATA.add(Arguments.of(RegistryKey.WOLF_VARIANT, Wolf.Variant.class, Registries.WOLF_VARIANT, CraftWolf.CraftVariant.class, net.minecraft.world.entity.animal.WolfVariant.class)); ++ register(RegistryKey.ENCHANTMENT, Enchantment.class, Registries.ENCHANTMENT, CraftEnchantment.class, net.minecraft.world.item.enchantment.Enchantment.class); ++ register(RegistryKey.GAME_EVENT, GameEvent.class, Registries.GAME_EVENT, CraftGameEvent.class, net.minecraft.world.level.gameevent.GameEvent.class); ++ register(RegistryKey.INSTRUMENT, MusicInstrument.class, Registries.INSTRUMENT, CraftMusicInstrument.class, Instrument.class); ++ register(RegistryKey.MOB_EFFECT, PotionEffectType.class, Registries.MOB_EFFECT, CraftPotionEffectType.class, MobEffect.class); ++ register(RegistryKey.STRUCTURE, Structure.class, Registries.STRUCTURE, CraftStructure.class, net.minecraft.world.level.levelgen.structure.Structure.class); ++ register(RegistryKey.STRUCTURE_TYPE, StructureType.class, Registries.STRUCTURE_TYPE, CraftStructureType.class, net.minecraft.world.level.levelgen.structure.StructureType.class); ++ register(RegistryKey.TRIM_MATERIAL, TrimMaterial.class, Registries.TRIM_MATERIAL, CraftTrimMaterial.class, net.minecraft.world.item.armortrim.TrimMaterial.class); ++ register(RegistryKey.TRIM_PATTERN, TrimPattern.class, Registries.TRIM_PATTERN, CraftTrimPattern.class, net.minecraft.world.item.armortrim.TrimPattern.class); ++ register(RegistryKey.DAMAGE_TYPE, DamageType.class, Registries.DAMAGE_TYPE, CraftDamageType.class, net.minecraft.world.damagesource.DamageType.class); ++ register(RegistryKey.WOLF_VARIANT, Wolf.Variant.class, Registries.WOLF_VARIANT, CraftWolf.CraftVariant.class, WolfVariant.class); ++ register(RegistryKey.ITEM, ItemType.class, Registries.ITEM, CraftItemType.class, net.minecraft.world.item.Item.class, true); ++ register(RegistryKey.BLOCK, BlockType.class, Registries.BLOCK, CraftBlockType.class, net.minecraft.world.level.block.Block.class, true); + + } + +- private static void register(Class bukkit, ResourceKey registry, Class craft, Class minecraft) { +- RegistriesArgumentProvider.register(bukkit, registry, craft, minecraft, false); ++ private static void register(RegistryKey registryKey, Class bukkit, ResourceKey registry, Class craft, Class minecraft) { // Paper ++ RegistriesArgumentProvider.register(registryKey, bukkit, registry, craft, minecraft, false); + } + +- private static void register(Class bukkit, ResourceKey registry, Class craft, Class minecraft, boolean newClass) { +- RegistriesArgumentProvider.DATA.add(Arguments.of(bukkit, registry, craft, minecraft, newClass)); ++ private static void register(RegistryKey registryKey, Class bukkit, ResourceKey registry, Class craft, Class minecraft, boolean newClass) { // Paper ++ RegistriesArgumentProvider.DATA.add(Arguments.of(registryKey, bukkit, registry, craft, minecraft, newClass)); } @Override diff --git a/patches/server/0486-Add-StructuresLocateEvent.patch b/patches/server/0486-Add-StructuresLocateEvent.patch index 23f1bd4d51..82cdf051db 100644 --- a/patches/server/0486-Add-StructuresLocateEvent.patch +++ b/patches/server/0486-Add-StructuresLocateEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add StructuresLocateEvent Co-authored-by: Jake Potrebic diff --git a/src/main/java/io/papermc/paper/registry/PaperRegistries.java b/src/main/java/io/papermc/paper/registry/PaperRegistries.java -index cc7d4924098eab9663cc52917e4b30d6ef4b02c7..183e168afcc4302bc1e3274a89835f1f60e4bbd6 100644 +index 4f4595356f2d17c261a84e13d37351f06433177b..3aa5aec0b17cbdff922009b940d49bb06945c2c6 100644 --- a/src/main/java/io/papermc/paper/registry/PaperRegistries.java +++ b/src/main/java/io/papermc/paper/registry/PaperRegistries.java -@@ -40,6 +40,12 @@ import static io.papermc.paper.registry.entry.RegistryEntry.entry; +@@ -45,6 +45,12 @@ import static io.papermc.paper.registry.entry.RegistryEntry.entry; @DefaultQualifier(NonNull.class) public final class PaperRegistries { diff --git a/patches/server/0492-Add-BlockPreDispenseEvent.patch b/patches/server/0492-Add-BlockPreDispenseEvent.patch index 2f1b97fbfa..3157a918d0 100644 --- a/patches/server/0492-Add-BlockPreDispenseEvent.patch +++ b/patches/server/0492-Add-BlockPreDispenseEvent.patch @@ -29,10 +29,10 @@ index efa7cf50b5577f87a2dfa61b59bf81052794fbf1..b4a742e8c513e458b34c216d1e907b47 } else { // CraftBukkit start - Fire event when pushing items into other inventories diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 13e4cb7af50b3a03523d84dd72ca6a122ca041ad..e6bb82928af3378847722421ce3bad7f5b994890 100644 +index b96b2f46a8a21d8e79516d13c06d9442cbca9905..a7b88ce35d0de3019348a01eb84a2bd00aee24a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2041,5 +2041,11 @@ public class CraftEventFactory { +@@ -2043,5 +2043,11 @@ public class CraftEventFactory { io.papermc.paper.event.block.BlockFailedDispenseEvent event = new io.papermc.paper.event.block.BlockFailedDispenseEvent(block); return event.callEvent(); } diff --git a/patches/server/0496-Expand-EntityUnleashEvent.patch b/patches/server/0496-Expand-EntityUnleashEvent.patch index 06754053fc..1a84331347 100644 --- a/patches/server/0496-Expand-EntityUnleashEvent.patch +++ b/patches/server/0496-Expand-EntityUnleashEvent.patch @@ -122,10 +122,10 @@ index dfb0db42e335fd7334b752ac62f8adb7bffbb2ef..65d140a3e3c42763ce4d162f8c9f5b9d flag1 = true; } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index e6bb82928af3378847722421ce3bad7f5b994890..dadb4f13ec6b9915108603aa34d4112c47337c44 100644 +index a7b88ce35d0de3019348a01eb84a2bd00aee24a1..0c2e8921d1048cb138a48215853c04c5d73f3514 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1565,8 +1565,10 @@ public class CraftEventFactory { +@@ -1567,8 +1567,10 @@ public class CraftEventFactory { Bukkit.getPluginManager().callEvent(new PlayerRecipeBookSettingsChangeEvent(player.getBukkitEntity(), bukkitType, open, filter)); } diff --git a/patches/server/0515-Expand-world-key-API.patch b/patches/server/0515-Expand-world-key-API.patch index 10d9e10a3c..4822c7f48e 100644 --- a/patches/server/0515-Expand-world-key-API.patch +++ b/patches/server/0515-Expand-world-key-API.patch @@ -20,10 +20,10 @@ index 9801f78f1d44fd5a72fbdb319681b683e8fb85c4..1e720b96f0367652db6924b8654deaa9 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 1460060f2ff42ebaa7b2418b375ce661c73bd17f..b9180b7552796331d09c3aef1e863a253180721d 100644 +index ab9c9f62da229faadddd68560db41d9f5e46689d..31602e41b9c5370f583cc8a22f15a4e999b58830 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1149,9 +1149,15 @@ public final class CraftServer implements Server { +@@ -1150,9 +1150,15 @@ public final class CraftServer implements Server { File folder = new File(this.getWorldContainer(), name); World world = this.getWorld(name); @@ -41,7 +41,7 @@ index 1460060f2ff42ebaa7b2418b375ce661c73bd17f..b9180b7552796331d09c3aef1e863a25 if (folder.exists()) { Preconditions.checkArgument(folder.isDirectory(), "File (%s) exists and isn't a folder", name); -@@ -1277,7 +1283,7 @@ public final class CraftServer implements Server { +@@ -1278,7 +1284,7 @@ public final class CraftServer implements Server { } else if (name.equals(levelName + "_the_end")) { worldKey = net.minecraft.world.level.Level.END; } else { @@ -50,7 +50,7 @@ index 1460060f2ff42ebaa7b2418b375ce661c73bd17f..b9180b7552796331d09c3aef1e863a25 } // If set to not keep spawn in memory (changed from default) then adjust rule accordingly -@@ -1373,6 +1379,15 @@ public final class CraftServer implements Server { +@@ -1374,6 +1380,15 @@ public final class CraftServer implements Server { return null; } @@ -67,10 +67,10 @@ index 1460060f2ff42ebaa7b2418b375ce661c73bd17f..b9180b7552796331d09c3aef1e863a25 // Check if a World already exists with the UID. if (this.getWorld(world.getUID()) != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index a5e9000034444fb36864020453acb0b183272922..a847717c0da236ee9743773eed3f2a3f1a8b10a6 100644 +index 336a245395f8802a1ed1d9e2f615effda85fc947..dc9742e553632cdc760ba1b392f60643a025a922 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -536,6 +536,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -540,6 +540,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public int nextEntityId() { return net.minecraft.world.entity.Entity.nextEntityId(); } @@ -81,4 +81,4 @@ index a5e9000034444fb36864020453acb0b183272922..a847717c0da236ee9743773eed3f2a3f + } // Paper end - /** + @Override diff --git a/patches/server/0520-Expose-protocol-version.patch b/patches/server/0520-Expose-protocol-version.patch index d61ca6ccaf..3b666949c8 100644 --- a/patches/server/0520-Expose-protocol-version.patch +++ b/patches/server/0520-Expose-protocol-version.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index a847717c0da236ee9743773eed3f2a3f1a8b10a6..dd28ead9b0d7cea53e7cf952ec1e2ca594efe0bb 100644 +index dc9742e553632cdc760ba1b392f60643a025a922..12446063a6c0f6c6f15a6a6500e76a99f5214001 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -541,6 +541,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -545,6 +545,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public String getMainLevelName() { return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName; } @@ -19,4 +19,4 @@ index a847717c0da236ee9743773eed3f2a3f1a8b10a6..dd28ead9b0d7cea53e7cf952ec1e2ca5 + } // Paper end - /** + @Override diff --git a/patches/server/0534-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch b/patches/server/0534-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch index 8fa5c39562..26cdea3136 100644 --- a/patches/server/0534-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch +++ b/patches/server/0534-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expand PlayerRespawnEvent, fix passed parameter issues Co-authored-by: Jake Potrebic diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 58853de5fda01114ddc7196c632d4daf5b59b6ce..04dd8964a1e9ea2a14589b811fd9938249f94f82 100644 +index 22da7f7c4b033d31b7a71878e34562a4370a4bd4..c8124bf451f5d03374f32a04b9b28fc9d97897ae 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2710,7 +2710,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2706,7 +2706,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl case PERFORM_RESPAWN: if (this.player.wonGame) { this.player.wonGame = false; diff --git a/patches/server/0541-Add-HiddenPotionEffect-API.patch b/patches/server/0541-Add-HiddenPotionEffect-API.patch index 724bbc9ff5..2d0b0d5b03 100644 --- a/patches/server/0541-Add-HiddenPotionEffect-API.patch +++ b/patches/server/0541-Add-HiddenPotionEffect-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Add HiddenPotionEffect API public net.minecraft.world.effect.MobEffectInstance hiddenEffect diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java -index 068a9b2d7b6895f14077d9647a8c9fed3e3d3ade..14c58cf8d255c51473fd3d0092faeaf5a3c1ae0c 100644 +index 01af4db5d0f17ea2943e5c464d4122a358503bc1..cb11f0624e4e65aa06bfaaec90729ee536cd53a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java -@@ -10,6 +10,7 @@ public class CraftPotionUtil { +@@ -78,6 +78,7 @@ public class CraftPotionUtil { public static MobEffectInstance fromBukkit(PotionEffect effect) { Holder type = CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType()); @@ -18,7 +18,7 @@ index 068a9b2d7b6895f14077d9647a8c9fed3e3d3ade..14c58cf8d255c51473fd3d0092faeaf5 return new MobEffectInstance(type, effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()); // Paper } -@@ -19,7 +20,7 @@ public class CraftPotionUtil { +@@ -87,7 +88,7 @@ public class CraftPotionUtil { int duration = effect.getDuration(); boolean ambient = effect.isAmbient(); boolean particles = effect.isVisible(); diff --git a/patches/server/0544-Add-basic-Datapack-API.patch b/patches/server/0544-Add-basic-Datapack-API.patch index 08c4d71896..72a73c2861 100644 --- a/patches/server/0544-Add-basic-Datapack-API.patch +++ b/patches/server/0544-Add-basic-Datapack-API.patch @@ -92,10 +92,10 @@ index 0000000000000000000000000000000000000000..cf4374493c11057451a62a655514415c + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b9180b7552796331d09c3aef1e863a253180721d..7c80d3290ee443ec79cf682be29d5ac1cbf3e381 100644 +index 31602e41b9c5370f583cc8a22f15a4e999b58830..fb6f176e37583443c4f67121a46a52b17b7d625a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -305,6 +305,7 @@ public final class CraftServer implements Server { +@@ -306,6 +306,7 @@ public final class CraftServer implements Server { public boolean ignoreVanillaPermissions = false; private final List playerView; public int reloadCount; @@ -103,7 +103,7 @@ index b9180b7552796331d09c3aef1e863a253180721d..7c80d3290ee443ec79cf682be29d5ac1 public static Exception excessiveVelEx; // Paper - Velocity warnings static { -@@ -387,6 +388,7 @@ public final class CraftServer implements Server { +@@ -388,6 +389,7 @@ public final class CraftServer implements Server { if (this.configuration.getBoolean("settings.use-map-color-cache")) { MapPalette.setMapColorCache(new CraftMapColorCache(this.logger)); } @@ -111,7 +111,7 @@ index b9180b7552796331d09c3aef1e863a253180721d..7c80d3290ee443ec79cf682be29d5ac1 } public boolean getCommandBlockOverride(String command) { -@@ -2975,5 +2977,11 @@ public final class CraftServer implements Server { +@@ -2976,5 +2978,11 @@ public final class CraftServer implements Server { public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() { return mobGoals; } diff --git a/patches/server/0546-Expand-PlayerGameModeChangeEvent.patch b/patches/server/0546-Expand-PlayerGameModeChangeEvent.patch index f9a90cac58..e4dd475a9f 100644 --- a/patches/server/0546-Expand-PlayerGameModeChangeEvent.patch +++ b/patches/server/0546-Expand-PlayerGameModeChangeEvent.patch @@ -45,7 +45,7 @@ index 7f09119bc7d661e08a960dd2bd46006efe752d3e..d1da3600dc07107309b20ebe6e7c0c4d } diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 7eab41ac49707a52adcfd6fb3c3d70cff3a4ad1b..ef24112c5360ec329dc8a89546f64bad68d7fd8e 100644 +index f920c134716620c69d31a88e2ad0ee1e7e2431b0..538720cd256d6d5fc4bf1800106c53b6a3116db9 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -2034,8 +2034,16 @@ public class ServerPlayer extends Player { @@ -132,10 +132,10 @@ index 486d9c4dbe3ee23198eba7f34ea8b5f4e9048c0b..f080322bc766361b9d2d8b1214c3dff1 } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 04dd8964a1e9ea2a14589b811fd9938249f94f82..3a6769fec9bae32209d2b126a10d99fd1b8dd4b7 100644 +index c8124bf451f5d03374f32a04b9b28fc9d97897ae..4a5553335cd6bbad8d3a05694710d95c96f62b9d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2719,7 +2719,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2715,7 +2715,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH); if (this.server.isHardcore()) { @@ -145,7 +145,7 @@ index 04dd8964a1e9ea2a14589b811fd9938249f94f82..3a6769fec9bae32209d2b126a10d99fd } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 36aaf37154c01c7a8f8543149e6bedec1386f5e7..6100e2313a86f9baca136a178cc30d4adc5cae53 100644 +index 58f47db6ed35e5e94cc7eae4c83bf65a589699db..ae2139509a201be5f7808b714211c23d50cca7a0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1640,7 +1640,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0547-ItemStack-repair-check-API.patch b/patches/server/0547-ItemStack-repair-check-API.patch index 0fe2b8aae3..bbd81a3f7b 100644 --- a/patches/server/0547-ItemStack-repair-check-API.patch +++ b/patches/server/0547-ItemStack-repair-check-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index dd28ead9b0d7cea53e7cf952ec1e2ca594efe0bb..18d46779f56f97aae264325a5202568d8a06a747 100644 +index 12446063a6c0f6c6f15a6a6500e76a99f5214001..df929851d75c9aafc4027a1b57732b660703561f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -546,6 +546,14 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -550,6 +550,14 @@ public final class CraftMagicNumbers implements UnsafeValues { public int getProtocolVersion() { return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion(); } @@ -22,7 +22,7 @@ index dd28ead9b0d7cea53e7cf952ec1e2ca594efe0bb..18d46779f56f97aae264325a5202568d + } // Paper end - /** + @Override diff --git a/src/test/java/io/papermc/paper/util/ItemStackRepairCheckTest.java b/src/test/java/io/papermc/paper/util/ItemStackRepairCheckTest.java new file mode 100644 index 0000000000000000000000000000000000000000..6b8d360ef86e181a680ad77f28b7dd7368dddfe7 diff --git a/patches/server/0548-More-Enchantment-API.patch b/patches/server/0548-More-Enchantment-API.patch index d561409c37..414f40fdb0 100644 --- a/patches/server/0548-More-Enchantment-API.patch +++ b/patches/server/0548-More-Enchantment-API.patch @@ -9,10 +9,10 @@ public net.minecraft.world.item.enchantment.Enchantment definition Co-authored-by: Luis diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index bb8a3e670924ebcce48669c5dce57e2df03fad77..552f703f6b06895246de72501d01163d9f24dad2 100644 +index faf0f726453aa957d17b75dfd8de5b40d984e69c..3157cac1905728ba0f51af412a5bba57578352b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -@@ -71,7 +71,7 @@ public class CraftEnchantment extends Enchantment implements Handleable getDefaultAttributeModifiers(Material material, EquipmentSlot slot) { diff --git a/patches/server/0558-Add-PlayerKickEvent-causes.patch b/patches/server/0558-Add-PlayerKickEvent-causes.patch index a107a7926d..4b24ab2ce3 100644 --- a/patches/server/0558-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0558-Add-PlayerKickEvent-causes.patch @@ -222,7 +222,7 @@ index 661765a9fe1c2e49299262190501ee3b3294a2f1..7659a3f50f5a90814dc7331ea00d6251 if (this.cserver.getServer().isRunning()) { this.cserver.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1a6dd2cf5bd02c328fb9ac80ec74be97202a13a2..972c7304f8623e4162dc805577106bdf9dac9928 100644 +index f4c6e815253f3e49577c554bf632e5c9f4f578ff..1f6e123fbd146129e5460631fdd88de9dd60bdca 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -349,7 +349,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -386,7 +386,7 @@ index 1a6dd2cf5bd02c328fb9ac80ec74be97202a13a2..972c7304f8623e4162dc805577106bdf } } -@@ -2568,7 +2568,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2564,7 +2564,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl // Spigot Start if ( entity == this.player && !this.player.isSpectator() ) { @@ -395,7 +395,7 @@ index 1a6dd2cf5bd02c328fb9ac80ec74be97202a13a2..972c7304f8623e4162dc805577106bdf return; } // Spigot End -@@ -2682,7 +2682,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2678,7 +2678,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } } @@ -404,7 +404,7 @@ index 1a6dd2cf5bd02c328fb9ac80ec74be97202a13a2..972c7304f8623e4162dc805577106bdf ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString()); } }); -@@ -3079,7 +3079,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3075,7 +3075,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl // Paper start - auto recipe limit if (!org.bukkit.Bukkit.isPrimaryThread()) { if (this.recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { @@ -413,7 +413,7 @@ index 1a6dd2cf5bd02c328fb9ac80ec74be97202a13a2..972c7304f8623e4162dc805577106bdf return; } } -@@ -3321,7 +3321,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3317,7 +3317,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl if (!Objects.equals(profilepublickey_a, profilepublickey_a1)) { if (profilepublickey_a != null && profilepublickey_a1.expiresAt().isBefore(profilepublickey_a.expiresAt())) { @@ -422,7 +422,7 @@ index 1a6dd2cf5bd02c328fb9ac80ec74be97202a13a2..972c7304f8623e4162dc805577106bdf } else { try { SignatureValidator signaturevalidator = this.server.getProfileKeySignatureValidator(); -@@ -3334,7 +3334,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3330,7 +3330,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator)); } catch (ProfilePublicKey.ValidationException profilepublickey_b) { ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage()); @@ -486,7 +486,7 @@ index f472dea0bd4f834c0c8f0aa59ae7cdae082b14af..2fa51c3a70f43cd23b8f494fc643d66c } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index dc8e6a4e62cc094300d20a057720b51b31c40b56..62a95876b01f1a8065c67bc844fe53920074fc57 100644 +index ae2139509a201be5f7808b714211c23d50cca7a0..2d173370b69d4caf6b890115a2f7dabc733d0a58 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -633,7 +633,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0573-Missing-Entity-API.patch b/patches/server/0573-Missing-Entity-API.patch index 0f3d205a48..325a5709e6 100644 --- a/patches/server/0573-Missing-Entity-API.patch +++ b/patches/server/0573-Missing-Entity-API.patch @@ -405,10 +405,10 @@ index 3952e52b94c1cc97e1d2d3885f59d7690efb74ad..9bcc0931510607b8fbd01233e2b3c346 + // Paper end - Horse API } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java -index a865b981f919c6784ae7c7c551e6a2a1ba0310d5..af35ff560a02daca7a130322fccbb52160e2db98 100644 +index 2f99fc44de05bfbb5c9a8c859312cb7d32310d62..81f5e1d866128af8fb2acc13aca715580fdf9886 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java -@@ -218,4 +218,17 @@ public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud +@@ -229,4 +229,17 @@ public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud this.getHandle().setOwner(null); } } @@ -705,10 +705,10 @@ index d30e1dd1b4525674c8a52da9b677c09a251b2467..9edcdc71b28cf08e42fbe44723ba540e + // Paper end - missing entity api } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java -index 837ae825e00feafaea87aa9d318998b0f30791d8..3815b68e139702f3f97c4fa2a77a0314d83fa758 100644 +index 114e84b485a6f05eac66083d8fd71028018d57ea..3c22799d36f07e349df207ce8a39236bbf6c17bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java -@@ -59,6 +59,20 @@ public class CraftFireball extends AbstractProjectile implements Fireball { +@@ -74,6 +74,20 @@ public class CraftFireball extends AbstractProjectile implements Fireball { this.update(); // SPIGOT-6579 } @@ -835,7 +835,7 @@ index 1cfc3d18fb785410f5acfcf3c338776858efe25a..ea929ca51bd35447da4bdb42379dfc12 // Paper start @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java -index 9986ac517e11b076a29a8c8e3f480ec286fa5825..0ad16ee7b33582d214dab41eeee378d52c8e38ed 100644 +index bf297388c75521266c93580a9caafe6bad70ab45..351f42842b780d053cd2e5bad9ae299449141b10 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java @@ -58,4 +58,36 @@ public class CraftLlama extends CraftChestedHorse implements Llama, com.destroys diff --git a/patches/server/0584-Add-System.out-err-catcher.patch b/patches/server/0584-Add-System.out-err-catcher.patch index 5b85a7f2b8..7ebe01fa1d 100644 --- a/patches/server/0584-Add-System.out-err-catcher.patch +++ b/patches/server/0584-Add-System.out-err-catcher.patch @@ -105,10 +105,10 @@ index 0000000000000000000000000000000000000000..a8e813ca89b033f061e695288b3383bd + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7c80d3290ee443ec79cf682be29d5ac1cbf3e381..7741acecf51040ba1faec4b22c0c0bfa8a2e4393 100644 +index fb6f176e37583443c4f67121a46a52b17b7d625a..2260ce0e705d8ba5b4d2c2ebaac09deb43ec9af0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -307,6 +307,7 @@ public final class CraftServer implements Server { +@@ -308,6 +308,7 @@ public final class CraftServer implements Server { public int reloadCount; private final io.papermc.paper.datapack.PaperDatapackManager datapackManager; // Paper public static Exception excessiveVelEx; // Paper - Velocity warnings diff --git a/patches/server/0599-Add-missing-team-sidebar-display-slots.patch b/patches/server/0599-Add-missing-team-sidebar-display-slots.patch index 43027f57f3..3095722a10 100644 --- a/patches/server/0599-Add-missing-team-sidebar-display-slots.patch +++ b/patches/server/0599-Add-missing-team-sidebar-display-slots.patch @@ -9,10 +9,10 @@ public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations toBukkitSlo public org.bukkit.craftbukkit.scoreboard.CraftScoreboardTranslations fromBukkitSlot(Lorg/bukkit/scoreboard/DisplaySlot;)Lnet/minecraft/world/scores/DisplaySlot; diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java -index 9e1896199d10be606a6c6304d849c7c9eb3c9fa1..b8a5ff5702f5a504c5b3aa0d9c27eb15f99471b7 100644 +index 43d9f70769be4be6c07b0a3d689e43e9f6805a19..e809d2506d27b62d74f2f255a75a923aaf590d9c 100644 --- a/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java +++ b/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java -@@ -27,6 +27,7 @@ public class FieldRename { +@@ -32,6 +32,7 @@ public class FieldRename { } return switch (owner) { @@ -20,9 +20,9 @@ index 9e1896199d10be606a6c6304d849c7c9eb3c9fa1..b8a5ff5702f5a504c5b3aa0d9c27eb15 case "org/bukkit/block/banner/PatternType" -> FieldRename.convertPatternTypeName(apiVersion, from); case "org/bukkit/enchantments/Enchantment" -> FieldRename.convertEnchantmentName(apiVersion, from); case "org/bukkit/block/Biome" -> FieldRename.convertBiomeName(apiVersion, from); -@@ -43,6 +44,16 @@ public class FieldRename { - }; - } +@@ -61,6 +62,16 @@ public class FieldRename { + // } + // Paper end + // Paper start - DisplaySlot + @DoNotReroute diff --git a/patches/server/0602-Get-entity-default-attributes.patch b/patches/server/0602-Get-entity-default-attributes.patch index cce23d94f7..ad280f7dbc 100644 --- a/patches/server/0602-Get-entity-default-attributes.patch +++ b/patches/server/0602-Get-entity-default-attributes.patch @@ -81,10 +81,10 @@ index 0000000000000000000000000000000000000000..ec9ebd2d539333293c51b7edfa18f18b + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index abc5f221e90fb39fe2fa192bcbd0a3bb75444d64..29661c484414e98c036045459dedf675aa661d85 100644 +index 0a6f78b5e08fffc782b51f19f42a53cad9287334..85fa9ee443e5222551f3c1e9001833eecc2f6c5c 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -559,6 +559,18 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -563,6 +563,18 @@ public final class CraftMagicNumbers implements UnsafeValues { } return CraftMagicNumbers.getItem(itemToBeRepaired.getType()).isValidRepairItem(CraftItemStack.asNMSCopy(itemToBeRepaired), CraftItemStack.asNMSCopy(repairMaterial)); } @@ -102,7 +102,7 @@ index abc5f221e90fb39fe2fa192bcbd0a3bb75444d64..29661c484414e98c036045459dedf675 + } // Paper end - /** + @Override diff --git a/src/test/java/io/papermc/paper/attribute/EntityTypeAttributesTest.java b/src/test/java/io/papermc/paper/attribute/EntityTypeAttributesTest.java new file mode 100644 index 0000000000000000000000000000000000000000..e8cdfa385230d3de202122e4df5e07f61f80ce75 diff --git a/patches/server/0606-Add-critical-damage-API.patch b/patches/server/0606-Add-critical-damage-API.patch index b279a27b3e..e0743975f1 100644 --- a/patches/server/0606-Add-critical-damage-API.patch +++ b/patches/server/0606-Add-critical-damage-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add critical damage API diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -index 70e946483f09195c82d4b306c487ba22a8f8cf6f..ffb7c966617bdfa2c3f05ec4e753e32996493343 100644 +index 9b5af216d38ff4584d40586403bd92207b230dfa..533ea6cbb813c8d1dc2bb3f65fd94d4fa5dd591e 100644 --- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java +++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -@@ -240,4 +240,18 @@ public class DamageSource { +@@ -255,4 +255,18 @@ public class DamageSource { public Holder typeHolder() { return this.type; } @@ -71,11 +71,11 @@ index 047629405dc67e3bcb5e4b3d5afa0e821f8fde44..8e8258333e181491b2d5b61ebdb80de3 int k = entity.getRemainingFireTicks(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 11f9220c4a5d2481f3a52238b4d845bad1fd0867..28d371e59d8780bf6e154bac56ee189b3b43b201 100644 +index 4bc21889a584add593a1ce092e5df161d8bb9d76..5c31c652a3b956dd638137307d1a8b2ee4c3f675 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1062,7 +1062,7 @@ public class CraftEventFactory { - return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled); +@@ -1064,7 +1064,7 @@ public class CraftEventFactory { + return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled); } DamageCause damageCause = (damager.getBukkitEntity() instanceof org.bukkit.entity.TNTPrimed) ? DamageCause.BLOCK_EXPLOSION : DamageCause.ENTITY_EXPLOSION; - return CraftEventFactory.callEntityDamageEvent(damager, entity, damageCause, bukkitDamageSource, modifiers, modifierFunctions, cancelled); @@ -83,16 +83,16 @@ index 11f9220c4a5d2481f3a52238b4d845bad1fd0867..28d371e59d8780bf6e154bac56ee189b } else if (damager != null || source.getDirectEntity() != null) { DamageCause cause = (source.isSweep()) ? DamageCause.ENTITY_SWEEP_ATTACK : DamageCause.ENTITY_ATTACK; -@@ -1088,7 +1088,7 @@ public class CraftEventFactory { +@@ -1090,7 +1090,7 @@ public class CraftEventFactory { cause = DamageCause.MAGIC; } - return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled); + return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API } else if (source.is(DamageTypes.FELL_OUT_OF_WORLD)) { - return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.VOID, bukkitDamageSource, modifiers, modifierFunctions, cancelled); + return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.VOID, bukkitDamageSource, modifiers, modifierFunctions, cancelled); } else if (source.is(DamageTypes.LAVA)) { -@@ -1146,13 +1146,13 @@ public class CraftEventFactory { +@@ -1148,13 +1148,13 @@ public class CraftEventFactory { cause = DamageCause.CUSTOM; } diff --git a/patches/server/0608-Add-isCollidable-methods-to-various-places.patch b/patches/server/0608-Add-isCollidable-methods-to-various-places.patch index 400b9e4171..7e886726b7 100644 --- a/patches/server/0608-Add-isCollidable-methods-to-various-places.patch +++ b/patches/server/0608-Add-isCollidable-methods-to-various-places.patch @@ -39,10 +39,10 @@ index 1002123cd0c6f57cecc4e80f5f21cc6ff5886d37..e96023b71845526383288917e8d7c575 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 29661c484414e98c036045459dedf675aa661d85..03ac06c4bd89e6da2272c3ff109a1b2d3454efd2 100644 +index 85fa9ee443e5222551f3c1e9001833eecc2f6c5c..027825a41d09d40bdd80c9ac37f014f5b45763c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -571,6 +571,12 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -575,6 +575,12 @@ public final class CraftMagicNumbers implements UnsafeValues { var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType) net.minecraft.core.registries.BuiltInRegistries.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(bukkitEntityKey))); return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier); } @@ -54,4 +54,4 @@ index 29661c484414e98c036045459dedf675aa661d85..03ac06c4bd89e6da2272c3ff109a1b2d + } // Paper end - /** + @Override diff --git a/patches/server/0611-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0611-Add-Raw-Byte-Entity-Serialization.patch index c003880b86..f19300b22e 100644 --- a/patches/server/0611-Add-Raw-Byte-Entity-Serialization.patch +++ b/patches/server/0611-Add-Raw-Byte-Entity-Serialization.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Add Raw Byte Entity Serialization public net.minecraft.world.entity.Entity setLevel(Lnet/minecraft/world/level/Level;)V diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index dd353bad7ddf7c1e4bbc37ed3724d73696f7b8a7..cdb69f4d5d49a2459671fa86dc39d60fdfa62489 100644 +index 541789139e9ccb0371a93da989b1f9701fceb034..6b66a9732f8e8b23b8d00beb9822fbb46ac76cab 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2106,6 +2106,15 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -50,10 +50,10 @@ index 9edcdc71b28cf08e42fbe44723ba540e8d4f7808..a61638bc8200f6aa25d9c3254aea6c0c @Override public boolean isInvisible() { // Paper - moved up from LivingEntity diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 03ac06c4bd89e6da2272c3ff109a1b2d3454efd2..64327d5dd0e1ec3f5ad411ee692923a340d6174f 100644 +index 027825a41d09d40bdd80c9ac37f014f5b45763c9..3e88b095260674a8383cc2646fc194c854bcf121 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -509,7 +509,33 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -513,7 +513,33 @@ public final class CraftMagicNumbers implements UnsafeValues { return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.parse(MinecraftServer.getServer().registryAccess(), compound).orElseThrow()); } diff --git a/patches/server/0616-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0616-Add-paper-mobcaps-and-paper-playermobcaps.patch index 5d60195ebe..c6b39416d0 100644 --- a/patches/server/0616-Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/0616-Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -278,10 +278,10 @@ index 58ea6a1f95a09c22125a8262b1b221004ebce0e4..ea6533c1ac218aa075da3401807a06fc BlockPos blockposition = NaturalSpawner.getRandomPosWithin(world, chunk); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7741acecf51040ba1faec4b22c0c0bfa8a2e4393..e85e866994247b77772937ef81507041db303071 100644 +index 2260ce0e705d8ba5b4d2c2ebaac09deb43ec9af0..d69037ce1d69b7f67587f9ab71cb9b9b2048f4d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2297,6 +2297,11 @@ public final class CraftServer implements Server { +@@ -2298,6 +2298,11 @@ public final class CraftServer implements Server { @Override public int getSpawnLimit(SpawnCategory spawnCategory) { diff --git a/patches/server/0631-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch b/patches/server/0631-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch index b11f4117a8..d9f19d0199 100644 --- a/patches/server/0631-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch +++ b/patches/server/0631-Fix-setPatternColor-on-tropical-fish-bucket-meta.patch @@ -11,10 +11,10 @@ This commit hence simply fixes this by using the proper body colour value when updating the pattern color. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java -index ce915b31d964f7ce5f5be9fbb5b52b1473ac4961..8940fc62f14dd7f53f98ea47ac06a21aa92a4b62 100644 +index c815dfdf2088830b4dfc8e82f818cc89a8d9439b..911bdce0795a6b11cd1d5ad5211202456e5225d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java -@@ -112,7 +112,7 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB +@@ -134,7 +134,7 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB if (this.variant == null) { this.variant = 0; } diff --git a/patches/server/0651-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/server/0651-Allow-delegation-to-vanilla-chunk-gen.patch index 8c6c32dac2..092085084a 100644 --- a/patches/server/0651-Allow-delegation-to-vanilla-chunk-gen.patch +++ b/patches/server/0651-Allow-delegation-to-vanilla-chunk-gen.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index e85e866994247b77772937ef81507041db303071..b1a75994eba329c3171a005815dd7d363006fb34 100644 +index d69037ce1d69b7f67587f9ab71cb9b9b2048f4d8..75d7293f27d617f6c096d87eb4eb0c7f8de8a0e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2482,6 +2482,90 @@ public final class CraftServer implements Server { +@@ -2483,6 +2483,90 @@ public final class CraftServer implements Server { return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME)); } diff --git a/patches/server/0665-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0665-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index 96fc6e3b61..33d3178f63 100644 --- a/patches/server/0665-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0665-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -18,10 +18,10 @@ index 718a455aa70999a339cccc51d6fc4bb689c2c27b..0a206b9ff1ad235fa0805ad635c1a6ca biomeProvider = gen.getDefaultBiomeProvider(worldInfo); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b1a75994eba329c3171a005815dd7d363006fb34..608face15b7a016699e997083042be304908cc68 100644 +index 75d7293f27d617f6c096d87eb4eb0c7f8de8a0e2..cae178b0b4046815ab64cd4c7c0a48f3eb430aba 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1274,7 +1274,7 @@ public final class CraftServer implements Server { +@@ -1275,7 +1275,7 @@ public final class CraftServer implements Server { List list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata)); LevelStem worlddimension = iregistry.get(actualDimension); diff --git a/patches/server/0677-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0677-API-for-creating-command-sender-which-forwards-feedb.patch index 4e11ae0467..1b3cb28843 100644 --- a/patches/server/0677-API-for-creating-command-sender-which-forwards-feedb.patch +++ b/patches/server/0677-API-for-creating-command-sender-which-forwards-feedb.patch @@ -122,10 +122,10 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 608face15b7a016699e997083042be304908cc68..ee0c69d1d1b931d23761461fc8cc3d214aa77330 100644 +index cae178b0b4046815ab64cd4c7c0a48f3eb430aba..b90428ec620dbaea4207f39e7a44a84f34c24385 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2128,6 +2128,13 @@ public final class CraftServer implements Server { +@@ -2129,6 +2129,13 @@ public final class CraftServer implements Server { return this.console.console; } diff --git a/patches/server/0681-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0681-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch index 43e7e71051..5a0a90ce86 100644 --- a/patches/server/0681-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch +++ b/patches/server/0681-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit Copies appropriate checks from CraftWorld#getSpawnLimit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index ee0c69d1d1b931d23761461fc8cc3d214aa77330..55c87d97e42113786409db4c368c0f68cf0c4c17 100644 +index b90428ec620dbaea4207f39e7a44a84f34c24385..432b711b47108a7100be31c492d151ac1eb95294 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2305,6 +2305,8 @@ public final class CraftServer implements Server { +@@ -2306,6 +2306,8 @@ public final class CraftServer implements Server { @Override public int getSpawnLimit(SpawnCategory spawnCategory) { // Paper start - Add mobcaps commands diff --git a/patches/server/0682-Add-GameEvent-tags.patch b/patches/server/0682-Add-GameEvent-tags.patch index 1de3d4a3c4..3f94a012ff 100644 --- a/patches/server/0682-Add-GameEvent-tags.patch +++ b/patches/server/0682-Add-GameEvent-tags.patch @@ -46,10 +46,10 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 55c87d97e42113786409db4c368c0f68cf0c4c17..df76c08b76e6e31414ccbb184557560b660f96a0 100644 +index 432b711b47108a7100be31c492d151ac1eb95294..e8c90b60c0a17e11c5bb10fb4a501fdbf619533b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2733,6 +2733,15 @@ public final class CraftServer implements Server { +@@ -2734,6 +2734,15 @@ public final class CraftServer implements Server { return (org.bukkit.Tag) new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey); } } @@ -65,7 +65,7 @@ index 55c87d97e42113786409db4c368c0f68cf0c4c17..df76c08b76e6e31414ccbb184557560b default -> throw new IllegalArgumentException(); } -@@ -2765,6 +2774,13 @@ public final class CraftServer implements Server { +@@ -2766,6 +2775,13 @@ public final class CraftServer implements Server { net.minecraft.core.Registry> entityTags = BuiltInRegistries.ENTITY_TYPE; return entityTags.getTags().map(pair -> (org.bukkit.Tag) new CraftEntityTag(entityTags, pair.getFirst())).collect(ImmutableList.toImmutableList()); } diff --git a/patches/server/0688-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0688-Put-world-into-worldlist-before-initing-the-world.patch index de105288ed..57e80522ca 100644 --- a/patches/server/0688-Put-world-into-worldlist-before-initing-the-world.patch +++ b/patches/server/0688-Put-world-into-worldlist-before-initing-the-world.patch @@ -23,10 +23,10 @@ index afa1b531620fe15e76a48b39b830c199a8a0e702..af5c6893859530f65724869d18b6677e if (worlddata.getCustomBossEvents() != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index df76c08b76e6e31414ccbb184557560b660f96a0..f4ac614b94d519659d884b779defad81f317e90a 100644 +index e8c90b60c0a17e11c5bb10fb4a501fdbf619533b..d6a0e7eb9ee643fa42e1f568eb76041ddd43871e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1300,10 +1300,11 @@ public final class CraftServer implements Server { +@@ -1301,10 +1301,11 @@ public final class CraftServer implements Server { return null; } diff --git a/patches/server/0690-Custom-Potion-Mixes.patch b/patches/server/0690-Custom-Potion-Mixes.patch index 04763694af..cb0745a1a0 100644 --- a/patches/server/0690-Custom-Potion-Mixes.patch +++ b/patches/server/0690-Custom-Potion-Mixes.patch @@ -282,10 +282,10 @@ index 3ebfd564d4bbf00da5919e966f3d047285845640..887957ce1ddc2f32569405642f35df46 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f4ac614b94d519659d884b779defad81f317e90a..9b9d78c4673b07845ff4ca78425ecb3aade3b039 100644 +index d6a0e7eb9ee643fa42e1f568eb76041ddd43871e..9b0cabd9fdcaab31f291894e370a7cc2d8e24825 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -308,6 +308,7 @@ public final class CraftServer implements Server { +@@ -309,6 +309,7 @@ public final class CraftServer implements Server { private final io.papermc.paper.datapack.PaperDatapackManager datapackManager; // Paper public static Exception excessiveVelEx; // Paper - Velocity warnings private final io.papermc.paper.logging.SysoutCatcher sysoutCatcher = new io.papermc.paper.logging.SysoutCatcher(); // Paper @@ -293,7 +293,7 @@ index f4ac614b94d519659d884b779defad81f317e90a..9b9d78c4673b07845ff4ca78425ecb3a static { ConfigurationSerialization.registerClass(CraftOfflinePlayer.class); -@@ -389,6 +390,7 @@ public final class CraftServer implements Server { +@@ -390,6 +391,7 @@ public final class CraftServer implements Server { if (this.configuration.getBoolean("settings.use-map-color-cache")) { MapPalette.setMapColorCache(new CraftMapColorCache(this.logger)); } @@ -301,7 +301,7 @@ index f4ac614b94d519659d884b779defad81f317e90a..9b9d78c4673b07845ff4ca78425ecb3a datapackManager = new io.papermc.paper.datapack.PaperDatapackManager(console.getPackRepository()); // Paper } -@@ -3099,5 +3101,9 @@ public final class CraftServer implements Server { +@@ -3100,5 +3102,9 @@ public final class CraftServer implements Server { return datapackManager; } diff --git a/patches/server/0701-Fix-saving-in-unloadWorld.patch b/patches/server/0701-Fix-saving-in-unloadWorld.patch index aa9f726bd7..3a5f0978a9 100644 --- a/patches/server/0701-Fix-saving-in-unloadWorld.patch +++ b/patches/server/0701-Fix-saving-in-unloadWorld.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix saving in unloadWorld Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 9b9d78c4673b07845ff4ca78425ecb3aade3b039..a45c56a72d5f19946d05e961d2a44f3d1456681e 100644 +index 9b0cabd9fdcaab31f291894e370a7cc2d8e24825..591b490179c283c17e59a13ee1a0ad315f69f905 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1349,7 +1349,7 @@ public final class CraftServer implements Server { +@@ -1350,7 +1350,7 @@ public final class CraftServer implements Server { try { if (save) { diff --git a/patches/server/0704-Fix-new-block-data-for-EntityChangeBlockEvent.patch b/patches/server/0704-Fix-new-block-data-for-EntityChangeBlockEvent.patch index d811493fc4..f1e6097f9a 100644 --- a/patches/server/0704-Fix-new-block-data-for-EntityChangeBlockEvent.patch +++ b/patches/server/0704-Fix-new-block-data-for-EntityChangeBlockEvent.patch @@ -196,10 +196,10 @@ index edc20745649b0837f1371c8d29e71fc0c8e5528f..932831bb5632ead5850842fc77192c84 } // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index dd092e44a18e238e4a8b4d8a791ef4267af01c04..70489085763475d29ddddc0bd3279974d0eb73cf 100644 +index 90696beb3ca48fc28c9842589bc3ea398af7d422..a40e6a19459cb5853f72708a0e7b8cc7334dca51 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1356,11 +1356,11 @@ public class CraftEventFactory { +@@ -1358,11 +1358,11 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0707-cache-resource-keys.patch b/patches/server/0707-cache-resource-keys.patch index d444813b7a..7f3b6ce992 100644 --- a/patches/server/0707-cache-resource-keys.patch +++ b/patches/server/0707-cache-resource-keys.patch @@ -33,10 +33,10 @@ index 95b956802f83b583a823fcd24808363775a56842..33d2e89ac40465b0c4633f9c51378b80 public static Holder bukkitToMinecraftHolder(Biome bukkit) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityType.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityType.java -index 198f51b297aa65dad665a637b4a71036491406bc..18ef90b574dca82c1729868a83612ca06a6ccdce 100644 +index fd1aaf8e18d6e3425639b60ce21c5aaf36e0b42a..266b616419a47f518a43b990cc7cbb4516beda03 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityType.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityType.java -@@ -20,10 +20,10 @@ public class CraftEntityType { +@@ -24,11 +24,11 @@ public class CraftEntityType { return bukkit; } @@ -48,4 +48,5 @@ index 198f51b297aa65dad665a637b4a71036491406bc..18ef90b574dca82c1729868a83612ca0 - .getOptional(CraftNamespacedKey.toMinecraft(bukkit.getKey())).orElseThrow(); + .getOptional(KEY_CACHE.computeIfAbsent(bukkit, type -> net.minecraft.resources.ResourceKey.create(Registries.ENTITY_TYPE, CraftNamespacedKey.toMinecraft(type.getKey())))).orElseThrow(); } - } + + public static String bukkitToString(EntityType bukkit) { diff --git a/patches/server/0710-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0710-Prevent-tile-entity-copies-loading-chunks.patch index a8ec237bcc..850db8e7b0 100644 --- a/patches/server/0710-Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/0710-Prevent-tile-entity-copies-loading-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity copies loading chunks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2eb69c7600a6a5e84b8f2a9bd9cc207c57459251..28c140d641244454d754770c06bc22d650cfcbfa 100644 +index eec6765f0885994791e6b09cd731bb275ceb286b..535f6478453e61fa37c5e6f887d27f25ca82269b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3189,7 +3189,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3185,7 +3185,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl BlockPos blockposition = BlockEntity.getPosFromTag(customdata.getUnsafe()); if (this.player.level().isLoaded(blockposition)) { diff --git a/patches/server/0713-WorldCreator-keepSpawnLoaded.patch b/patches/server/0713-WorldCreator-keepSpawnLoaded.patch index 92ffaf7290..9e860a12cf 100644 --- a/patches/server/0713-WorldCreator-keepSpawnLoaded.patch +++ b/patches/server/0713-WorldCreator-keepSpawnLoaded.patch @@ -5,10 +5,10 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a45c56a72d5f19946d05e961d2a44f3d1456681e..d1b8d0952d571200589e9f613c50393a41bf0804 100644 +index 591b490179c283c17e59a13ee1a0ad315f69f905..d9b33e5892317370be8c129a3e54a13722967942 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1292,7 +1292,7 @@ public final class CraftServer implements Server { +@@ -1293,7 +1293,7 @@ public final class CraftServer implements Server { } // If set to not keep spawn in memory (changed from default) then adjust rule accordingly diff --git a/patches/server/0727-Prevent-entity-loading-causing-async-lookups.patch b/patches/server/0727-Prevent-entity-loading-causing-async-lookups.patch index d3f30f5169..06bfec3f5f 100644 --- a/patches/server/0727-Prevent-entity-loading-causing-async-lookups.patch +++ b/patches/server/0727-Prevent-entity-loading-causing-async-lookups.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent entity loading causing async lookups diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 3bd13975934e8f61b41c4c08b73ead6e0f45ffac..bcf4e77ed17fa35d509b33568793a38278e2b718 100644 +index d689f02150fa55ffcfb03adb5955f190ffdcc0de..5a6041ca0a787a945629066477f94d48ea1f1f19 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -740,6 +740,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -17,10 +17,10 @@ index 3bd13975934e8f61b41c4c08b73ead6e0f45ffac..bcf4e77ed17fa35d509b33568793a382 if (this.isPassenger() && this.getVehicle().isRemoved()) { this.stopRiding(); diff --git a/src/main/java/net/minecraft/world/entity/NeutralMob.java b/src/main/java/net/minecraft/world/entity/NeutralMob.java -index 7bb01b28b07bf2b31897cc5ab1f44fc0387958bb..1bc49da1c4cc12966ca414152b3ddf7f850c7d44 100644 +index 3b08905ddc3c2506779ce0eac1a53a4d89442ddc..b55633bf4e26dc00e27ab28c7739c274e48b74c3 100644 --- a/src/main/java/net/minecraft/world/entity/NeutralMob.java +++ b/src/main/java/net/minecraft/world/entity/NeutralMob.java -@@ -42,24 +42,11 @@ public interface NeutralMob { +@@ -45,24 +45,11 @@ public interface NeutralMob { UUID uuid = nbt.getUUID("AngryAt"); this.setPersistentAngerTarget(uuid); @@ -30,14 +30,14 @@ index 7bb01b28b07bf2b31897cc5ab1f44fc0387958bb..1bc49da1c4cc12966ca414152b3ddf7f - if (entity instanceof Mob) { - Mob entityinsentient = (Mob) entity; - -- this.setTarget(entityinsentient); +- this.setTarget(entityinsentient, EntityTargetEvent.TargetReason.UNKNOWN, false); // CraftBukkit - this.setLastHurtByMob(entityinsentient); - } - - if (entity instanceof Player) { - Player entityhuman = (Player) entity; - -- this.setTarget(entityhuman); +- this.setTarget(entityhuman, EntityTargetEvent.TargetReason.UNKNOWN, false); // CraftBukkit - this.setLastHurtByPlayer(entityhuman); - } - @@ -50,7 +50,7 @@ index 7bb01b28b07bf2b31897cc5ab1f44fc0387958bb..1bc49da1c4cc12966ca414152b3ddf7f } } } -@@ -133,4 +120,28 @@ public interface NeutralMob { +@@ -136,4 +123,28 @@ public interface NeutralMob { @Nullable LivingEntity getTarget(); @@ -67,12 +67,12 @@ index 7bb01b28b07bf2b31897cc5ab1f44fc0387958bb..1bc49da1c4cc12966ca414152b3ddf7f + + if (entity != null) { + if (entity instanceof Mob mob) { -+ this.setTarget(mob, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_ENTITY, true); ++ this.setTarget(mob, EntityTargetEvent.TargetReason.UNKNOWN, false); // CraftBukkit + this.setLastHurtByMob(mob); + } + + if (entity instanceof Player player) { -+ this.setTarget(player, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_ENTITY, true); ++ this.setTarget(player, EntityTargetEvent.TargetReason.UNKNOWN, false); // CraftBukkit + this.setLastHurtByPlayer(player); + } + } diff --git a/patches/server/0728-Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/0728-Throw-exception-on-world-create-while-being-ticked.patch index e3913abcf5..4a0d4b038d 100644 --- a/patches/server/0728-Throw-exception-on-world-create-while-being-ticked.patch +++ b/patches/server/0728-Throw-exception-on-world-create-while-being-ticked.patch @@ -45,10 +45,10 @@ index 18a73cc12615ecc7e61e8f96e6d8a3aa2ffe6e1f..0775e9259c5b465306adf6b9d7ffc404 this.profiler.popPush("connection"); MinecraftTimings.connectionTimer.startTiming(); // Spigot // Paper diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index d1b8d0952d571200589e9f613c50393a41bf0804..a84ef01a0c6c73dae27850044fea6d763e972107 100644 +index d9b33e5892317370be8c129a3e54a13722967942..271b103aa0fc84ac051619ff94abbeeaa1b276c1 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -886,6 +886,11 @@ public final class CraftServer implements Server { +@@ -887,6 +887,11 @@ public final class CraftServer implements Server { return new ArrayList(this.worlds.values()); } @@ -60,7 +60,7 @@ index d1b8d0952d571200589e9f613c50393a41bf0804..a84ef01a0c6c73dae27850044fea6d76 public DedicatedPlayerList getHandle() { return this.playerList; } -@@ -1146,6 +1151,7 @@ public final class CraftServer implements Server { +@@ -1147,6 +1152,7 @@ public final class CraftServer implements Server { @Override public World createWorld(WorldCreator creator) { Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP"); @@ -68,7 +68,7 @@ index d1b8d0952d571200589e9f613c50393a41bf0804..a84ef01a0c6c73dae27850044fea6d76 Preconditions.checkArgument(creator != null, "WorldCreator cannot be null"); String name = creator.name(); -@@ -1322,6 +1328,7 @@ public final class CraftServer implements Server { +@@ -1323,6 +1329,7 @@ public final class CraftServer implements Server { @Override public boolean unloadWorld(World world, boolean save) { diff --git a/patches/server/0734-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0734-Don-t-broadcast-messages-to-command-blocks.patch index 58912bb8af..855a217d4c 100644 --- a/patches/server/0734-Don-t-broadcast-messages-to-command-blocks.patch +++ b/patches/server/0734-Don-t-broadcast-messages-to-command-blocks.patch @@ -20,10 +20,10 @@ index 8c2dcc4134d96351cee75773214f3f47e71533e9..e6bfcc50cdf728216084bc00a5bb8b6b Date date = new Date(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index a84ef01a0c6c73dae27850044fea6d763e972107..8d9a027b2d54f0896a196baa6bf02074d14e15f8 100644 +index 271b103aa0fc84ac051619ff94abbeeaa1b276c1..d9390854adf0009a5b8ccd4ff2d6175987918a0e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1891,7 +1891,7 @@ public final class CraftServer implements Server { +@@ -1892,7 +1892,7 @@ public final class CraftServer implements Server { // Paper end Set recipients = new HashSet<>(); for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) { diff --git a/patches/server/0752-Add-Velocity-IP-Forwarding-Support.patch b/patches/server/0752-Add-Velocity-IP-Forwarding-Support.patch index 717824d206..87a1f24b99 100644 --- a/patches/server/0752-Add-Velocity-IP-Forwarding-Support.patch +++ b/patches/server/0752-Add-Velocity-IP-Forwarding-Support.patch @@ -228,10 +228,10 @@ index 9bcded0466f3b10fafd709edc44c60f85cb48b7f..cb006ae0e5be2f1d31261bdd36964229 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 8d9a027b2d54f0896a196baa6bf02074d14e15f8..3618f7b808ccf7a0d6569225ae6ebd4972b51746 100644 +index d9390854adf0009a5b8ccd4ff2d6175987918a0e..99823b061d6c580336cc27be834018f9d2156a72 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -815,7 +815,7 @@ public final class CraftServer implements Server { +@@ -816,7 +816,7 @@ public final class CraftServer implements Server { @Override public long getConnectionThrottle() { // Spigot Start - Automatically set connection throttle for bungee configurations diff --git a/patches/server/0753-Add-NamespacedKey-biome-methods.patch b/patches/server/0753-Add-NamespacedKey-biome-methods.patch index cd1f237abf..90058446ee 100644 --- a/patches/server/0753-Add-NamespacedKey-biome-methods.patch +++ b/patches/server/0753-Add-NamespacedKey-biome-methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 64327d5dd0e1ec3f5ad411ee692923a340d6174f..76802c72fa2da7e8e16a7d611ac860d6d9ec7cff 100644 +index 3e88b095260674a8383cc2646fc194c854bcf121..230ef9f3619cb3d2e750f5217df2ea19f61e25be 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -603,6 +603,19 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -607,6 +607,19 @@ public final class CraftMagicNumbers implements UnsafeValues { Preconditions.checkArgument(material.isBlock(), material + " is not a block"); return getBlock(material).hasCollision; } @@ -28,4 +28,4 @@ index 64327d5dd0e1ec3f5ad411ee692923a340d6174f..76802c72fa2da7e8e16a7d611ac860d6 + } // Paper end - /** + @Override diff --git a/patches/server/0773-Elder-Guardian-appearance-API.patch b/patches/server/0773-Elder-Guardian-appearance-API.patch index 403482552b..660b7c3b7e 100644 --- a/patches/server/0773-Elder-Guardian-appearance-API.patch +++ b/patches/server/0773-Elder-Guardian-appearance-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a5b87aaa0b5ae437a44c5576ff6f7c28e07e36bf..331e565cf9d145c03150f402b1538b539e1e1816 100644 +index b99dc0fee6c23707785ee155c69d013facf2bc96..80a1b190772334c7cc43b8f3dbfc8db96c70c2ca 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3274,6 +3274,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3271,6 +3271,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end diff --git a/patches/server/0787-Add-Player-Warden-Warning-API.patch b/patches/server/0787-Add-Player-Warden-Warning-API.patch index cbda3eac9c..a049f08c9f 100644 --- a/patches/server/0787-Add-Player-Warden-Warning-API.patch +++ b/patches/server/0787-Add-Player-Warden-Warning-API.patch @@ -10,10 +10,10 @@ public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTick public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 331e565cf9d145c03150f402b1538b539e1e1816..02420c94c4efc2fb201bfcfd95867aced9f14da9 100644 +index 80a1b190772334c7cc43b8f3dbfc8db96c70c2ca..cceaeda61af0db282c94bf306c34979100f050df 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3279,6 +3279,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3276,6 +3276,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void showElderGuardian(boolean silent) { if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F)); } diff --git a/patches/server/0805-Improve-logging-and-errors.patch b/patches/server/0805-Improve-logging-and-errors.patch index cb4ce73b0f..e5bcd5c0f7 100644 --- a/patches/server/0805-Improve-logging-and-errors.patch +++ b/patches/server/0805-Improve-logging-and-errors.patch @@ -52,10 +52,10 @@ index fdff82ed5dbf5176d470b9b6c41acfe6b98c7039..00679b76715fde4b90a999fd11cca40d } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c010d36d91066cb333f3360f278b775bacddd857..f8bfc87b044e538e068c021cfc3f8de43b15e84d 100644 +index e711e3ab336b879664a885c4ec9b9e46cf71331d..cb9b46ed5ff2f9aa0d322be75659c0046f38c663 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3387,7 +3387,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3383,7 +3383,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator)); } catch (ProfilePublicKey.ValidationException profilepublickey_b) { @@ -95,7 +95,7 @@ index 9ae23dbf076e977c9d9b98a02c5925e9a8f68f7f..0126b88f60904dfbf1e29eb3b89a9850 // CraftBukkit start diff --git a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java -index 1f82491fc885e3c349fca779ce98798a5c6efde5..71d057dc8c7362f8e7aaca5e31c9f02b2bf3f281 100644 +index 8e42a91587353271820d58c30ac84c708c00b989..ae6d9453cbfb708ed00a61a221bd425110b291a4 100644 --- a/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java +++ b/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java @@ -44,6 +44,7 @@ import org.bukkit.material.MaterialData; diff --git a/patches/server/0810-Flying-Fall-Damage.patch b/patches/server/0810-Flying-Fall-Damage.patch index 17c6c542fd..2e5344a36c 100644 --- a/patches/server/0810-Flying-Fall-Damage.patch +++ b/patches/server/0810-Flying-Fall-Damage.patch @@ -26,10 +26,10 @@ index 90c9856dc16f83c762415aaeeb030bcd07b72d51..96fc37c871566ec41c42bd0e0f4a1470 } else { if (fallDistance >= 2.0F) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0d2b87257f797de02f1dd68f1eb740a3d99dad22..4dbcde83c62b331d5b9112874c68c4d026abb53b 100644 +index f2d862671df42706e8d36db458f58cb51acd8efa..729033560f55f54ca418c5d5445b82efceabafa4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2566,6 +2566,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2563,6 +2563,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().onUpdateAbilities(); } diff --git a/patches/server/0812-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch b/patches/server/0812-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch deleted file mode 100644 index e4493ae309..0000000000 --- a/patches/server/0812-Add-exploded-block-state-to-EntityDamageByBlockEvent.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic -Date: Fri, 22 Oct 2021 16:25:07 -0700 -Subject: [PATCH] Add exploded block state to EntityDamageByBlockEvent - -== AT == -public org.bukkit.craftbukkit.block.CraftBlockStates getBlockState(Lorg/bukkit/World;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/entity/BlockEntity;)Lorg/bukkit/craftbukkit/block/CraftBlockState; - -diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSources.java b/src/main/java/net/minecraft/world/damagesource/DamageSources.java -index 89928dad3182a0131c3fba19c9c131d6997028eb..a1c53f04c2dd505e6af72e512e111d7994786035 100644 ---- a/src/main/java/net/minecraft/world/damagesource/DamageSources.java -+++ b/src/main/java/net/minecraft/world/damagesource/DamageSources.java -@@ -265,15 +265,16 @@ public class DamageSources { - return this.source(DamageTypes.SONIC_BOOM, attacker); - } - -+ @Deprecated @io.papermc.paper.annotation.DoNotUse // Paper - add exploded state - public DamageSource badRespawnPointExplosion(Vec3 position) { - // CraftBukkit start -- return this.badRespawnPointExplosion(position, null, null, null); -+ return this.badRespawnPointExplosion(position, null, null, null, null); // Paper - pass possible BlockEntity - } - -- public DamageSource badRespawnPointExplosion(Vec3 vec3d, net.minecraft.world.level.Level world, net.minecraft.world.level.block.state.BlockState blockData, net.minecraft.core.BlockPos position) { -+ public DamageSource badRespawnPointExplosion(Vec3 vec3d, net.minecraft.world.level.Level world, net.minecraft.world.level.block.state.BlockState blockData, net.minecraft.core.BlockPos position, @Nullable net.minecraft.world.level.block.entity.BlockEntity blockEntity) { // Paper - pass possible BlockEntity - DamageSource damageSource = new DamageSource(this.damageTypes.getHolderOrThrow(DamageTypes.BAD_RESPAWN_POINT), vec3d); - if (world != null && blockData != null && position != null) { -- damageSource.blockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, position, blockData, null); -+ damageSource.blockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(null, position, blockData, blockEntity); // Paper - pass possible BlockEntity (null world for unplaced) - } - return damageSource; - // CraftBukkit end -diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java -index c353643a9c9b400d351ef49e1b7d4f516ed0b0eb..a2379aa9337df13f17f0ebb05c50a710cb19a5ad 100644 ---- a/src/main/java/net/minecraft/world/level/block/BedBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java -@@ -146,6 +146,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock - private InteractionResult explodeBed(BlockState iblockdata, Level world, BlockPos blockposition) { - { - { -+ final BlockEntity blockEntity = world.getBlockEntity(blockposition); // Paper - capture BlockEntity - world.removeBlock(blockposition, false); - BlockPos blockposition1 = blockposition.relative(((Direction) iblockdata.getValue(BedBlock.FACING)).getOpposite()); - -@@ -155,7 +156,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock - - Vec3 vec3d = blockposition.getCenter(); - -- world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, world, iblockdata, blockposition), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // CraftBukkit - add state -+ world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, world, iblockdata, blockposition, blockEntity), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // CraftBukkit - add state // Paper - add BlockEntity - return InteractionResult.SUCCESS; - } - } -diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java -index be85535767bc79875c38da78a209d33d4be87c8a..0699211428f182d8d56a2ba019d89ce05c920430 100644 ---- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java -+++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java -@@ -149,7 +149,7 @@ public class RespawnAnchorBlock extends Block { - }; - Vec3 vec3d = explodedPos.getCenter(); - -- world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, world, state, explodedPos), explosiondamagecalculator, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // CraftBukkit - add state -+ world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, world, state, explodedPos, null), explosiondamagecalculator, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // CraftBukkit - add state // Paper - } - - public static boolean canSetSpawn(Level world) { -diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index c52cb55cd1da988ec646e4e1484ec1a72513291d..0ab1cf162016422007426698dec60ffd875631a0 100644 ---- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1070,7 +1070,7 @@ public class CraftEventFactory { - Entity damager = (bukkitDamageSource.isIndirect() && source.getDirectEntity() != null) ? source.getDirectEntity() : source.getCausingEntity(); - if (source.is(DamageTypeTags.IS_EXPLOSION)) { - if (damager == null) { -- return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled); -+ return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.blockState); // Paper - Include BlockState for damage - } - DamageCause damageCause = (damager.getBukkitEntity() instanceof org.bukkit.entity.TNTPrimed) ? DamageCause.BLOCK_EXPLOSION : DamageCause.ENTITY_EXPLOSION; - return CraftEventFactory.callEntityDamageEvent(damager, entity, damageCause, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API -@@ -1117,7 +1117,7 @@ public class CraftEventFactory { - } else { - throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, source.getDirectBlock(), source.getMsgId())); - } -- return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled); -+ return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.blockState); // Paper - Include BlockState for damage - } - - DamageCause cause; -@@ -1170,8 +1170,13 @@ public class CraftEventFactory { - return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled); - } - -- private static EntityDamageEvent callEntityDamageEvent(Block damager, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map modifiers, Map> modifierFunctions, boolean cancelled) { -- EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(damager, damagee.getBukkitEntity(), cause, bukkitDamageSource, modifiers, modifierFunctions); -+ // Paper start -+ private static EntityDamageEvent callEntityDamageEvent(Block damager, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map modifiers, Map> modifierFunctions, boolean cancelled) { // Paper -+ return callEntityDamageEvent(damager, damagee, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled, null); -+ } -+ private static EntityDamageEvent callEntityDamageEvent(Block damager, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map modifiers, Map> modifierFunctions, boolean cancelled, @Nullable org.bukkit.block.BlockState explodedBlockState) { -+ EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(damager, damagee.getBukkitEntity(), cause, bukkitDamageSource, modifiers, modifierFunctions, explodedBlockState); -+ // Paper end - return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled); - } - diff --git a/patches/server/0813-config-for-disabling-entity-tag-tags.patch b/patches/server/0812-config-for-disabling-entity-tag-tags.patch similarity index 100% rename from patches/server/0813-config-for-disabling-entity-tag-tags.patch rename to patches/server/0812-config-for-disabling-entity-tag-tags.patch diff --git a/patches/server/0814-Use-single-player-info-update-packet-on-join.patch b/patches/server/0813-Use-single-player-info-update-packet-on-join.patch similarity index 95% rename from patches/server/0814-Use-single-player-info-update-packet-on-join.patch rename to patches/server/0813-Use-single-player-info-update-packet-on-join.patch index d9b0bd2808..f8e74ba432 100644 --- a/patches/server/0814-Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/0813-Use-single-player-info-update-packet-on-join.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Use single player info update packet on join diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f55255a6bab7524d37688b9fa5c9ca238fcd2656..ea8ba0c7306dffc8152be23f1b1dc452379f2ebb 100644 +index b35365fce1233214a0dd7f1cf86d940f47c860d3..fa4c6bd37bd7e3c66c867bab61b11b0bd217fd22 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3425,7 +3425,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3421,7 +3421,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID()); this.chatMessageChain.append(() -> { this.player.setChatSession(session); diff --git a/patches/server/0815-Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/0814-Correctly-shrink-items-during-EntityResurrectEvent.patch similarity index 95% rename from patches/server/0815-Correctly-shrink-items-during-EntityResurrectEvent.patch rename to patches/server/0814-Correctly-shrink-items-during-EntityResurrectEvent.patch index aa171312b3..98f6d365c0 100644 --- a/patches/server/0815-Correctly-shrink-items-during-EntityResurrectEvent.patch +++ b/patches/server/0814-Correctly-shrink-items-during-EntityResurrectEvent.patch @@ -22,7 +22,7 @@ This patch corrects this behaviour by only shrinking the item if a totem of undying was found and the event was called uncancelled. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index c5ebe3aec4f7ba484194c75f94600ba926b10abb..6ba7a7dd04e7a896f99ec6f7ff3749989d31bc0b 100644 +index 205c7bdc03c86229a100bd535db16b502d99ba24..f6f2f62cf9a4c7876c251766ad7c32f6f046eb2e 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1644,7 +1644,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0816-Win-Screen-API.patch b/patches/server/0815-Win-Screen-API.patch similarity index 93% rename from patches/server/0816-Win-Screen-API.patch rename to patches/server/0815-Win-Screen-API.patch index 55b4336093..0bc7c9aa44 100644 --- a/patches/server/0816-Win-Screen-API.patch +++ b/patches/server/0815-Win-Screen-API.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Win Screen API public net.minecraft.server.level.ServerPlayer seenCredits diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4dbcde83c62b331d5b9112874c68c4d026abb53b..37c23923ebd4dfd6405d3c19fa42609fc683a42e 100644 +index 729033560f55f54ca418c5d5445b82efceabafa4..606b56bcb3fdc3c01a1a98f1c8de77ff0bc70727 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1292,6 +1292,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0817-Remove-CraftItemStack-setAmount-null-assignment.patch b/patches/server/0816-Remove-CraftItemStack-setAmount-null-assignment.patch similarity index 100% rename from patches/server/0817-Remove-CraftItemStack-setAmount-null-assignment.patch rename to patches/server/0816-Remove-CraftItemStack-setAmount-null-assignment.patch diff --git a/patches/server/0818-Fix-force-opening-enchantment-tables.patch b/patches/server/0817-Fix-force-opening-enchantment-tables.patch similarity index 100% rename from patches/server/0818-Fix-force-opening-enchantment-tables.patch rename to patches/server/0817-Fix-force-opening-enchantment-tables.patch diff --git a/patches/server/0819-Add-Entity-Body-Yaw-API.patch b/patches/server/0818-Add-Entity-Body-Yaw-API.patch similarity index 100% rename from patches/server/0819-Add-Entity-Body-Yaw-API.patch rename to patches/server/0818-Add-Entity-Body-Yaw-API.patch diff --git a/patches/server/0820-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch b/patches/server/0819-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch similarity index 100% rename from patches/server/0820-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch rename to patches/server/0819-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch diff --git a/patches/server/0821-Add-EntityFertilizeEggEvent.patch b/patches/server/0820-Add-EntityFertilizeEggEvent.patch similarity index 96% rename from patches/server/0821-Add-EntityFertilizeEggEvent.patch rename to patches/server/0820-Add-EntityFertilizeEggEvent.patch index 9121d938b7..e002e6919d 100644 --- a/patches/server/0821-Add-EntityFertilizeEggEvent.patch +++ b/patches/server/0820-Add-EntityFertilizeEggEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityFertilizeEggEvent diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -index b550befd7bd05951be160f81600200b0b31bae5b..3eabf1e94c0a1086f471e30bf523581907169c58 100644 +index 83759d65d5be3e4df2b1815f82bf195fad41c542..b4d68a08ec1e4ec7bcc123bcb6c2dc90272430cf 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java @@ -441,6 +441,10 @@ public class Turtle extends Animal { @@ -69,10 +69,10 @@ index a0c52ce65d4035d135b1536c7408a6867a553447..dc035bf94c5f6574ed8ad369b327b7f7 this.playSound(SoundEvents.SNIFFER_EGG_PLOP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 0.5F); } // Paper - Call EntityDropItemEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 0ab1cf162016422007426698dec60ffd875631a0..160ebf499b2f088a3fb1ca683e3d7b02acbd548f 100644 +index 43759af5c1ddb49926cdf49b95acd65e68cffd60..cd515bbb191e23bbb297dcc2e849e64a26ee28da 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2109,4 +2109,28 @@ public class CraftEventFactory { +@@ -2106,4 +2106,28 @@ public class CraftEventFactory { return event.callEvent(); } // Paper end diff --git a/patches/server/0822-Fix-HumanEntity-drop-not-updating-the-client-inv.patch b/patches/server/0821-Fix-HumanEntity-drop-not-updating-the-client-inv.patch similarity index 100% rename from patches/server/0822-Fix-HumanEntity-drop-not-updating-the-client-inv.patch rename to patches/server/0821-Fix-HumanEntity-drop-not-updating-the-client-inv.patch diff --git a/patches/server/0823-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/server/0822-Add-CompostItemEvent-and-EntityCompostItemEvent.patch similarity index 100% rename from patches/server/0823-Add-CompostItemEvent-and-EntityCompostItemEvent.patch rename to patches/server/0822-Add-CompostItemEvent-and-EntityCompostItemEvent.patch diff --git a/patches/server/0824-Correctly-handle-ArmorStand-invisibility.patch b/patches/server/0823-Correctly-handle-ArmorStand-invisibility.patch similarity index 100% rename from patches/server/0824-Correctly-handle-ArmorStand-invisibility.patch rename to patches/server/0823-Correctly-handle-ArmorStand-invisibility.patch diff --git a/patches/server/0825-Fix-advancement-triggers-for-entity-damage.patch b/patches/server/0824-Fix-advancement-triggers-for-entity-damage.patch similarity index 97% rename from patches/server/0825-Fix-advancement-triggers-for-entity-damage.patch rename to patches/server/0824-Fix-advancement-triggers-for-entity-damage.patch index f5cd8361e8..6d0a71ca45 100644 --- a/patches/server/0825-Fix-advancement-triggers-for-entity-damage.patch +++ b/patches/server/0824-Fix-advancement-triggers-for-entity-damage.patch @@ -23,7 +23,7 @@ index 2ebbf7954dc5e0d6c9d53327d05b725eec310086..c5bd2e90ad74ba08910f65a2e07b6f76 return !this.getResponse(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 6ba7a7dd04e7a896f99ec6f7ff3749989d31bc0b..d84193a413fbdf76ddb70282d92e6d45b0424384 100644 +index f6f2f62cf9a4c7876c251766ad7c32f6f046eb2e..454d4fa966fd83632ae237bc3e94fddc68e9a8ad 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2375,7 +2375,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0826-Fix-text-display-error-on-spawn.patch b/patches/server/0825-Fix-text-display-error-on-spawn.patch similarity index 100% rename from patches/server/0826-Fix-text-display-error-on-spawn.patch rename to patches/server/0825-Fix-text-display-error-on-spawn.patch diff --git a/patches/server/0827-Fix-inventories-returning-null-Locations.patch b/patches/server/0826-Fix-inventories-returning-null-Locations.patch similarity index 97% rename from patches/server/0827-Fix-inventories-returning-null-Locations.patch rename to patches/server/0826-Fix-inventories-returning-null-Locations.patch index 2a3e133d8d..eabfae28c5 100644 --- a/patches/server/0827-Fix-inventories-returning-null-Locations.patch +++ b/patches/server/0826-Fix-inventories-returning-null-Locations.patch @@ -30,7 +30,7 @@ index c26161784359ea167e11de8aa58eda3b4851059c..6632cf24ebe6d147950a1fdb87666093 } diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index 7098bd97a30131dd7180ec2a4d4b485e3c6f9405..d0f55f0eb3208a072f205232b023c5f923dbcf3f 100644 +index 6173c689013ab02c83ca6ff1fde2b1e47f3e7820..1b6fd16d8c6195c6f7b65c7621d5f9bd15c46a75 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -52,6 +52,12 @@ public class BeaconMenu extends AbstractContainerMenu { diff --git a/patches/server/0828-Add-Shearable-API.patch b/patches/server/0827-Add-Shearable-API.patch similarity index 100% rename from patches/server/0828-Add-Shearable-API.patch rename to patches/server/0827-Add-Shearable-API.patch diff --git a/patches/server/0829-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/server/0828-Fix-SpawnEggMeta-get-setSpawnedType.patch similarity index 94% rename from patches/server/0829-Fix-SpawnEggMeta-get-setSpawnedType.patch rename to patches/server/0828-Fix-SpawnEggMeta-get-setSpawnedType.patch index bf28528953..af809bf2b4 100644 --- a/patches/server/0829-Fix-SpawnEggMeta-get-setSpawnedType.patch +++ b/patches/server/0828-Fix-SpawnEggMeta-get-setSpawnedType.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix SpawnEggMeta#get/setSpawnedType diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -index c36c004156d3a89dc2209423c57a2ce230d686dc..a6d2370113eb44c0863b7837362dbb350f5057c6 100644 +index 163b1712ce4a1c8f91028dc7c2cd56ba7ad8981f..726438237093abc85d9239f9c84be3df6d8318c4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java @@ -224,6 +224,30 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { diff --git a/patches/server/0830-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch b/patches/server/0829-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch similarity index 100% rename from patches/server/0830-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch rename to patches/server/0829-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch diff --git a/patches/server/0831-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0830-Treat-sequence-violations-like-they-should-be.patch similarity index 92% rename from patches/server/0831-Treat-sequence-violations-like-they-should-be.patch rename to patches/server/0830-Treat-sequence-violations-like-they-should-be.patch index b2b2aef8d8..b60e6de65d 100644 --- a/patches/server/0831-Treat-sequence-violations-like-they-should-be.patch +++ b/patches/server/0830-Treat-sequence-violations-like-they-should-be.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Treat sequence violations like they should be diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7c11e29378b1fd9535237e760384fa3904465056..7e800eadd7b7e39468f4c55830bf041ed99b92eb 100644 +index fa4c6bd37bd7e3c66c867bab61b11b0bd217fd22..665ef268a0936a52b979c6cca680e237ae7aa74c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1960,6 +1960,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0832-remove-duplicate-animate-packet-for-records.patch b/patches/server/0831-remove-duplicate-animate-packet-for-records.patch similarity index 100% rename from patches/server/0832-remove-duplicate-animate-packet-for-records.patch rename to patches/server/0831-remove-duplicate-animate-packet-for-records.patch diff --git a/patches/server/0833-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0832-Prevent-causing-expired-keys-from-impacting-new-join.patch similarity index 96% rename from patches/server/0833-Prevent-causing-expired-keys-from-impacting-new-join.patch rename to patches/server/0832-Prevent-causing-expired-keys-from-impacting-new-join.patch index 046fc27c9d..d71981b357 100644 --- a/patches/server/0833-Prevent-causing-expired-keys-from-impacting-new-join.patch +++ b/patches/server/0832-Prevent-causing-expired-keys-from-impacting-new-join.patch @@ -26,7 +26,7 @@ index 68c062cbaa030d62d97c9c003651f8fc17a00a6b..6247a21c9c391abf1f6db3482c659593 UPDATE_GAME_MODE((serialized, buf) -> serialized.gameMode = GameType.byId(buf.readVarInt()), (buf, entry) -> buf.writeVarInt(entry.gameMode().getId())), UPDATE_LISTED((serialized, buf) -> serialized.listed = buf.readBoolean(), (buf, entry) -> buf.writeBoolean(entry.listed())), diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e98d07dfa5c0d65f363dfc066d4058eac9f76e93..f4c5e1fc14ddcc90703ca1a1ec09617c5c3c6b79 100644 +index 665ef268a0936a52b979c6cca680e237ae7aa74c..a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -295,6 +295,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -51,7 +51,7 @@ index e98d07dfa5c0d65f363dfc066d4058eac9f76e93..f4c5e1fc14ddcc90703ca1a1ec09617c } private int getMaximumFlyingTicks(Entity vehicle) { -@@ -3423,6 +3431,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3419,6 +3427,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl private void resetPlayerChatState(RemoteChatSession session) { this.chatSession = session; diff --git a/patches/server/0834-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch b/patches/server/0833-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch similarity index 91% rename from patches/server/0834-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch rename to patches/server/0833-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch index 98ae07fa8b..e2e9fd9b35 100644 --- a/patches/server/0834-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch +++ b/patches/server/0833-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 3ce6604a74d7ab0b045901261d58736ca4c543a7..751efd2400a1c6fa6e1db72080c4f17fa9a9c548 100644 +index 1e122d5b49aa7f6a626e781e53de53be18afc346..055fcf3d51852ca466c7189f36382e0b0d0d86d2 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1374,6 +1374,11 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0835-Use-array-for-gamerule-storage.patch b/patches/server/0834-Use-array-for-gamerule-storage.patch similarity index 100% rename from patches/server/0835-Use-array-for-gamerule-storage.patch rename to patches/server/0834-Use-array-for-gamerule-storage.patch diff --git a/patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch b/patches/server/0835-Fix-a-couple-of-upstream-bed-issues.patch similarity index 95% rename from patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch rename to patches/server/0835-Fix-a-couple-of-upstream-bed-issues.patch index 5dd7794a29..665db524c5 100644 --- a/patches/server/0836-Fix-a-couple-of-upstream-bed-issues.patch +++ b/patches/server/0835-Fix-a-couple-of-upstream-bed-issues.patch @@ -10,7 +10,7 @@ but then replaced it with a bed, you could respawn at the bed in that world. diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java -index a2379aa9337df13f17f0ebb05c50a710cb19a5ad..4459685d1fb655f93a523ae50b62d6b97785ed90 100644 +index 18b9a62613c08eb5bf63ae26565b0e91e1f44d39..85d598c3354ee62f0fd1b26e485e0084967c0380 100644 --- a/src/main/java/net/minecraft/world/level/block/BedBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java @@ -107,6 +107,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock diff --git a/patches/server/0837-Fix-demo-flag-not-enabling-demo-mode.patch b/patches/server/0836-Fix-demo-flag-not-enabling-demo-mode.patch similarity index 100% rename from patches/server/0837-Fix-demo-flag-not-enabling-demo-mode.patch rename to patches/server/0836-Fix-demo-flag-not-enabling-demo-mode.patch diff --git a/patches/server/0838-Add-Mob-Experience-reward-API.patch b/patches/server/0837-Add-Mob-Experience-reward-API.patch similarity index 100% rename from patches/server/0838-Add-Mob-Experience-reward-API.patch rename to patches/server/0837-Add-Mob-Experience-reward-API.patch diff --git a/patches/server/0839-Break-redstone-on-top-of-trap-doors-early.patch b/patches/server/0838-Break-redstone-on-top-of-trap-doors-early.patch similarity index 100% rename from patches/server/0839-Break-redstone-on-top-of-trap-doors-early.patch rename to patches/server/0838-Break-redstone-on-top-of-trap-doors-early.patch diff --git a/patches/server/0840-Avoid-Lazy-Initialization-for-Enum-Fields.patch b/patches/server/0839-Avoid-Lazy-Initialization-for-Enum-Fields.patch similarity index 100% rename from patches/server/0840-Avoid-Lazy-Initialization-for-Enum-Fields.patch rename to patches/server/0839-Avoid-Lazy-Initialization-for-Enum-Fields.patch diff --git a/patches/server/0841-More-accurate-isInOpenWater-impl.patch b/patches/server/0840-More-accurate-isInOpenWater-impl.patch similarity index 100% rename from patches/server/0841-More-accurate-isInOpenWater-impl.patch rename to patches/server/0840-More-accurate-isInOpenWater-impl.patch diff --git a/patches/server/0842-Expand-PlayerItemMendEvent.patch b/patches/server/0841-Expand-PlayerItemMendEvent.patch similarity index 95% rename from patches/server/0842-Expand-PlayerItemMendEvent.patch rename to patches/server/0841-Expand-PlayerItemMendEvent.patch index 02f6324ef9..fac31424c0 100644 --- a/patches/server/0842-Expand-PlayerItemMendEvent.patch +++ b/patches/server/0841-Expand-PlayerItemMendEvent.patch @@ -33,7 +33,7 @@ index adc3e6298a1946fdea029c82a9954fb5b6e24497..a207a31d80a302dbdfe80f8727222542 return k > 0 ? this.repairPlayerItems(player, k) : 0; } else { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 37c23923ebd4dfd6405d3c19fa42609fc683a42e..7c039d79b6fba3358daaaf8894e05d9493fa6af8 100644 +index 606b56bcb3fdc3c01a1a98f1c8de77ff0bc70727..7522a31d618e90d5109f3067e07748f9a07482a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1835,11 +1835,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -51,10 +51,10 @@ index 37c23923ebd4dfd6405d3c19fa42609fc683a42e..7c039d79b6fba3358daaaf8894e05d94 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 160ebf499b2f088a3fb1ca683e3d7b02acbd548f..c8627846dc213f2230327e37ac1114d5cd7447ef 100644 +index cd515bbb191e23bbb297dcc2e849e64a26ee28da..355c9c8121a6ef60d6178eebc1587b90b9731f12 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1267,10 +1267,10 @@ public class CraftEventFactory { +@@ -1264,10 +1264,10 @@ public class CraftEventFactory { return event; } diff --git a/patches/server/0843-Refresh-ProjectileSource-for-projectiles.patch b/patches/server/0842-Refresh-ProjectileSource-for-projectiles.patch similarity index 97% rename from patches/server/0843-Refresh-ProjectileSource-for-projectiles.patch rename to patches/server/0842-Refresh-ProjectileSource-for-projectiles.patch index f6d4037762..836a0882ad 100644 --- a/patches/server/0843-Refresh-ProjectileSource-for-projectiles.patch +++ b/patches/server/0842-Refresh-ProjectileSource-for-projectiles.patch @@ -14,7 +14,7 @@ clearing the owner. Co-authored-by: Warrior <50800980+Warriorrrr@users.noreply.github.com> diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 09defe4a20c7b0794cba358c177e787f1c0273c1..b2e2bd4d7e3b373a92d3a4a13446f27fbf652c0a 100644 +index d074b9f859f6ed9ce0137c8e238de188c290fa4d..2323e8d69673d6291af6337f321f36ed9080bfd9 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -386,6 +386,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0844-Add-transient-modifier-API.patch b/patches/server/0843-Add-transient-modifier-API.patch similarity index 100% rename from patches/server/0844-Add-transient-modifier-API.patch rename to patches/server/0843-Add-transient-modifier-API.patch diff --git a/patches/server/0845-Fix-block-place-logic.patch b/patches/server/0844-Fix-block-place-logic.patch similarity index 100% rename from patches/server/0845-Fix-block-place-logic.patch rename to patches/server/0844-Fix-block-place-logic.patch diff --git a/patches/server/0846-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/0845-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch similarity index 100% rename from patches/server/0846-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch rename to patches/server/0845-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch diff --git a/patches/server/0847-Call-BlockGrowEvent-for-missing-blocks.patch b/patches/server/0846-Call-BlockGrowEvent-for-missing-blocks.patch similarity index 100% rename from patches/server/0847-Call-BlockGrowEvent-for-missing-blocks.patch rename to patches/server/0846-Call-BlockGrowEvent-for-missing-blocks.patch diff --git a/patches/server/0848-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch b/patches/server/0847-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch similarity index 90% rename from patches/server/0848-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch rename to patches/server/0847-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch index d3064fd3ee..c99da23d4c 100644 --- a/patches/server/0848-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch +++ b/patches/server/0847-Don-t-enforce-icanhasbukkit-default-if-alias-block-e.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3618f7b808ccf7a0d6569225ae6ebd4972b51746..fb41a9da32c91d40e771a3c070d03a785a222b13 100644 +index ddc1d66ae6a292e4aaa0bdd1088dfa0f7efc1ad3..83449758a2613076d6bbd61813a9d8cd4e2c2ed4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -354,7 +354,11 @@ public final class CraftServer implements Server { +@@ -355,7 +355,11 @@ public final class CraftServer implements Server { } this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile()); this.commandsConfiguration.options().copyDefaults(true); diff --git a/patches/server/0849-fix-MapLike-spam-for-missing-key-selector.patch b/patches/server/0848-fix-MapLike-spam-for-missing-key-selector.patch similarity index 100% rename from patches/server/0849-fix-MapLike-spam-for-missing-key-selector.patch rename to patches/server/0848-fix-MapLike-spam-for-missing-key-selector.patch diff --git a/patches/server/0850-Fix-sniffer-removeExploredLocation.patch b/patches/server/0849-Fix-sniffer-removeExploredLocation.patch similarity index 100% rename from patches/server/0850-Fix-sniffer-removeExploredLocation.patch rename to patches/server/0849-Fix-sniffer-removeExploredLocation.patch diff --git a/patches/server/0851-Add-method-to-remove-all-active-potion-effects.patch b/patches/server/0850-Add-method-to-remove-all-active-potion-effects.patch similarity index 100% rename from patches/server/0851-Add-method-to-remove-all-active-potion-effects.patch rename to patches/server/0850-Add-method-to-remove-all-active-potion-effects.patch diff --git a/patches/server/0852-Fix-incorrect-crafting-result-amount-for-fireworks.patch b/patches/server/0851-Fix-incorrect-crafting-result-amount-for-fireworks.patch similarity index 100% rename from patches/server/0852-Fix-incorrect-crafting-result-amount-for-fireworks.patch rename to patches/server/0851-Fix-incorrect-crafting-result-amount-for-fireworks.patch diff --git a/patches/server/0853-Add-event-for-player-editing-sign.patch b/patches/server/0852-Add-event-for-player-editing-sign.patch similarity index 100% rename from patches/server/0853-Add-event-for-player-editing-sign.patch rename to patches/server/0852-Add-event-for-player-editing-sign.patch diff --git a/patches/server/0854-Only-tick-item-frames-if-players-can-see-it.patch b/patches/server/0853-Only-tick-item-frames-if-players-can-see-it.patch similarity index 100% rename from patches/server/0854-Only-tick-item-frames-if-players-can-see-it.patch rename to patches/server/0853-Only-tick-item-frames-if-players-can-see-it.patch diff --git a/patches/server/0855-Fix-cmd-permission-levels-for-command-blocks.patch b/patches/server/0854-Fix-cmd-permission-levels-for-command-blocks.patch similarity index 100% rename from patches/server/0855-Fix-cmd-permission-levels-for-command-blocks.patch rename to patches/server/0854-Fix-cmd-permission-levels-for-command-blocks.patch diff --git a/patches/server/0856-Add-option-to-disable-block-updates.patch b/patches/server/0855-Add-option-to-disable-block-updates.patch similarity index 100% rename from patches/server/0856-Add-option-to-disable-block-updates.patch rename to patches/server/0855-Add-option-to-disable-block-updates.patch diff --git a/patches/server/0857-Call-missing-BlockDispenseEvent.patch b/patches/server/0856-Call-missing-BlockDispenseEvent.patch similarity index 97% rename from patches/server/0857-Call-missing-BlockDispenseEvent.patch rename to patches/server/0856-Call-missing-BlockDispenseEvent.patch index 11a27bb794..a4fb5e7017 100644 --- a/patches/server/0857-Call-missing-BlockDispenseEvent.patch +++ b/patches/server/0856-Call-missing-BlockDispenseEvent.patch @@ -50,10 +50,10 @@ index 9507dbbb4b490149b9248c384be5adaccae40c41..5bbadc890a72f1cb22c6881ebcc163b0 for (int k = 0; k < 5; ++k) { worldserver.sendParticles(ParticleTypes.SPLASH, (double) blockposition.getX() + worldserver.random.nextDouble(), (double) (blockposition.getY() + 1), (double) blockposition.getZ() + worldserver.random.nextDouble(), 1, 0.0D, 0.0D, 0.0D, 1.0D); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index c8627846dc213f2230327e37ac1114d5cd7447ef..3679bc4573346666088995903a3418c359444532 100644 +index 355c9c8121a6ef60d6178eebc1587b90b9731f12..2e676e7754429e1bd6cc7fdac32adcac56ab0f7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -2110,6 +2110,32 @@ public class CraftEventFactory { +@@ -2107,6 +2107,32 @@ public class CraftEventFactory { } // Paper end diff --git a/patches/server/0858-Don-t-load-chunks-for-supporting-block-checks.patch b/patches/server/0857-Don-t-load-chunks-for-supporting-block-checks.patch similarity index 90% rename from patches/server/0858-Don-t-load-chunks-for-supporting-block-checks.patch rename to patches/server/0857-Don-t-load-chunks-for-supporting-block-checks.patch index 4dd0bce763..4637d4573c 100644 --- a/patches/server/0858-Don-t-load-chunks-for-supporting-block-checks.patch +++ b/patches/server/0857-Don-t-load-chunks-for-supporting-block-checks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Don't load chunks for supporting block checks diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index b2e2bd4d7e3b373a92d3a4a13446f27fbf652c0a..16f36d1bfe6458f9aa935cdc63066c082bc83f8e 100644 +index 2323e8d69673d6291af6337f321f36ed9080bfd9..51032754e62b9e5da3f1c1adffbae4168cfbb0d1 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1211,7 +1211,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0859-Optimize-player-lookups-for-beacons.patch b/patches/server/0858-Optimize-player-lookups-for-beacons.patch similarity index 100% rename from patches/server/0859-Optimize-player-lookups-for-beacons.patch rename to patches/server/0858-Optimize-player-lookups-for-beacons.patch diff --git a/patches/server/0860-Add-Sign-getInteractableSideFor.patch b/patches/server/0859-Add-Sign-getInteractableSideFor.patch similarity index 100% rename from patches/server/0860-Add-Sign-getInteractableSideFor.patch rename to patches/server/0859-Add-Sign-getInteractableSideFor.patch diff --git a/patches/server/0861-fix-item-meta-for-tadpole-buckets.patch b/patches/server/0860-fix-item-meta-for-tadpole-buckets.patch similarity index 96% rename from patches/server/0861-fix-item-meta-for-tadpole-buckets.patch rename to patches/server/0860-fix-item-meta-for-tadpole-buckets.patch index 11453b4a7d..6022692c57 100644 --- a/patches/server/0861-fix-item-meta-for-tadpole-buckets.patch +++ b/patches/server/0860-fix-item-meta-for-tadpole-buckets.patch @@ -41,10 +41,10 @@ index 27af7ca9d62bdb4a24be5af139c181d7bc271ba5..3ff0340c40e9dc9a6e690de15ccade7a Material.GLOW_ITEM_FRAME, Material.PAINTING diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -index cf436c9e62a11b8c6cbf7638de0e5635c67459ac..9338743f1e2197f82d610490a22235ee6728e0da 100644 +index a1d8da4e0de3f84194f28d7d18fa795d53714590..d6018439015583fa0344c7c01b2e60a13de29795 100644 --- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java +++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java -@@ -206,6 +206,27 @@ public class ItemMetaTest extends AbstractTestingBase { +@@ -208,6 +208,27 @@ public class ItemMetaTest extends AbstractTestingBase { } } diff --git a/patches/server/0862-Fix-BanList-API.patch b/patches/server/0861-Fix-BanList-API.patch similarity index 99% rename from patches/server/0862-Fix-BanList-API.patch rename to patches/server/0861-Fix-BanList-API.patch index 424bd4c9d0..76483f04b0 100644 --- a/patches/server/0862-Fix-BanList-API.patch +++ b/patches/server/0861-Fix-BanList-API.patch @@ -208,7 +208,7 @@ index 172202accf4448a933fcf1ff820316c7910dd7f7..50ee7656580d386db473c054f5c5ec57 return null; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4603752c6ddb75b400afc48971523530fafe8623..5caf63605829e3df994ff22c4351234625d4dc24 100644 +index 7522a31d618e90d5109f3067e07748f9a07482a5..7dfad8abaf5db2ca5ea942a0ce92c3313a132205 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1733,23 +1733,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -256,7 +256,7 @@ index 4603752c6ddb75b400afc48971523530fafe8623..5caf63605829e3df994ff22c43512346 } diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java -index e3a244dac35bf4d5d10e41c200aaa7f93e278ef9..c7cd9081fa7e0b5e436e168515d051cd15a33706 100644 +index d2c121cc610b6c635e2de5059b147f5ee35096bd..3e725dd3aca80a062917e3fd214c554b52dddde5 100644 --- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java +++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java @@ -28,7 +28,7 @@ import org.bukkit.profile.PlayerProfile; diff --git a/patches/server/0863-Determine-lava-and-water-fluid-explosion-resistance-.patch b/patches/server/0862-Determine-lava-and-water-fluid-explosion-resistance-.patch similarity index 100% rename from patches/server/0863-Determine-lava-and-water-fluid-explosion-resistance-.patch rename to patches/server/0862-Determine-lava-and-water-fluid-explosion-resistance-.patch diff --git a/patches/server/0864-Fix-possible-NPE-on-painting-creation.patch b/patches/server/0863-Fix-possible-NPE-on-painting-creation.patch similarity index 100% rename from patches/server/0864-Fix-possible-NPE-on-painting-creation.patch rename to patches/server/0863-Fix-possible-NPE-on-painting-creation.patch diff --git a/patches/server/0865-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/0864-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch similarity index 100% rename from patches/server/0865-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch rename to patches/server/0864-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch diff --git a/patches/server/0866-ExperienceOrb-should-call-EntitySpawnEvent.patch b/patches/server/0865-ExperienceOrb-should-call-EntitySpawnEvent.patch similarity index 93% rename from patches/server/0866-ExperienceOrb-should-call-EntitySpawnEvent.patch rename to patches/server/0865-ExperienceOrb-should-call-EntitySpawnEvent.patch index e5768c83cb..2beca46925 100644 --- a/patches/server/0866-ExperienceOrb-should-call-EntitySpawnEvent.patch +++ b/patches/server/0865-ExperienceOrb-should-call-EntitySpawnEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ExperienceOrb should call EntitySpawnEvent diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 3679bc4573346666088995903a3418c359444532..d3b85371b014e462b3bd53ec179214c17640ef72 100644 +index 2e676e7754429e1bd6cc7fdac32adcac56ab0f7d..304a224e82d3b73ae914c58753eca9ecb1a08c1c 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -735,7 +735,8 @@ public class CraftEventFactory { diff --git a/patches/server/0867-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch b/patches/server/0866-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch similarity index 100% rename from patches/server/0867-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch rename to patches/server/0866-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch diff --git a/patches/server/0868-Add-whitelist-events.patch b/patches/server/0867-Add-whitelist-events.patch similarity index 100% rename from patches/server/0868-Add-whitelist-events.patch rename to patches/server/0867-Add-whitelist-events.patch diff --git a/patches/server/0869-Implement-PlayerFailMoveEvent.patch b/patches/server/0868-Implement-PlayerFailMoveEvent.patch similarity index 98% rename from patches/server/0869-Implement-PlayerFailMoveEvent.patch rename to patches/server/0868-Implement-PlayerFailMoveEvent.patch index f6e1c805fc..9a127a050d 100644 --- a/patches/server/0869-Implement-PlayerFailMoveEvent.patch +++ b/patches/server/0868-Implement-PlayerFailMoveEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerFailMoveEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f4c5e1fc14ddcc90703ca1a1ec09617c5c3c6b79..0595381e4b3296e047df1ef9bff1f06766de3788 100644 +index a2ce3d3423a8cb3b851c2d811678ccb9c5b5d5b0..38e19bd86bdef97dbea5ae2a4e7692ba10d39c47 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -1266,8 +1266,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -91,7 +91,7 @@ index f4c5e1fc14ddcc90703ca1a1ec09617c5c3c6b79..0595381e4b3296e047df1ef9bff1f067 this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet()); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet. this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround()); } else { -@@ -3454,4 +3484,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3450,4 +3480,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl InteractionResult run(ServerPlayer player, Entity entity, InteractionHand hand); } diff --git a/patches/server/0870-Folia-scheduler-and-owned-region-API.patch b/patches/server/0869-Folia-scheduler-and-owned-region-API.patch similarity index 99% rename from patches/server/0870-Folia-scheduler-and-owned-region-API.patch rename to patches/server/0869-Folia-scheduler-and-owned-region-API.patch index 43a9734890..b84601a478 100644 --- a/patches/server/0870-Folia-scheduler-and-owned-region-API.patch +++ b/patches/server/0869-Folia-scheduler-and-owned-region-API.patch @@ -1148,7 +1148,7 @@ index 0000000000000000000000000000000000000000..d306f911757a4d556c82c0070d4837db + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 28b68ddc343059fdd98419930a8b75cca54487d0..7cec7bc99787a85634236b68d551ec12561f382f 100644 +index dbffff0e30713f769aa8e0fe747b8fe599442e49..1f41b2298e98d40c0419ba8220654d65174414c2 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1554,6 +1554,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop true, iregistrycustom_dimension, this.console.options.has("recreateRegionFiles")); } diff --git a/patches/server/0878-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch b/patches/server/0877-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch similarity index 100% rename from patches/server/0878-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch rename to patches/server/0877-Remove-UpgradeData-neighbour-ticks-outside-of-range.patch diff --git a/patches/server/0879-Cache-map-ids-on-item-frames.patch b/patches/server/0878-Cache-map-ids-on-item-frames.patch similarity index 100% rename from patches/server/0879-Cache-map-ids-on-item-frames.patch rename to patches/server/0878-Cache-map-ids-on-item-frames.patch diff --git a/patches/server/0880-Fix-custom-statistic-criteria-creation.patch b/patches/server/0879-Fix-custom-statistic-criteria-creation.patch similarity index 87% rename from patches/server/0880-Fix-custom-statistic-criteria-creation.patch rename to patches/server/0879-Fix-custom-statistic-criteria-creation.patch index b409b07e4c..479f3f99ff 100644 --- a/patches/server/0880-Fix-custom-statistic-criteria-creation.patch +++ b/patches/server/0879-Fix-custom-statistic-criteria-creation.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix custom statistic criteria creation diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 76802c72fa2da7e8e16a7d611ac860d6d9ec7cff..4a978ebf1b5796833d83939a9502934d18ebb549 100644 +index 230ef9f3619cb3d2e750f5217df2ea19f61e25be..72e86de0d3e9448b5689790b054b5a672ee26311 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -616,6 +616,12 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -620,6 +620,12 @@ public final class CraftMagicNumbers implements UnsafeValues { net.minecraft.core.Holder biomeBase = cra.getHandle().registryAccess().registryOrThrow(net.minecraft.core.registries.Registries.BIOME).getHolderOrThrow(net.minecraft.resources.ResourceKey.create(net.minecraft.core.registries.Registries.BIOME, org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(biomeKey))); cra.setBiome(x, y, z, biomeBase); } @@ -20,4 +20,4 @@ index 76802c72fa2da7e8e16a7d611ac860d6d9ec7cff..4a978ebf1b5796833d83939a9502934d + } // Paper end - /** + @Override diff --git a/patches/server/0881-Bandaid-fix-for-Effect.patch b/patches/server/0880-Bandaid-fix-for-Effect.patch similarity index 98% rename from patches/server/0881-Bandaid-fix-for-Effect.patch rename to patches/server/0880-Bandaid-fix-for-Effect.patch index 524e09bb4f..890c0c308e 100644 --- a/patches/server/0881-Bandaid-fix-for-Effect.patch +++ b/patches/server/0880-Bandaid-fix-for-Effect.patch @@ -81,7 +81,7 @@ index 0c5c67480e16333641f4ebc89d892f7a0e2387fd..18c1cceb9e8b2873b24134a9e0126336 // Special case: the axis is optional for ELECTRIC_SPARK Preconditions.checkArgument(effect.getData() == null || effect == Effect.ELECTRIC_SPARK, "Wrong kind of data for the %s effect", effect); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 1c264135c34117407bfbb2d230e2ea1f9ebd0671..463b24fd34f76632b590ad659676ba49090f4bef 100644 +index 7dfad8abaf5db2ca5ea942a0ce92c3313a132205..36ffa642655bea0281251996b8207dd6335043ba 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -915,7 +915,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0882-SculkCatalyst-bloom-API.patch b/patches/server/0881-SculkCatalyst-bloom-API.patch similarity index 100% rename from patches/server/0882-SculkCatalyst-bloom-API.patch rename to patches/server/0881-SculkCatalyst-bloom-API.patch diff --git a/patches/server/0883-API-for-an-entity-s-scoreboard-name.patch b/patches/server/0882-API-for-an-entity-s-scoreboard-name.patch similarity index 100% rename from patches/server/0883-API-for-an-entity-s-scoreboard-name.patch rename to patches/server/0882-API-for-an-entity-s-scoreboard-name.patch diff --git a/patches/server/0884-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/server/0883-Deprecate-and-replace-methods-with-old-StructureType.patch similarity index 92% rename from patches/server/0884-Deprecate-and-replace-methods-with-old-StructureType.patch rename to patches/server/0883-Deprecate-and-replace-methods-with-old-StructureType.patch index 31119a3193..1241b20fbb 100644 --- a/patches/server/0884-Deprecate-and-replace-methods-with-old-StructureType.patch +++ b/patches/server/0883-Deprecate-and-replace-methods-with-old-StructureType.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 6b94ae36f535e58d0ff780985d7cc5dc0494b105..b1cfc6f5a2511e9bb145442dfb765951a1ee0fca 100644 +index 89b7dfcb22c2e59aa5723551f881b975544a0ab5..58c0778741a14c252ee01536b6fd9a3c5bcbc58f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1969,6 +1969,11 @@ public final class CraftServer implements Server { +@@ -1970,6 +1970,11 @@ public final class CraftServer implements Server { ServerLevel worldServer = ((CraftWorld) world).getHandle(); Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored); @@ -20,7 +20,7 @@ index 6b94ae36f535e58d0ff780985d7cc5dc0494b105..b1cfc6f5a2511e9bb145442dfb765951 BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation); // Create map with trackPlayer = true, unlimitedTracking = true -@@ -1979,6 +1984,31 @@ public final class CraftServer implements Server { +@@ -1980,6 +1985,31 @@ public final class CraftServer implements Server { return CraftItemStack.asBukkitCopy(stack); } diff --git a/patches/server/0885-Don-t-tab-complete-namespaced-commands-if-send-names.patch b/patches/server/0884-Don-t-tab-complete-namespaced-commands-if-send-names.patch similarity index 95% rename from patches/server/0885-Don-t-tab-complete-namespaced-commands-if-send-names.patch rename to patches/server/0884-Don-t-tab-complete-namespaced-commands-if-send-names.patch index ca6f261bbc..83a253acb9 100644 --- a/patches/server/0885-Don-t-tab-complete-namespaced-commands-if-send-names.patch +++ b/patches/server/0884-Don-t-tab-complete-namespaced-commands-if-send-names.patch @@ -11,7 +11,7 @@ This patch prevents server from sending namespaced commands when player requests tab-complete only commands. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 64c42e4ea8d17c8110f1df043cb3b7b3cbb52b8a..0206521fff9c148e95cfb031b05511041af39746 100644 +index 38e19bd86bdef97dbea5ae2a4e7692ba10d39c47..5c9d3ce9c84fd86209023306ad15a9bcb1725b0d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -817,6 +817,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0886-Properly-handle-BlockBreakEvent-isDropItems.patch b/patches/server/0885-Properly-handle-BlockBreakEvent-isDropItems.patch similarity index 100% rename from patches/server/0886-Properly-handle-BlockBreakEvent-isDropItems.patch rename to patches/server/0885-Properly-handle-BlockBreakEvent-isDropItems.patch diff --git a/patches/server/0887-Fire-entity-death-event-for-ender-dragon.patch b/patches/server/0886-Fire-entity-death-event-for-ender-dragon.patch similarity index 90% rename from patches/server/0887-Fire-entity-death-event-for-ender-dragon.patch rename to patches/server/0886-Fire-entity-death-event-for-ender-dragon.patch index 08b7409275..28897505d4 100644 --- a/patches/server/0887-Fire-entity-death-event-for-ender-dragon.patch +++ b/patches/server/0886-Fire-entity-death-event-for-ender-dragon.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fire entity death event for ender dragon diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index e8be7ddbef12b27ed5c5fcfa8b726d5a85058aa9..6f14607a88761171a72e274b3c9b476b20a272f1 100644 +index e8be7ddbef12b27ed5c5fcfa8b726d5a85058aa9..0e797e2714a2fd103cbd51548764577fd9b6412d 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java @@ -641,6 +641,15 @@ public class EnderDragon extends Mob implements Enemy { @@ -14,7 +14,7 @@ index e8be7ddbef12b27ed5c5fcfa8b726d5a85058aa9..6f14607a88761171a72e274b3c9b476b public void kill() { + // Paper start - Fire entity death event + this.silentDeath = true; -+ org.bukkit.event.entity.EntityDeathEvent deathEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this); ++ org.bukkit.event.entity.EntityDeathEvent deathEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, this.damageSources().genericKill()); + if (deathEvent.isCancelled()) { + this.silentDeath = false; // Reset to default if event was cancelled + return; diff --git a/patches/server/0888-Configurable-entity-tracking-range-by-Y-coordinate.patch b/patches/server/0887-Configurable-entity-tracking-range-by-Y-coordinate.patch similarity index 100% rename from patches/server/0888-Configurable-entity-tracking-range-by-Y-coordinate.patch rename to patches/server/0887-Configurable-entity-tracking-range-by-Y-coordinate.patch diff --git a/patches/server/0889-Add-Listing-API-for-Player.patch b/patches/server/0888-Add-Listing-API-for-Player.patch similarity index 98% rename from patches/server/0889-Add-Listing-API-for-Player.patch rename to patches/server/0888-Add-Listing-API-for-Player.patch index 280e547dd5..c5a9538763 100644 --- a/patches/server/0889-Add-Listing-API-for-Player.patch +++ b/patches/server/0888-Add-Listing-API-for-Player.patch @@ -119,7 +119,7 @@ index ea04eb049e16d1027d15f9863d1fcd16f090c464..0aa28caa1254137c0bae8e213bd08c9a // Paper end - Use single player info update packet on join player.sentListPacket = true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 463b24fd34f76632b590ad659676ba49090f4bef..5f5632e7d6d02fbe9f7024b8316414d8aa302d60 100644 +index 36ffa642655bea0281251996b8207dd6335043ba..e423e97d07ef0f5d0e5bcc7ceb0f353be142e0bf 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -199,6 +199,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -139,7 +139,7 @@ index 463b24fd34f76632b590ad659676ba49090f4bef..5f5632e7d6d02fbe9f7024b8316414d8 if (original != null) otherPlayer.setUUID(original); // Paper - uuid override } -@@ -2180,6 +2181,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2177,6 +2178,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return (entity != null) ? this.canSee(entity) : false; // If we can't find it, we can't see it } diff --git a/patches/server/0890-Configurable-Region-Compression-Format.patch b/patches/server/0889-Configurable-Region-Compression-Format.patch similarity index 100% rename from patches/server/0890-Configurable-Region-Compression-Format.patch rename to patches/server/0889-Configurable-Region-Compression-Format.patch diff --git a/patches/server/0891-Add-BlockFace-to-BlockDamageEvent.patch b/patches/server/0890-Add-BlockFace-to-BlockDamageEvent.patch similarity index 96% rename from patches/server/0891-Add-BlockFace-to-BlockDamageEvent.patch rename to patches/server/0890-Add-BlockFace-to-BlockDamageEvent.patch index cbd04c8454..2fcc02db1b 100644 --- a/patches/server/0891-Add-BlockFace-to-BlockDamageEvent.patch +++ b/patches/server/0890-Add-BlockFace-to-BlockDamageEvent.patch @@ -18,7 +18,7 @@ index 7b4426ac0435d3f419d9ece29dc9eccdb8f99950..cef3a64b5e6c4d34ed079078420078a7 if (blockEvent.isCancelled()) { // Let the client know the block still exists diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index d3b85371b014e462b3bd53ec179214c17640ef72..f883781f88fdc00a8c9a789b135569ac805b6860 100644 +index 304a224e82d3b73ae914c58753eca9ecb1a08c1c..1543a8d55a55b1e6b48855f584ecf8c543f2e5f2 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -650,13 +650,13 @@ public class CraftEventFactory { diff --git a/patches/server/0892-Fix-NPE-on-Boat-getStatus.patch b/patches/server/0891-Fix-NPE-on-Boat-getStatus.patch similarity index 100% rename from patches/server/0892-Fix-NPE-on-Boat-getStatus.patch rename to patches/server/0891-Fix-NPE-on-Boat-getStatus.patch diff --git a/patches/server/0893-Expand-Pose-API.patch b/patches/server/0892-Expand-Pose-API.patch similarity index 95% rename from patches/server/0893-Expand-Pose-API.patch rename to patches/server/0892-Expand-Pose-API.patch index 1a247ee6fd..21ecedeaeb 100644 --- a/patches/server/0893-Expand-Pose-API.patch +++ b/patches/server/0892-Expand-Pose-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expand Pose API diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 638aeef75dc5f7ab8b8e050118a7c709246a85f4..acf2cc8afaf4dee193ecf3bfc4a39b8c39ffc376 100644 +index b2c2d45bf390b9968dbb20c150b1fac2559a08a7..7f2ffffa270f493224ea97fcd0e862baf36ae40c 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -421,6 +421,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess diff --git a/patches/server/0894-More-DragonBattle-API.patch b/patches/server/0893-More-DragonBattle-API.patch similarity index 100% rename from patches/server/0894-More-DragonBattle-API.patch rename to patches/server/0893-More-DragonBattle-API.patch diff --git a/patches/server/0895-Add-PlayerPickItemEvent.patch b/patches/server/0894-Add-PlayerPickItemEvent.patch similarity index 96% rename from patches/server/0895-Add-PlayerPickItemEvent.patch rename to patches/server/0894-Add-PlayerPickItemEvent.patch index 005f1da60d..010e85d01a 100644 --- a/patches/server/0895-Add-PlayerPickItemEvent.patch +++ b/patches/server/0894-Add-PlayerPickItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerPickItemEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0206521fff9c148e95cfb031b05511041af39746..ff8593b3835be310affc39cde964fabfcc105094 100644 +index 5c9d3ce9c84fd86209023306ad15a9bcb1725b0d..30e0563ba54021bf8f2896bee8060e723ad84d48 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -932,8 +932,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0896-Allow-trident-custom-damage.patch b/patches/server/0895-Allow-trident-custom-damage.patch similarity index 100% rename from patches/server/0896-Allow-trident-custom-damage.patch rename to patches/server/0895-Allow-trident-custom-damage.patch diff --git a/patches/server/0897-Expose-hand-in-BlockCanBuildEvent.patch b/patches/server/0896-Expose-hand-in-BlockCanBuildEvent.patch similarity index 100% rename from patches/server/0897-Expose-hand-in-BlockCanBuildEvent.patch rename to patches/server/0896-Expose-hand-in-BlockCanBuildEvent.patch diff --git a/patches/server/0898-Optimize-nearest-structure-border-iteration.patch b/patches/server/0897-Optimize-nearest-structure-border-iteration.patch similarity index 100% rename from patches/server/0898-Optimize-nearest-structure-border-iteration.patch rename to patches/server/0897-Optimize-nearest-structure-border-iteration.patch diff --git a/patches/server/0899-Implement-OfflinePlayer-isConnected.patch b/patches/server/0898-Implement-OfflinePlayer-isConnected.patch similarity index 94% rename from patches/server/0899-Implement-OfflinePlayer-isConnected.patch rename to patches/server/0898-Implement-OfflinePlayer-isConnected.patch index 45edfbf777..5eade7d5b4 100644 --- a/patches/server/0899-Implement-OfflinePlayer-isConnected.patch +++ b/patches/server/0898-Implement-OfflinePlayer-isConnected.patch @@ -23,7 +23,7 @@ index 4d654c4f0b6210a9841427789ba70ce5d1d308be..9d93130f23addb18b97d7f5ec013faef public String getName() { Player player = this.getPlayer(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5f5632e7d6d02fbe9f7024b8316414d8aa302d60..8f92ff51647a1919d90219d0cab1710aa9ff7361 100644 +index e423e97d07ef0f5d0e5bcc7ceb0f353be142e0bf..4bdbc94f7221a88ee073e73ec0a13af51f704478 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -254,6 +254,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0900-Fix-inventory-desync.patch b/patches/server/0899-Fix-inventory-desync.patch similarity index 100% rename from patches/server/0900-Fix-inventory-desync.patch rename to patches/server/0899-Fix-inventory-desync.patch diff --git a/patches/server/0901-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/server/0900-Add-titleOverride-to-InventoryOpenEvent.patch similarity index 96% rename from patches/server/0901-Add-titleOverride-to-InventoryOpenEvent.patch rename to patches/server/0900-Add-titleOverride-to-InventoryOpenEvent.patch index 94d372fe34..cbe6fb67df 100644 --- a/patches/server/0901-Add-titleOverride-to-InventoryOpenEvent.patch +++ b/patches/server/0900-Add-titleOverride-to-InventoryOpenEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add titleOverride to InventoryOpenEvent diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 992032821110fc658fecc09530097a526f20d74d..e447aa85b51c7e28fcd89bf8aa7602c88d599239 100644 +index d59225c63aa4d3df9f8e87a1b3527d044fd2c410..e10c8309e184fe2c5c9682aa901ed7a320980431 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1617,12 +1617,17 @@ public class ServerPlayer extends Player { @@ -79,10 +79,10 @@ index 3d36d79a4e7f16f6face3465cdf54656984f3ebc..41f3cdec7deabf34358b8087df77169f if (!player.isImmobile()) player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, io.papermc.paper.adventure.PaperAdventure.asVanilla(adventure$title))); // Paper - Prevent opening inventories when frozen player.containerMenu = container; diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index f883781f88fdc00a8c9a789b135569ac805b6860..da89b73b08b27ec979545e825efe15aec5cf3af2 100644 +index 1543a8d55a55b1e6b48855f584ecf8c543f2e5f2..e100aaccab7e50c6d71b350443e3779472c910eb 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1384,10 +1384,21 @@ public class CraftEventFactory { +@@ -1381,10 +1381,21 @@ public class CraftEventFactory { } public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container) { @@ -105,7 +105,7 @@ index f883781f88fdc00a8c9a789b135569ac805b6860..da89b73b08b27ec979545e825efe15ae if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId), InventoryCloseEvent.Reason.OPEN_NEW); // Paper - Inventory close reason } -@@ -1402,10 +1413,10 @@ public class CraftEventFactory { +@@ -1399,10 +1410,10 @@ public class CraftEventFactory { if (event.isCancelled()) { container.transferTo(player.containerMenu, craftPlayer); diff --git a/patches/server/0902-Configure-sniffer-egg-hatch-time.patch b/patches/server/0901-Configure-sniffer-egg-hatch-time.patch similarity index 100% rename from patches/server/0902-Configure-sniffer-egg-hatch-time.patch rename to patches/server/0901-Configure-sniffer-egg-hatch-time.patch diff --git a/patches/server/0903-Do-crystal-portal-proximity-check-before-entity-look.patch b/patches/server/0902-Do-crystal-portal-proximity-check-before-entity-look.patch similarity index 100% rename from patches/server/0903-Do-crystal-portal-proximity-check-before-entity-look.patch rename to patches/server/0902-Do-crystal-portal-proximity-check-before-entity-look.patch diff --git a/patches/server/0904-Skip-POI-finding-if-stuck-in-vehicle.patch b/patches/server/0903-Skip-POI-finding-if-stuck-in-vehicle.patch similarity index 100% rename from patches/server/0904-Skip-POI-finding-if-stuck-in-vehicle.patch rename to patches/server/0903-Skip-POI-finding-if-stuck-in-vehicle.patch diff --git a/patches/server/0905-Add-slot-sanity-checks-in-container-clicks.patch b/patches/server/0904-Add-slot-sanity-checks-in-container-clicks.patch similarity index 93% rename from patches/server/0905-Add-slot-sanity-checks-in-container-clicks.patch rename to patches/server/0904-Add-slot-sanity-checks-in-container-clicks.patch index 05ebe54d1d..b049da07fe 100644 --- a/patches/server/0905-Add-slot-sanity-checks-in-container-clicks.patch +++ b/patches/server/0904-Add-slot-sanity-checks-in-container-clicks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add slot sanity checks in container clicks diff --git a/src/main/java/net/minecraft/core/component/DataComponentPatch.java b/src/main/java/net/minecraft/core/component/DataComponentPatch.java -index b69fa76003d948e307cf83d72a57513a984e622d..913327c9bb937c95e487ba21cf8e2084817bbfdb 100644 +index 2a00a2c8102a4a88edcfc8c680c3711efeb75b4a..33340e8ebe23a1a9ce587be34551fb929c41d0fd 100644 --- a/src/main/java/net/minecraft/core/component/DataComponentPatch.java +++ b/src/main/java/net/minecraft/core/component/DataComponentPatch.java @@ -71,7 +71,7 @@ public final class DataComponentPatch { @@ -18,10 +18,10 @@ index b69fa76003d948e307cf83d72a57513a984e622d..913327c9bb937c95e487ba21cf8e2084 DataComponentType datacomponenttype; int k; diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f197731f95ff2f3ee5a69d88d7bfaa5fea7c1c71..eea72bd54f69c872c416fd78ab76be124eca381c 100644 +index 30e0563ba54021bf8f2896bee8060e723ad84d48..e13097ceba283fdf165d7e6327fe78590252fe94 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2974,6 +2974,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -2970,6 +2970,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl break; case SWAP: if ((packet.getButtonNum() >= 0 && packet.getButtonNum() < 9) || packet.getButtonNum() == 40) { diff --git a/patches/server/0906-Call-BlockRedstoneEvents-for-lecterns.patch b/patches/server/0905-Call-BlockRedstoneEvents-for-lecterns.patch similarity index 100% rename from patches/server/0906-Call-BlockRedstoneEvents-for-lecterns.patch rename to patches/server/0905-Call-BlockRedstoneEvents-for-lecterns.patch diff --git a/patches/server/0907-Allow-proper-checking-of-empty-item-stacks.patch b/patches/server/0906-Allow-proper-checking-of-empty-item-stacks.patch similarity index 100% rename from patches/server/0907-Allow-proper-checking-of-empty-item-stacks.patch rename to patches/server/0906-Allow-proper-checking-of-empty-item-stacks.patch diff --git a/patches/server/0908-Fix-silent-equipment-change-for-mobs.patch b/patches/server/0907-Fix-silent-equipment-change-for-mobs.patch similarity index 100% rename from patches/server/0908-Fix-silent-equipment-change-for-mobs.patch rename to patches/server/0907-Fix-silent-equipment-change-for-mobs.patch diff --git a/patches/server/0909-Fix-spigot-s-Forced-Stats.patch b/patches/server/0908-Fix-spigot-s-Forced-Stats.patch similarity index 100% rename from patches/server/0909-Fix-spigot-s-Forced-Stats.patch rename to patches/server/0908-Fix-spigot-s-Forced-Stats.patch diff --git a/patches/server/0910-Add-missing-InventoryHolders-to-inventories.patch b/patches/server/0909-Add-missing-InventoryHolders-to-inventories.patch similarity index 98% rename from patches/server/0910-Add-missing-InventoryHolders-to-inventories.patch rename to patches/server/0909-Add-missing-InventoryHolders-to-inventories.patch index a2c5867c17..7f32a639b2 100644 --- a/patches/server/0910-Add-missing-InventoryHolders-to-inventories.patch +++ b/patches/server/0909-Add-missing-InventoryHolders-to-inventories.patch @@ -77,7 +77,7 @@ index 428e454116804c27496cfbf796edd44780890d33..4c7e91977fa590abfe7eb3704d8008ed + // Paper end - Add missing InventoryHolders } diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index d0f55f0eb3208a072f205232b023c5f923dbcf3f..d11b2a26cbb031d18bfb9c54ac1c7932c5295dc6 100644 +index 1b6fd16d8c6195c6f7b65c7621d5f9bd15c46a75..7f513e8c4f81524aee9326ddbbc6bec0b3fa1b27 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -42,7 +42,7 @@ public class BeaconMenu extends AbstractContainerMenu { @@ -148,10 +148,10 @@ index 85e336637db8643fc5aca1dba724c9b341cbf46f..12b466ccb7c36021cf807c4f3fd2bcb0 @Override public Optional evaluate(BiFunction getter) { diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -index beec777ae79f6c649f5fa1f0a8a30ac3e272a129..46beb8e45788950b8ca863aaf07c6d0587d8f693 100644 +index 18612988acaee570038bffd1361aa3ffdc938852..2f62957e061f513e01ec617f22791a7f27d65f02 100644 --- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java +++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -@@ -59,7 +59,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -60,7 +60,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { public EnchantmentMenu(int syncId, Inventory playerInventory, ContainerLevelAccess context) { super(MenuType.ENCHANTMENT, syncId); diff --git a/patches/server/0911-Do-not-read-tile-entities-in-chunks-that-are-positio.patch b/patches/server/0910-Do-not-read-tile-entities-in-chunks-that-are-positio.patch similarity index 100% rename from patches/server/0911-Do-not-read-tile-entities-in-chunks-that-are-positio.patch rename to patches/server/0910-Do-not-read-tile-entities-in-chunks-that-are-positio.patch diff --git a/patches/server/0912-Add-missing-logs-for-log-ips-config-option.patch b/patches/server/0911-Add-missing-logs-for-log-ips-config-option.patch similarity index 100% rename from patches/server/0912-Add-missing-logs-for-log-ips-config-option.patch rename to patches/server/0911-Add-missing-logs-for-log-ips-config-option.patch diff --git a/patches/server/0913-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch b/patches/server/0912-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch similarity index 100% rename from patches/server/0913-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch rename to patches/server/0912-Fix-race-condition-on-UpgradeData.BlockFixers-class-.patch diff --git a/patches/server/0914-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch b/patches/server/0913-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch similarity index 100% rename from patches/server/0914-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch rename to patches/server/0913-Fix-NPE-in-AdvancementProgress-getDateAwarded.patch diff --git a/patches/server/0915-Fix-team-sidebar-objectives-not-being-cleared.patch b/patches/server/0914-Fix-team-sidebar-objectives-not-being-cleared.patch similarity index 100% rename from patches/server/0915-Fix-team-sidebar-objectives-not-being-cleared.patch rename to patches/server/0914-Fix-team-sidebar-objectives-not-being-cleared.patch diff --git a/patches/server/0916-Fix-missing-map-initialize-event-call.patch b/patches/server/0915-Fix-missing-map-initialize-event-call.patch similarity index 95% rename from patches/server/0916-Fix-missing-map-initialize-event-call.patch rename to patches/server/0915-Fix-missing-map-initialize-event-call.patch index df02af5590..fd2193a41f 100644 --- a/patches/server/0916-Fix-missing-map-initialize-event-call.patch +++ b/patches/server/0915-Fix-missing-map-initialize-event-call.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Fix missing map initialize event call 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 751efd2400a1c6fa6e1db72080c4f17fa9a9c548..b37cad7d65e72ead9f3967baaae45f1b734ad726 100644 +index 055fcf3d51852ca466c7189f36382e0b0d0d86d2..2da315d288efa66f7bff96923ebd5eac5130ba39 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1664,13 +1664,24 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0917-Update-entity-data-when-attaching-firework-to-entity.patch b/patches/server/0916-Update-entity-data-when-attaching-firework-to-entity.patch similarity index 100% rename from patches/server/0917-Update-entity-data-when-attaching-firework-to-entity.patch rename to patches/server/0916-Update-entity-data-when-attaching-firework-to-entity.patch diff --git a/patches/server/0918-Fix-UnsafeValues-loadAdvancement.patch b/patches/server/0917-Fix-UnsafeValues-loadAdvancement.patch similarity index 93% rename from patches/server/0918-Fix-UnsafeValues-loadAdvancement.patch rename to patches/server/0917-Fix-UnsafeValues-loadAdvancement.patch index f14a906ec4..e79bc2f38e 100644 --- a/patches/server/0918-Fix-UnsafeValues-loadAdvancement.patch +++ b/patches/server/0917-Fix-UnsafeValues-loadAdvancement.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix UnsafeValues#loadAdvancement diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 4a978ebf1b5796833d83939a9502934d18ebb549..a7a1c9962a57fc9ed99f1523b2f5230a55b2afd1 100644 +index 72e86de0d3e9448b5689790b054b5a672ee26311..8c7ab4612bd5a86ad1c722663f4831769b86b564 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -319,7 +319,27 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -323,7 +323,27 @@ public final class CraftMagicNumbers implements UnsafeValues { JsonElement jsonelement = ServerAdvancementManager.GSON.fromJson(advancement, JsonElement.class); net.minecraft.advancements.Advancement nms = net.minecraft.advancements.Advancement.CODEC.parse(JsonOps.INSTANCE, jsonelement).getOrThrow(JsonParseException::new); if (nms != null) { diff --git a/patches/server/0919-Add-player-idle-duration-API.patch b/patches/server/0918-Add-player-idle-duration-API.patch similarity index 85% rename from patches/server/0919-Add-player-idle-duration-API.patch rename to patches/server/0918-Add-player-idle-duration-API.patch index 3aaeed1d13..6c4c560343 100644 --- a/patches/server/0919-Add-player-idle-duration-API.patch +++ b/patches/server/0918-Add-player-idle-duration-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add player idle duration API Implements API for getting and resetting a player's idle duration. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8f92ff51647a1919d90219d0cab1710aa9ff7361..e2986f07a7f7a3f15275fa6366ebaaf65019036d 100644 +index 4bdbc94f7221a88ee073e73ec0a13af51f704478..9c818bb1ea5c9dc8764845d5930d60503fc06f54 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3394,6 +3394,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3391,6 +3391,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end diff --git a/patches/server/0920-Don-t-check-if-we-can-see-non-visible-entities.patch b/patches/server/0919-Don-t-check-if-we-can-see-non-visible-entities.patch similarity index 100% rename from patches/server/0920-Don-t-check-if-we-can-see-non-visible-entities.patch rename to patches/server/0919-Don-t-check-if-we-can-see-non-visible-entities.patch diff --git a/patches/server/0921-Fix-NPE-in-SculkBloomEvent-world-access.patch b/patches/server/0920-Fix-NPE-in-SculkBloomEvent-world-access.patch similarity index 100% rename from patches/server/0921-Fix-NPE-in-SculkBloomEvent-world-access.patch rename to patches/server/0920-Fix-NPE-in-SculkBloomEvent-world-access.patch diff --git a/patches/server/0922-Allow-null-itemstack-for-Player-sendEquipmentChange.patch b/patches/server/0921-Allow-null-itemstack-for-Player-sendEquipmentChange.patch similarity index 90% rename from patches/server/0922-Allow-null-itemstack-for-Player-sendEquipmentChange.patch rename to patches/server/0921-Allow-null-itemstack-for-Player-sendEquipmentChange.patch index 2778d6eb28..bb8021000e 100644 --- a/patches/server/0922-Allow-null-itemstack-for-Player-sendEquipmentChange.patch +++ b/patches/server/0921-Allow-null-itemstack-for-Player-sendEquipmentChange.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow null itemstack for Player#sendEquipmentChange diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e2986f07a7f7a3f15275fa6366ebaaf65019036d..483221803ec1f1c78da1f83ccf42b041cb782d7a 100644 +index 9c818bb1ea5c9dc8764845d5930d60503fc06f54..e582f9bad4173886905e33861da2493981bc7f4d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1125,7 +1125,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0923-Optimize-VarInts.patch b/patches/server/0922-Optimize-VarInts.patch similarity index 100% rename from patches/server/0923-Optimize-VarInts.patch rename to patches/server/0922-Optimize-VarInts.patch diff --git a/patches/server/0924-Add-API-to-get-the-collision-shape-of-a-block-before.patch b/patches/server/0923-Add-API-to-get-the-collision-shape-of-a-block-before.patch similarity index 94% rename from patches/server/0924-Add-API-to-get-the-collision-shape-of-a-block-before.patch rename to patches/server/0923-Add-API-to-get-the-collision-shape-of-a-block-before.patch index ac06d6fe4b..48e81c5809 100644 --- a/patches/server/0924-Add-API-to-get-the-collision-shape-of-a-block-before.patch +++ b/patches/server/0923-Add-API-to-get-the-collision-shape-of-a-block-before.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add API to get the collision shape of a block before it's diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 784daa5e6c9a940966a32b6251a810e6f9664936..d6c4ddd3a4a57c92380672336aa1146810cf892b 100644 +index de4bbb73a78d037b99d662df130c7e122fda6cee..162e10ce5481d1f94afae595114920ef9df51c61 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -679,6 +679,20 @@ public class CraftBlockData implements BlockData { diff --git a/patches/server/0925-Add-predicate-for-blocks-when-raytracing.patch b/patches/server/0924-Add-predicate-for-blocks-when-raytracing.patch similarity index 100% rename from patches/server/0925-Add-predicate-for-blocks-when-raytracing.patch rename to patches/server/0924-Add-predicate-for-blocks-when-raytracing.patch diff --git a/patches/server/0926-Broadcast-take-item-packets-with-collector-as-source.patch b/patches/server/0925-Broadcast-take-item-packets-with-collector-as-source.patch similarity index 92% rename from patches/server/0926-Broadcast-take-item-packets-with-collector-as-source.patch rename to patches/server/0925-Broadcast-take-item-packets-with-collector-as-source.patch index ba525debbf..c1b5abaf2a 100644 --- a/patches/server/0926-Broadcast-take-item-packets-with-collector-as-source.patch +++ b/patches/server/0925-Broadcast-take-item-packets-with-collector-as-source.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Broadcast take item packets with collector as source This fixes players (which can't view the collector) seeing item pickups with themselves as the target. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d84193a413fbdf76ddb70282d92e6d45b0424384..1784a1881dc7f4b7148abf94bc7d7750c810997b 100644 +index 454d4fa966fd83632ae237bc3e94fddc68e9a8ad..c5cc7edd3d100b31a6319b6924de524305adb023 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3714,7 +3714,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0927-Expand-LingeringPotion-API.patch b/patches/server/0926-Expand-LingeringPotion-API.patch similarity index 100% rename from patches/server/0927-Expand-LingeringPotion-API.patch rename to patches/server/0926-Expand-LingeringPotion-API.patch diff --git a/patches/server/0928-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch b/patches/server/0927-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch similarity index 100% rename from patches/server/0928-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch rename to patches/server/0927-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch diff --git a/patches/server/0929-Add-hand-to-fish-event-for-all-player-interactions.patch b/patches/server/0928-Add-hand-to-fish-event-for-all-player-interactions.patch similarity index 100% rename from patches/server/0929-Add-hand-to-fish-event-for-all-player-interactions.patch rename to patches/server/0928-Add-hand-to-fish-event-for-all-player-interactions.patch diff --git a/patches/server/0930-Fix-several-issues-with-EntityBreedEvent.patch b/patches/server/0929-Fix-several-issues-with-EntityBreedEvent.patch similarity index 100% rename from patches/server/0930-Fix-several-issues-with-EntityBreedEvent.patch rename to patches/server/0929-Fix-several-issues-with-EntityBreedEvent.patch diff --git a/patches/server/0931-Add-UUID-attribute-modifier-API.patch b/patches/server/0930-Add-UUID-attribute-modifier-API.patch similarity index 100% rename from patches/server/0931-Add-UUID-attribute-modifier-API.patch rename to patches/server/0930-Add-UUID-attribute-modifier-API.patch diff --git a/patches/server/0932-Fix-missing-event-call-for-entity-teleport-API.patch b/patches/server/0931-Fix-missing-event-call-for-entity-teleport-API.patch similarity index 100% rename from patches/server/0932-Fix-missing-event-call-for-entity-teleport-API.patch rename to patches/server/0931-Fix-missing-event-call-for-entity-teleport-API.patch diff --git a/patches/server/0933-Lazily-create-LootContext-for-criterions.patch b/patches/server/0932-Lazily-create-LootContext-for-criterions.patch similarity index 100% rename from patches/server/0933-Lazily-create-LootContext-for-criterions.patch rename to patches/server/0932-Lazily-create-LootContext-for-criterions.patch diff --git a/patches/server/0934-Don-t-fire-sync-events-during-worldgen.patch b/patches/server/0933-Don-t-fire-sync-events-during-worldgen.patch similarity index 97% rename from patches/server/0934-Don-t-fire-sync-events-during-worldgen.patch rename to patches/server/0933-Don-t-fire-sync-events-during-worldgen.patch index 144b9ec8bc..9b99893450 100644 --- a/patches/server/0934-Don-t-fire-sync-events-during-worldgen.patch +++ b/patches/server/0933-Don-t-fire-sync-events-during-worldgen.patch @@ -19,7 +19,7 @@ where generation happened directly to a ServerLevel and the entity still has the flag set. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index b37cad7d65e72ead9f3967baaae45f1b734ad726..4e5b08093413fb6571a3c49b1563f50b05d8fce1 100644 +index 2da315d288efa66f7bff96923ebd5eac5130ba39..39cf7ae086108d8077121829368b81605d046fab 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1226,6 +1226,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -31,7 +31,7 @@ index b37cad7d65e72ead9f3967baaae45f1b734ad726..4e5b08093413fb6571a3c49b1563f50b if (entity.valid) { MinecraftServer.LOGGER.error("Attempted Double World add on {}", entity, new Throwable()); diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index acf2cc8afaf4dee193ecf3bfc4a39b8c39ffc376..ee38f76e46c20e9fadfb5d4d602b7b82a8a22e51 100644 +index 7f2ffffa270f493224ea97fcd0e862baf36ae40c..df82f696dc3a3ce388cfedbede22f503575a888a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -650,7 +650,11 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -68,7 +68,7 @@ index d769dc472d3f12bf1e30ddd767a76659b734caac..8c7cc9c5af0b8d8bef9b6e2d3d3e723c }, () -> { EntityType.LOGGER.warn("Skipping Entity with id {}", nbt.getString("id")); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 1784a1881dc7f4b7148abf94bc7d7750c810997b..6b156049b06b38afbbd7cf3155b06601e334a805 100644 +index c5cc7edd3d100b31a6319b6924de524305adb023..048e8dcdc56d02a5466085f4842fdd7f8f5f12a8 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1163,6 +1163,11 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0935-Add-Structure-check-API.patch b/patches/server/0934-Add-Structure-check-API.patch similarity index 100% rename from patches/server/0935-Add-Structure-check-API.patch rename to patches/server/0934-Add-Structure-check-API.patch diff --git a/patches/server/0936-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch b/patches/server/0935-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch similarity index 88% rename from patches/server/0936-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch rename to patches/server/0935-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch index fe101a09ac..32337c9ace 100644 --- a/patches/server/0936-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch +++ b/patches/server/0935-Fix-CraftMetaItem-getAttributeModifier-duplication-c.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix CraftMetaItem#getAttributeModifier duplication check diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 1c5e9d142783bf6995941bffa78bdd2da215b4d0..423951d636095de0b0bfcd27a49d69e50be73bc3 100644 +index 43fad0ad01712da8d8bdcd54078aaa7b5fbc2720..d90876888c2dedbdedd63cff932f48da286c8172 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -1277,7 +1277,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1285,7 +1285,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null"); this.checkAttributeList(); for (Map.Entry entry : this.attributeModifiers.entries()) { diff --git a/patches/server/0937-Restore-vanilla-entity-drops-behavior.patch b/patches/server/0936-Restore-vanilla-entity-drops-behavior.patch similarity index 83% rename from patches/server/0937-Restore-vanilla-entity-drops-behavior.patch rename to patches/server/0936-Restore-vanilla-entity-drops-behavior.patch index 0360231caf..d855bfb740 100644 --- a/patches/server/0937-Restore-vanilla-entity-drops-behavior.patch +++ b/patches/server/0936-Restore-vanilla-entity-drops-behavior.patch @@ -9,7 +9,7 @@ on dropping the item instead of generalizing it for all dropped items like CB does. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e447aa85b51c7e28fcd89bf8aa7602c88d599239..0d4224c56bcdff54bbf6cc2d9d25e4d7b0ba187b 100644 +index e10c8309e184fe2c5c9682aa901ed7a320980431..3a3c17e62244a16cbad5558d55bcf8e330997acb 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -968,22 +968,20 @@ public class ServerPlayer extends Player { @@ -50,7 +50,7 @@ index e447aa85b51c7e28fcd89bf8aa7602c88d599239..0d4224c56bcdff54bbf6cc2d9d25e4d7 if (entityitem == null) { return null; diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index ee38f76e46c20e9fadfb5d4d602b7b82a8a22e51..4e96b6c05bf8b8235e91bdd26e5615c5299fd9aa 100644 +index df82f696dc3a3ce388cfedbede22f503575a888a..0782fd7bf29aa4d30ea5a9a303cc43620fe5b06e 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -2524,6 +2524,25 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess @@ -104,7 +104,7 @@ index ee38f76e46c20e9fadfb5d4d602b7b82a8a22e51..4e96b6c05bf8b8235e91bdd26e5615c5 return this.spawnAtLocation(entityitem); } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 6b156049b06b38afbbd7cf3155b06601e334a805..f024038d473e424aa08256040c1591d23871c20c 100644 +index 048e8dcdc56d02a5466085f4842fdd7f8f5f12a8..9a5b42bce2604d17ed4cf2c8c7eea55557ec3eff 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -266,7 +266,7 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -134,7 +134,7 @@ index aa22829c3d41118664a872540fdc8f716120c407..c23d4ee0a16d1ae7168b2496d97189a1 } diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index b1b0b0554e0ad035463fd53aa440d9c079b7cfb4..2ed6845f16fab175e2e9e96e76391e63ab4a43e2 100644 +index 767f076c6fad7a1146bc409bf47f1d2fc3caf3ce..095a678e3ff7b2bd713fe5bc8542b35ac91d159c 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java @@ -614,7 +614,7 @@ public class ArmorStand extends LivingEntity { @@ -165,38 +165,39 @@ index b1b0b0554e0ad035463fd53aa440d9c079b7cfb4..2ed6845f16fab175e2e9e96e76391e63 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index da89b73b08b27ec979545e825efe15aec5cf3af2..fe2fd48e8e8c7d5aed409605dda969d9017889d0 100644 +index e100aaccab7e50c6d71b350443e3779472c910eb..313916df9dd87f9835897fc35de50648e180b042 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -964,17 +964,23 @@ public class CraftEventFactory { +@@ -964,18 +964,24 @@ public class CraftEventFactory { } - public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim) { -- return CraftEventFactory.callEntityDeathEvent(victim, new ArrayList(0)); -+ return CraftEventFactory.callEntityDeathEvent(victim, new ArrayList<>(0)); // Paper - Restore vanilla drops behavior + public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource) { +- return CraftEventFactory.callEntityDeathEvent(victim, damageSource, new ArrayList(0)); ++ return CraftEventFactory.callEntityDeathEvent(victim, damageSource, new ArrayList<>(0)); // Paper - Restore vanilla drops behavior } -- public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List drops) { -+ public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List drops) { // Paper - Restore vanilla drops behavior +- public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List drops) { ++ public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List drops) { // Paper - Restore vanilla drops behavior // Paper start - return CraftEventFactory.callEntityDeathEvent(victim, drops, com.google.common.util.concurrent.Runnables.doNothing()); + return CraftEventFactory.callEntityDeathEvent(victim, damageSource, drops, com.google.common.util.concurrent.Runnables.doNothing()); } -- public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List drops, Runnable lootCheck) { +- public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List drops, Runnable lootCheck) { + + private static final java.util.function.Function FROM_FUNCTION = stack -> { + if (stack == null) return null; + return new Entity.DefaultDrop(CraftItemType.bukkitToMinecraft(stack.getType()), stack, null); + }; + -+ public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List drops, Runnable lootCheck) { // Paper ++ public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List drops, Runnable lootCheck) { // Paper // Paper end CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); -- EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); -+ EntityDeathEvent event = new EntityDeathEvent(entity, new io.papermc.paper.util.TransformingRandomAccessList<>(drops, Entity.DefaultDrop::stack, FROM_FUNCTION), victim.getExpReward()); // Paper - Restore vanilla drops behavior + CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource); +- EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward()); ++ EntityDeathEvent event = new EntityDeathEvent(entity, bukkitDamageSource, new io.papermc.paper.util.TransformingRandomAccessList<>(drops, Entity.DefaultDrop::stack, FROM_FUNCTION), victim.getExpReward()); // Paper - Restore vanilla drops behavior populateFields(victim, event); // Paper - make cancellable CraftWorld world = (CraftWorld) entity.getWorld(); Bukkit.getServer().getPluginManager().callEvent(event); -@@ -988,19 +994,23 @@ public class CraftEventFactory { +@@ -989,20 +995,24 @@ public class CraftEventFactory { victim.expToDrop = event.getDroppedExp(); lootCheck.run(); // Paper - advancement triggers before destroying items @@ -216,15 +217,16 @@ index da89b73b08b27ec979545e825efe15aec5cf3af2..fe2fd48e8e8c7d5aed409605dda969d9 return event; } -- public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, List drops, net.kyori.adventure.text.Component deathMessage, boolean keepInventory) { // Paper - Adventure -+ public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, List drops, net.kyori.adventure.text.Component deathMessage, boolean keepInventory) { // Paper - Adventure & Restore vanilla drops behavior +- public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, DamageSource damageSource, List drops, net.kyori.adventure.text.Component deathMessage, boolean keepInventory) { // Paper - Adventure ++ public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, DamageSource damageSource, List drops, net.kyori.adventure.text.Component deathMessage, boolean keepInventory) { // Paper - Adventure & Restore vanilla drops behavior CraftPlayer entity = victim.getBukkitEntity(); -- PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); -+ PlayerDeathEvent event = new PlayerDeathEvent(entity, new io.papermc.paper.util.TransformingRandomAccessList<>(drops, Entity.DefaultDrop::stack, FROM_FUNCTION), victim.getExpReward(), 0, deathMessage); // Paper - Restore vanilla drops behavior + CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource); +- PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(), 0, deathMessage); ++ PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, new io.papermc.paper.util.TransformingRandomAccessList<>(drops, Entity.DefaultDrop::stack, FROM_FUNCTION), victim.getExpReward(), 0, deathMessage); // Paper - Restore vanilla drops behavior event.setKeepInventory(keepInventory); event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel populateFields(victim, event); // Paper - make cancellable -@@ -1019,10 +1029,14 @@ public class CraftEventFactory { +@@ -1021,10 +1031,14 @@ public class CraftEventFactory { victim.expToDrop = event.getDroppedExp(); victim.newExp = event.getNewExp(); diff --git a/patches/server/0938-Dont-resend-blocks-on-interactions.patch b/patches/server/0937-Dont-resend-blocks-on-interactions.patch similarity index 100% rename from patches/server/0938-Dont-resend-blocks-on-interactions.patch rename to patches/server/0937-Dont-resend-blocks-on-interactions.patch diff --git a/patches/server/0939-add-more-scoreboard-API.patch b/patches/server/0938-add-more-scoreboard-API.patch similarity index 100% rename from patches/server/0939-add-more-scoreboard-API.patch rename to patches/server/0938-add-more-scoreboard-API.patch diff --git a/patches/server/0940-Improve-Registry.patch b/patches/server/0939-Improve-Registry.patch similarity index 92% rename from patches/server/0940-Improve-Registry.patch rename to patches/server/0939-Improve-Registry.patch index 2f8634794b..966048fae0 100644 --- a/patches/server/0940-Improve-Registry.patch +++ b/patches/server/0939-Improve-Registry.patch @@ -5,18 +5,18 @@ Subject: [PATCH] Improve Registry diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -index e2fcbeb8635280fcd2aeedff9803386c9bcabb0c..a3a00778a8fdbc13f8adbf4e4fbc4f1303d22789 100644 +index 0b19ddf411933240f3cdc6b4e9ce3817c8d45af1..5c725faae98a126ee0e34eea53cfa484d2315709 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java -@@ -104,6 +104,7 @@ public class CraftRegistry implements Registry { +@@ -144,6 +144,7 @@ public class CraftRegistry implements Registry { private final Class bukkitClass; // Paper - relax preload class private final Map cache = new HashMap<>(); + private final Map byValue = new java.util.IdentityHashMap<>(); // Paper - improve Registry private final net.minecraft.core.Registry minecraftRegistry; private final BiFunction minecraftToBukkit; - private boolean init; -@@ -148,6 +149,7 @@ public class CraftRegistry implements Registry { + private final BiFunction serializationUpdater; // Paper - rename to make it *clear* what it is *only* for +@@ -192,6 +193,7 @@ public class CraftRegistry implements Registry { } this.cache.put(namespacedKey, bukkit); @@ -24,7 +24,7 @@ index e2fcbeb8635280fcd2aeedff9803386c9bcabb0c..a3a00778a8fdbc13f8adbf4e4fbc4f13 return bukkit; } -@@ -170,4 +172,11 @@ public class CraftRegistry implements Registry { +@@ -214,4 +216,11 @@ public class CraftRegistry implements Registry { return this.minecraftToBukkit.apply(namespacedKey, minecraft); } diff --git a/patches/server/0941-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch b/patches/server/0940-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch similarity index 97% rename from patches/server/0941-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch rename to patches/server/0940-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch index 9bde782301..20238b3ebf 100644 --- a/patches/server/0941-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch +++ b/patches/server/0940-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch @@ -26,7 +26,7 @@ index a306b30af19277386a2f3e560b4902a8b5796f2a..54851f6cc0d5fddb32a9a1e84a4f5ae4 x = to.getX(); y = to.getY(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index f024038d473e424aa08256040c1591d23871c20c..27e74611229e9558f1e015c68cb0cc91290c42b8 100644 +index 9a5b42bce2604d17ed4cf2c8c7eea55557ec3eff..5a47752a1c7da9b9da692c34ef046988924b6266 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -4189,7 +4189,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0942-Add-experience-points-API.patch b/patches/server/0941-Add-experience-points-API.patch similarity index 97% rename from patches/server/0942-Add-experience-points-API.patch rename to patches/server/0941-Add-experience-points-API.patch index 84a3db0a12..f0ca6dbcf9 100644 --- a/patches/server/0942-Add-experience-points-API.patch +++ b/patches/server/0941-Add-experience-points-API.patch @@ -18,7 +18,7 @@ index 96fc37c871566ec41c42bd0e0f4a147044c239b4..10b62625323e24aa4e9e01e7c0c02d8c // Paper start - send while respecting visibility private static void sendSoundEffect(Player fromEntity, double x, double y, double z, SoundEvent soundEffect, SoundSource soundCategory, float volume, float pitch) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 483221803ec1f1c78da1f83ccf42b041cb782d7a..e1af41a8d938420694a5342f08b811615dc46003 100644 +index e582f9bad4173886905e33861da2493981bc7f4d..b60db7df3cef33a4a6a9804104759ecaa3ae330a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1902,6 +1902,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0943-Add-drops-to-shear-events.patch b/patches/server/0942-Add-drops-to-shear-events.patch similarity index 99% rename from patches/server/0943-Add-drops-to-shear-events.patch rename to patches/server/0942-Add-drops-to-shear-events.patch index ad99ccecb4..8c729c0f48 100644 --- a/patches/server/0943-Add-drops-to-shear-events.patch +++ b/patches/server/0942-Add-drops-to-shear-events.patch @@ -275,10 +275,10 @@ index 9c0bfddd479eef688d2509ad700371c3c860ff1a..e9f9b041ae7195e9d23bd446454b1d8c public boolean readyForShearing() { return !this.isSheared() && this.isAlive(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index fe2fd48e8e8c7d5aed409605dda969d9017889d0..31bc4a0408da3bf3b0d8eb56b045e9742a898a39 100644 +index 313916df9dd87f9835897fc35de50648e180b042..1d526e76eca94cf2dce473cff2b56ea9f7f0ec18 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1669,20 +1669,20 @@ public class CraftEventFactory { +@@ -1666,20 +1666,20 @@ public class CraftEventFactory { player.level().getCraftServer().getPluginManager().callEvent(event); } diff --git a/patches/server/0944-Add-PlayerShieldDisableEvent.patch b/patches/server/0943-Add-PlayerShieldDisableEvent.patch similarity index 100% rename from patches/server/0944-Add-PlayerShieldDisableEvent.patch rename to patches/server/0943-Add-PlayerShieldDisableEvent.patch diff --git a/patches/server/0945-Validate-ResourceLocation-in-NBT-reading.patch b/patches/server/0944-Validate-ResourceLocation-in-NBT-reading.patch similarity index 99% rename from patches/server/0945-Validate-ResourceLocation-in-NBT-reading.patch rename to patches/server/0944-Validate-ResourceLocation-in-NBT-reading.patch index 6de34aa3c7..fbf7709b9c 100644 --- a/patches/server/0945-Validate-ResourceLocation-in-NBT-reading.patch +++ b/patches/server/0944-Validate-ResourceLocation-in-NBT-reading.patch @@ -53,7 +53,7 @@ index 8c7cc9c5af0b8d8bef9b6e2d3d3e723cd76f3212..56b51096ca4147363a843accf6ef2510 @Nullable diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 27e74611229e9558f1e015c68cb0cc91290c42b8..afd665420d3f839fb330f7f25c62a64ace027ef1 100644 +index 5a47752a1c7da9b9da692c34ef046988924b6266..480d7633016ac641d4318f7eb971e0c721c5397a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -911,12 +911,13 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0946-Properly-handle-experience-dropping-on-block-break.patch b/patches/server/0945-Properly-handle-experience-dropping-on-block-break.patch similarity index 100% rename from patches/server/0946-Properly-handle-experience-dropping-on-block-break.patch rename to patches/server/0945-Properly-handle-experience-dropping-on-block-break.patch diff --git a/patches/server/0947-Fixup-NamespacedKey-handling.patch b/patches/server/0946-Fixup-NamespacedKey-handling.patch similarity index 79% rename from patches/server/0947-Fixup-NamespacedKey-handling.patch rename to patches/server/0946-Fixup-NamespacedKey-handling.patch index 20c52c2fba..08f6980461 100644 --- a/patches/server/0947-Fixup-NamespacedKey-handling.patch +++ b/patches/server/0946-Fixup-NamespacedKey-handling.patch @@ -31,21 +31,17 @@ index fb72bdea520ccc0928cfbda0569e02a1917a7e86..6f6e19b7b57cb3070ef5b6810d844934 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java -index 6fd032dfb50f6051d6a0b5fbd9d76f42c23354d6..c52f64bb608b67ac7e30fec0c3c9bdef080fa716 100644 +index cc97638e038ea64ad180ebfded2528aa07d1809e..10e4318782107644f67818109784fff60d017e0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java +++ b/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java -@@ -29,7 +29,10 @@ public class CraftAttribute { - public static Attribute stringToBukkit(String bukkit) { - Preconditions.checkArgument(bukkit != null); +@@ -37,6 +37,7 @@ public class CraftAttribute { + string = FieldRename.convertAttributeName(ApiVersion.CURRENT, string); + string = string.toLowerCase(Locale.ROOT); + NamespacedKey key = NamespacedKey.fromString(string); ++ if (key == null) return null; // Paper - Fixup NamespacedKey handling -- return Registry.ATTRIBUTE.get(NamespacedKey.fromString(bukkit)); -+ // Paper start - Fixup NamespacedKey handling -+ final NamespacedKey key = NamespacedKey.fromString(bukkit); -+ return key != null ? Registry.ATTRIBUTE.get(key) : null; -+ // Paper end - Fixup NamespacedKey handling - } - - public static net.minecraft.world.entity.ai.attributes.Attribute bukkitToMinecraft(Attribute bukkit) { + // Now also convert from when keys where saved + return CraftRegistry.get(Registry.ATTRIBUTE, key, ApiVersion.CURRENT); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java index 12b95c4455e741b65b844eab362f02bce54eb525..ac9279f7acb7077c08d7741435126adfef9e17b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java @@ -75,19 +71,19 @@ index 12b95c4455e741b65b844eab362f02bce54eb525..ac9279f7acb7077c08d7741435126adf CraftMetaArmor(Map map) { super(map); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java -index e17093289884b904fc3720600ffa3e772e0935b3..7032f07e3872c65bbebb905e9d50057a113100d4 100644 +index 67905f804ccc102faa942499f5ba218f710ab9cc..99bf6132184b1b7846270fc9a1b9e97048306a3b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java -@@ -33,9 +33,14 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst +@@ -31,9 +31,14 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst super(tag); getOrEmpty(tag, CraftMetaMusicInstrument.GOAT_HORN_INSTRUMENT).ifPresent((instrument) -> { - this.instrument = CraftMusicInstrument.minecraftHolderToBukkit(instrument); -+ this.instrument = this.unwrapAndConvertHolder(Registry.INSTRUMENT, instrument); // Paper - fix upstream not handling custom instruments ++ this.instrument = this.unwrapAndConvertHolder(org.bukkit.Registry.INSTRUMENT, instrument); // Paper - fix upstream not handling custom instruments }); } + // Paper start - fixup upstream being dum -+ private T unwrapAndConvertHolder(final Registry registry, final net.minecraft.core.Holder value) { ++ private T unwrapAndConvertHolder(final org.bukkit.Registry registry, final net.minecraft.core.Holder value) { + return value.unwrap().map(key -> registry.get(org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(key.location())), v -> null); + } + // Paper end - fixup upstream being dum @@ -95,21 +91,17 @@ index e17093289884b904fc3720600ffa3e772e0935b3..7032f07e3872c65bbebb905e9d50057a CraftMetaMusicInstrument(Map map) { super(map); diff --git a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionType.java b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionType.java -index 7dc83b02810490c21b68be962c5ef6eb45e32baf..71cc45c4ef9ab98d509b0f8bf7b033a2b32641db 100644 +index 82a50b06c08b632f77d73745e1fa9bd22dfd950a..f1d8ed4a2b8959873b02d57f6a40323a841f3d7f 100644 --- a/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionType.java +++ b/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionType.java -@@ -61,7 +61,10 @@ public class CraftPotionType implements PotionType.InternalPotionData { - public static PotionType stringToBukkit(String string) { - Preconditions.checkArgument(string != null); +@@ -69,6 +69,7 @@ public class CraftPotionType implements PotionType.InternalPotionData { + string = FieldRename.convertPotionTypeName(ApiVersion.CURRENT, string); + string = string.toLowerCase(Locale.ROOT); + NamespacedKey key = NamespacedKey.fromString(string); ++ if (key == null) return null; // Paper - Fixup NamespacedKey handling -- return Registry.POTION.get(NamespacedKey.fromString(string)); -+ // Paper start - Fixup NamespacedKey handling -+ final NamespacedKey key = NamespacedKey.fromString(string); -+ return key != null ? Registry.POTION.get(key) : null; -+ // Paper end - Fixup NamespacedKey handling - } - - private final NamespacedKey key; + // Now also convert from when keys where saved + return CraftRegistry.get(Registry.POTION, key, ApiVersion.CURRENT); diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java b/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java index 5f40d240b879e3989897b6e45725a8e5a6a7f194..5014192edb9616ce725fc1592832034789527b6f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java diff --git a/patches/server/0948-Expose-LootTable-of-DecoratedPot.patch b/patches/server/0947-Expose-LootTable-of-DecoratedPot.patch similarity index 100% rename from patches/server/0948-Expose-LootTable-of-DecoratedPot.patch rename to patches/server/0947-Expose-LootTable-of-DecoratedPot.patch diff --git a/patches/server/0949-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/0948-Reduce-allocation-of-Vec3D-by-entity-tracker.patch similarity index 100% rename from patches/server/0949-Reduce-allocation-of-Vec3D-by-entity-tracker.patch rename to patches/server/0948-Reduce-allocation-of-Vec3D-by-entity-tracker.patch diff --git a/patches/server/0950-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch b/patches/server/0949-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch similarity index 100% rename from patches/server/0950-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch rename to patches/server/0949-Add-PlayerTradeEvent-and-PlayerPurchaseEvent.patch diff --git a/patches/server/0951-Add-ShulkerDuplicateEvent.patch b/patches/server/0950-Add-ShulkerDuplicateEvent.patch similarity index 100% rename from patches/server/0951-Add-ShulkerDuplicateEvent.patch rename to patches/server/0950-Add-ShulkerDuplicateEvent.patch diff --git a/patches/server/0952-Add-api-for-spawn-egg-texture-colors.patch b/patches/server/0951-Add-api-for-spawn-egg-texture-colors.patch similarity index 82% rename from patches/server/0952-Add-api-for-spawn-egg-texture-colors.patch rename to patches/server/0951-Add-api-for-spawn-egg-texture-colors.patch index cff7fe211e..b7957271cb 100644 --- a/patches/server/0952-Add-api-for-spawn-egg-texture-colors.patch +++ b/patches/server/0951-Add-api-for-spawn-egg-texture-colors.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Add api for spawn egg texture colors diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index a7a1c9962a57fc9ed99f1523b2f5230a55b2afd1..cf29c541b74ab37592997c31adb7b240d92b2bea 100644 +index 8c7ab4612bd5a86ad1c722663f4831769b86b564..f45604d9193e7f1a646ff98b2e110f4e334a4368 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -644,6 +644,15 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -663,6 +663,15 @@ public final class CraftMagicNumbers implements UnsafeValues { + return CraftRegistry.get(registry, namespacedKey, ApiVersion.CURRENT); } - // Paper end + // Paper start - spawn egg color visibility + @Override diff --git a/patches/server/0953-Add-Lifecycle-Event-system.patch b/patches/server/0952-Add-Lifecycle-Event-system.patch similarity index 99% rename from patches/server/0953-Add-Lifecycle-Event-system.patch rename to patches/server/0952-Add-Lifecycle-Event-system.patch index e725e14bc4..62b493a87f 100644 --- a/patches/server/0953-Add-Lifecycle-Event-system.patch +++ b/patches/server/0952-Add-Lifecycle-Event-system.patch @@ -707,10 +707,10 @@ index 2e96308696e131f3f013469a395e5ddda2c5d529..65a66e484c1c39c5f41d97db52f31c67 } catch (Throwable e) { LOGGER.error("Failed to run bootstrapper for %s. This plugin will not be loaded.".formatted(provider.getSource()), e); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b1cfc6f5a2511e9bb145442dfb765951a1ee0fca..b9ad8446d702f729673d75dd6978b9db820f380b 100644 +index 58c0778741a14c252ee01536b6fd9a3c5bcbc58f..2e026aca8e545b857b3ed0eaf3c57acc3657635c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1017,6 +1017,11 @@ public final class CraftServer implements Server { +@@ -1018,6 +1018,11 @@ public final class CraftServer implements Server { @Override public void reload() { @@ -739,10 +739,10 @@ index d96399e9bf1a58db5a4a22e58abb99e7660e0694..66bdac50130f523f9dc4379b103b7a46 + // Paper end - lifecycle events } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index cf29c541b74ab37592997c31adb7b240d92b2bea..12289984948b0cc34df39767945222616844aebb 100644 +index f45604d9193e7f1a646ff98b2e110f4e334a4368..5688847458dde4cd9371e465ba73b2794639fa4d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -653,6 +653,13 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -672,6 +672,13 @@ public final class CraftMagicNumbers implements UnsafeValues { } // Paper end - spawn egg color visibility diff --git a/patches/server/0954-ItemStack-Tooltip-API.patch b/patches/server/0953-ItemStack-Tooltip-API.patch similarity index 90% rename from patches/server/0954-ItemStack-Tooltip-API.patch rename to patches/server/0953-ItemStack-Tooltip-API.patch index 7a2e3afd0a..99c3106c3d 100644 --- a/patches/server/0954-ItemStack-Tooltip-API.patch +++ b/patches/server/0953-ItemStack-Tooltip-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack Tooltip API diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 12289984948b0cc34df39767945222616844aebb..4d66c0d64af800c92e84a40e90cda9c6a49d3f04 100644 +index 5688847458dde4cd9371e465ba73b2794639fa4d..a9ab74da54cdec04e2df12ab3c3332bb675ccae1 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -643,6 +643,20 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -647,6 +647,20 @@ public final class CraftMagicNumbers implements UnsafeValues { return org.bukkit.craftbukkit.CraftStatistic.getNMSStatistic(statistic).getName(); } // Paper end @@ -27,5 +27,5 @@ index 12289984948b0cc34df39767945222616844aebb..4d66c0d64af800c92e84a40e90cda9c6 + } + // Paper end - expose itemstack tooltip lines - // Paper start - spawn egg color visibility @Override + public String get(Class aClass, String s) { diff --git a/patches/server/0955-Add-getChunkSnapshot-includeLightData-parameter.patch b/patches/server/0954-Add-getChunkSnapshot-includeLightData-parameter.patch similarity index 100% rename from patches/server/0955-Add-getChunkSnapshot-includeLightData-parameter.patch rename to patches/server/0954-Add-getChunkSnapshot-includeLightData-parameter.patch diff --git a/patches/server/0956-Add-FluidState-API.patch b/patches/server/0955-Add-FluidState-API.patch similarity index 100% rename from patches/server/0956-Add-FluidState-API.patch rename to patches/server/0955-Add-FluidState-API.patch diff --git a/patches/server/0957-add-number-format-api.patch b/patches/server/0956-add-number-format-api.patch similarity index 100% rename from patches/server/0957-add-number-format-api.patch rename to patches/server/0956-add-number-format-api.patch diff --git a/patches/server/0958-improve-BanList-types.patch b/patches/server/0957-improve-BanList-types.patch similarity index 89% rename from patches/server/0958-improve-BanList-types.patch rename to patches/server/0957-improve-BanList-types.patch index b5d73be289..e4c96f87eb 100644 --- a/patches/server/0958-improve-BanList-types.patch +++ b/patches/server/0957-improve-BanList-types.patch @@ -5,10 +5,10 @@ Subject: [PATCH] improve BanList types diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index b9ad8446d702f729673d75dd6978b9db820f380b..271b376d51479a2adc42b41bb252e60234ddee5e 100644 +index 2e026aca8e545b857b3ed0eaf3c57acc3657635c..767bbe5e6e558a3e8913740a8016037356b8ede2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2222,6 +2222,21 @@ public final class CraftServer implements Server { +@@ -2223,6 +2223,21 @@ public final class CraftServer implements Server { }; } diff --git a/patches/server/0959-Expanded-Hopper-API.patch b/patches/server/0958-Expanded-Hopper-API.patch similarity index 100% rename from patches/server/0959-Expanded-Hopper-API.patch rename to patches/server/0958-Expanded-Hopper-API.patch diff --git a/patches/server/0960-Add-BlockBreakProgressUpdateEvent.patch b/patches/server/0959-Add-BlockBreakProgressUpdateEvent.patch similarity index 93% rename from patches/server/0960-Add-BlockBreakProgressUpdateEvent.patch rename to patches/server/0959-Add-BlockBreakProgressUpdateEvent.patch index 8ecbca8a5a..a5a136f346 100644 --- a/patches/server/0960-Add-BlockBreakProgressUpdateEvent.patch +++ b/patches/server/0959-Add-BlockBreakProgressUpdateEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add BlockBreakProgressUpdateEvent diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 4e5b08093413fb6571a3c49b1563f50b05d8fce1..57d96e809bc230bce5db589c9f150f614fcea699 100644 +index 39cf7ae086108d8077121829368b81605d046fab..4616672c4be74421e2acbc9df96f7c8ff2782e55 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1322,6 +1322,17 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0961-Deprecate-ItemStack-setType.patch b/patches/server/0960-Deprecate-ItemStack-setType.patch similarity index 100% rename from patches/server/0961-Deprecate-ItemStack-setType.patch rename to patches/server/0960-Deprecate-ItemStack-setType.patch diff --git a/patches/server/0962-Add-CartographyItemEvent.patch b/patches/server/0961-Add-CartographyItemEvent.patch similarity index 94% rename from patches/server/0962-Add-CartographyItemEvent.patch rename to patches/server/0961-Add-CartographyItemEvent.patch index 5709712651..c867a928b3 100644 --- a/patches/server/0962-Add-CartographyItemEvent.patch +++ b/patches/server/0961-Add-CartographyItemEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add CartographyItemEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index eea72bd54f69c872c416fd78ab76be124eca381c..37b4d668ab043a8dec01e5d444c3624346e6043d 100644 +index e13097ceba283fdf165d7e6327fe78590252fe94..bead9625a04a9c1139c54d6a56f055b80eb2d701 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3096,6 +3096,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl +@@ -3092,6 +3092,19 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } } diff --git a/patches/server/0963-More-Raid-API.patch b/patches/server/0962-More-Raid-API.patch similarity index 100% rename from patches/server/0963-More-Raid-API.patch rename to patches/server/0962-More-Raid-API.patch diff --git a/patches/server/0964-Add-onboarding-message-for-initial-server-start.patch b/patches/server/0963-Add-onboarding-message-for-initial-server-start.patch similarity index 95% rename from patches/server/0964-Add-onboarding-message-for-initial-server-start.patch rename to patches/server/0963-Add-onboarding-message-for-initial-server-start.patch index 29e25a735d..f208eae1d5 100644 --- a/patches/server/0964-Add-onboarding-message-for-initial-server-start.patch +++ b/patches/server/0963-Add-onboarding-message-for-initial-server-start.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add onboarding message for initial server start diff --git a/src/main/java/io/papermc/paper/configuration/Configurations.java b/src/main/java/io/papermc/paper/configuration/Configurations.java -index 522156e1b7578663c426fcaf7e47acb93d030486..4495e1e8930619a0d58745cc55c69a5b574eb698 100644 +index 7684e71f802f3d19e5340713b45cc84860ce9495..96142deb42700f888ea08689ab62c27ef2b881fd 100644 --- a/src/main/java/io/papermc/paper/configuration/Configurations.java +++ b/src/main/java/io/papermc/paper/configuration/Configurations.java @@ -129,6 +129,7 @@ public abstract class Configurations { @@ -17,7 +17,7 @@ index 522156e1b7578663c426fcaf7e47acb93d030486..4495e1e8930619a0d58745cc55c69a5b node = loader.load(); this.verifyGlobalConfigVersion(node); diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java -index d12fd313730c44dcec3c73fcd8c99c0c84f46743..5f59e733c00de9c0f5692b3b3c092a050a9f409f 100644 +index ab5089781b8866cd6ad1b9570634ba84d936cfe7..4de88f74182bb596c6b5ad0351cc0dacefd0ce96 100644 --- a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java +++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java @@ -25,6 +25,7 @@ public class GlobalConfiguration extends ConfigurationPart { @@ -29,7 +29,7 @@ index d12fd313730c44dcec3c73fcd8c99c0c84f46743..5f59e733c00de9c0f5692b3b3c092a05 return instance; } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 7cec7bc99787a85634236b68d551ec12561f382f..138ca522b2df3ccf49fcbd81446a73705141aa5f 100644 +index 1f41b2298e98d40c0419ba8220654d65174414c2..f87e3b00208aa0bec8f2219a8f1f96f20d3f12c5 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1132,6 +1132,16 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop resourceKey) { +- return this.source(resourceKey, entity, entity1); +- // CraftBukkit end ++ return this.source(attacker != null && source != null ? DamageTypes.PLAYER_EXPLOSION : DamageTypes.EXPLOSION, source, attacker); // Paper - revert to vanilla + } + + public DamageSource sonicBoom(Entity attacker) { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 4e96b6c05bf8b8235e91bdd26e5615c5299fd9aa..3c1bcf8d1a07b35a8688160c9f05f792451338a3 100644 +index 0782fd7bf29aa4d30ea5a9a303cc43620fe5b06e..3c1bcf8d1a07b35a8688160c9f05f792451338a3 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3195,7 +3195,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess return; } -- if (!this.hurt(this.damageSources().lightningBolt().customCausingEntity(lightning), 5.0F)) { +- if (!this.hurt(this.damageSources().lightningBolt().customEntityDamager(lightning), 5.0F)) { + if (!this.hurt(this.damageSources().lightningBolt().customEventDamager(lightning), 5.0F)) { // Paper - fix DamageSource API return; } // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -index 3eabf1e94c0a1086f471e30bf523581907169c58..ffffa53fcaa6ec8681b283fa20bb5a3320ad9c11 100644 +index b4d68a08ec1e4ec7bcc123bcb6c2dc90272430cf..ffffa53fcaa6ec8681b283fa20bb5a3320ad9c11 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java @@ -334,7 +334,7 @@ public class Turtle extends Animal { @Override public void thunderHit(ServerLevel world, LightningBolt lightning) { -- this.hurt(this.damageSources().lightningBolt().customCausingEntity(lightning), Float.MAX_VALUE); // CraftBukkit +- this.hurt(this.damageSources().lightningBolt().customEntityDamager(lightning), Float.MAX_VALUE); // CraftBukkit + this.hurt(this.damageSources().lightningBolt().customEventDamager(lightning), Float.MAX_VALUE); // CraftBukkit // Paper - fix DamageSource API } @@ -87,40 +107,40 @@ index 0ffff5329fa2c7833f9ec71528cb7f951cf78109..bf2d91bbb4bf401696f5f5d14a67e392 if (damager != null) { event = new HangingBreakByEntityEvent((Hanging) this.getBukkitEntity(), damager.getBukkitEntity(), source.is(DamageTypeTags.IS_EXPLOSION) ? HangingBreakEvent.RemoveCause.EXPLOSION : HangingBreakEvent.RemoveCause.ENTITY); diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java -index 4b94e21d05d6deae75f0c2fb711e43a4c7d06f90..cbcb2bfa8f91099e5c374f590f48885390bdf7a7 100644 +index 7db5de71b0353d9807978c0351870fd99b76ee67..0ae4ba060b2ce2c79e1235c939f3c1926eb6e33e 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java @@ -271,7 +271,7 @@ public class Creeper extends Monster implements PowerableMob { if (!event.isCancelled()) { // CraftBukkit end this.dead = true; -- this.level().explode(this, net.minecraft.world.level.Explosion.getDefaultDamageSource(this.level(), this).customCausingEntity(this.entityIgniter), null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit -+ this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit // Paper - fix DamageSource API +- this.level().explode(this, this.level().damageSources().explosion(this, this.entityIgniter, net.minecraft.world.damagesource.DamageTypes.EXPLOSION), null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit ++ this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit // Paper - fix DamageSource API (revert to vanilla, no, just no, don't change this) this.discard(EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause this.spawnLingeringCloud(); // CraftBukkit start diff --git a/src/main/java/net/minecraft/world/entity/projectile/EvokerFangs.java b/src/main/java/net/minecraft/world/entity/projectile/EvokerFangs.java -index eb764829bde34a835a151934267bfcf36d5239fa..f8aa723f18e28b02d4b7055404922ff8d7a73f8d 100644 +index edc5cfd3f3eab176df9080cf932dac3905f1b26d..f8aa723f18e28b02d4b7055404922ff8d7a73f8d 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/EvokerFangs.java +++ b/src/main/java/net/minecraft/world/entity/projectile/EvokerFangs.java @@ -133,7 +133,7 @@ public class EvokerFangs extends Entity implements TraceableEntity { if (target.isAlive() && !target.isInvulnerable() && target != entityliving1) { if (entityliving1 == null) { -- target.hurt(this.damageSources().magic().customCausingEntity(this), 6.0F); // CraftBukkit +- target.hurt(this.damageSources().magic().customEntityDamager(this), 6.0F); // CraftBukkit + target.hurt(this.damageSources().magic().customEventDamager(this), 6.0F); // CraftBukkit // Paper - fix DamageSource API } else { if (entityliving1.isAlliedTo((Entity) target)) { return; diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -index 28690877c443ceb2bdf20e6d251c9d32f667814c..1fb1e729d6879568d8b4943071fa940325b2e5b0 100644 +index ced6bf2fc4556c9b2b32ac382058506e931c1475..519755b7f8bc7e8bb9fab135fc5bf7de3a9419f9 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -@@ -86,7 +86,7 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { +@@ -85,7 +85,7 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { entityplayer.connection.teleport(teleEvent.getTo()); entity.resetFallDistance(); -- entity.hurt(this.damageSources().fall().customCausingEntity(this), 5.0F); // CraftBukkit +- entity.hurt(this.damageSources().fall().customEntityDamager(this), 5.0F); // CraftBukkit + entity.hurt(this.damageSources().fall().customEventDamager(this), 5.0F); // CraftBukkit // Paper - fix DamageSource API } // CraftBukkit end @@ -138,29 +158,16 @@ index 02931861de955352e71d6f5ffc720a17304815fe..55b4b5ad5f084c9a271a716d07667247 } if (flag && entity instanceof LivingEntity) { -diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index 414297ab9e953049b5f0b091e54d37c6e9edf861..2f9be855815d8db0098f969c2d1bd0c3c25f0892 100644 ---- a/src/main/java/net/minecraft/world/level/Explosion.java -+++ b/src/main/java/net/minecraft/world/level/Explosion.java -@@ -104,7 +104,7 @@ public class Explosion { - this.z = z; - this.fire = createFire; - this.blockInteraction = destructionType; -- this.damageSource = damageSource == null ? world.damageSources().explosion(this).customCausingEntity(entity) : damageSource.customCausingEntity(entity); // CraftBukkit - handle source entity -+ this.damageSource = damageSource == null ? world.damageSources().explosion(this) : damageSource; // CraftBukkit - handle source entity // Paper - revert to fix DamageSource API - this.damageCalculator = behavior == null ? this.makeDamageCalculator(entity) : behavior; - this.smallExplosionParticles = particle; - this.largeExplosionParticles = emitterParticle; diff --git a/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java b/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java -index 6ae1ad21807c039726021f8f26f92042acce2fda..b7e2327c50195e8d3ca3ca3b47c7c0f9ea8e289c 100644 +index ab67c5caaff6e8c7de293b528636f53254b805bd..6d92856b5089e946a85d519cadce080bc6c3574f 100644 --- a/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java +++ b/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java -@@ -41,7 +41,7 @@ public class CraftDamageSource implements DamageSource { +@@ -47,7 +47,7 @@ public class CraftDamageSource implements DamageSource { @Override - public org.bukkit.entity.Entity getCausingEntity() { -- net.minecraft.world.entity.Entity entity = this.getHandle().getCausingEntity(); -+ net.minecraft.world.entity.Entity entity = this.getHandle().getEntity(); // Paper - fix DamageSource API + public org.bukkit.entity.Entity getDirectEntity() { +- net.minecraft.world.entity.Entity entity = this.getHandle().getDamager(); ++ net.minecraft.world.entity.Entity entity = this.getHandle().getDirectEntity(); // Paper - fix DamageSource API return (entity != null) ? entity.getBukkitEntity() : null; } @@ -168,7 +175,7 @@ index 6ae1ad21807c039726021f8f26f92042acce2fda..b7e2327c50195e8d3ca3ca3b47c7c0f9 @Override public boolean isIndirect() { -- return this.getHandle().getCausingEntity() != this.getHandle().getDirectEntity(); +- return this.getHandle().getEntity() != this.getHandle().getDamager(); + return this.getHandle().isIndirect(); // Paper - fix DamageSource API } @@ -190,15 +197,15 @@ index 4c6e15535fa40aad8cf1920f392589404f9ba79c..35eb95ef6fb6a0f7ea63351e90741c48 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 31bc4a0408da3bf3b0d8eb56b045e9742a898a39..92a9643a31d3b753c997854a0db0ceabe883fd29 100644 +index 1d526e76eca94cf2dce473cff2b56ea9f7f0ec18..e075770772b84a79f2e05f273f31a4aeb479ff98 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1082,7 +1082,7 @@ public class CraftEventFactory { +@@ -1084,7 +1084,7 @@ public class CraftEventFactory { private static EntityDamageEvent handleEntityDamageEvent(Entity entity, DamageSource source, Map modifiers, Map> modifierFunctions, boolean cancelled) { CraftDamageSource bukkitDamageSource = new CraftDamageSource(source); -- Entity damager = (bukkitDamageSource.isIndirect() && source.getDirectEntity() != null) ? source.getDirectEntity() : source.getCausingEntity(); +- Entity damager = (source.getDamager() != null) ? source.getDamager() : source.getEntity(); + final Entity damager = source.getCustomEventDamager(); // Paper - fix DamageSource API if (source.is(DamageTypeTags.IS_EXPLOSION)) { if (damager == null) { - return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled, source.blockState); // Paper - Include BlockState for damage + return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled); diff --git a/patches/server/0970-Fix-creation-of-invalid-block-entity-during-world-ge.patch b/patches/server/0969-Fix-creation-of-invalid-block-entity-during-world-ge.patch similarity index 100% rename from patches/server/0970-Fix-creation-of-invalid-block-entity-during-world-ge.patch rename to patches/server/0969-Fix-creation-of-invalid-block-entity-during-world-ge.patch diff --git a/patches/server/0971-Fix-possible-StackOverflowError-for-some-dispenses.patch b/patches/server/0970-Fix-possible-StackOverflowError-for-some-dispenses.patch similarity index 100% rename from patches/server/0971-Fix-possible-StackOverflowError-for-some-dispenses.patch rename to patches/server/0970-Fix-possible-StackOverflowError-for-some-dispenses.patch diff --git a/patches/server/0972-Improve-tag-parser-handling.patch b/patches/server/0971-Improve-tag-parser-handling.patch similarity index 99% rename from patches/server/0972-Improve-tag-parser-handling.patch rename to patches/server/0971-Improve-tag-parser-handling.patch index 1bb246240c..702d71c5bd 100644 --- a/patches/server/0972-Improve-tag-parser-handling.patch +++ b/patches/server/0971-Improve-tag-parser-handling.patch @@ -169,7 +169,7 @@ index 898b19887ed34c87003fc63cb5905df2ba6234a5..b47eeb23055b135d5567552ba983bfbc private void write(FriendlyByteBuf buf) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 342d81e200df6df332655525326c164432355953..4a1fe620ab2a6efadf734c1d7b09784e3865291c 100644 +index bead9625a04a9c1139c54d6a56f055b80eb2d701..34d4243fb5198e36ea3291ffe8ed2480bc960cdb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -763,6 +763,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl diff --git a/patches/server/0973-Item-Mutation-Fixes.patch b/patches/server/0972-Item-Mutation-Fixes.patch similarity index 90% rename from patches/server/0973-Item-Mutation-Fixes.patch rename to patches/server/0972-Item-Mutation-Fixes.patch index 736d493c99..1a3a62c7da 100644 --- a/patches/server/0973-Item-Mutation-Fixes.patch +++ b/patches/server/0972-Item-Mutation-Fixes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Item Mutation Fixes diff --git a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -index 46beb8e45788950b8ca863aaf07c6d0587d8f693..5b3e33807e0e13480e3359c0cf067719e5749237 100644 +index 2f62957e061f513e01ec617f22791a7f27d65f02..480d093105073edfd3acdd7b079b4ca5aa5fdc6d 100644 --- a/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java +++ b/src/main/java/net/minecraft/world/inventory/EnchantmentMenu.java -@@ -227,7 +227,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -228,7 +228,7 @@ public class EnchantmentMenu extends AbstractContainerMenu { return false; } else if (this.costs[id] > 0 && !itemstack.isEmpty() && (player.experienceLevel >= j && player.experienceLevel >= this.costs[id] || player.getAbilities().instabuild)) { this.access.execute((world, blockposition) -> { @@ -17,7 +17,7 @@ index 46beb8e45788950b8ca863aaf07c6d0587d8f693..5b3e33807e0e13480e3359c0cf067719 List list = this.getEnchantmentList(world.enabledFeatures(), itemstack, id, this.costs[id]); // CraftBukkit start -@@ -249,10 +249,16 @@ public class EnchantmentMenu extends AbstractContainerMenu { +@@ -250,10 +250,16 @@ public class EnchantmentMenu extends AbstractContainerMenu { return; } // CraftBukkit end diff --git a/patches/server/0974-Per-world-ticks-per-spawn-settings.patch b/patches/server/0973-Per-world-ticks-per-spawn-settings.patch similarity index 100% rename from patches/server/0974-Per-world-ticks-per-spawn-settings.patch rename to patches/server/0973-Per-world-ticks-per-spawn-settings.patch diff --git a/patches/server/0975-Properly-track-the-changed-item-from-dispense-events.patch b/patches/server/0974-Properly-track-the-changed-item-from-dispense-events.patch similarity index 100% rename from patches/server/0975-Properly-track-the-changed-item-from-dispense-events.patch rename to patches/server/0974-Properly-track-the-changed-item-from-dispense-events.patch diff --git a/patches/server/0976-Rewrite-dataconverter-system.patch b/patches/server/0975-Rewrite-dataconverter-system.patch similarity index 99% rename from patches/server/0976-Rewrite-dataconverter-system.patch rename to patches/server/0975-Rewrite-dataconverter-system.patch index c42c20282d..a9ae9021b3 100644 --- a/patches/server/0976-Rewrite-dataconverter-system.patch +++ b/patches/server/0975-Rewrite-dataconverter-system.patch @@ -28965,10 +28965,10 @@ index 1d287dd7379e56f7fd4b425880b850cd843f5789..8ab7ca373a885fbe658013c9c6a2e38d return nbttagcompound; }); diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 4d66c0d64af800c92e84a40e90cda9c6a49d3f04..a1c9989df460d7ae3666fffe7968750832a30b85 100644 +index a9ab74da54cdec04e2df12ab3c3332bb675ccae1..74c5c0e63a3c41174967c1be1da01e60e458f12f 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -525,7 +525,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -529,7 +529,7 @@ public final class CraftMagicNumbers implements UnsafeValues { net.minecraft.nbt.CompoundTag compound = deserializeNbtFromBytes(data); final int dataVersion = compound.getInt("DataVersion"); @@ -28977,7 +28977,7 @@ index 4d66c0d64af800c92e84a40e90cda9c6a49d3f04..a1c9989df460d7ae3666fffe79687508 return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.parse(MinecraftServer.getServer().registryAccess(), compound).orElseThrow()); } -@@ -546,7 +546,7 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -550,7 +550,7 @@ public final class CraftMagicNumbers implements UnsafeValues { net.minecraft.nbt.CompoundTag compound = deserializeNbtFromBytes(data); int dataVersion = compound.getInt("DataVersion"); diff --git a/patches/server/0977-Suspicious-Effect-Entry-API.patch b/patches/server/0976-Suspicious-Effect-Entry-API.patch similarity index 100% rename from patches/server/0977-Suspicious-Effect-Entry-API.patch rename to patches/server/0976-Suspicious-Effect-Entry-API.patch diff --git a/patches/server/0978-check-if-itemstack-is-stackable-first.patch b/patches/server/0977-check-if-itemstack-is-stackable-first.patch similarity index 100% rename from patches/server/0978-check-if-itemstack-is-stackable-first.patch rename to patches/server/0977-check-if-itemstack-is-stackable-first.patch diff --git a/patches/server/0979-disable-forced-empty-world-ticks.patch b/patches/server/0978-disable-forced-empty-world-ticks.patch similarity index 92% rename from patches/server/0979-disable-forced-empty-world-ticks.patch rename to patches/server/0978-disable-forced-empty-world-ticks.patch index 35b666570c..c6a2989ea0 100644 --- a/patches/server/0979-disable-forced-empty-world-ticks.patch +++ b/patches/server/0978-disable-forced-empty-world-ticks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] disable forced empty world ticks diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 39819cfb316ee24db5c6648e32f929e15fd71157..4f15b9d7c706a9b11ce2df0fa3b67d49f2b73d09 100644 +index 3a1ecdaebfd64f4703eafc92b5895e1dbddd8ee6..b33bf957b1541756e3b983b87b1c83629757739a 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -527,7 +527,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/0980-Starlight.patch b/patches/server/0979-Starlight.patch similarity index 100% rename from patches/server/0980-Starlight.patch rename to patches/server/0979-Starlight.patch diff --git a/patches/server/0981-Rewrite-chunk-system.patch b/patches/server/0980-Rewrite-chunk-system.patch similarity index 99% rename from patches/server/0981-Rewrite-chunk-system.patch rename to patches/server/0980-Rewrite-chunk-system.patch index 8d2701c5fa..50c0bd1815 100644 --- a/patches/server/0981-Rewrite-chunk-system.patch +++ b/patches/server/0980-Rewrite-chunk-system.patch @@ -15684,7 +15684,7 @@ index c33f85b570f159ab465b5a10a8044a81f2797f43..244a19ecd0234fa1d7a6ecfea2075159 DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, worldLoader.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::createFromGameruleRadius); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 138ca522b2df3ccf49fcbd81446a73705141aa5f..7d33a4638660aaa55b2ef114efd6d618312b61c9 100644 +index f87e3b00208aa0bec8f2219a8f1f96f20d3f12c5..81dd728d7193acb6cc87a7f54c7d7a2088e5f853 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -318,7 +318,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index afd665420d3f839fb330f7f25c62a64ace027ef1..bb74f36dcaeda72e3b154f1d62375967aad89f67 100644 +index 480d7633016ac641d4318f7eb971e0c721c5397a..322de978f5738433e6064f9210893dcfbc701b91 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3736,7 +3736,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/0986-Optimize-Network-Manager-and-add-advanced-packet-sup.patch b/patches/server/0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch similarity index 100% rename from patches/server/0986-Optimize-Network-Manager-and-add-advanced-packet-sup.patch rename to patches/server/0985-Optimize-Network-Manager-and-add-advanced-packet-sup.patch diff --git a/patches/server/0987-Allow-Saving-of-Oversized-Chunks.patch b/patches/server/0986-Allow-Saving-of-Oversized-Chunks.patch similarity index 100% rename from patches/server/0987-Allow-Saving-of-Oversized-Chunks.patch rename to patches/server/0986-Allow-Saving-of-Oversized-Chunks.patch diff --git a/patches/server/0988-Fix-World-isChunkGenerated-calls.patch b/patches/server/0987-Fix-World-isChunkGenerated-calls.patch similarity index 100% rename from patches/server/0988-Fix-World-isChunkGenerated-calls.patch rename to patches/server/0987-Fix-World-isChunkGenerated-calls.patch diff --git a/patches/server/0989-Flat-bedrock-generator-settings.patch b/patches/server/0988-Flat-bedrock-generator-settings.patch similarity index 100% rename from patches/server/0989-Flat-bedrock-generator-settings.patch rename to patches/server/0988-Flat-bedrock-generator-settings.patch diff --git a/patches/server/0990-Entity-Activation-Range-2.0.patch b/patches/server/0989-Entity-Activation-Range-2.0.patch similarity index 99% rename from patches/server/0990-Entity-Activation-Range-2.0.patch rename to patches/server/0989-Entity-Activation-Range-2.0.patch index 0327db7ee1..b11e48c679 100644 --- a/patches/server/0990-Entity-Activation-Range-2.0.patch +++ b/patches/server/0989-Entity-Activation-Range-2.0.patch @@ -17,7 +17,7 @@ Adds villagers as separate config public net.minecraft.world.entity.Entity isInsidePortal diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 7106f388aed2ef2ce14a2228eb85b51092cb983d..c5e7743f1712bd15a93046e494ef5f7df1273b3c 100644 +index 4934c59f0ac6bd6dea67b716e4db07d295757f46..12245d90ccb4bce09966ab6b3def1e7e1564223b 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -2,7 +2,6 @@ package net.minecraft.server.level; diff --git a/patches/server/0991-Optional-per-player-mob-spawns.patch b/patches/server/0990-Optional-per-player-mob-spawns.patch similarity index 99% rename from patches/server/0991-Optional-per-player-mob-spawns.patch rename to patches/server/0990-Optional-per-player-mob-spawns.patch index 54636b93ff..b8fd54cd56 100644 --- a/patches/server/0991-Optional-per-player-mob-spawns.patch +++ b/patches/server/0990-Optional-per-player-mob-spawns.patch @@ -64,7 +64,7 @@ index d1728e13a7b649f308bde90ab633c79d86c10822..002aad174fb1781ee963414037f84e51 this.lastSpawnState = spawnercreature_d; diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 305d88c8bfb0d9864f132be7b0e8fd2f4d18a539..e857bc7014d611f128bbae67970a6e071f31b6fb 100644 +index 467ef6237e11b9d28f5d7ebf9dc56723d756e5ba..7626872528cddd3e3b9a895a77a2ceca50bdb452 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -272,6 +272,10 @@ public class ServerPlayer extends Player { diff --git a/patches/server/0992-Anti-Xray.patch b/patches/server/0991-Anti-Xray.patch similarity index 99% rename from patches/server/0992-Anti-Xray.patch rename to patches/server/0991-Anti-Xray.patch index 0fd9954cbe..b614f89a1c 100644 --- a/patches/server/0992-Anti-Xray.patch +++ b/patches/server/0991-Anti-Xray.patch @@ -1573,10 +1573,10 @@ index 1e2530c9e5212b6d2bdbc94817beddb4247dac73..82b4bd669c57b18fb0b443bcd9449502 private static final byte[] EMPTY_LIGHT = new byte[2048]; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 859af2ce336f134dac0d97f916530e8e4e91a4e7..960f52b2724ab07bd3c7e9d0d874456b6a3b091e 100644 +index 045e625c789e8c53228fccb0f3a6769aa5a93fb5..508c1e662e14693e0af3a68079d811d1583b94f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2658,7 +2658,7 @@ public final class CraftServer implements Server { +@@ -2659,7 +2659,7 @@ public final class CraftServer implements Server { public ChunkGenerator.ChunkData createChunkData(World world) { Preconditions.checkArgument(world != null, "World cannot be null"); ServerLevel handle = ((CraftWorld) world).getHandle(); diff --git a/patches/server/0993-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch b/patches/server/0992-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch similarity index 98% rename from patches/server/0993-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch rename to patches/server/0992-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch index 14ca843b31..4415e66df9 100644 --- a/patches/server/0993-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch +++ b/patches/server/0992-Improve-cancelling-PreCreatureSpawnEvent-with-per-pl.patch @@ -60,7 +60,7 @@ index 002aad174fb1781ee963414037f84e5120488592..c7b7f153895a4b95b2071a31db00c9c4 spawnercreature_d = NaturalSpawner.createState(naturalSpawnChunkCount, this.level.getAllEntities(), this::getFullChunk, null, true); } else { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index e857bc7014d611f128bbae67970a6e071f31b6fb..a0d16e8289d6e35bb1e92623642386ac0c0552be 100644 +index 7626872528cddd3e3b9a895a77a2ceca50bdb452..95f5fda22759b8fe5ce7e01635fe908cf3d92337 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -276,6 +276,7 @@ public class ServerPlayer extends Player { diff --git a/patches/server/0994-Optimize-Collision-to-not-load-chunks.patch b/patches/server/0993-Optimize-Collision-to-not-load-chunks.patch similarity index 100% rename from patches/server/0994-Optimize-Collision-to-not-load-chunks.patch rename to patches/server/0993-Optimize-Collision-to-not-load-chunks.patch diff --git a/patches/server/0995-Optimize-GoalSelector-Goal.Flag-Set-operations.patch b/patches/server/0994-Optimize-GoalSelector-Goal.Flag-Set-operations.patch similarity index 100% rename from patches/server/0995-Optimize-GoalSelector-Goal.Flag-Set-operations.patch rename to patches/server/0994-Optimize-GoalSelector-Goal.Flag-Set-operations.patch diff --git a/patches/server/0996-Entity-load-save-limit-per-chunk.patch b/patches/server/0995-Entity-load-save-limit-per-chunk.patch similarity index 100% rename from patches/server/0996-Entity-load-save-limit-per-chunk.patch rename to patches/server/0995-Entity-load-save-limit-per-chunk.patch diff --git a/patches/server/0997-Improved-Watchdog-Support.patch b/patches/server/0996-Improved-Watchdog-Support.patch similarity index 99% rename from patches/server/0997-Improved-Watchdog-Support.patch rename to patches/server/0996-Improved-Watchdog-Support.patch index 2f40b2b0ec..c7f4927009 100644 --- a/patches/server/0997-Improved-Watchdog-Support.patch +++ b/patches/server/0996-Improved-Watchdog-Support.patch @@ -71,7 +71,7 @@ index bcb6a3b3cd17ce5db9aaf6bd3ec7a0ec1b44b979..4f3cc14d48690bb183d09bb7a5ba1e23 cause = cause.getCause(); } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8607652b274fb8f6eca5f3fb7183925da3c710cf..f31fcf3054b201e52ee84b9523820dc619762eef 100644 +index c0d5190ee653bf2bbe2858b1a142d5409ed322ee..4213f8424fa19eead42a307a3a33ab25ead86613 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -303,7 +303,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { String s = String.valueOf(worldserver); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 35751ff961383280ffce1be18fc3c1aa311f0c08..a378866740b4f283d542028ad4dd75064083d5b7 100644 +index 05bf2094d10f924401eb122cd3fe4540aafce497..d4376ed215d97066a21e462fae2a0e25ad8a16a1 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -570,6 +570,17 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -63,7 +63,7 @@ index f168044d36f22080504da171e5ed31a6f02385ba..5cedce1f432f6b809b25269242a16477 if (this.hasDelayedDestroy) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 34793f2072e370ee6ec4a969d103dbe1fd230657..6751290fdcc30e3657c56660924bd5fb48418871 100644 +index 8e7ff76818ad26f69785a60de25ad07a3ba72039..ca242ba1312263ec095fa2850dc0f02351e844ab 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3839,6 +3839,10 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/1025-Optimise-nearby-player-retrieval.patch b/patches/server/1024-Optimise-nearby-player-retrieval.patch similarity index 99% rename from patches/server/1025-Optimise-nearby-player-retrieval.patch rename to patches/server/1024-Optimise-nearby-player-retrieval.patch index 22e16a6576..eae5d781cc 100644 --- a/patches/server/1025-Optimise-nearby-player-retrieval.patch +++ b/patches/server/1024-Optimise-nearby-player-retrieval.patch @@ -8,7 +8,7 @@ we can instead use the nearby player tracking system to reduce the number of tests per search. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index a378866740b4f283d542028ad4dd75064083d5b7..0b0fd9e32d2772098d1aade83083b38cac01b76e 100644 +index d4376ed215d97066a21e462fae2a0e25ad8a16a1..aab652174a8175765cad548f7c61ce353ca74803 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -581,6 +581,115 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/1026-Distance-manager-tick-timings.patch b/patches/server/1025-Distance-manager-tick-timings.patch similarity index 100% rename from patches/server/1026-Distance-manager-tick-timings.patch rename to patches/server/1025-Distance-manager-tick-timings.patch diff --git a/patches/server/1027-Handle-Oversized-block-entities-in-chunks.patch b/patches/server/1026-Handle-Oversized-block-entities-in-chunks.patch similarity index 100% rename from patches/server/1027-Handle-Oversized-block-entities-in-chunks.patch rename to patches/server/1026-Handle-Oversized-block-entities-in-chunks.patch diff --git a/patches/server/1028-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/1027-Send-full-pos-packets-for-hard-colliding-entities.patch similarity index 100% rename from patches/server/1028-Send-full-pos-packets-for-hard-colliding-entities.patch rename to patches/server/1027-Send-full-pos-packets-for-hard-colliding-entities.patch diff --git a/patches/server/1029-Fix-and-optimise-world-force-upgrading.patch b/patches/server/1028-Fix-and-optimise-world-force-upgrading.patch similarity index 98% rename from patches/server/1029-Fix-and-optimise-world-force-upgrading.patch rename to patches/server/1028-Fix-and-optimise-world-force-upgrading.patch index 3e94098edd..c00097bdf4 100644 --- a/patches/server/1029-Fix-and-optimise-world-force-upgrading.patch +++ b/patches/server/1028-Fix-and-optimise-world-force-upgrading.patch @@ -280,7 +280,7 @@ index 244a19ecd0234fa1d7a6ecfea20751595688605d..5443013060b62e3bfcc51cddca96d1c0 Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, dynamicRegistryManager, eraseCache, recreateRegionFiles); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8515cec5e21ad291ca427baaafb4c2f337f01208..8dc2f9df367c849ca333bf1a1fd92ff91617b548 100644 +index 9c3de11be9f655d97d63ec8c535cabf04d9db0b5..cac41b5cea8c6362946c6bd5e50b449d033ab6a9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -599,11 +599,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata)); -@@ -1378,6 +1376,13 @@ public final class CraftServer implements Server { +@@ -1379,6 +1377,13 @@ public final class CraftServer implements Server { biomeProvider = generator.getDefaultBiomeProvider(worldInfo); } diff --git a/patches/server/1030-API-for-checking-sent-chunks.patch b/patches/server/1029-API-for-checking-sent-chunks.patch similarity index 94% rename from patches/server/1030-API-for-checking-sent-chunks.patch rename to patches/server/1029-API-for-checking-sent-chunks.patch index 6187f99887..a08ada1670 100644 --- a/patches/server/1030-API-for-checking-sent-chunks.patch +++ b/patches/server/1029-API-for-checking-sent-chunks.patch @@ -21,10 +21,10 @@ index ee58c67cb2bd78159cce19ec75f13dc6168a0e7a..149cfb0587299f72fcfddf395fb71b70 // TODO rebase into util patch diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 33c553d1558b3cdfac22948f3878e1a31d70f02b..eddbbd0e9be3cb81d1030c0c9da829b9193ebc16 100644 +index 6f8999df04e6ad4d4d52e87b05a187f586d60c74..a9aa3dca65aca86cf535d6616f5d5db3e1e8fc8b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3449,6 +3449,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3446,6 +3446,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end diff --git a/patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/1030-Add-config-for-mobs-immune-to-default-effects.patch similarity index 100% rename from patches/server/1032-Add-config-for-mobs-immune-to-default-effects.patch rename to patches/server/1030-Add-config-for-mobs-immune-to-default-effects.patch diff --git a/patches/server/1033-Deep-clone-nbt-tags-in-PDC.patch b/patches/server/1031-Deep-clone-nbt-tags-in-PDC.patch similarity index 91% rename from patches/server/1033-Deep-clone-nbt-tags-in-PDC.patch rename to patches/server/1031-Deep-clone-nbt-tags-in-PDC.patch index 251ed19319..96cc14f9db 100644 --- a/patches/server/1033-Deep-clone-nbt-tags-in-PDC.patch +++ b/patches/server/1031-Deep-clone-nbt-tags-in-PDC.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Deep clone nbt tags in PDC diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index f4ba60ef241a86bbb1879f07083fa24194aa1cbf..cbc4eb0f4614182d77ddcf5e9cdda54618497f2b 100644 +index d90876888c2dedbdedd63cff932f48da286c8172..eba1c67abc2ace5913ab3ae8d732f8c68fd0f683 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -284,7 +284,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -298,7 +298,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.damage = meta.damage; this.maxDamage = meta.maxDamage; this.unhandledTags = meta.unhandledTags; @@ -17,7 +17,7 @@ index f4ba60ef241a86bbb1879f07083fa24194aa1cbf..cbc4eb0f4614182d77ddcf5e9cdda546 this.customTag = meta.customTag; -@@ -1527,7 +1527,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1563,7 +1563,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (this.customTag != null) { clone.customTag = this.customTag.copy(); } diff --git a/patches/server/1031-handle-converting-old-serialized-names-to-new-names.patch b/patches/server/1031-handle-converting-old-serialized-names-to-new-names.patch deleted file mode 100644 index beb171fe27..0000000000 --- a/patches/server/1031-handle-converting-old-serialized-names-to-new-names.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic -Date: Fri, 26 Apr 2024 11:38:40 -0700 -Subject: [PATCH] handle converting old serialized names to new names - - -diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 72f60a1308d93eefe73ab8a5a509c08d3ddd1521..cfb40d9bf093a83c8ae38ffe5c1d17f79528e0c3 100644 ---- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -494,7 +494,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - for (Object hideFlagObject : hideFlags) { - String hideFlagString = (String) hideFlagObject; - try { -- ItemFlag hideFlatEnum = ItemFlag.valueOf(hideFlagString); -+ ItemFlag hideFlatEnum = ItemFlag.valueOf(org.bukkit.craftbukkit.legacy.FieldRename.convertItemFlagName(org.bukkit.craftbukkit.util.ApiVersion.CURRENT, hideFlagString)); // Paper - handle old field names - this.addItemFlags(hideFlatEnum); - } catch (IllegalArgumentException ex) { - // Ignore when we got a old String which does not map to a Enum value anymore -@@ -663,7 +663,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - enchantKey = "SWEEPING_EDGE"; - } - -- Enchantment enchantment = Enchantment.getByName(enchantKey); -+ Enchantment enchantment = Enchantment.getByName(org.bukkit.craftbukkit.legacy.FieldRename.convertEnchantmentName(org.bukkit.craftbukkit.util.ApiVersion.CURRENT, enchantKey)); // Paper - convert enchantment names - if ((enchantment != null) && (entry.getValue() instanceof Integer)) { - enchantments.put(enchantment, (Integer) entry.getValue()); - } -@@ -697,7 +697,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { - continue; - } - AttributeModifier modifier = (AttributeModifier) o; -- Attribute attribute = EnumUtils.getEnum(Attribute.class, attributeName.toUpperCase(Locale.ROOT)); -+ Attribute attribute = EnumUtils.getEnum(Attribute.class, org.bukkit.craftbukkit.legacy.FieldRename.convertAttributeName(org.bukkit.craftbukkit.util.ApiVersion.CURRENT, attributeName.toUpperCase(Locale.ROOT))); // Paper - handle old field names - if (attribute == null) { - continue; - } diff --git a/patches/server/1034-Support-old-UUID-format-for-NBT.patch b/patches/server/1032-Support-old-UUID-format-for-NBT.patch similarity index 100% rename from patches/server/1034-Support-old-UUID-format-for-NBT.patch rename to patches/server/1032-Support-old-UUID-format-for-NBT.patch diff --git a/patches/server/1035-Fix-shield-disable-inconsistency.patch b/patches/server/1033-Fix-shield-disable-inconsistency.patch similarity index 93% rename from patches/server/1035-Fix-shield-disable-inconsistency.patch rename to patches/server/1033-Fix-shield-disable-inconsistency.patch index 61f593ff71..757be91657 100644 --- a/patches/server/1035-Fix-shield-disable-inconsistency.patch +++ b/patches/server/1033-Fix-shield-disable-inconsistency.patch @@ -8,7 +8,7 @@ it will not disable the shield if the attacker is holding an axe item. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 6751290fdcc30e3657c56660924bd5fb48418871..614a90ff73a8a85f4b7fa2c633eb0473ec01c4d2 100644 +index ca242ba1312263ec095fa2850dc0f02351e844ab..2338e41fde55559249d5f212697235e789b20b2a 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2341,7 +2341,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/1036-Write-SavedData-IO-async.patch b/patches/server/1034-Write-SavedData-IO-async.patch similarity index 99% rename from patches/server/1036-Write-SavedData-IO-async.patch rename to patches/server/1034-Write-SavedData-IO-async.patch index 932cd936fb..365011d581 100644 --- a/patches/server/1036-Write-SavedData-IO-async.patch +++ b/patches/server/1034-Write-SavedData-IO-async.patch @@ -44,7 +44,7 @@ index 36caf354634d6675a3f1ec6829f4778e1d0623bc..b99f50604bafecbc68835974c9ed0caa // CraftBukkit start - modelled on below diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 0b0fd9e32d2772098d1aade83083b38cac01b76e..0981d440d0dbfe4df668d1f3f1b5706a93bc4434 100644 +index aab652174a8175765cad548f7c61ce353ca74803..ca56a0b596976448da6bb2a0e82b3d5cd4133e12 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java @@ -1492,7 +1492,7 @@ public class ServerLevel extends Level implements WorldGenLevel { diff --git a/patches/server/1037-Don-t-lose-removed-data-components-in-ItemMeta.patch b/patches/server/1035-Don-t-lose-removed-data-components-in-ItemMeta.patch similarity index 87% rename from patches/server/1037-Don-t-lose-removed-data-components-in-ItemMeta.patch rename to patches/server/1035-Don-t-lose-removed-data-components-in-ItemMeta.patch index 156a09cd69..d64eaac093 100644 --- a/patches/server/1037-Don-t-lose-removed-data-components-in-ItemMeta.patch +++ b/patches/server/1035-Don-t-lose-removed-data-components-in-ItemMeta.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't lose removed data components in ItemMeta diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index a1faf7906f8734149538d52173fcb3401200e594..dd17d7d88ad43e0c426a7a508709fc8993d3a5c9 100644 +index eba1c67abc2ace5913ab3ae8d732f8c68fd0f683..eb9ba1a161f4feade220507a602086bc9d6ce03f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -174,6 +174,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -188,6 +188,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { return this; } @@ -22,7 +22,7 @@ index a1faf7906f8734149538d52173fcb3401200e594..dd17d7d88ad43e0c426a7a508709fc89 DataComponentPatch build() { return this.builder.build(); } -@@ -384,7 +391,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -398,7 +405,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Set, Optional>> keys = tag.entrySet(); for (Map.Entry, Optional> key : keys) { @@ -33,7 +33,7 @@ index a1faf7906f8734149538d52173fcb3401200e594..dd17d7d88ad43e0c426a7a508709fc89 key.getValue().ifPresentOrElse((value) -> { this.unhandledTags.set((DataComponentType) key.getKey(), value); }, () -> { -@@ -780,9 +789,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -788,9 +797,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } for (Map.Entry, Optional> e : this.unhandledTags.build().entrySet()) { diff --git a/patches/server/1038-Add-experimental-improved-give-command.patch b/patches/server/1036-Add-experimental-improved-give-command.patch similarity index 100% rename from patches/server/1038-Add-experimental-improved-give-command.patch rename to patches/server/1036-Add-experimental-improved-give-command.patch diff --git a/patches/server/1039-Handle-Large-Packets-disconnecting-client.patch b/patches/server/1037-Handle-Large-Packets-disconnecting-client.patch similarity index 100% rename from patches/server/1039-Handle-Large-Packets-disconnecting-client.patch rename to patches/server/1037-Handle-Large-Packets-disconnecting-client.patch diff --git a/patches/server/1040-Fix-ItemFlags.patch b/patches/server/1038-Fix-ItemFlags.patch similarity index 93% rename from patches/server/1040-Fix-ItemFlags.patch rename to patches/server/1038-Fix-ItemFlags.patch index 8d1a1d818b..df5328f3a8 100644 --- a/patches/server/1040-Fix-ItemFlags.patch +++ b/patches/server/1038-Fix-ItemFlags.patch @@ -33,10 +33,10 @@ index fca0cfba14dd2cc6f24b56eaf269594b2d87fd04..8734f0b777432cd8639094b75a3da1b9 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba245d169f2 100644 +index eb9ba1a161f4feade220507a602086bc9d6ce03f..2caa968b3fea322d1cb3210d2dfa7bc844961189 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -224,6 +224,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -238,6 +238,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { static final ItemMetaKeyType HIDE_ADDITIONAL_TOOLTIP = new ItemMetaKeyType(DataComponents.HIDE_ADDITIONAL_TOOLTIP); @Specific(Specific.To.NBT) static final ItemMetaKeyType CUSTOM_DATA = new ItemMetaKeyType<>(DataComponents.CUSTOM_DATA); @@ -49,7 +49,7 @@ index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba2 // We store the raw original JSON representation of all text data. See SPIGOT-5063, SPIGOT-5656, SPIGOT-5304 private Component displayName; -@@ -296,6 +302,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -310,6 +316,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.customTag = meta.customTag; this.version = meta.version; @@ -60,7 +60,7 @@ index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba2 } CraftMetaItem(DataComponentPatch tag) { -@@ -388,6 +398,20 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -402,6 +412,20 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.customTag = null; } }); @@ -81,7 +81,7 @@ index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba2 Set, Optional>> keys = tag.entrySet(); for (Map.Entry, Optional> key : keys) { -@@ -569,10 +593,19 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -583,10 +607,19 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { String unhandled = SerializableMeta.getString(map, "unhandled", true); if (unhandled != null) { @@ -103,7 +103,7 @@ index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba2 } catch (IOException ex) { Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex); } -@@ -788,6 +821,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -796,6 +829,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { itemTag.put(CraftMetaItem.MAX_DAMAGE, this.maxDamage); } @@ -119,7 +119,7 @@ index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba2 for (Map.Entry, Optional> e : this.unhandledTags.build().entrySet()) { e.getValue().ifPresentOrElse((value) -> { itemTag.builder.set((DataComponentType) e.getKey(), value); -@@ -862,7 +904,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -870,7 +912,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Overridden boolean isEmpty() { @@ -128,7 +128,7 @@ index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba2 } // Paper start -@@ -1471,6 +1513,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1507,6 +1549,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hasFood() ? that.hasFood() && this.food.equals(that.food) : !that.hasFood()) && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage()) && (this.hasMaxDamage() ? that.hasMaxDamage() && this.maxDamage.equals(that.maxDamage) : !that.hasMaxDamage()) @@ -137,7 +137,7 @@ index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba2 && (this.version == that.version); } -@@ -1513,6 +1557,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1549,6 +1593,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (this.hasDamage() ? this.damage : 0); hash = 61 * hash + (this.hasMaxDamage() ? 1231 : 1237); hash = 61 * hash + (this.hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0); @@ -146,7 +146,7 @@ index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba2 hash = 61 * hash + this.version; return hash; } -@@ -1550,6 +1596,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1586,6 +1632,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { clone.damage = this.damage; clone.maxDamage = this.maxDamage; clone.version = this.version; @@ -161,7 +161,7 @@ index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba2 return clone; } catch (CloneNotSupportedException e) { throw new Error(e); -@@ -1659,6 +1713,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1695,6 +1749,16 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } @@ -178,7 +178,7 @@ index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba2 if (!this.unhandledTags.isEmpty()) { Tag unhandled = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), this.unhandledTags.build()).getOrThrow(IllegalStateException::new); try { -@@ -1669,6 +1733,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1705,6 +1769,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex); } } @@ -193,7 +193,7 @@ index 46142cd7f488170322dc6fec86a71a0e4f353cf4..ff38f010b0f950e0a0f706e144b54ba2 if (!this.persistentDataContainer.isEmpty()) { // Store custom tags, wrapped in their compound builder.put(CraftMetaItem.BUKKIT_CUSTOM_TAG.BUKKIT, this.persistentDataContainer.serialize()); -@@ -1810,6 +1882,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1846,6 +1918,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { CraftMetaItem.MAX_DAMAGE.TYPE, CraftMetaItem.CUSTOM_DATA.TYPE, CraftMetaItem.ATTRIBUTES.TYPE, diff --git a/patches/server/1041-Fix-helmet-damage-reduction-inconsistencies.patch b/patches/server/1039-Fix-helmet-damage-reduction-inconsistencies.patch similarity index 88% rename from patches/server/1041-Fix-helmet-damage-reduction-inconsistencies.patch rename to patches/server/1039-Fix-helmet-damage-reduction-inconsistencies.patch index f5b5797303..af975bb004 100644 --- a/patches/server/1041-Fix-helmet-damage-reduction-inconsistencies.patch +++ b/patches/server/1039-Fix-helmet-damage-reduction-inconsistencies.patch @@ -7,10 +7,10 @@ Affect the falling stalactite damage type where the reduction is not applied like in Vanilla diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 92a9643a31d3b753c997854a0db0ceabe883fd29..547ab158cd0cbf51da06ea97740cfce34bca651b 100644 +index e075770772b84a79f2e05f273f31a4aeb479ff98..34b91eff3190848bae38b20e1d956ece497b1473 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -@@ -1215,7 +1215,7 @@ public class CraftEventFactory { +@@ -1212,7 +1212,7 @@ public class CraftEventFactory { Map> modifierFunctions = new EnumMap<>(DamageModifier.class); modifiers.put(DamageModifier.BASE, rawDamage); modifierFunctions.put(DamageModifier.BASE, CraftEventFactory.ZERO); diff --git a/patches/server/1042-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch b/patches/server/1040-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch similarity index 94% rename from patches/server/1042-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch rename to patches/server/1040-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch index 736542f8cc..e471865c85 100644 --- a/patches/server/1042-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch +++ b/patches/server/1040-Revert-to-vanilla-handling-of-LivingEntity-actuallyH.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Revert to vanilla handling of LivingEntity#actuallyHurt diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 614a90ff73a8a85f4b7fa2c633eb0473ec01c4d2..6e043457a29a890bcefd27fc5bb07c1a7e4e30f7 100644 +index 2338e41fde55559249d5f212697235e789b20b2a..517e10c3d8b1549cd30fd0e7cf2bcb35e88eb8ed 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -2226,7 +2226,7 @@ public abstract class LivingEntity extends Entity implements Attackable { diff --git a/patches/server/1043-improve-checking-handled-tags-in-itemmeta.patch b/patches/server/1041-improve-checking-handled-tags-in-itemmeta.patch similarity index 96% rename from patches/server/1043-improve-checking-handled-tags-in-itemmeta.patch rename to patches/server/1041-improve-checking-handled-tags-in-itemmeta.patch index ae4d1400df..72204e0a32 100644 --- a/patches/server/1043-improve-checking-handled-tags-in-itemmeta.patch +++ b/patches/server/1041-improve-checking-handled-tags-in-itemmeta.patch @@ -209,11 +209,11 @@ index 84e09a934600df116206df1c3922a11ee969901a..04ca71d03eea61b0e7e62f2beb954b50 getOrEmpty(tag, CraftMetaArmorStand.ENTITY_TAG).ifPresent((nbt) -> { this.entityTag = nbt.copyTag(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java -index 7e6e71adea7ec5fd0ca18ac54c128e40fa694437..04a0e8743f87ff89e89273a423ec1c4c4eda31ff 100644 +index 3377fdd445db33b2ee1735942b391c6bfa92ab91..44d8aa7123ac22cf9a22720ecadc8c5f63bafc0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java -@@ -34,8 +34,8 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck - this.entityTag = bucket.entityTag; +@@ -37,8 +37,8 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck + this.bucketEntityTag = bucket.bucketEntityTag; } - CraftMetaAxolotlBucket(DataComponentPatch tag) { @@ -239,7 +239,7 @@ index 524aadad91c855f6c201999831824f7ce06f9ed6..2d6abecc94683f92da6be26b72ea8296 getOrEmpty(tag, CraftMetaBanner.PATTERNS).ifPresent((entityTag) -> { List patterns = entityTag.layers(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -index ad2bc225a93fc90661c488252b9139533d5803a2..a1e10c14375b81f97e37105df43ab8f13461474c 100644 +index 9034905aabf057f387b65957a254d056b12e0519..12911233c01d0ac1af9adbd157d56d28361fc76f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java @@ -161,8 +161,8 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta @@ -269,7 +269,7 @@ index 4da38ebb7fdbdb0f8fa422ebcd2e3eec2b2be846..a395c7ce952f4a60a5edf80e8731afa6 getOrEmpty(tag, CraftMetaBook.BOOK_CONTENT).ifPresent((writable) -> { List> pages = writable.pages(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java -index b653c2c80e8e8524ea6d7625c6a86f8204c50709..7f3733c29f2e79bffa24631efb20de49fde857f2 100644 +index c7360e2b2d6e50abc371c21b09cdadd63892f439..3f78a0935d738854182254b345064e3c225dcd5f 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java @@ -78,8 +78,8 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta { @@ -404,10 +404,10 @@ index b444bd26d6c3def3494d3cc0520e462408272be3..8e0dd4b7a7a25a8beb27b507047bc48d getOrEmpty(tag, CraftMetaFirework.FIREWORKS).ifPresent((fireworks) -> { this.power = fireworks.flightDuration(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index ff38f010b0f950e0a0f706e144b54ba245d169f2..0bc100430483f88bc7edf17645250b2862ccc1d5 100644 +index 2caa968b3fea322d1cb3210d2dfa7bc844961189..12a193db7475870e5107c86c7611bb4b92feacb8 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -308,7 +308,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -322,7 +322,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper end } @@ -416,7 +416,7 @@ index ff38f010b0f950e0a0f706e144b54ba245d169f2..0bc100430483f88bc7edf17645250b28 CraftMetaItem.getOrEmpty(tag, CraftMetaItem.NAME).ifPresent((component) -> { this.displayName = component; }); -@@ -413,11 +413,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -427,11 +427,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { }); // Paper end - fix ItemFlags @@ -436,7 +436,7 @@ index ff38f010b0f950e0a0f706e144b54ba245d169f2..0bc100430483f88bc7edf17645250b28 key.getValue().ifPresentOrElse((value) -> { this.unhandledTags.set((DataComponentType) key.getKey(), value); }, () -> { -@@ -1859,63 +1866,73 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1895,65 +1902,73 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.version = version; } @@ -485,7 +485,9 @@ index ff38f010b0f950e0a0f706e144b54ba245d169f2..0bc100430483f88bc7edf17645250b28 - CraftMetaBlockState.BLOCK_ENTITY_TAG.TYPE, - CraftMetaKnowledgeBook.BOOK_RECIPES.TYPE, - CraftMetaTropicalFishBucket.ENTITY_TAG.TYPE, +- CraftMetaTropicalFishBucket.BUCKET_ENTITY_TAG.TYPE, - CraftMetaAxolotlBucket.ENTITY_TAG.TYPE, +- CraftMetaAxolotlBucket.BUCKET_ENTITY_TAG.TYPE, - CraftMetaCrossbow.CHARGED_PROJECTILES.TYPE, - CraftMetaSuspiciousStew.EFFECTS.TYPE, - CraftMetaCompass.LODESTONE_TARGET.TYPE, @@ -493,6 +495,8 @@ index ff38f010b0f950e0a0f706e144b54ba245d169f2..0bc100430483f88bc7edf17645250b28 - CraftMetaMusicInstrument.GOAT_HORN_INSTRUMENT.TYPE, - CraftMetaOminousBottle.OMINOUS_BOTTLE_AMPLIFIER.TYPE - )); +- } +- return CraftMetaItem.HANDLED_TAGS; + // Paper start - improve checking handled tags + @org.jetbrains.annotations.VisibleForTesting + public static final Map, Set>> HANDLED_DCTS_PER_TYPE = new HashMap<>(); @@ -525,7 +529,7 @@ index ff38f010b0f950e0a0f706e144b54ba245d169f2..0bc100430483f88bc7edf17645250b28 + final Map, Set>> map = new HashMap<>(); + map.put(CraftMetaArmor.class, Set.of(CraftMetaArmor.TRIM.TYPE)); + map.put(CraftMetaArmorStand.class, Set.of(CraftMetaArmorStand.ENTITY_TAG.TYPE)); -+ map.put(CraftMetaAxolotlBucket.class, Set.of(CraftMetaAxolotlBucket.ENTITY_TAG.TYPE)); ++ map.put(CraftMetaAxolotlBucket.class, Set.of(CraftMetaAxolotlBucket.ENTITY_TAG.TYPE, CraftMetaAxolotlBucket.BUCKET_ENTITY_TAG.TYPE)); + map.put(CraftMetaBanner.class, Set.of(/*CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT, */CraftMetaBanner.PATTERNS.TYPE)); // banner uses same tag as block state + map.put(CraftMetaBlockState.class, Set.of(CraftMetaBlockState.BLOCK_ENTITY_TAG.TYPE)); + map.put(CraftMetaBook.class, Set.of(CraftMetaBook.BOOK_CONTENT.TYPE)); @@ -547,7 +551,7 @@ index ff38f010b0f950e0a0f706e144b54ba245d169f2..0bc100430483f88bc7edf17645250b28 + map.put(CraftMetaSkull.class, Set.of(CraftMetaSkull.SKULL_PROFILE.TYPE, CraftMetaSkull.NOTE_BLOCK_SOUND.TYPE)); + map.put(CraftMetaSpawnEgg.class, Set.of(CraftMetaSpawnEgg.ENTITY_TAG.TYPE)); + map.put(CraftMetaSuspiciousStew.class, Set.of(CraftMetaSuspiciousStew.EFFECTS.TYPE)); -+ map.put(CraftMetaTropicalFishBucket.class, Set.of(CraftMetaTropicalFishBucket.ENTITY_TAG.TYPE)); ++ map.put(CraftMetaTropicalFishBucket.class, Set.of(CraftMetaTropicalFishBucket.ENTITY_TAG.TYPE, CraftMetaTropicalFishBucket.BUCKET_ENTITY_TAG.TYPE)); + + for (final Map.Entry, Set>> entry : map.entrySet()) { + final ArrayList> topLevelTags = new ArrayList<>(entry.getValue()); @@ -555,8 +559,7 @@ index ff38f010b0f950e0a0f706e144b54ba245d169f2..0bc100430483f88bc7edf17645250b28 + topLevelTags.addAll(DEFAULT_HANDLED_DCTS); + HANDLED_DCTS_PER_TYPE.put(entry.getKey(), Set.copyOf(topLevelTags)); + } - } -- return CraftMetaItem.HANDLED_TAGS; ++ } + return HANDLED_DCTS_PER_TYPE.getOrDefault(clazz, DEFAULT_HANDLED_DCTS); } } @@ -610,10 +613,10 @@ index f0c817e27a602740bc979b2ebaec3917e1906d74..6979c9026494e69de46b7458fb56d371 getOrEmpty(tag, CraftMetaMap.MAP_ID).ifPresent((mapId) -> { this.mapId = mapId.id(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java -index 7032f07e3872c65bbebb905e9d50057a113100d4..e764d0090afac9fa81fb8c0e16d0b53ea6c24bb9 100644 +index 99bf6132184b1b7846270fc9a1b9e97048306a3b..9d886c9b66e5d86590a88169c16bfd16aede5cf6 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java -@@ -29,8 +29,8 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst +@@ -27,8 +27,8 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst } } @@ -623,7 +626,7 @@ index 7032f07e3872c65bbebb905e9d50057a113100d4..e764d0090afac9fa81fb8c0e16d0b53e + super(tag, extraHandledDcts); // Paper getOrEmpty(tag, CraftMetaMusicInstrument.GOAT_HORN_INSTRUMENT).ifPresent((instrument) -> { - this.instrument = this.unwrapAndConvertHolder(Registry.INSTRUMENT, instrument); // Paper - fix upstream not handling custom instruments + this.instrument = this.unwrapAndConvertHolder(org.bukkit.Registry.INSTRUMENT, instrument); // Paper - fix upstream not handling custom instruments diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java index 19f1425ae86e1b8b8fd46a5c6a193d1b77aeefe9..7197c4f5698fd041c4db6d0f6a80c55f77661789 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java @@ -640,10 +643,10 @@ index 19f1425ae86e1b8b8fd46a5c6a193d1b77aeefe9..7197c4f5698fd041c4db6d0f6a80c55f this.ominousBottleAmplifier = amplifier; }); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java -index 077c123caa63e0369e5710dfdf2a71561fdfbc77..4a9e6a679530025caa710a152c5249299ceffdf9 100644 +index e2aa305dcaf94d76fa3b74fc33b4d8bbc6d92b2b..db7f71af22d904de08d4badaa7f66d1286d5bf16 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java -@@ -59,8 +59,8 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { +@@ -61,8 +61,8 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta { } } @@ -670,7 +673,7 @@ index 0f725408691384800abb2cc7a43d9e1c75c9a17e..c769d2a210060f6829a6cbe739d6d9ab getOrEmpty(tag, CraftMetaSkull.SKULL_PROFILE).ifPresent((resolvableProfile) -> { this.setProfile(resolvableProfile.gameProfile()); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java -index a6d2370113eb44c0863b7837362dbb350f5057c6..a6bb927c3707e4b4b1c6fe37d6dc166e69c1c52d 100644 +index 726438237093abc85d9239f9c84be3df6d8318c4..a3c1a8c469630464ac80b7786731462046134998 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java @@ -125,8 +125,8 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta { @@ -700,11 +703,11 @@ index 14e944b4e83b80e0fc6d81e346cc305ab00561c5..39cab624de062514358a2a2942aea0e5 List list = suspiciousStewEffects.effects(); int length = list.size(); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java -index 8940fc62f14dd7f53f98ea47ac06a21aa92a4b62..959a5ec62ac951ce0dd09079a3cfef77d0801888 100644 +index 911bdce0795a6b11cd1d5ad5211202456e5225d4..b5392a3a6f6f3d0a54549e6bb93f28590ee048f0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java -@@ -35,8 +35,8 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB - this.entityTag = bucket.entityTag; +@@ -39,8 +39,8 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB + this.bucketEntityTag = bucket.bucketEntityTag; } - CraftMetaTropicalFishBucket(DataComponentPatch tag) { diff --git a/patches/server/1044-General-ItemMeta-fixes.patch b/patches/server/1042-General-ItemMeta-fixes.patch similarity index 93% rename from patches/server/1044-General-ItemMeta-fixes.patch rename to patches/server/1042-General-ItemMeta-fixes.patch index d05a17dbe7..08ad9d86b0 100644 --- a/patches/server/1044-General-ItemMeta-fixes.patch +++ b/patches/server/1042-General-ItemMeta-fixes.patch @@ -116,10 +116,10 @@ index 2d6abecc94683f92da6be26b72ea829663b16d76..6a3b0c7f0cc3ffb17a231383ad103fa7 for (Pattern p : this.patterns) { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -index a1e10c14375b81f97e37105df43ab8f13461474c..99ee41e79891d6017f065492efab5af95b1b4c38 100644 +index 12911233c01d0ac1af9adbd157d56d28361fc76f..99ee41e79891d6017f065492efab5af95b1b4c38 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java -@@ -209,9 +209,18 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta +@@ -209,10 +209,19 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta super.applyToItem(tag); if (this.blockEntityTag != null) { @@ -135,10 +135,12 @@ index a1e10c14375b81f97e37105df43ab8f13461474c..99ee41e79891d6017f065492efab5af9 + // Paper end for (TypedDataComponent component : this.blockEntityTag.collectComponents()) { +- tag.putIfAbsent(component); + if (CraftMetaItem.DEFAULT_HANDLED_DCTS.contains(component.type())) continue; // Paper - if the component type was already handled by CraftMetaItem, don't add it again - tag.builder.set(component); ++ tag.builder.set(component); } } + } @@ -332,6 +341,13 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta Preconditions.checkArgument(blockStateType == blockState.getClass() && blockState instanceof CraftBlockEntityState, "Invalid blockState for " + this.material); @@ -154,7 +156,7 @@ index a1e10c14375b81f97e37105df43ab8f13461474c..99ee41e79891d6017f065492efab5af9 private static Material shieldToBannerHack() { diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java -index 7f3733c29f2e79bffa24631efb20de49fde857f2..6a6e9a1478a2ead20467bc711d0ad4a9ab3010cb 100644 +index 3f78a0935d738854182254b345064e3c225dcd5f..1d63632372eb8b078bbbba6f9e583eb93c902746 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java @@ -116,8 +116,8 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta { @@ -260,22 +262,23 @@ index 8e0dd4b7a7a25a8beb27b507047bc48d8227627c..cf5d27ccc2225bac3aa57912f444f95d @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46a5377894 100644 +index 12a193db7475870e5107c86c7611bb4b92feacb8..87bb193acd39515c2d80cf1ab41d1e2538112fe9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -@@ -165,9 +165,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -172,9 +172,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } } - static final class Applicator { + static abstract class Applicator { // Paper - support updating profile after resolving it - final DataComponentPatch.Builder builder = DataComponentPatch.builder(); +- private final DataComponentPatch.Builder builder = DataComponentPatch.builder(); ++ final DataComponentPatch.Builder builder = DataComponentPatch.builder(); // Paper - private -> package-private + void skullCallback(com.mojang.authlib.GameProfile gameProfile) {} // Paper - support updating profile after resolving it Applicator put(ItemMetaKeyType key, T value) { this.builder.set(key.TYPE, value); -@@ -279,7 +280,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -293,7 +294,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { this.enchantments = new EnchantmentMap(meta.enchantments); // Paper } @@ -284,7 +287,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 this.attributeModifiers = LinkedHashMultimap.create(meta.attributeModifiers); } -@@ -309,6 +310,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -323,6 +324,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } CraftMetaItem(DataComponentPatch tag, Set> extraHandledTags) { // Paper - improve handled tags on type changes @@ -296,7 +299,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 CraftMetaItem.getOrEmpty(tag, CraftMetaItem.NAME).ifPresent((component) -> { this.displayName = component; }); -@@ -725,7 +731,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -733,7 +739,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { Map mods = SerializableMeta.getObject(Map.class, map, key.BUKKIT, true); Multimap result = LinkedHashMultimap.create(); if (mods == null) { @@ -305,7 +308,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 } for (Object obj : mods.keySet()) { -@@ -879,10 +885,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -887,10 +893,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } void applyModifiers(Multimap modifiers, CraftMetaItem.Applicator tag) { @@ -318,7 +321,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 return; } -@@ -911,7 +915,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -919,7 +923,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Overridden boolean isEmpty() { @@ -327,7 +330,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 } // Paper start -@@ -1007,6 +1011,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1015,6 +1019,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public void lore(final List lore) { @@ -335,7 +338,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(lore) : null; } // Paper end -@@ -1131,6 +1136,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1139,6 +1144,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper end @Override public void setLore(List lore) { @@ -343,7 +346,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 if (lore == null || lore.isEmpty()) { this.lore = null; } else { -@@ -1146,6 +1152,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1154,6 +1160,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper start @Override public void setLoreComponents(List lore) { @@ -351,7 +354,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 if (lore == null) { this.lore = null; } else { -@@ -1413,7 +1420,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1421,7 +1428,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { @Override public String getAsString() { @@ -360,7 +363,16 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 this.applyToItem(tag); DataComponentPatch patch = tag.build(); Tag nbt = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), patch).getOrThrow(); -@@ -1434,6 +1441,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1430,7 +1437,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { + + @Override + public String getAsComponentString() { +- CraftMetaItem.Applicator tag = new CraftMetaItem.Applicator(); ++ CraftMetaItem.Applicator tag = new CraftMetaItem.Applicator() {}; // Paper + this.applyToItem(tag); + DataComponentPatch patch = tag.build(); + +@@ -1470,6 +1477,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (first == null || second == null) { return false; } @@ -368,7 +380,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 for (Map.Entry entry : first.entries()) { if (!second.containsEntry(entry.getKey(), entry.getValue())) { return false; -@@ -1506,7 +1514,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1542,7 +1550,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { && (this.hasCustomModelData() ? that.hasCustomModelData() && this.customModelData.equals(that.customModelData) : !that.hasCustomModelData()) && (this.hasBlockData() ? that.hasBlockData() && this.blockData.equals(that.blockData) : !that.hasBlockData()) && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost()) @@ -377,7 +389,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 && (this.unhandledTags.equals(that.unhandledTags)) && (Objects.equals(this.customTag, that.customTag)) && (this.persistentDataContainer.equals(that.persistentDataContainer)) -@@ -1563,7 +1571,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1599,7 +1607,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { hash = 61 * hash + (this.hasFood() ? this.food.hashCode() : 0); hash = 61 * hash + (this.hasDamage() ? this.damage : 0); hash = 61 * hash + (this.hasMaxDamage() ? 1231 : 1237); @@ -386,7 +398,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 hash = 61 * hash + (this.canPlaceOnPredicates != null ? this.canPlaceOnPredicates.hashCode() : 0); // Paper hash = 61 * hash + (this.canBreakPredicates != null ? this.canBreakPredicates.hashCode() : 0); // Paper hash = 61 * hash + this.version; -@@ -1583,7 +1591,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1619,7 +1627,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { if (this.enchantments != null) { clone.enchantments = new EnchantmentMap(this.enchantments); // Paper } @@ -395,7 +407,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers); } if (this.customTag != null) { -@@ -1787,7 +1795,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1823,7 +1831,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { } static void serializeModifiers(Multimap modifiers, ImmutableMap.Builder builder, ItemMetaKey key) { @@ -404,7 +416,7 @@ index 0bc100430483f88bc7edf17645250b2862ccc1d5..db3e74f22f555e3bb5b304af303cdd46 return; } -@@ -1869,7 +1877,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { +@@ -1905,7 +1913,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { // Paper start - improve checking handled tags @org.jetbrains.annotations.VisibleForTesting public static final Map, Set>> HANDLED_DCTS_PER_TYPE = new HashMap<>(); diff --git a/patches/server/1045-Expose-hasColor-to-leather-armor.patch b/patches/server/1043-Expose-hasColor-to-leather-armor.patch similarity index 100% rename from patches/server/1045-Expose-hasColor-to-leather-armor.patch rename to patches/server/1043-Expose-hasColor-to-leather-armor.patch diff --git a/patches/server/1046-Added-API-to-get-player-ha-proxy-address.patch b/patches/server/1044-Added-API-to-get-player-ha-proxy-address.patch similarity index 97% rename from patches/server/1046-Added-API-to-get-player-ha-proxy-address.patch rename to patches/server/1044-Added-API-to-get-player-ha-proxy-address.patch index f14e9bae13..364197b03e 100644 --- a/patches/server/1046-Added-API-to-get-player-ha-proxy-address.patch +++ b/patches/server/1044-Added-API-to-get-player-ha-proxy-address.patch @@ -35,7 +35,7 @@ index 52f537b7bfbdeaad9d17c0e88a1ed1c8925a833f..8aff5129f85ab5729b3da2e465871be6 } else { super.channelRead(ctx, msg); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0ff9bb5f5d312503ec4b3cf3bf8c532b09a8f08b..5f896948d158651cd9837364759dbfbcce6b7d21 100644 +index a9aa3dca65aca86cf535d6616f5d5db3e1e8fc8b..561a7a8e96e2d91bbb87fe6230e94b5f38073d27 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -273,6 +273,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/1047-More-Chest-Block-API.patch b/patches/server/1045-More-Chest-Block-API.patch similarity index 100% rename from patches/server/1047-More-Chest-Block-API.patch rename to patches/server/1045-More-Chest-Block-API.patch diff --git a/patches/server/1048-Print-data-component-type-on-encoding-error.patch b/patches/server/1046-Print-data-component-type-on-encoding-error.patch similarity index 92% rename from patches/server/1048-Print-data-component-type-on-encoding-error.patch rename to patches/server/1046-Print-data-component-type-on-encoding-error.patch index ca97f4b068..78cb82fa00 100644 --- a/patches/server/1048-Print-data-component-type-on-encoding-error.patch +++ b/patches/server/1046-Print-data-component-type-on-encoding-error.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Print data component type on encoding error diff --git a/src/main/java/net/minecraft/core/component/DataComponentPatch.java b/src/main/java/net/minecraft/core/component/DataComponentPatch.java -index 913327c9bb937c95e487ba21cf8e2084817bbfdb..f7632a099e1c6e214b5689375889eee7d6426e67 100644 +index 33340e8ebe23a1a9ce587be34551fb929c41d0fd..b8977749d35dd7343021425f477445bec470d46b 100644 --- a/src/main/java/net/minecraft/core/component/DataComponentPatch.java +++ b/src/main/java/net/minecraft/core/component/DataComponentPatch.java @@ -143,7 +143,13 @@ public final class DataComponentPatch { diff --git a/patches/server/1049-Fix-entity-tracker-desync-when-new-players-are-added.patch b/patches/server/1047-Fix-entity-tracker-desync-when-new-players-are-added.patch similarity index 100% rename from patches/server/1049-Fix-entity-tracker-desync-when-new-players-are-added.patch rename to patches/server/1047-Fix-entity-tracker-desync-when-new-players-are-added.patch diff --git a/patches/server/1050-Brigadier-based-command-API.patch b/patches/server/1048-Brigadier-based-command-API.patch similarity index 99% rename from patches/server/1050-Brigadier-based-command-API.patch rename to patches/server/1048-Brigadier-based-command-API.patch index fb030daa83..ce4c0764c7 100644 --- a/patches/server/1050-Brigadier-based-command-API.patch +++ b/patches/server/1048-Brigadier-based-command-API.patch @@ -2266,7 +2266,7 @@ index eb4fc900164d1fb3a78653ae8bc42ea30323f5b7..2eb9c584cc77237f1c82d880a51a3f8b this.setPvpAllowed(dedicatedserverproperties.pvp); this.setFlightAllowed(dedicatedserverproperties.allowFlight); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5e9202bc7fc649764568b55d66ba0d684118c00c..379d87cdab68e161a71063af5cd47bd08daef119 100644 +index 3faf80fca51d66480265eaf3cc89149e53ceb215..b9b3277c8ed94e0cd30b20b9c00a33eaad48e5ac 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -2464,33 +2464,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl @@ -2316,10 +2316,10 @@ index 5e9202bc7fc649764568b55d66ba0d684118c00c..379d87cdab68e161a71063af5cd47bd0 // CraftBukkit end diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 10622ba2f035c183b709748818b6de1a1a8d9ed0..7c165ed8b1fd8072bbfbed7b4f865b72f677a2a3 100644 +index 85d4e561930367918f3c5c4216cadbb970626599..da1aed63af837b193900bb85393611edbd56c363 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -274,11 +274,11 @@ public final class CraftServer implements Server { +@@ -275,11 +275,11 @@ public final class CraftServer implements Server { private final Logger logger = Logger.getLogger("Minecraft"); private final ServicesManager servicesManager = new SimpleServicesManager(); private final CraftScheduler scheduler = new CraftScheduler(); @@ -2334,7 +2334,7 @@ index 10622ba2f035c183b709748818b6de1a1a8d9ed0..7c165ed8b1fd8072bbfbed7b4f865b72 private final StructureManager structureManager; protected final DedicatedServer console; protected final DedicatedPlayerList playerList; -@@ -403,6 +403,12 @@ public final class CraftServer implements Server { +@@ -404,6 +404,12 @@ public final class CraftServer implements Server { this.serverTickManager = new CraftServerTickManager(console.tickRateManager()); Bukkit.setServer(this); @@ -2347,7 +2347,7 @@ index 10622ba2f035c183b709748818b6de1a1a8d9ed0..7c165ed8b1fd8072bbfbed7b4f865b72 CraftRegistry.setMinecraftRegistry(console.registryAccess()); -@@ -572,48 +578,11 @@ public final class CraftServer implements Server { +@@ -573,48 +579,11 @@ public final class CraftServer implements Server { } private void setVanillaCommands(boolean first) { // Spigot @@ -2398,7 +2398,7 @@ index 10622ba2f035c183b709748818b6de1a1a8d9ed0..7c165ed8b1fd8072bbfbed7b4f865b72 // Refresh commands for (ServerPlayer player : this.getHandle().players) { -@@ -1000,17 +969,31 @@ public final class CraftServer implements Server { +@@ -1001,17 +970,31 @@ public final class CraftServer implements Server { return true; } @@ -2440,7 +2440,7 @@ index 10622ba2f035c183b709748818b6de1a1a8d9ed0..7c165ed8b1fd8072bbfbed7b4f865b72 return false; } -@@ -1019,7 +1002,7 @@ public final class CraftServer implements Server { +@@ -1020,7 +1003,7 @@ public final class CraftServer implements Server { public void reload() { // Paper start - lifecycle events if (io.papermc.paper.plugin.lifecycle.event.LifecycleEventRunner.INSTANCE.blocksPluginReloading()) { @@ -2449,7 +2449,7 @@ index 10622ba2f035c183b709748818b6de1a1a8d9ed0..7c165ed8b1fd8072bbfbed7b4f865b72 } // Paper end - lifecycle events org.spigotmc.WatchdogThread.hasStarted = false; // Paper - Disable watchdog early timeout on reload -@@ -1072,8 +1055,9 @@ public final class CraftServer implements Server { +@@ -1073,8 +1056,9 @@ public final class CraftServer implements Server { } Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper @@ -2460,7 +2460,7 @@ index 10622ba2f035c183b709748818b6de1a1a8d9ed0..7c165ed8b1fd8072bbfbed7b4f865b72 // Paper start for (Plugin plugin : pluginClone) { entityMetadata.removeAll(plugin); -@@ -1113,6 +1097,12 @@ public final class CraftServer implements Server { +@@ -1114,6 +1098,12 @@ public final class CraftServer implements Server { this.enablePlugins(PluginLoadOrder.STARTUP); this.enablePlugins(PluginLoadOrder.POSTWORLD); if (io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper != null) io.papermc.paper.plugin.PluginInitializerManager.instance().pluginRemapper.pluginsEnabled(); // Paper - Remap plugins @@ -2756,7 +2756,7 @@ index 0000000000000000000000000000000000000000..6475510ea1084a003fb2c8645cb4538b + } +} diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java -index bd56792fc674c4e3606a3179ebf5a84ef0a4e35c..aded6d8b36008d87a1039e88333fa4b86077b56a 100644 +index f8e363e9c10e30598185a91cbb5cafc00b79ad3d..d7e24766f383f75ed46123fff1bd0ec926a635b4 100644 --- a/src/test/java/org/bukkit/support/DummyServer.java +++ b/src/test/java/org/bukkit/support/DummyServer.java @@ -51,7 +51,7 @@ public final class DummyServer { diff --git a/work/Bukkit b/work/Bukkit index ac72b19b01..fa99e752ae 160000 --- a/work/Bukkit +++ b/work/Bukkit @@ -1 +1 @@ -Subproject commit ac72b19b01bcb3aef5710677b0b942e098479660 +Subproject commit fa99e752ae28e0a294b2def5955645ad74a8a2d3 diff --git a/work/CraftBukkit b/work/CraftBukkit index 66fd94322c..4af0f22e8a 160000 --- a/work/CraftBukkit +++ b/work/CraftBukkit @@ -1 +1 @@ -Subproject commit 66fd94322c5b1b8eb474c7a95aed9d048f995803 +Subproject commit 4af0f22e8a2ce40afd554a3d60da4fe093c7debd