aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-02-23 14:37:33 +0100
committerGitHub <[email protected]>2024-02-23 14:37:33 +0100
commit71c84c8132a463ca26978b852bbbf33ae42cd4ce (patch)
treebbdde5e8056d16ba6778e56165db39b1f6d44468
parent3ea95efdebba7254e842dec66214f71de4721993 (diff)
downloadPaper-71c84c8132a463ca26978b852bbbf33ae42cd4ce.tar.gz
Paper-71c84c8132a463ca26978b852bbbf33ae42cd4ce.zip
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#10277)
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: 9a80d38c SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-722: Add EntityRemoveEvent 258086d9 SPIGOT-7417, PR-967: Add Sign#getTargetSide and Sign#getAllowedEditor ffaba051 SPIGOT-7584: Add missing Tag.ITEMS_NON_FLAMMABLE_WOOD CraftBukkit Changes: 98b6c1ac7 SPIGOT-7589 Fix NullPointerException when bans expire a2736ddb0 SPIGOT-336, SPIGOT-3366, SPIGOT-5768, SPIGOT-6409, SPIGOT-6861, PR-1008: Add EntityRemoveEvent 5bf12cb89 SPIGOT-7565: Throw a more descriptive error message when a developer tries to spawn an entity from a CraftBukkit class 76d95fe7e SPIGOT-7417, PR-1343: Add Sign#getTargetSide and Sign#getAllowedEditor Spigot Changes: e9ec5485 Rebuild patches f1b62e0c Rebuild patches
-rw-r--r--patches/api/0006-Adventure.patch8
-rw-r--r--patches/api/0033-Entity-AddTo-RemoveFrom-World-Events.patch29
-rw-r--r--patches/api/0249-Added-PlayerChangeBeaconEffectEvent.patch (renamed from patches/api/0250-Added-PlayerChangeBeaconEffectEvent.patch)0
-rw-r--r--patches/api/0249-Added-missing-vanilla-tags.patch23
-rw-r--r--patches/api/0250-Added-PlayerStonecutterRecipeSelectEvent.patch (renamed from patches/api/0251-Added-PlayerStonecutterRecipeSelectEvent.patch)0
-rw-r--r--patches/api/0251-Add-dropLeash-variable-to-EntityUnleashEvent.patch (renamed from patches/api/0252-Add-dropLeash-variable-to-EntityUnleashEvent.patch)0
-rw-r--r--patches/api/0252-add-DragonEggFormEvent.patch (renamed from patches/api/0253-add-DragonEggFormEvent.patch)0
-rw-r--r--patches/api/0253-EntityMoveEvent.patch (renamed from patches/api/0254-EntityMoveEvent.patch)0
-rw-r--r--patches/api/0254-Allow-adding-items-to-BlockDropItemEvent.patch (renamed from patches/api/0255-Allow-adding-items-to-BlockDropItemEvent.patch)0
-rw-r--r--patches/api/0255-Add-getMainThreadExecutor-to-BukkitScheduler.patch (renamed from patches/api/0256-Add-getMainThreadExecutor-to-BukkitScheduler.patch)0
-rw-r--r--patches/api/0256-living-entity-allow-attribute-registration.patch (renamed from patches/api/0257-living-entity-allow-attribute-registration.patch)0
-rw-r--r--patches/api/0257-Add-missing-effects.patch (renamed from patches/api/0258-Add-missing-effects.patch)0
-rw-r--r--patches/api/0258-Expose-Tracked-Players.patch (renamed from patches/api/0259-Expose-Tracked-Players.patch)0
-rw-r--r--patches/api/0259-Cache-the-result-of-Material-isBlock.patch (renamed from patches/api/0260-Cache-the-result-of-Material-isBlock.patch)0
-rw-r--r--patches/api/0260-Add-worldborder-events.patch (renamed from patches/api/0261-Add-worldborder-events.patch)0
-rw-r--r--patches/api/0261-added-PlayerNameEntityEvent.patch (renamed from patches/api/0262-added-PlayerNameEntityEvent.patch)0
-rw-r--r--patches/api/0262-Add-recipe-to-cook-events.patch (renamed from patches/api/0263-Add-recipe-to-cook-events.patch)0
-rw-r--r--patches/api/0263-Add-Block-isValidTool.patch (renamed from patches/api/0264-Add-Block-isValidTool.patch)2
-rw-r--r--patches/api/0264-Expand-world-key-API.patch (renamed from patches/api/0265-Expand-world-key-API.patch)0
-rw-r--r--patches/api/0265-Item-Rarity-API.patch (renamed from patches/api/0266-Item-Rarity-API.patch)0
-rw-r--r--patches/api/0266-Expose-protocol-version.patch (renamed from patches/api/0267-Expose-protocol-version.patch)0
-rw-r--r--patches/api/0267-add-isDeeplySleeping-to-HumanEntity.patch (renamed from patches/api/0268-add-isDeeplySleeping-to-HumanEntity.patch)0
-rw-r--r--patches/api/0268-add-consumeFuel-to-FurnaceBurnEvent.patch (renamed from patches/api/0269-add-consumeFuel-to-FurnaceBurnEvent.patch)0
-rw-r--r--patches/api/0269-add-get-set-drop-chance-to-EntityEquipment.patch (renamed from patches/api/0270-add-get-set-drop-chance-to-EntityEquipment.patch)0
-rw-r--r--patches/api/0270-Added-PlayerDeepSleepEvent.patch (renamed from patches/api/0271-Added-PlayerDeepSleepEvent.patch)0
-rw-r--r--patches/api/0271-More-World-API.patch (renamed from patches/api/0272-More-World-API.patch)0
-rw-r--r--patches/api/0272-Added-PlayerBedFailEnterEvent.patch (renamed from patches/api/0273-Added-PlayerBedFailEnterEvent.patch)0
-rw-r--r--patches/api/0273-Introduce-beacon-activation-deactivation-events.patch (renamed from patches/api/0274-Introduce-beacon-activation-deactivation-events.patch)0
-rw-r--r--patches/api/0274-PlayerMoveEvent-Improvements.patch (renamed from patches/api/0275-PlayerMoveEvent-Improvements.patch)0
-rw-r--r--patches/api/0275-add-RespawnFlags-to-PlayerRespawnEvent.patch (renamed from patches/api/0276-add-RespawnFlags-to-PlayerRespawnEvent.patch)0
-rw-r--r--patches/api/0276-Add-more-WanderingTrader-API.patch (renamed from patches/api/0277-Add-more-WanderingTrader-API.patch)0
-rw-r--r--patches/api/0277-Add-EntityBlockStorage-clearEntities.patch (renamed from patches/api/0278-Add-EntityBlockStorage-clearEntities.patch)0
-rw-r--r--patches/api/0278-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch (renamed from patches/api/0279-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch)0
-rw-r--r--patches/api/0279-Inventory-close.patch (renamed from patches/api/0280-Inventory-close.patch)0
-rw-r--r--patches/api/0280-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch (renamed from patches/api/0281-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch)0
-rw-r--r--patches/api/0281-Add-basic-Datapack-API.patch (renamed from patches/api/0282-Add-basic-Datapack-API.patch)0
-rw-r--r--patches/api/0282-additions-to-PlayerGameModeChangeEvent.patch (renamed from patches/api/0283-additions-to-PlayerGameModeChangeEvent.patch)0
-rw-r--r--patches/api/0283-ItemStack-repair-check-API.patch (renamed from patches/api/0284-ItemStack-repair-check-API.patch)0
-rw-r--r--patches/api/0284-More-Enchantment-API.patch (renamed from patches/api/0285-More-Enchantment-API.patch)0
-rw-r--r--patches/api/0285-Add-Mob-lookAt-API.patch (renamed from patches/api/0286-Add-Mob-lookAt-API.patch)0
-rw-r--r--patches/api/0286-ItemStack-editMeta.patch (renamed from patches/api/0287-ItemStack-editMeta.patch)0
-rw-r--r--patches/api/0287-Add-EntityInsideBlockEvent.patch (renamed from patches/api/0288-Add-EntityInsideBlockEvent.patch)0
-rw-r--r--patches/api/0288-Attributes-API-for-item-defaults.patch (renamed from patches/api/0289-Attributes-API-for-item-defaults.patch)0
-rw-r--r--patches/api/0289-Add-cause-to-Weather-ThunderChangeEvents.patch (renamed from patches/api/0290-Add-cause-to-Weather-ThunderChangeEvents.patch)0
-rw-r--r--patches/api/0290-More-Lidded-Block-API.patch (renamed from patches/api/0291-More-Lidded-Block-API.patch)0
-rw-r--r--patches/api/0291-Add-PlayerKickEvent-causes.patch (renamed from patches/api/0292-Add-PlayerKickEvent-causes.patch)0
-rw-r--r--patches/api/0292-Add-PufferFishStateChangeEvent.patch (renamed from patches/api/0293-Add-PufferFishStateChangeEvent.patch)0
-rw-r--r--patches/api/0293-Add-BellRevealRaiderEvent.patch (renamed from patches/api/0294-Add-BellRevealRaiderEvent.patch)0
-rw-r--r--patches/api/0294-Add-ElderGuardianAppearanceEvent.patch (renamed from patches/api/0295-Add-ElderGuardianAppearanceEvent.patch)0
-rw-r--r--patches/api/0295-Add-more-line-of-sight-methods.patch (renamed from patches/api/0296-Add-more-line-of-sight-methods.patch)2
-rw-r--r--patches/api/0296-Add-WaterBottleSplashEvent.patch (renamed from patches/api/0297-Add-WaterBottleSplashEvent.patch)0
-rw-r--r--patches/api/0297-Add-more-LimitedRegion-API.patch (renamed from patches/api/0298-Add-more-LimitedRegion-API.patch)0
-rw-r--r--patches/api/0298-Missing-Entity-API.patch (renamed from patches/api/0299-Missing-Entity-API.patch)0
-rw-r--r--patches/api/0299-Adds-PlayerArmSwingEvent.patch (renamed from patches/api/0300-Adds-PlayerArmSwingEvent.patch)0
-rw-r--r--patches/api/0300-Add-PlayerSignCommandPreprocessEvent.patch (renamed from patches/api/0301-Add-PlayerSignCommandPreprocessEvent.patch)0
-rw-r--r--patches/api/0301-fix-empty-array-elements-in-command-arguments.patch (renamed from patches/api/0302-fix-empty-array-elements-in-command-arguments.patch)0
-rw-r--r--patches/api/0302-Stinger-API.patch (renamed from patches/api/0303-Stinger-API.patch)0
-rw-r--r--patches/api/0303-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch (renamed from patches/api/0304-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch)0
-rw-r--r--patches/api/0304-Add-PlayerSetSpawnEvent.patch (renamed from patches/api/0305-Add-PlayerSetSpawnEvent.patch)0
-rw-r--r--patches/api/0305-Added-EntityDamageItemEvent.patch (renamed from patches/api/0306-Added-EntityDamageItemEvent.patch)0
-rw-r--r--patches/api/0306-Make-EntityUnleashEvent-cancellable.patch (renamed from patches/api/0307-Make-EntityUnleashEvent-cancellable.patch)0
-rw-r--r--patches/api/0307-Change-EnderEye-target-without-changing-other-things.patch (renamed from patches/api/0308-Change-EnderEye-target-without-changing-other-things.patch)0
-rw-r--r--patches/api/0308-Add-BlockBreakBlockEvent.patch (renamed from patches/api/0309-Add-BlockBreakBlockEvent.patch)0
-rw-r--r--patches/api/0309-Add-helpers-for-left-right-click-to-Action.patch (renamed from patches/api/0310-Add-helpers-for-left-right-click-to-Action.patch)0
-rw-r--r--patches/api/0310-Option-to-prevent-NBT-copy-in-smithing-recipes.patch (renamed from patches/api/0311-Option-to-prevent-NBT-copy-in-smithing-recipes.patch)0
-rw-r--r--patches/api/0311-More-CommandBlock-API.patch (renamed from patches/api/0312-More-CommandBlock-API.patch)0
-rw-r--r--patches/api/0312-Add-missing-team-sidebar-display-slots.patch (renamed from patches/api/0313-Add-missing-team-sidebar-display-slots.patch)0
-rw-r--r--patches/api/0313-add-back-EntityPortalExitEvent.patch (renamed from patches/api/0314-add-back-EntityPortalExitEvent.patch)0
-rw-r--r--patches/api/0314-Add-methods-to-find-targets-for-lightning-strikes.patch (renamed from patches/api/0315-Add-methods-to-find-targets-for-lightning-strikes.patch)0
-rw-r--r--patches/api/0315-Get-entity-default-attributes.patch (renamed from patches/api/0316-Get-entity-default-attributes.patch)0
-rw-r--r--patches/api/0316-Left-handed-API.patch (renamed from patches/api/0317-Left-handed-API.patch)0
-rw-r--r--patches/api/0317-Add-critical-damage-API.patch (renamed from patches/api/0318-Add-critical-damage-API.patch)0
-rw-r--r--patches/api/0318-Add-more-advancement-API.patch (renamed from patches/api/0319-Add-more-advancement-API.patch)0
-rw-r--r--patches/api/0319-Fix-issues-with-mob-conversion.patch (renamed from patches/api/0320-Fix-issues-with-mob-conversion.patch)0
-rw-r--r--patches/api/0320-Add-isCollidable-methods-to-various-places.patch (renamed from patches/api/0321-Add-isCollidable-methods-to-various-places.patch)0
-rw-r--r--patches/api/0321-Goat-ram-API.patch (renamed from patches/api/0322-Goat-ram-API.patch)0
-rw-r--r--patches/api/0322-Add-API-for-resetting-a-single-score.patch (renamed from patches/api/0323-Add-API-for-resetting-a-single-score.patch)0
-rw-r--r--patches/api/0323-Add-Raw-Byte-Entity-Serialization.patch (renamed from patches/api/0324-Add-Raw-Byte-Entity-Serialization.patch)0
-rw-r--r--patches/api/0324-Add-PlayerItemFrameChangeEvent.patch (renamed from patches/api/0325-Add-PlayerItemFrameChangeEvent.patch)0
-rw-r--r--patches/api/0325-Allow-delegation-to-vanilla-chunk-gen.patch (renamed from patches/api/0326-Allow-delegation-to-vanilla-chunk-gen.patch)0
-rw-r--r--patches/api/0326-Add-more-Campfire-API.patch (renamed from patches/api/0327-Add-more-Campfire-API.patch)0
-rw-r--r--patches/api/0327-Extend-VehicleCollisionEvent-move-HandlerList-up.patch (renamed from patches/api/0328-Extend-VehicleCollisionEvent-move-HandlerList-up.patch)0
-rw-r--r--patches/api/0328-Improve-scoreboard-entries.patch (renamed from patches/api/0329-Improve-scoreboard-entries.patch)0
-rw-r--r--patches/api/0329-Entity-powdered-snow-API.patch (renamed from patches/api/0330-Entity-powdered-snow-API.patch)0
-rw-r--r--patches/api/0330-Add-API-for-item-entity-health.patch (renamed from patches/api/0331-Add-API-for-item-entity-health.patch)2
-rw-r--r--patches/api/0331-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch (renamed from patches/api/0332-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch)0
-rw-r--r--patches/api/0332-Bucketable-API.patch (renamed from patches/api/0333-Bucketable-API.patch)0
-rw-r--r--patches/api/0333-System-prop-for-default-config-comment-parsing.patch (renamed from patches/api/0334-System-prop-for-default-config-comment-parsing.patch)0
-rw-r--r--patches/api/0334-Expose-vanilla-BiomeProvider-from-WorldInfo.patch (renamed from patches/api/0335-Expose-vanilla-BiomeProvider-from-WorldInfo.patch)0
-rw-r--r--patches/api/0335-Multiple-Entries-with-Scoreboards.patch (renamed from patches/api/0336-Multiple-Entries-with-Scoreboards.patch)0
-rw-r--r--patches/api/0336-Warn-on-strange-EventHandler-return-types.patch (renamed from patches/api/0337-Warn-on-strange-EventHandler-return-types.patch)0
-rw-r--r--patches/api/0337-Multi-Block-Change-API.patch (renamed from patches/api/0338-Multi-Block-Change-API.patch)0
-rw-r--r--patches/api/0338-Fix-NotePlayEvent.patch (renamed from patches/api/0339-Fix-NotePlayEvent.patch)0
-rw-r--r--patches/api/0339-Freeze-Tick-Lock-API.patch (renamed from patches/api/0340-Freeze-Tick-Lock-API.patch)2
-rw-r--r--patches/api/0340-Dolphin-API.patch (renamed from patches/api/0341-Dolphin-API.patch)0
-rw-r--r--patches/api/0341-More-PotionEffectType-API.patch (renamed from patches/api/0342-More-PotionEffectType-API.patch)0
-rw-r--r--patches/api/0342-API-for-creating-command-sender-which-forwards-feedb.patch (renamed from patches/api/0343-API-for-creating-command-sender-which-forwards-feedb.patch)0
-rw-r--r--patches/api/0343-Implement-regenerateChunk.patch (renamed from patches/api/0344-Implement-regenerateChunk.patch)0
-rw-r--r--patches/api/0344-Add-GameEvent-tags.patch (renamed from patches/api/0345-Add-GameEvent-tags.patch)4
-rw-r--r--patches/api/0345-Furnace-RecipesUsed-API.patch (renamed from patches/api/0346-Furnace-RecipesUsed-API.patch)0
-rw-r--r--patches/api/0346-Configurable-sculk-sensor-listener-range.patch (renamed from patches/api/0347-Configurable-sculk-sensor-listener-range.patch)0
-rw-r--r--patches/api/0347-Add-missing-block-data-mins-and-maxes.patch (renamed from patches/api/0348-Add-missing-block-data-mins-and-maxes.patch)0
-rw-r--r--patches/api/0348-Custom-Potion-Mixes.patch (renamed from patches/api/0349-Custom-Potion-Mixes.patch)0
-rw-r--r--patches/api/0349-Expose-furnace-minecart-push-values.patch (renamed from patches/api/0350-Expose-furnace-minecart-push-values.patch)0
-rw-r--r--patches/api/0350-More-Projectile-API.patch (renamed from patches/api/0351-More-Projectile-API.patch)0
-rw-r--r--patches/api/0351-Add-getComputedBiome-API.patch (renamed from patches/api/0352-Add-getComputedBiome-API.patch)2
-rw-r--r--patches/api/0352-Add-enchantWithLevels-API.patch (renamed from patches/api/0353-Add-enchantWithLevels-API.patch)0
-rw-r--r--patches/api/0353-Add-TameableDeathMessageEvent.patch (renamed from patches/api/0354-Add-TameableDeathMessageEvent.patch)0
-rw-r--r--patches/api/0354-Allow-to-change-the-podium-of-the-EnderDragon.patch (renamed from patches/api/0355-Allow-to-change-the-podium-of-the-EnderDragon.patch)0
-rw-r--r--patches/api/0355-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch (renamed from patches/api/0356-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch)0
-rw-r--r--patches/api/0356-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch (renamed from patches/api/0357-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch)0
-rw-r--r--patches/api/0357-WorldCreator-keepSpawnLoaded.patch (renamed from patches/api/0358-WorldCreator-keepSpawnLoaded.patch)0
-rw-r--r--patches/api/0358-Add-EntityDyeEvent-and-CollarColorable-interface.patch (renamed from patches/api/0359-Add-EntityDyeEvent-and-CollarColorable-interface.patch)0
-rw-r--r--patches/api/0359-Add-PlayerStopUsingItemEvent.patch (renamed from patches/api/0360-Add-PlayerStopUsingItemEvent.patch)0
-rw-r--r--patches/api/0360-Expand-FallingBlock-API.patch (renamed from patches/api/0361-Expand-FallingBlock-API.patch)0
-rw-r--r--patches/api/0361-Add-method-isTickingWorlds-to-Bukkit.patch (renamed from patches/api/0362-Add-method-isTickingWorlds-to-Bukkit.patch)0
-rw-r--r--patches/api/0362-Add-WardenAngerChangeEvent.patch (renamed from patches/api/0363-Add-WardenAngerChangeEvent.patch)0
-rw-r--r--patches/api/0363-Nameable-Banner-API.patch (renamed from patches/api/0364-Nameable-Banner-API.patch)0
-rw-r--r--patches/api/0364-Add-Player-getFishHook.patch (renamed from patches/api/0365-Add-Player-getFishHook.patch)0
-rw-r--r--patches/api/0365-More-Teleport-API.patch (renamed from patches/api/0366-More-Teleport-API.patch)2
-rw-r--r--patches/api/0366-Add-EntityPortalReadyEvent.patch (renamed from patches/api/0367-Add-EntityPortalReadyEvent.patch)0
-rw-r--r--patches/api/0367-Custom-Chat-Completion-Suggestions-API.patch (renamed from patches/api/0368-Custom-Chat-Completion-Suggestions-API.patch)0
-rw-r--r--patches/api/0368-Collision-API.patch (renamed from patches/api/0369-Collision-API.patch)0
-rw-r--r--patches/api/0369-Block-Ticking-API.patch (renamed from patches/api/0370-Block-Ticking-API.patch)2
-rw-r--r--patches/api/0370-Add-NamespacedKey-biome-methods.patch (renamed from patches/api/0371-Add-NamespacedKey-biome-methods.patch)0
-rw-r--r--patches/api/0371-Also-load-resources-from-LibraryLoader.patch (renamed from patches/api/0372-Also-load-resources-from-LibraryLoader.patch)2
-rw-r--r--patches/api/0372-Added-byte-array-serialization-deserialization-for-P.patch (renamed from patches/api/0373-Added-byte-array-serialization-deserialization-for-P.patch)0
-rw-r--r--patches/api/0373-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch (renamed from patches/api/0374-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch)0
-rw-r--r--patches/api/0374-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch (renamed from patches/api/0375-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch)0
-rw-r--r--patches/api/0375-Add-getDrops-to-BlockState.patch (renamed from patches/api/0376-Add-getDrops-to-BlockState.patch)0
-rw-r--r--patches/api/0376-Add-PlayerInventorySlotChangeEvent.patch (renamed from patches/api/0377-Add-PlayerInventorySlotChangeEvent.patch)0
-rw-r--r--patches/api/0377-Elder-Guardian-appearance-API.patch (renamed from patches/api/0378-Elder-Guardian-appearance-API.patch)0
-rw-r--r--patches/api/0378-Allow-changing-bed-s-occupied-property.patch (renamed from patches/api/0379-Allow-changing-bed-s-occupied-property.patch)0
-rw-r--r--patches/api/0379-Add-EquipmentSlot-convenience-methods.patch (renamed from patches/api/0380-Add-EquipmentSlot-convenience-methods.patch)0
-rw-r--r--patches/api/0380-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch (renamed from patches/api/0381-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch)2
-rw-r--r--patches/api/0381-Add-entity-knockback-API.patch (renamed from patches/api/0382-Add-entity-knockback-API.patch)2
-rw-r--r--patches/api/0382-Added-EntityToggleSitEvent.patch (renamed from patches/api/0383-Added-EntityToggleSitEvent.patch)0
-rw-r--r--patches/api/0383-Add-Moving-Piston-API.patch (renamed from patches/api/0384-Add-Moving-Piston-API.patch)0
-rw-r--r--patches/api/0384-Add-PrePlayerAttackEntityEvent.patch (renamed from patches/api/0385-Add-PrePlayerAttackEntityEvent.patch)0
-rw-r--r--patches/api/0385-Add-Player-Warden-Warning-API.patch (renamed from patches/api/0386-Add-Player-Warden-Warning-API.patch)0
-rw-r--r--patches/api/0386-More-vanilla-friendly-methods-to-update-trades.patch (renamed from patches/api/0387-More-vanilla-friendly-methods-to-update-trades.patch)0
-rw-r--r--patches/api/0387-Add-paper-dumplisteners-command.patch (renamed from patches/api/0388-Add-paper-dumplisteners-command.patch)0
-rw-r--r--patches/api/0388-ItemStack-damage-API.patch (renamed from patches/api/0389-ItemStack-damage-API.patch)2
-rw-r--r--patches/api/0389-Add-Tick-TemporalUnit.patch (renamed from patches/api/0390-Add-Tick-TemporalUnit.patch)0
-rw-r--r--patches/api/0390-Friction-API.patch (renamed from patches/api/0391-Friction-API.patch)4
-rw-r--r--patches/api/0391-Player-Entity-Tracking-Events.patch (renamed from patches/api/0392-Player-Entity-Tracking-Events.patch)0
-rw-r--r--patches/api/0392-Add-missing-Fluid-type.patch (renamed from patches/api/0393-Add-missing-Fluid-type.patch)0
-rw-r--r--patches/api/0393-fix-Instruments.patch (renamed from patches/api/0394-fix-Instruments.patch)0
-rw-r--r--patches/api/0394-Add-BlockLockCheckEvent.patch (renamed from patches/api/0395-Add-BlockLockCheckEvent.patch)0
-rw-r--r--patches/api/0395-Add-Sneaking-API-for-Entities.patch (renamed from patches/api/0396-Add-Sneaking-API-for-Entities.patch)0
-rw-r--r--patches/api/0396-Improve-PortalEvents.patch (renamed from patches/api/0397-Improve-PortalEvents.patch)0
-rw-r--r--patches/api/0397-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch (renamed from patches/api/0398-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch)0
-rw-r--r--patches/api/0398-Flying-Fall-Damage-API.patch (renamed from patches/api/0399-Flying-Fall-Damage-API.patch)0
-rw-r--r--patches/api/0399-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch (renamed from patches/api/0400-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch)0
-rw-r--r--patches/api/0400-Win-Screen-API.patch (renamed from patches/api/0401-Win-Screen-API.patch)0
-rw-r--r--patches/api/0401-Add-Entity-Body-Yaw-API.patch (renamed from patches/api/0402-Add-Entity-Body-Yaw-API.patch)0
-rw-r--r--patches/api/0402-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch (renamed from patches/api/0403-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch)0
-rw-r--r--patches/api/0403-Add-EntityFertilizeEggEvent.patch (renamed from patches/api/0404-Add-EntityFertilizeEggEvent.patch)0
-rw-r--r--patches/api/0404-Add-CompostItemEvent-and-EntityCompostItemEvent.patch (renamed from patches/api/0405-Add-CompostItemEvent-and-EntityCompostItemEvent.patch)0
-rw-r--r--patches/api/0405-Add-Shearable-API.patch (renamed from patches/api/0406-Add-Shearable-API.patch)0
-rw-r--r--patches/api/0406-Fix-SpawnEggMeta-get-setSpawnedType.patch (renamed from patches/api/0407-Fix-SpawnEggMeta-get-setSpawnedType.patch)0
-rw-r--r--patches/api/0407-Add-Mob-Experience-reward-API.patch (renamed from patches/api/0408-Add-Mob-Experience-reward-API.patch)0
-rw-r--r--patches/api/0408-Expand-PlayerItemMendEvent.patch (renamed from patches/api/0409-Expand-PlayerItemMendEvent.patch)0
-rw-r--r--patches/api/0409-Add-transient-modifier-API.patch (renamed from patches/api/0410-Add-transient-modifier-API.patch)0
-rw-r--r--patches/api/0410-Properly-remove-the-experimental-smithing-inventory-.patch (renamed from patches/api/0411-Properly-remove-the-experimental-smithing-inventory-.patch)0
-rw-r--r--patches/api/0411-Add-method-to-remove-all-active-potion-effects.patch (renamed from patches/api/0412-Add-method-to-remove-all-active-potion-effects.patch)2
-rw-r--r--patches/api/0412-Folia-scheduler-and-owned-region-API.patch (renamed from patches/api/0413-Folia-scheduler-and-owned-region-API.patch)0
-rw-r--r--patches/api/0413-Add-event-for-player-editing-sign.patch (renamed from patches/api/0414-Add-event-for-player-editing-sign.patch)0
-rw-r--r--patches/api/0414-Add-Sign-getInteractableSideFor.patch (renamed from patches/api/0415-Add-Sign-getInteractableSideFor.patch)9
-rw-r--r--patches/api/0415-Fix-BanList-API.patch (renamed from patches/api/0416-Fix-BanList-API.patch)0
-rw-r--r--patches/api/0416-Add-whitelist-events.patch (renamed from patches/api/0417-Add-whitelist-events.patch)0
-rw-r--r--patches/api/0417-API-for-updating-recipes-on-clients.patch (renamed from patches/api/0418-API-for-updating-recipes-on-clients.patch)0
-rw-r--r--patches/api/0418-Add-PlayerFailMoveEvent.patch (renamed from patches/api/0419-Add-PlayerFailMoveEvent.patch)0
-rw-r--r--patches/api/0419-Fix-custom-statistic-criteria-creation.patch (renamed from patches/api/0420-Fix-custom-statistic-criteria-creation.patch)0
-rw-r--r--patches/api/0420-SculkCatalyst-bloom-API.patch (renamed from patches/api/0421-SculkCatalyst-bloom-API.patch)0
-rw-r--r--patches/api/0421-API-for-an-entity-s-scoreboard-name.patch (renamed from patches/api/0422-API-for-an-entity-s-scoreboard-name.patch)0
-rw-r--r--patches/api/0422-Deprecate-and-replace-methods-with-old-StructureType.patch (renamed from patches/api/0423-Deprecate-and-replace-methods-with-old-StructureType.patch)0
-rw-r--r--patches/api/0423-Add-Listing-API-for-Player.patch (renamed from patches/api/0424-Add-Listing-API-for-Player.patch)0
-rw-r--r--patches/api/0424-Expose-clicked-BlockFace-during-BlockDamageEvent.patch (renamed from patches/api/0425-Expose-clicked-BlockFace-during-BlockDamageEvent.patch)0
-rw-r--r--patches/api/0425-Fix-NPE-on-Boat-getStatus.patch (renamed from patches/api/0426-Fix-NPE-on-Boat-getStatus.patch)0
-rw-r--r--patches/api/0426-Expand-Pose-API.patch (renamed from patches/api/0427-Expand-Pose-API.patch)0
-rw-r--r--patches/api/0427-MerchantRecipe-add-copy-constructor.patch (renamed from patches/api/0428-MerchantRecipe-add-copy-constructor.patch)0
-rw-r--r--patches/api/0428-More-DragonBattle-API.patch (renamed from patches/api/0429-More-DragonBattle-API.patch)0
-rw-r--r--patches/api/0429-Add-PlayerPickItemEvent.patch (renamed from patches/api/0430-Add-PlayerPickItemEvent.patch)0
-rw-r--r--patches/api/0430-Allow-trident-custom-damage.patch (renamed from patches/api/0431-Allow-trident-custom-damage.patch)0
-rw-r--r--patches/api/0431-Expose-hand-during-BlockCanBuildEvent.patch (renamed from patches/api/0432-Expose-hand-during-BlockCanBuildEvent.patch)0
-rw-r--r--patches/api/0432-Limit-setBurnTime-to-valid-short-values.patch (renamed from patches/api/0433-Limit-setBurnTime-to-valid-short-values.patch)0
-rw-r--r--patches/api/0433-Add-OfflinePlayer-isConnected.patch (renamed from patches/api/0434-Add-OfflinePlayer-isConnected.patch)2
-rw-r--r--patches/api/0434-Add-titleOverride-to-InventoryOpenEvent.patch (renamed from patches/api/0435-Add-titleOverride-to-InventoryOpenEvent.patch)0
-rw-r--r--patches/api/0435-Allow-proper-checking-of-empty-item-stacks.patch (renamed from patches/api/0436-Allow-proper-checking-of-empty-item-stacks.patch)0
-rw-r--r--patches/api/0436-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch (renamed from patches/api/0437-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch)0
-rw-r--r--patches/api/0437-Add-player-idle-duration-API.patch (renamed from patches/api/0438-Add-player-idle-duration-API.patch)0
-rw-r--r--patches/api/0438-Add-API-to-get-the-collision-shape-of-a-block-before.patch (renamed from patches/api/0439-Add-API-to-get-the-collision-shape-of-a-block-before.patch)2
-rw-r--r--patches/api/0439-Add-predicate-for-blocks-when-raytracing.patch (renamed from patches/api/0440-Add-predicate-for-blocks-when-raytracing.patch)0
-rw-r--r--patches/api/0440-Add-hand-to-fish-event-for-all-player-interactions.patch (renamed from patches/api/0441-Add-hand-to-fish-event-for-all-player-interactions.patch)0
-rw-r--r--patches/api/0441-Add-UUID-attribute-modifier-API.patch (renamed from patches/api/0442-Add-UUID-attribute-modifier-API.patch)0
-rw-r--r--patches/api/0442-Expand-LingeringPotion-API.patch (renamed from patches/api/0443-Expand-LingeringPotion-API.patch)0
-rw-r--r--patches/api/0443-Remove-unnecessary-durability-check-in-ItemStack-isS.patch (renamed from patches/api/0444-Remove-unnecessary-durability-check-in-ItemStack-isS.patch)2
-rw-r--r--patches/api/0444-Add-Structure-check-API.patch (renamed from patches/api/0445-Add-Structure-check-API.patch)0
-rw-r--r--patches/api/0445-add-missing-Experimental-annotations.patch (renamed from patches/api/0446-add-missing-Experimental-annotations.patch)4
-rw-r--r--patches/api/0446-Add-more-scoreboard-API.patch (renamed from patches/api/0447-Add-more-scoreboard-API.patch)0
-rw-r--r--patches/api/0447-Improve-Registry.patch (renamed from patches/api/0448-Improve-Registry.patch)0
-rw-r--r--patches/api/0448-Add-experience-points-API.patch (renamed from patches/api/0449-Add-experience-points-API.patch)0
-rw-r--r--patches/api/0449-Add-missing-InventoryType.patch (renamed from patches/api/0450-Add-missing-InventoryType.patch)0
-rw-r--r--patches/api/0450-Add-drops-to-shear-events.patch (renamed from patches/api/0451-Add-drops-to-shear-events.patch)0
-rw-r--r--patches/api/0451-Add-HiddenPotionEffect-API.patch (renamed from patches/api/0452-Add-HiddenPotionEffect-API.patch)2
-rw-r--r--patches/api/0452-Add-PlayerShieldDisableEvent.patch (renamed from patches/api/0453-Add-PlayerShieldDisableEvent.patch)0
-rw-r--r--patches/api/0453-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch (renamed from patches/api/0454-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch)0
-rw-r--r--patches/api/0454-Add-BlockStateMeta-clearBlockState.patch (renamed from patches/api/0455-Add-BlockStateMeta-clearBlockState.patch)0
-rw-r--r--patches/api/0455-Expose-LootTable-of-DecoratedPot.patch (renamed from patches/api/0456-Expose-LootTable-of-DecoratedPot.patch)0
-rw-r--r--patches/api/0456-Add-ShulkerDuplicateEvent.patch (renamed from patches/api/0457-Add-ShulkerDuplicateEvent.patch)0
-rw-r--r--patches/api/0457-Add-api-for-spawn-egg-texture-colors.patch (renamed from patches/api/0458-Add-api-for-spawn-egg-texture-colors.patch)0
-rw-r--r--patches/api/0458-Add-Lifecycle-Event-system.patch (renamed from patches/api/0459-Add-Lifecycle-Event-system.patch)0
-rw-r--r--patches/api/0459-Conduit-API.patch (renamed from patches/api/0460-Conduit-API.patch)0
-rw-r--r--patches/api/0460-ItemStack-Tooltip-API.patch (renamed from patches/api/0461-ItemStack-Tooltip-API.patch)0
-rw-r--r--patches/api/0461-Add-getChunkSnapshot-includeLightData-parameter.patch (renamed from patches/api/0462-Add-getChunkSnapshot-includeLightData-parameter.patch)0
-rw-r--r--patches/api/0462-Add-FluidState-API.patch (renamed from patches/api/0463-Add-FluidState-API.patch)0
-rw-r--r--patches/api/0463-add-number-format-api.patch (renamed from patches/api/0464-add-number-format-api.patch)0
-rw-r--r--patches/server/0001-Setup-Gradle-project.patch15
-rw-r--r--patches/server/0003-Build-system-changes.patch12
-rw-r--r--patches/server/0004-Test-changes.patch8
-rw-r--r--patches/server/0009-MC-Utils.patch28
-rw-r--r--patches/server/0010-Adventure.patch46
-rw-r--r--patches/server/0014-Timings-v2.patch38
-rw-r--r--patches/server/0021-Configurable-fishing-time-ranges.patch6
-rw-r--r--patches/server/0022-Allow-nerfed-mobs-to-jump.patch6
-rw-r--r--patches/server/0023-Add-configurable-entity-despawn-distances.patch6
-rw-r--r--patches/server/0025-Drop-falling-block-and-tnt-entities-at-the-specified.patch18
-rw-r--r--patches/server/0029-Player-affects-spawning-API.patch14
-rw-r--r--patches/server/0032-Entity-Origin-API.patch14
-rw-r--r--patches/server/0033-Prevent-block-entity-and-entity-crashes.patch4
-rw-r--r--patches/server/0034-Configurable-top-of-nether-void-damage.patch4
-rw-r--r--patches/server/0049-Add-PlayerInitialSpawnEvent.patch6
-rw-r--r--patches/server/0052-All-chunks-are-slime-spawn-chunks-toggle.patch4
-rw-r--r--patches/server/0056-Add-configurable-portal-search-radius.patch4
-rw-r--r--patches/server/0057-Add-velocity-warnings.patch4
-rw-r--r--patches/server/0059-Add-exception-reporting-event.patch4
-rw-r--r--patches/server/0060-Disable-Scoreboards-for-non-players-by-default.patch8
-rw-r--r--patches/server/0068-Configurable-Non-Player-Arrow-Despawn-Rate.patch6
-rw-r--r--patches/server/0070-Custom-replacement-for-eaten-items.patch8
-rw-r--r--patches/server/0071-handle-NaN-health-absorb-values-and-repair-bad-data.patch8
-rw-r--r--patches/server/0072-Use-a-Shared-Random-for-Entities.patch6
-rw-r--r--patches/server/0080-Add-PlayerUseUnknownEntityEvent.patch9
-rw-r--r--patches/server/0085-Configurable-Player-Collision.patch10
-rw-r--r--patches/server/0088-EntityRegainHealthEvent-isFastRegen-API.patch4
-rw-r--r--patches/server/0092-LootTable-API-and-replenishable-lootables.patch16
-rw-r--r--patches/server/0095-Optional-TNT-doesn-t-move-in-water.patch6
-rw-r--r--patches/server/0098-Fix-global-sound-handling.patch12
-rw-r--r--patches/server/0105-Add-EntityZapEvent.patch8
-rw-r--r--patches/server/0106-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch4
-rw-r--r--patches/server/0109-Add-source-to-PlayerExpChangeEvent.patch8
-rw-r--r--patches/server/0110-Add-ProjectileCollideEvent.patch6
-rw-r--r--patches/server/0115-Add-API-methods-to-control-if-armor-stands-can-move.patch6
-rw-r--r--patches/server/0118-Firework-API-s.patch8
-rw-r--r--patches/server/0119-PlayerTeleportEndGatewayEvent.patch4
-rw-r--r--patches/server/0121-Enforce-Sync-Player-Saves.patch4
-rw-r--r--patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch42
-rw-r--r--patches/server/0123-Cap-Entity-Collisions.patch8
-rw-r--r--patches/server/0125-Properly-handle-async-calls-to-restart-the-server.patch4
-rw-r--r--patches/server/0126-Add-option-to-make-parrots-stay-on-shoulders-despite.patch6
-rw-r--r--patches/server/0128-Use-TerminalConsoleAppender-for-console-improvements.patch8
-rw-r--r--patches/server/0129-provide-a-configurable-option-to-disable-creeper-lin.patch4
-rw-r--r--patches/server/0130-Item-canEntityPickup.patch8
-rw-r--r--patches/server/0131-PlayerPickupItemEvent-setFlyAtPlayer.patch10
-rw-r--r--patches/server/0132-PlayerAttemptPickupItemEvent.patch8
-rw-r--r--patches/server/0136-Shoulder-Entities-Release-API.patch4
-rw-r--r--patches/server/0139-Entity-fromMobSpawner.patch12
-rw-r--r--patches/server/0143-ProfileWhitelistVerifyEvent.patch6
-rw-r--r--patches/server/0155-Send-attack-SoundEffects-only-to-players-who-can-see.patch12
-rw-r--r--patches/server/0156-Add-PlayerArmorChangeEvent.patch4
-rw-r--r--patches/server/0162-PlayerPickupExperienceEvent.patch4
-rw-r--r--patches/server/0163-Ability-to-apply-mending-to-XP-API.patch4
-rw-r--r--patches/server/0166-PreCreatureSpawnEvent.patch6
-rw-r--r--patches/server/0172-Toggleable-player-crits.patch4
-rw-r--r--patches/server/0176-Player.setPlayerProfile-API.patch8
-rw-r--r--patches/server/0183-Configurable-sprint-interruption-on-attack.patch4
-rw-r--r--patches/server/0192-WitchReadyPotionEvent.patch4
-rw-r--r--patches/server/0194-Add-EntityTeleportEndGatewayEvent.patch4
-rw-r--r--patches/server/0195-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch4
-rw-r--r--patches/server/0196-Fix-CraftEntity-hashCode.patch4
-rw-r--r--patches/server/0199-Make-shield-blocking-delay-configurable.patch6
-rw-r--r--patches/server/0201-PlayerReadyArrowEvent.patch4
-rw-r--r--patches/server/0202-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch24
-rw-r--r--patches/server/0208-InventoryCloseEvent-Reason-API.patch20
-rw-r--r--patches/server/0212-add-more-information-to-Entity.toString.patch4
-rw-r--r--patches/server/0213-EnderDragon-Events.patch20
-rw-r--r--patches/server/0217-Option-to-prevent-armor-stands-from-doing-entity-loo.patch6
-rw-r--r--patches/server/0218-Vanished-players-don-t-have-rights.patch6
-rw-r--r--patches/server/0219-Allow-disabling-armor-stand-ticking.patch14
-rw-r--r--patches/server/0224-Add-TNTPrimeEvent.patch4
-rw-r--r--patches/server/0226-Fix-NBT-type-issues.patch6
-rw-r--r--patches/server/0228-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch8
-rw-r--r--patches/server/0230-Use-ConcurrentHashMap-in-JsonList.patch12
-rw-r--r--patches/server/0235-Slime-Pathfinder-Events.patch22
-rw-r--r--patches/server/0240-Add-More-Creeper-API.patch6
-rw-r--r--patches/server/0243-Add-ray-tracing-methods-to-LivingEntity.patch6
-rw-r--r--patches/server/0245-Improve-death-events.patch58
-rw-r--r--patches/server/0252-Honor-EntityAgeable.ageLock.patch6
-rw-r--r--patches/server/0257-Add-LivingEntity-getTargetEntity.patch6
-rw-r--r--patches/server/0274-force-entity-dismount-during-teleportation.patch18
-rw-r--r--patches/server/0278-Replace-OfflinePlayer-getLastPlayed.patch6
-rw-r--r--patches/server/0286-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch4
-rw-r--r--patches/server/0287-Entity-getEntitySpawnReason.patch18
-rw-r--r--patches/server/0289-Add-PlayerPostRespawnEvent.patch8
-rw-r--r--patches/server/0290-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch6
-rw-r--r--patches/server/0304-offset-item-frame-ticking.patch4
-rw-r--r--patches/server/0305-Prevent-consuming-the-wrong-itemstack.patch8
-rw-r--r--patches/server/0310-Duplicate-UUID-Resolve-Option.patch8
-rw-r--r--patches/server/0315-Fix-items-not-falling-correctly.patch4
-rw-r--r--patches/server/0319-Alternative-item-despawn-rate.patch14
-rw-r--r--patches/server/0321-Fix-items-vanishing-through-end-portal.patch4
-rw-r--r--patches/server/0327-Add-ThrownEggHatchEvent.patch4
-rw-r--r--patches/server/0328-Entity-Jump-API.patch10
-rw-r--r--patches/server/0329-Add-option-to-nerf-pigmen-from-nether-portals.patch8
-rw-r--r--patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch4
-rw-r--r--patches/server/0345-Dead-Player-s-shouldn-t-be-able-to-move.patch4
-rw-r--r--patches/server/0346-Don-t-move-existing-players-to-world-spawn.patch4
-rw-r--r--patches/server/0351-Don-t-run-entity-collision-code-if-not-needed.patch4
-rw-r--r--patches/server/0354-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch12
-rw-r--r--patches/server/0355-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch14
-rw-r--r--patches/server/0356-Add-PlayerAttackEntityCooldownResetEvent.patch4
-rw-r--r--patches/server/0359-Fix-item-duplication-and-teleport-issues.patch30
-rw-r--r--patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch4
-rw-r--r--patches/server/0369-Option-for-maximum-exp-value-when-merging-orbs.patch6
-rw-r--r--patches/server/0370-ExperienceOrbMergeEvent.patch4
-rw-r--r--patches/server/0374-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch4
-rw-r--r--patches/server/0375-Ensure-safe-gateway-teleport.patch4
-rw-r--r--patches/server/0382-Fix-sand-duping.patch8
-rw-r--r--patches/server/0390-Ensure-Entity-position-and-AABB-are-never-invalid.patch8
-rw-r--r--patches/server/0400-Add-entity-liquid-API.patch4
-rw-r--r--patches/server/0402-Add-PrepareResultEvent.patch8
-rw-r--r--patches/server/0403-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch4
-rw-r--r--patches/server/0404-Fix-arrows-never-despawning-MC-125757.patch4
-rw-r--r--patches/server/0406-Fix-SPIGOT-5989.patch10
-rw-r--r--patches/server/0417-Add-moon-phase-API.patch4
-rw-r--r--patches/server/0420-Add-BellRingEvent.patch4
-rw-r--r--patches/server/0429-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch12
-rw-r--r--patches/server/0433-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch4
-rw-r--r--patches/server/0435-Entity-isTicking.patch8
-rw-r--r--patches/server/0446-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch6
-rw-r--r--patches/server/0448-Add-ignore-discounts-API.patch6
-rw-r--r--patches/server/0449-Toggle-for-removing-existing-dragon.patch4
-rw-r--r--patches/server/0453-Add-API-for-quit-reason.patch4
-rw-r--r--patches/server/0455-Expose-world-spawn-angle.patch4
-rw-r--r--patches/server/0462-Climbing-should-not-bypass-cramming-gamerule.patch14
-rw-r--r--patches/server/0469-Expose-LivingEntity-hurt-direction.patch6
-rw-r--r--patches/server/0470-Add-OBSTRUCTED-reason-to-BedEnterResult.patch4
-rw-r--r--patches/server/0473-MC-4-Fix-item-position-desync.patch4
-rw-r--r--patches/server/0483-Fix-nerfed-slime-when-splitting.patch4
-rw-r--r--patches/server/0488-Add-BlockFailedDispenseEvent.patch4
-rw-r--r--patches/server/0494-Fix-villager-boat-exploit.patch6
-rw-r--r--patches/server/0495-Add-sendOpLevel-API.patch8
-rw-r--r--patches/server/0498-Collision-option-for-requiring-a-player-participant.patch4
-rw-r--r--patches/server/0499-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch4
-rw-r--r--patches/server/0503-Add-BlockPreDispenseEvent.patch4
-rw-r--r--patches/server/0507-Expand-EntityUnleashEvent.patch18
-rw-r--r--patches/server/0510-Add-EntityMoveEvent.patch6
-rw-r--r--patches/server/0513-Allow-adding-items-to-BlockDropItemEvent.patch4
-rw-r--r--patches/server/0518-Expose-Tracked-Players.patch4
-rw-r--r--patches/server/0520-fix-converting-txt-to-json-file.patch4
-rw-r--r--patches/server/0527-Expand-world-key-API.patch4
-rw-r--r--patches/server/0530-Drop-carried-item-when-player-has-disconnected.patch4
-rw-r--r--patches/server/0535-Fix-PlayerItemConsumeEvent-cancelling-properly.patch4
-rw-r--r--patches/server/0543-Add-PlayerDeepSleepEvent.patch4
-rw-r--r--patches/server/0547-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch10
-rw-r--r--patches/server/0551-Add-more-WanderingTrader-API.patch6
-rw-r--r--patches/server/0552-Add-EntityBlockStorage-clearEntities.patch4
-rw-r--r--patches/server/0571-Add-PlayerKickEvent-causes.patch8
-rw-r--r--patches/server/0575-Add-option-to-fix-items-merging-through-walls.patch4
-rw-r--r--patches/server/0577-Fix-invulnerable-end-crystals.patch10
-rw-r--r--patches/server/0579-Fix-dangerous-end-portal-logic.patch6
-rw-r--r--patches/server/0582-Line-Of-Sight-Changes.patch10
-rw-r--r--patches/server/0584-Fix-potions-splash-events.patch20
-rw-r--r--patches/server/0586-Fix-PlayerDropItemEvent-using-wrong-item.patch4
-rw-r--r--patches/server/0587-Missing-Entity-API.patch26
-rw-r--r--patches/server/0593-Fix-kick-event-leave-message-not-being-sent.patch6
-rw-r--r--patches/server/0594-Add-config-for-mobs-immune-to-default-effects.patch8
-rw-r--r--patches/server/0597-Add-missing-forceDrop-toggles.patch18
-rw-r--r--patches/server/0604-Add-PlayerSetSpawnEvent.patch6
-rw-r--r--patches/server/0605-Make-hoppers-respect-inventory-max-stack-size.patch4
-rw-r--r--patches/server/0607-Config-option-for-Piglins-guarding-chests.patch4
-rw-r--r--patches/server/0609-Optimize-indirect-passenger-iteration.patch6
-rw-r--r--patches/server/0612-Change-EnderEye-target-without-changing-other-things.patch6
-rw-r--r--patches/server/0617-Add-back-EntityPortalExitEvent.patch6
-rw-r--r--patches/server/0623-Add-critical-damage-API.patch20
-rw-r--r--patches/server/0628-Add-Raw-Byte-Entity-Serialization.patch8
-rw-r--r--patches/server/0630-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch6
-rw-r--r--patches/server/0632-Improve-and-expand-AsyncCatcher.patch36
-rw-r--r--patches/server/0655-Update-head-rotation-in-missing-places.patch6
-rw-r--r--patches/server/0662-don-t-attempt-to-teleport-dead-entities.patch4
-rw-r--r--patches/server/0663-Prevent-excessive-velocity-through-repeated-crits.patch4
-rw-r--r--patches/server/0666-Prevent-sending-oversized-item-data-in-equipment-and.patch6
-rw-r--r--patches/server/0667-Hide-unnecessary-itemmeta-from-clients.patch6
-rw-r--r--patches/server/0676-Forward-CraftEntity-in-teleport-command.patch6
-rw-r--r--patches/server/0678-Entity-powdered-snow-API.patch4
-rw-r--r--patches/server/0679-Add-API-for-item-entity-health.patch4
-rw-r--r--patches/server/0684-Fix-bees-aging-inside-hives.patch8
-rw-r--r--patches/server/0686-Validate-usernames.patch8
-rw-r--r--patches/server/0693-Add-configurable-height-for-slime-spawn.patch6
-rw-r--r--patches/server/0697-Freeze-Tick-Lock-API.patch18
-rw-r--r--patches/server/0714-Force-close-world-loading-screen.patch4
-rw-r--r--patches/server/0717-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch4
-rw-r--r--patches/server/0718-More-Projectile-API.patch16
-rw-r--r--patches/server/0727-Fix-new-block-data-for-EntityChangeBlockEvent.patch16
-rw-r--r--patches/server/0729-Ensure-entity-passenger-world-matches-ridden-entity.patch4
-rw-r--r--patches/server/0731-Allow-changing-the-EnderDragon-podium.patch10
-rw-r--r--patches/server/0734-Use-username-instead-of-display-name-in-PlayerList-g.patch4
-rw-r--r--patches/server/0742-Add-PlayerStopUsingItemEvent.patch4
-rw-r--r--patches/server/0744-Expand-FallingBlock-API.patch10
-rw-r--r--patches/server/0751-Prevent-entity-loading-causing-async-lookups.patch4
-rw-r--r--patches/server/0763-Add-various-missing-EntityDropItemEvent-calls.patch12
-rw-r--r--patches/server/0766-More-Teleport-API.patch8
-rw-r--r--patches/server/0767-Add-EntityPortalReadyEvent.patch6
-rw-r--r--patches/server/0768-Don-t-use-level-random-in-entity-constructors.patch8
-rw-r--r--patches/server/0773-Collision-API.patch8
-rw-r--r--patches/server/0779-Stop-large-look-changes-from-crashing-the-server.patch4
-rw-r--r--patches/server/0780-Fire-EntityChangeBlockEvent-in-more-places.patch12
-rw-r--r--patches/server/0791-Fix-a-bunch-of-vanilla-bugs.patch12
-rw-r--r--patches/server/0793-Fix-custom-piglin-loved-items.patch4
-rw-r--r--patches/server/0794-EntityPickupItemEvent-fixes.patch10
-rw-r--r--patches/server/0795-Correctly-handle-interactions-with-items-on-cooldown.patch6
-rw-r--r--patches/server/0802-Add-EntityToggleSitEvent.patch12
-rw-r--r--patches/server/0808-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch4
-rw-r--r--patches/server/0809-Add-PrePlayerAttackEntityEvent.patch4
-rw-r--r--patches/server/0813-More-vanilla-friendly-methods-to-update-trades.patch6
-rw-r--r--patches/server/0815-check-global-player-list-where-appropriate.patch6
-rw-r--r--patches/server/0818-Friction-API.patch24
-rw-r--r--patches/server/0822-Player-Entity-Tracking-Events.patch6
-rw-r--r--patches/server/0824-Fixes-and-additions-to-the-SpawnReason-API.patch14
-rw-r--r--patches/server/0829-Add-Sneaking-API-for-Entities.patch4
-rw-r--r--patches/server/0831-Improve-PortalEvents.patch4
-rw-r--r--patches/server/0835-Flying-Fall-Damage.patch8
-rw-r--r--patches/server/0836-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch10
-rw-r--r--patches/server/0837-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch6
-rw-r--r--patches/server/0839-Use-single-player-info-update-packet-on-join.patch6
-rw-r--r--patches/server/0840-Correctly-shrink-items-during-EntityResurrectEvent.patch4
-rw-r--r--patches/server/0844-Add-Entity-Body-Yaw-API.patch6
-rw-r--r--patches/server/0847-Add-EntityFertilizeEggEvent.patch4
-rw-r--r--patches/server/0851-Fix-advancement-triggers-for-entity-damage.patch6
-rw-r--r--patches/server/0869-Expand-PlayerItemMendEvent.patch14
-rw-r--r--patches/server/0870-Refresh-ProjectileSource-for-projectiles.patch4
-rw-r--r--patches/server/0880-Add-event-for-player-editing-sign.patch4
-rw-r--r--patches/server/0884-Call-missing-BlockDispenseEvent.patch4
-rw-r--r--patches/server/0885-Don-t-load-chunks-for-supporting-block-checks.patch4
-rw-r--r--patches/server/0887-Add-Sign-getInteractableSideFor.patch4
-rw-r--r--patches/server/0893-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch4
-rw-r--r--patches/server/0894-ExperienceOrb-should-call-EntitySpawnEvent.patch4
-rw-r--r--patches/server/0898-Folia-scheduler-and-owned-region-API.patch30
-rw-r--r--patches/server/0900-API-for-updating-recipes-on-clients.patch6
-rw-r--r--patches/server/0911-API-for-an-entity-s-scoreboard-name.patch4
-rw-r--r--patches/server/0915-Fire-entity-death-event-for-ender-dragon.patch6
-rw-r--r--patches/server/0917-Add-Listing-API-for-Player.patch8
-rw-r--r--patches/server/0919-Add-BlockFace-to-BlockDamageEvent.patch4
-rw-r--r--patches/server/0921-Expand-Pose-API.patch10
-rw-r--r--patches/server/0925-Allow-trident-custom-damage.patch6
-rw-r--r--patches/server/0930-Add-titleOverride-to-InventoryOpenEvent.patch6
-rw-r--r--patches/server/0937-Fix-silent-equipment-change-for-mobs.patch4
-rw-r--r--patches/server/0958-Broadcast-take-item-packets-with-collector-as-source.patch4
-rw-r--r--patches/server/0959-Expand-LingeringPotion-API.patch6
-rw-r--r--patches/server/0961-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch10
-rw-r--r--patches/server/0962-Add-hand-to-fish-event-for-all-player-interactions.patch12
-rw-r--r--patches/server/0963-Fix-several-issues-with-EntityBreedEvent.patch6
-rw-r--r--patches/server/0965-Fix-missing-event-call-for-entity-teleport-API.patch4
-rw-r--r--patches/server/0967-Don-t-fire-sync-events-during-worldgen.patch14
-rw-r--r--patches/server/0970-Restore-vanilla-entity-drops-behavior.patch30
-rw-r--r--patches/server/0974-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch4
-rw-r--r--patches/server/0975-Add-experience-points-API.patch6
-rw-r--r--patches/server/0976-Add-drops-to-shear-events.patch14
-rw-r--r--patches/server/0977-Add-PlayerShieldDisableEvent.patch12
-rw-r--r--patches/server/0978-Validate-ResourceLocation-in-NBT-reading.patch12
-rw-r--r--patches/server/0985-Rewrite-chunk-system.patch55
-rw-r--r--patches/server/0986-incremental-chunk-and-player-saving.patch8
-rw-r--r--patches/server/0988-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch6
-rw-r--r--patches/server/0989-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch6
-rw-r--r--patches/server/0994-Entity-Activation-Range-2.0.patch24
-rw-r--r--patches/server/0996-Anti-Xray.patch8
-rw-r--r--patches/server/0998-Optimize-Collision-to-not-load-chunks.patch8
-rw-r--r--patches/server/1002-Improved-Watchdog-Support.patch6
-rw-r--r--patches/server/1006-Use-distance-map-to-optimise-entity-tracker.patch6
-rw-r--r--patches/server/1012-Improve-boat-collision-performance.patch8
-rw-r--r--patches/server/1019-Detail-more-information-in-watchdog-dumps.patch12
-rw-r--r--patches/server/1020-Collision-optimisations.patch18
-rw-r--r--patches/server/1026-Properly-resend-entities.patch16
-rw-r--r--patches/server/1027-Optimize-Hoppers.patch28
-rw-r--r--patches/server/1031-Lag-compensation-ticks.patch14
-rw-r--r--patches/server/1039-Improve-tag-parser-handling.patch47
m---------work/Bukkit0
m---------work/CraftBukkit0
m---------work/Spigot0
489 files changed, 1282 insertions, 1223 deletions
diff --git a/patches/api/0006-Adventure.patch b/patches/api/0006-Adventure.patch
index 5a408070fe..7689102526 100644
--- a/patches/api/0006-Adventure.patch
+++ b/patches/api/0006-Adventure.patch
@@ -1595,10 +1595,10 @@ index 372c0bd5a4d7800a11c24c95e39fe376a96232bf..9c88be68b4f403d0500cb607394b3a16
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit/block/Sign.java
-index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..2813f96bb13b9be28867d2c045a3003a18456879 100644
+index d9fae47539a382bf87e4265111b7e6c2a1819caf..1fdb1144949adc3a2b5cbc3aca94d2f8e0c6d9ee 100644
--- a/src/main/java/org/bukkit/block/Sign.java
+++ b/src/main/java/org/bukkit/block/Sign.java
-@@ -10,12 +10,51 @@ import org.jetbrains.annotations.NotNull;
+@@ -12,12 +12,51 @@ import org.jetbrains.annotations.Nullable;
* Represents a captured state of either a SignPost or a WallSign.
*/
public interface Sign extends TileState, Colorable {
@@ -1651,7 +1651,7 @@ index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..2813f96bb13b9be28867d2c045a3003a
*/
@Deprecated
@NotNull
-@@ -29,7 +68,7 @@ public interface Sign extends TileState, Colorable {
+@@ -31,7 +70,7 @@ public interface Sign extends TileState, Colorable {
* @param index Line number to get the text from, starting at 0
* @return Text on the given line
* @throws IndexOutOfBoundsException Thrown when the line does not exist
@@ -1660,7 +1660,7 @@ index 5fc1c759e6e8f3fd43a5fa5c6e3f777efa16b1ec..2813f96bb13b9be28867d2c045a3003a
*/
@Deprecated
@NotNull
-@@ -44,7 +83,7 @@ public interface Sign extends TileState, Colorable {
+@@ -46,7 +85,7 @@ public interface Sign extends TileState, Colorable {
* @param index Line number to set the text at, starting from 0
* @param line New text to set at the specified index
* @throws IndexOutOfBoundsException If the index is out of the range 0..3
diff --git a/patches/api/0033-Entity-AddTo-RemoveFrom-World-Events.patch b/patches/api/0033-Entity-AddTo-RemoveFrom-World-Events.patch
index e76689a73f..4d41106879 100644
--- a/patches/api/0033-Entity-AddTo-RemoveFrom-World-Events.patch
+++ b/patches/api/0033-Entity-AddTo-RemoveFrom-World-Events.patch
@@ -104,3 +104,32 @@ index 0000000000000000000000000000000000000000..d75e6a8334c7408ea8c3f155414fc14d
+ return HANDLER_LIST;
+ }
+}
+diff --git a/src/main/java/org/bukkit/event/entity/EntityRemoveEvent.java b/src/main/java/org/bukkit/event/entity/EntityRemoveEvent.java
+index e32df91d911bae42c8137c6f952a6ac6a94d27e0..8ed5d1ccc44951089999db360219b556db89b4ba 100644
+--- a/src/main/java/org/bukkit/event/entity/EntityRemoveEvent.java
++++ b/src/main/java/org/bukkit/event/entity/EntityRemoveEvent.java
+@@ -1,5 +1,6 @@
+ package org.bukkit.event.entity;
+
++import com.destroystokyo.paper.event.entity.EntityRemoveFromWorldEvent;
+ import org.bukkit.entity.Entity;
+ import org.bukkit.event.HandlerList;
+ import org.jetbrains.annotations.ApiStatus;
+@@ -11,8 +12,9 @@ import org.jetbrains.annotations.NotNull;
+ * This event should only be used for monitoring. The result
+ * of modifying the entity during or after this event is unspecified.
+ * This event is not called for a {@link org.bukkit.entity.Player}.
++ * @deprecated use {@link EntityRemoveFromWorldEvent} instead
+ */
++@Deprecated(forRemoval = true)
+ public class EntityRemoveEvent extends EntityEvent {
+
+ private static final HandlerList handlers = new HandlerList();
+@@ -112,5 +114,6 @@ public class EntityRemoveEvent extends EntityEvent {
+ * When the chunk an entity is in gets unloaded.
+ */
+ UNLOAD,
++ DISCARD
+ }
+ }
diff --git a/patches/api/0250-Added-PlayerChangeBeaconEffectEvent.patch b/patches/api/0249-Added-PlayerChangeBeaconEffectEvent.patch
index 4d84c9e1b1..4d84c9e1b1 100644
--- a/patches/api/0250-Added-PlayerChangeBeaconEffectEvent.patch
+++ b/patches/api/0249-Added-PlayerChangeBeaconEffectEvent.patch
diff --git a/patches/api/0249-Added-missing-vanilla-tags.patch b/patches/api/0249-Added-missing-vanilla-tags.patch
deleted file mode 100644
index cfa894aa95..0000000000
--- a/patches/api/0249-Added-missing-vanilla-tags.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Jake Potrebic <[email protected]>
-Date: Sun, 3 Jan 2021 20:03:40 -0800
-Subject: [PATCH] Added missing vanilla tags
-
-
-diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
-index 971bc2e3ae0c265664e2fc3105f4be3027edce26..31bdecf8cbea40129a568c1761f27fa1ae0f535a 100644
---- a/src/main/java/org/bukkit/Tag.java
-+++ b/src/main/java/org/bukkit/Tag.java
-@@ -767,6 +767,12 @@ public interface Tag<T extends Keyed> extends Keyed {
- * Vanilla item tag representing all chest boat items.
- */
- Tag<Material> ITEMS_CHEST_BOATS = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("chest_boats"), Material.class);
-+ // Paper start
-+ /**
-+ * Vanilla item tag representing all non-flammable wood items.
-+ */
-+ Tag<Material> ITEMS_NON_FLAMMABLE_WOOD = Bukkit.getTag(REGISTRY_ITEMS, NamespacedKey.minecraft("non_flammable_wood"), Material.class);
-+ // Paper end
- /**
- * Vanilla item tag representing all fish items.
- */
diff --git a/patches/api/0251-Added-PlayerStonecutterRecipeSelectEvent.patch b/patches/api/0250-Added-PlayerStonecutterRecipeSelectEvent.patch
index 46377a6798..46377a6798 100644
--- a/patches/api/0251-Added-PlayerStonecutterRecipeSelectEvent.patch
+++ b/patches/api/0250-Added-PlayerStonecutterRecipeSelectEvent.patch
diff --git a/patches/api/0252-Add-dropLeash-variable-to-EntityUnleashEvent.patch b/patches/api/0251-Add-dropLeash-variable-to-EntityUnleashEvent.patch
index f85f2a4f26..f85f2a4f26 100644
--- a/patches/api/0252-Add-dropLeash-variable-to-EntityUnleashEvent.patch
+++ b/patches/api/0251-Add-dropLeash-variable-to-EntityUnleashEvent.patch
diff --git a/patches/api/0253-add-DragonEggFormEvent.patch b/patches/api/0252-add-DragonEggFormEvent.patch
index 3b40a9f99d..3b40a9f99d 100644
--- a/patches/api/0253-add-DragonEggFormEvent.patch
+++ b/patches/api/0252-add-DragonEggFormEvent.patch
diff --git a/patches/api/0254-EntityMoveEvent.patch b/patches/api/0253-EntityMoveEvent.patch
index d9e828eb8c..d9e828eb8c 100644
--- a/patches/api/0254-EntityMoveEvent.patch
+++ b/patches/api/0253-EntityMoveEvent.patch
diff --git a/patches/api/0255-Allow-adding-items-to-BlockDropItemEvent.patch b/patches/api/0254-Allow-adding-items-to-BlockDropItemEvent.patch
index c6b7565fe4..c6b7565fe4 100644
--- a/patches/api/0255-Allow-adding-items-to-BlockDropItemEvent.patch
+++ b/patches/api/0254-Allow-adding-items-to-BlockDropItemEvent.patch
diff --git a/patches/api/0256-Add-getMainThreadExecutor-to-BukkitScheduler.patch b/patches/api/0255-Add-getMainThreadExecutor-to-BukkitScheduler.patch
index 7cc686da5a..7cc686da5a 100644
--- a/patches/api/0256-Add-getMainThreadExecutor-to-BukkitScheduler.patch
+++ b/patches/api/0255-Add-getMainThreadExecutor-to-BukkitScheduler.patch
diff --git a/patches/api/0257-living-entity-allow-attribute-registration.patch b/patches/api/0256-living-entity-allow-attribute-registration.patch
index e7ded6dabb..e7ded6dabb 100644
--- a/patches/api/0257-living-entity-allow-attribute-registration.patch
+++ b/patches/api/0256-living-entity-allow-attribute-registration.patch
diff --git a/patches/api/0258-Add-missing-effects.patch b/patches/api/0257-Add-missing-effects.patch
index 63c42ebfec..63c42ebfec 100644
--- a/patches/api/0258-Add-missing-effects.patch
+++ b/patches/api/0257-Add-missing-effects.patch
diff --git a/patches/api/0259-Expose-Tracked-Players.patch b/patches/api/0258-Expose-Tracked-Players.patch
index f3f9ff4532..f3f9ff4532 100644
--- a/patches/api/0259-Expose-Tracked-Players.patch
+++ b/patches/api/0258-Expose-Tracked-Players.patch
diff --git a/patches/api/0260-Cache-the-result-of-Material-isBlock.patch b/patches/api/0259-Cache-the-result-of-Material-isBlock.patch
index ee04af53bb..ee04af53bb 100644
--- a/patches/api/0260-Cache-the-result-of-Material-isBlock.patch
+++ b/patches/api/0259-Cache-the-result-of-Material-isBlock.patch
diff --git a/patches/api/0261-Add-worldborder-events.patch b/patches/api/0260-Add-worldborder-events.patch
index 1c889b6cdd..1c889b6cdd 100644
--- a/patches/api/0261-Add-worldborder-events.patch
+++ b/patches/api/0260-Add-worldborder-events.patch
diff --git a/patches/api/0262-added-PlayerNameEntityEvent.patch b/patches/api/0261-added-PlayerNameEntityEvent.patch
index 69bd20d13e..69bd20d13e 100644
--- a/patches/api/0262-added-PlayerNameEntityEvent.patch
+++ b/patches/api/0261-added-PlayerNameEntityEvent.patch
diff --git a/patches/api/0263-Add-recipe-to-cook-events.patch b/patches/api/0262-Add-recipe-to-cook-events.patch
index 8c8712541e..8c8712541e 100644
--- a/patches/api/0263-Add-recipe-to-cook-events.patch
+++ b/patches/api/0262-Add-recipe-to-cook-events.patch
diff --git a/patches/api/0264-Add-Block-isValidTool.patch b/patches/api/0263-Add-Block-isValidTool.patch
index caa83ab79b..835cf73b7a 100644
--- a/patches/api/0264-Add-Block-isValidTool.patch
+++ b/patches/api/0263-Add-Block-isValidTool.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add Block#isValidTool
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
-index 689170a273ce68cf6fbd4659f3e08577c100535f..987dfdc9b09299e5ef3ae1fea2882ae56f8da38e 100644
+index c68ed7de2d50da4105dd38c0986f237e8c56b2d6..b5fe76a6353816a2d009dfa5921f8ada92984f34 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -230,6 +230,15 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
diff --git a/patches/api/0265-Expand-world-key-API.patch b/patches/api/0264-Expand-world-key-API.patch
index ee70bbcfd2..ee70bbcfd2 100644
--- a/patches/api/0265-Expand-world-key-API.patch
+++ b/patches/api/0264-Expand-world-key-API.patch
diff --git a/patches/api/0266-Item-Rarity-API.patch b/patches/api/0265-Item-Rarity-API.patch
index 5e00725324..5e00725324 100644
--- a/patches/api/0266-Item-Rarity-API.patch
+++ b/patches/api/0265-Item-Rarity-API.patch
diff --git a/patches/api/0267-Expose-protocol-version.patch b/patches/api/0266-Expose-protocol-version.patch
index 0d34eacc4c..0d34eacc4c 100644
--- a/patches/api/0267-Expose-protocol-version.patch
+++ b/patches/api/0266-Expose-protocol-version.patch
diff --git a/patches/api/0268-add-isDeeplySleeping-to-HumanEntity.patch b/patches/api/0267-add-isDeeplySleeping-to-HumanEntity.patch
index fc6f6dcab3..fc6f6dcab3 100644
--- a/patches/api/0268-add-isDeeplySleeping-to-HumanEntity.patch
+++ b/patches/api/0267-add-isDeeplySleeping-to-HumanEntity.patch
diff --git a/patches/api/0269-add-consumeFuel-to-FurnaceBurnEvent.patch b/patches/api/0268-add-consumeFuel-to-FurnaceBurnEvent.patch
index 07036efb43..07036efb43 100644
--- a/patches/api/0269-add-consumeFuel-to-FurnaceBurnEvent.patch
+++ b/patches/api/0268-add-consumeFuel-to-FurnaceBurnEvent.patch
diff --git a/patches/api/0270-add-get-set-drop-chance-to-EntityEquipment.patch b/patches/api/0269-add-get-set-drop-chance-to-EntityEquipment.patch
index 836af12518..836af12518 100644
--- a/patches/api/0270-add-get-set-drop-chance-to-EntityEquipment.patch
+++ b/patches/api/0269-add-get-set-drop-chance-to-EntityEquipment.patch
diff --git a/patches/api/0271-Added-PlayerDeepSleepEvent.patch b/patches/api/0270-Added-PlayerDeepSleepEvent.patch
index b333894788..b333894788 100644
--- a/patches/api/0271-Added-PlayerDeepSleepEvent.patch
+++ b/patches/api/0270-Added-PlayerDeepSleepEvent.patch
diff --git a/patches/api/0272-More-World-API.patch b/patches/api/0271-More-World-API.patch
index a3d88eb648..a3d88eb648 100644
--- a/patches/api/0272-More-World-API.patch
+++ b/patches/api/0271-More-World-API.patch
diff --git a/patches/api/0273-Added-PlayerBedFailEnterEvent.patch b/patches/api/0272-Added-PlayerBedFailEnterEvent.patch
index 6f9decf5fc..6f9decf5fc 100644
--- a/patches/api/0273-Added-PlayerBedFailEnterEvent.patch
+++ b/patches/api/0272-Added-PlayerBedFailEnterEvent.patch
diff --git a/patches/api/0274-Introduce-beacon-activation-deactivation-events.patch b/patches/api/0273-Introduce-beacon-activation-deactivation-events.patch
index 4e173b3d6c..4e173b3d6c 100644
--- a/patches/api/0274-Introduce-beacon-activation-deactivation-events.patch
+++ b/patches/api/0273-Introduce-beacon-activation-deactivation-events.patch
diff --git a/patches/api/0275-PlayerMoveEvent-Improvements.patch b/patches/api/0274-PlayerMoveEvent-Improvements.patch
index 33cf16e54b..33cf16e54b 100644
--- a/patches/api/0275-PlayerMoveEvent-Improvements.patch
+++ b/patches/api/0274-PlayerMoveEvent-Improvements.patch
diff --git a/patches/api/0276-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/api/0275-add-RespawnFlags-to-PlayerRespawnEvent.patch
index c596be8b98..c596be8b98 100644
--- a/patches/api/0276-add-RespawnFlags-to-PlayerRespawnEvent.patch
+++ b/patches/api/0275-add-RespawnFlags-to-PlayerRespawnEvent.patch
diff --git a/patches/api/0277-Add-more-WanderingTrader-API.patch b/patches/api/0276-Add-more-WanderingTrader-API.patch
index 99045d4949..99045d4949 100644
--- a/patches/api/0277-Add-more-WanderingTrader-API.patch
+++ b/patches/api/0276-Add-more-WanderingTrader-API.patch
diff --git a/patches/api/0278-Add-EntityBlockStorage-clearEntities.patch b/patches/api/0277-Add-EntityBlockStorage-clearEntities.patch
index 7032ba6155..7032ba6155 100644
--- a/patches/api/0278-Add-EntityBlockStorage-clearEntities.patch
+++ b/patches/api/0277-Add-EntityBlockStorage-clearEntities.patch
diff --git a/patches/api/0279-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch b/patches/api/0278-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch
index 16af3a7728..16af3a7728 100644
--- a/patches/api/0279-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch
+++ b/patches/api/0278-Add-Adventure-message-to-PlayerAdvancementDoneEvent.patch
diff --git a/patches/api/0280-Inventory-close.patch b/patches/api/0279-Inventory-close.patch
index 87dfa1a083..87dfa1a083 100644
--- a/patches/api/0280-Inventory-close.patch
+++ b/patches/api/0279-Inventory-close.patch
diff --git a/patches/api/0281-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch b/patches/api/0280-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
index 3103f1ce2c..3103f1ce2c 100644
--- a/patches/api/0281-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
+++ b/patches/api/0280-Add-a-should-burn-in-sunlight-API-for-Phantoms-and-S.patch
diff --git a/patches/api/0282-Add-basic-Datapack-API.patch b/patches/api/0281-Add-basic-Datapack-API.patch
index dafb02a98d..dafb02a98d 100644
--- a/patches/api/0282-Add-basic-Datapack-API.patch
+++ b/patches/api/0281-Add-basic-Datapack-API.patch
diff --git a/patches/api/0283-additions-to-PlayerGameModeChangeEvent.patch b/patches/api/0282-additions-to-PlayerGameModeChangeEvent.patch
index b2e65ae490..b2e65ae490 100644
--- a/patches/api/0283-additions-to-PlayerGameModeChangeEvent.patch
+++ b/patches/api/0282-additions-to-PlayerGameModeChangeEvent.patch
diff --git a/patches/api/0284-ItemStack-repair-check-API.patch b/patches/api/0283-ItemStack-repair-check-API.patch
index 46650ec4b7..46650ec4b7 100644
--- a/patches/api/0284-ItemStack-repair-check-API.patch
+++ b/patches/api/0283-ItemStack-repair-check-API.patch
diff --git a/patches/api/0285-More-Enchantment-API.patch b/patches/api/0284-More-Enchantment-API.patch
index 98c3ef060b..98c3ef060b 100644
--- a/patches/api/0285-More-Enchantment-API.patch
+++ b/patches/api/0284-More-Enchantment-API.patch
diff --git a/patches/api/0286-Add-Mob-lookAt-API.patch b/patches/api/0285-Add-Mob-lookAt-API.patch
index 0dd5126905..0dd5126905 100644
--- a/patches/api/0286-Add-Mob-lookAt-API.patch
+++ b/patches/api/0285-Add-Mob-lookAt-API.patch
diff --git a/patches/api/0287-ItemStack-editMeta.patch b/patches/api/0286-ItemStack-editMeta.patch
index 5996dc1000..5996dc1000 100644
--- a/patches/api/0287-ItemStack-editMeta.patch
+++ b/patches/api/0286-ItemStack-editMeta.patch
diff --git a/patches/api/0288-Add-EntityInsideBlockEvent.patch b/patches/api/0287-Add-EntityInsideBlockEvent.patch
index 2805c40dcc..2805c40dcc 100644
--- a/patches/api/0288-Add-EntityInsideBlockEvent.patch
+++ b/patches/api/0287-Add-EntityInsideBlockEvent.patch
diff --git a/patches/api/0289-Attributes-API-for-item-defaults.patch b/patches/api/0288-Attributes-API-for-item-defaults.patch
index 66172a6027..66172a6027 100644
--- a/patches/api/0289-Attributes-API-for-item-defaults.patch
+++ b/patches/api/0288-Attributes-API-for-item-defaults.patch
diff --git a/patches/api/0290-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/api/0289-Add-cause-to-Weather-ThunderChangeEvents.patch
index 8e5d45d87b..8e5d45d87b 100644
--- a/patches/api/0290-Add-cause-to-Weather-ThunderChangeEvents.patch
+++ b/patches/api/0289-Add-cause-to-Weather-ThunderChangeEvents.patch
diff --git a/patches/api/0291-More-Lidded-Block-API.patch b/patches/api/0290-More-Lidded-Block-API.patch
index a89f206f9a..a89f206f9a 100644
--- a/patches/api/0291-More-Lidded-Block-API.patch
+++ b/patches/api/0290-More-Lidded-Block-API.patch
diff --git a/patches/api/0292-Add-PlayerKickEvent-causes.patch b/patches/api/0291-Add-PlayerKickEvent-causes.patch
index 39657e4039..39657e4039 100644
--- a/patches/api/0292-Add-PlayerKickEvent-causes.patch
+++ b/patches/api/0291-Add-PlayerKickEvent-causes.patch
diff --git a/patches/api/0293-Add-PufferFishStateChangeEvent.patch b/patches/api/0292-Add-PufferFishStateChangeEvent.patch
index 7a719777e3..7a719777e3 100644
--- a/patches/api/0293-Add-PufferFishStateChangeEvent.patch
+++ b/patches/api/0292-Add-PufferFishStateChangeEvent.patch
diff --git a/patches/api/0294-Add-BellRevealRaiderEvent.patch b/patches/api/0293-Add-BellRevealRaiderEvent.patch
index c45f89fd4b..c45f89fd4b 100644
--- a/patches/api/0294-Add-BellRevealRaiderEvent.patch
+++ b/patches/api/0293-Add-BellRevealRaiderEvent.patch
diff --git a/patches/api/0295-Add-ElderGuardianAppearanceEvent.patch b/patches/api/0294-Add-ElderGuardianAppearanceEvent.patch
index 23897b7390..23897b7390 100644
--- a/patches/api/0295-Add-ElderGuardianAppearanceEvent.patch
+++ b/patches/api/0294-Add-ElderGuardianAppearanceEvent.patch
diff --git a/patches/api/0296-Add-more-line-of-sight-methods.patch b/patches/api/0295-Add-more-line-of-sight-methods.patch
index 419a436957..6540c2d0f4 100644
--- a/patches/api/0296-Add-more-line-of-sight-methods.patch
+++ b/patches/api/0295-Add-more-line-of-sight-methods.patch
@@ -23,7 +23,7 @@ index d8b1fa79dc24138dc71e32c14bda71c1d570ed88..b68367f123f029c3ff47eab6bfabd7a8
// Paper end
}
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index 62d0d2fe3c6dfc9faaa821bde074b623914e4a44..129df18c471f1ec0c286746953ae8803a209cfa7 100644
+index e9919fce380ec1d0d48b3ac706e7fd31af0be26b..b1fb059fc2249814c9e509c219da2aed84d34fe0 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -590,6 +590,19 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
diff --git a/patches/api/0297-Add-WaterBottleSplashEvent.patch b/patches/api/0296-Add-WaterBottleSplashEvent.patch
index f5525245fa..f5525245fa 100644
--- a/patches/api/0297-Add-WaterBottleSplashEvent.patch
+++ b/patches/api/0296-Add-WaterBottleSplashEvent.patch
diff --git a/patches/api/0298-Add-more-LimitedRegion-API.patch b/patches/api/0297-Add-more-LimitedRegion-API.patch
index 292f95c890..292f95c890 100644
--- a/patches/api/0298-Add-more-LimitedRegion-API.patch
+++ b/patches/api/0297-Add-more-LimitedRegion-API.patch
diff --git a/patches/api/0299-Missing-Entity-API.patch b/patches/api/0298-Missing-Entity-API.patch
index 7dff1ccf46..7dff1ccf46 100644
--- a/patches/api/0299-Missing-Entity-API.patch
+++ b/patches/api/0298-Missing-Entity-API.patch
diff --git a/patches/api/0300-Adds-PlayerArmSwingEvent.patch b/patches/api/0299-Adds-PlayerArmSwingEvent.patch
index 48e43517eb..48e43517eb 100644
--- a/patches/api/0300-Adds-PlayerArmSwingEvent.patch
+++ b/patches/api/0299-Adds-PlayerArmSwingEvent.patch
diff --git a/patches/api/0301-Add-PlayerSignCommandPreprocessEvent.patch b/patches/api/0300-Add-PlayerSignCommandPreprocessEvent.patch
index 8882c35337..8882c35337 100644
--- a/patches/api/0301-Add-PlayerSignCommandPreprocessEvent.patch
+++ b/patches/api/0300-Add-PlayerSignCommandPreprocessEvent.patch
diff --git a/patches/api/0302-fix-empty-array-elements-in-command-arguments.patch b/patches/api/0301-fix-empty-array-elements-in-command-arguments.patch
index 4b66990211..4b66990211 100644
--- a/patches/api/0302-fix-empty-array-elements-in-command-arguments.patch
+++ b/patches/api/0301-fix-empty-array-elements-in-command-arguments.patch
diff --git a/patches/api/0303-Stinger-API.patch b/patches/api/0302-Stinger-API.patch
index d2dc349f90..d2dc349f90 100644
--- a/patches/api/0303-Stinger-API.patch
+++ b/patches/api/0302-Stinger-API.patch
diff --git a/patches/api/0304-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch b/patches/api/0303-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch
index aefa20a2d9..aefa20a2d9 100644
--- a/patches/api/0304-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch
+++ b/patches/api/0303-Rewrite-LogEvents-to-contain-the-source-jars-in-stac.patch
diff --git a/patches/api/0305-Add-PlayerSetSpawnEvent.patch b/patches/api/0304-Add-PlayerSetSpawnEvent.patch
index 42bce4d456..42bce4d456 100644
--- a/patches/api/0305-Add-PlayerSetSpawnEvent.patch
+++ b/patches/api/0304-Add-PlayerSetSpawnEvent.patch
diff --git a/patches/api/0306-Added-EntityDamageItemEvent.patch b/patches/api/0305-Added-EntityDamageItemEvent.patch
index 60513a1cbd..60513a1cbd 100644
--- a/patches/api/0306-Added-EntityDamageItemEvent.patch
+++ b/patches/api/0305-Added-EntityDamageItemEvent.patch
diff --git a/patches/api/0307-Make-EntityUnleashEvent-cancellable.patch b/patches/api/0306-Make-EntityUnleashEvent-cancellable.patch
index e99584c277..e99584c277 100644
--- a/patches/api/0307-Make-EntityUnleashEvent-cancellable.patch
+++ b/patches/api/0306-Make-EntityUnleashEvent-cancellable.patch
diff --git a/patches/api/0308-Change-EnderEye-target-without-changing-other-things.patch b/patches/api/0307-Change-EnderEye-target-without-changing-other-things.patch
index d8e53593ae..d8e53593ae 100644
--- a/patches/api/0308-Change-EnderEye-target-without-changing-other-things.patch
+++ b/patches/api/0307-Change-EnderEye-target-without-changing-other-things.patch
diff --git a/patches/api/0309-Add-BlockBreakBlockEvent.patch b/patches/api/0308-Add-BlockBreakBlockEvent.patch
index dd02c33432..dd02c33432 100644
--- a/patches/api/0309-Add-BlockBreakBlockEvent.patch
+++ b/patches/api/0308-Add-BlockBreakBlockEvent.patch
diff --git a/patches/api/0310-Add-helpers-for-left-right-click-to-Action.patch b/patches/api/0309-Add-helpers-for-left-right-click-to-Action.patch
index 9dac2fe612..9dac2fe612 100644
--- a/patches/api/0310-Add-helpers-for-left-right-click-to-Action.patch
+++ b/patches/api/0309-Add-helpers-for-left-right-click-to-Action.patch
diff --git a/patches/api/0311-Option-to-prevent-NBT-copy-in-smithing-recipes.patch b/patches/api/0310-Option-to-prevent-NBT-copy-in-smithing-recipes.patch
index 7e61d68783..7e61d68783 100644
--- a/patches/api/0311-Option-to-prevent-NBT-copy-in-smithing-recipes.patch
+++ b/patches/api/0310-Option-to-prevent-NBT-copy-in-smithing-recipes.patch
diff --git a/patches/api/0312-More-CommandBlock-API.patch b/patches/api/0311-More-CommandBlock-API.patch
index c8c52c7587..c8c52c7587 100644
--- a/patches/api/0312-More-CommandBlock-API.patch
+++ b/patches/api/0311-More-CommandBlock-API.patch
diff --git a/patches/api/0313-Add-missing-team-sidebar-display-slots.patch b/patches/api/0312-Add-missing-team-sidebar-display-slots.patch
index cdecbd1764..cdecbd1764 100644
--- a/patches/api/0313-Add-missing-team-sidebar-display-slots.patch
+++ b/patches/api/0312-Add-missing-team-sidebar-display-slots.patch
diff --git a/patches/api/0314-add-back-EntityPortalExitEvent.patch b/patches/api/0313-add-back-EntityPortalExitEvent.patch
index 5a153e2345..5a153e2345 100644
--- a/patches/api/0314-add-back-EntityPortalExitEvent.patch
+++ b/patches/api/0313-add-back-EntityPortalExitEvent.patch
diff --git a/patches/api/0315-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/api/0314-Add-methods-to-find-targets-for-lightning-strikes.patch
index c84e83d2de..c84e83d2de 100644
--- a/patches/api/0315-Add-methods-to-find-targets-for-lightning-strikes.patch
+++ b/patches/api/0314-Add-methods-to-find-targets-for-lightning-strikes.patch
diff --git a/patches/api/0316-Get-entity-default-attributes.patch b/patches/api/0315-Get-entity-default-attributes.patch
index 60dc6739f1..60dc6739f1 100644
--- a/patches/api/0316-Get-entity-default-attributes.patch
+++ b/patches/api/0315-Get-entity-default-attributes.patch
diff --git a/patches/api/0317-Left-handed-API.patch b/patches/api/0316-Left-handed-API.patch
index cae17a697b..cae17a697b 100644
--- a/patches/api/0317-Left-handed-API.patch
+++ b/patches/api/0316-Left-handed-API.patch
diff --git a/patches/api/0318-Add-critical-damage-API.patch b/patches/api/0317-Add-critical-damage-API.patch
index f04ac65ac5..f04ac65ac5 100644
--- a/patches/api/0318-Add-critical-damage-API.patch
+++ b/patches/api/0317-Add-critical-damage-API.patch
diff --git a/patches/api/0319-Add-more-advancement-API.patch b/patches/api/0318-Add-more-advancement-API.patch
index 179dbdc225..179dbdc225 100644
--- a/patches/api/0319-Add-more-advancement-API.patch
+++ b/patches/api/0318-Add-more-advancement-API.patch
diff --git a/patches/api/0320-Fix-issues-with-mob-conversion.patch b/patches/api/0319-Fix-issues-with-mob-conversion.patch
index f451d967b6..f451d967b6 100644
--- a/patches/api/0320-Fix-issues-with-mob-conversion.patch
+++ b/patches/api/0319-Fix-issues-with-mob-conversion.patch
diff --git a/patches/api/0321-Add-isCollidable-methods-to-various-places.patch b/patches/api/0320-Add-isCollidable-methods-to-various-places.patch
index a3abc4242a..a3abc4242a 100644
--- a/patches/api/0321-Add-isCollidable-methods-to-various-places.patch
+++ b/patches/api/0320-Add-isCollidable-methods-to-various-places.patch
diff --git a/patches/api/0322-Goat-ram-API.patch b/patches/api/0321-Goat-ram-API.patch
index 06d426a786..06d426a786 100644
--- a/patches/api/0322-Goat-ram-API.patch
+++ b/patches/api/0321-Goat-ram-API.patch
diff --git a/patches/api/0323-Add-API-for-resetting-a-single-score.patch b/patches/api/0322-Add-API-for-resetting-a-single-score.patch
index 14142e8f6c..14142e8f6c 100644
--- a/patches/api/0323-Add-API-for-resetting-a-single-score.patch
+++ b/patches/api/0322-Add-API-for-resetting-a-single-score.patch
diff --git a/patches/api/0324-Add-Raw-Byte-Entity-Serialization.patch b/patches/api/0323-Add-Raw-Byte-Entity-Serialization.patch
index 6c33be9317..6c33be9317 100644
--- a/patches/api/0324-Add-Raw-Byte-Entity-Serialization.patch
+++ b/patches/api/0323-Add-Raw-Byte-Entity-Serialization.patch
diff --git a/patches/api/0325-Add-PlayerItemFrameChangeEvent.patch b/patches/api/0324-Add-PlayerItemFrameChangeEvent.patch
index b5d6cf7bd1..b5d6cf7bd1 100644
--- a/patches/api/0325-Add-PlayerItemFrameChangeEvent.patch
+++ b/patches/api/0324-Add-PlayerItemFrameChangeEvent.patch
diff --git a/patches/api/0326-Allow-delegation-to-vanilla-chunk-gen.patch b/patches/api/0325-Allow-delegation-to-vanilla-chunk-gen.patch
index e8f75d98e2..e8f75d98e2 100644
--- a/patches/api/0326-Allow-delegation-to-vanilla-chunk-gen.patch
+++ b/patches/api/0325-Allow-delegation-to-vanilla-chunk-gen.patch
diff --git a/patches/api/0327-Add-more-Campfire-API.patch b/patches/api/0326-Add-more-Campfire-API.patch
index 80cdc0bb39..80cdc0bb39 100644
--- a/patches/api/0327-Add-more-Campfire-API.patch
+++ b/patches/api/0326-Add-more-Campfire-API.patch
diff --git a/patches/api/0328-Extend-VehicleCollisionEvent-move-HandlerList-up.patch b/patches/api/0327-Extend-VehicleCollisionEvent-move-HandlerList-up.patch
index 5f5a4f4140..5f5a4f4140 100644
--- a/patches/api/0328-Extend-VehicleCollisionEvent-move-HandlerList-up.patch
+++ b/patches/api/0327-Extend-VehicleCollisionEvent-move-HandlerList-up.patch
diff --git a/patches/api/0329-Improve-scoreboard-entries.patch b/patches/api/0328-Improve-scoreboard-entries.patch
index 0dcc796b4d..0dcc796b4d 100644
--- a/patches/api/0329-Improve-scoreboard-entries.patch
+++ b/patches/api/0328-Improve-scoreboard-entries.patch
diff --git a/patches/api/0330-Entity-powdered-snow-API.patch b/patches/api/0329-Entity-powdered-snow-API.patch
index d31b58855c..d31b58855c 100644
--- a/patches/api/0330-Entity-powdered-snow-API.patch
+++ b/patches/api/0329-Entity-powdered-snow-API.patch
diff --git a/patches/api/0331-Add-API-for-item-entity-health.patch b/patches/api/0330-Add-API-for-item-entity-health.patch
index 94373dbdf2..572034e557 100644
--- a/patches/api/0331-Add-API-for-item-entity-health.patch
+++ b/patches/api/0330-Add-API-for-item-entity-health.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add API for item entity health
diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java
-index 48858e1c58c13d786bbc935abedb0f059837833c..d0bef15785493b512ff0f7414c1d58d38fead581 100644
+index 6239aec4f6c625a814fa4fd610cdc5ab1a9f6e0f..ced419f8655bff72f0257b639d5f7d73afe3c2e2 100644
--- a/src/main/java/org/bukkit/entity/Item.java
+++ b/src/main/java/org/bukkit/entity/Item.java
@@ -133,5 +133,24 @@ public interface Item extends Entity {
diff --git a/patches/api/0332-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch b/patches/api/0331-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch
index f094cdc255..f094cdc255 100644
--- a/patches/api/0332-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch
+++ b/patches/api/0331-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch
diff --git a/patches/api/0333-Bucketable-API.patch b/patches/api/0332-Bucketable-API.patch
index 26dbdc9f5d..26dbdc9f5d 100644
--- a/patches/api/0333-Bucketable-API.patch
+++ b/patches/api/0332-Bucketable-API.patch
diff --git a/patches/api/0334-System-prop-for-default-config-comment-parsing.patch b/patches/api/0333-System-prop-for-default-config-comment-parsing.patch
index 632f71e519..632f71e519 100644
--- a/patches/api/0334-System-prop-for-default-config-comment-parsing.patch
+++ b/patches/api/0333-System-prop-for-default-config-comment-parsing.patch
diff --git a/patches/api/0335-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/api/0334-Expose-vanilla-BiomeProvider-from-WorldInfo.patch
index 9b189fc918..9b189fc918 100644
--- a/patches/api/0335-Expose-vanilla-BiomeProvider-from-WorldInfo.patch
+++ b/patches/api/0334-Expose-vanilla-BiomeProvider-from-WorldInfo.patch
diff --git a/patches/api/0336-Multiple-Entries-with-Scoreboards.patch b/patches/api/0335-Multiple-Entries-with-Scoreboards.patch
index 920c2f117e..920c2f117e 100644
--- a/patches/api/0336-Multiple-Entries-with-Scoreboards.patch
+++ b/patches/api/0335-Multiple-Entries-with-Scoreboards.patch
diff --git a/patches/api/0337-Warn-on-strange-EventHandler-return-types.patch b/patches/api/0336-Warn-on-strange-EventHandler-return-types.patch
index c7807b823b..c7807b823b 100644
--- a/patches/api/0337-Warn-on-strange-EventHandler-return-types.patch
+++ b/patches/api/0336-Warn-on-strange-EventHandler-return-types.patch
diff --git a/patches/api/0338-Multi-Block-Change-API.patch b/patches/api/0337-Multi-Block-Change-API.patch
index 45664f22b3..45664f22b3 100644
--- a/patches/api/0338-Multi-Block-Change-API.patch
+++ b/patches/api/0337-Multi-Block-Change-API.patch
diff --git a/patches/api/0339-Fix-NotePlayEvent.patch b/patches/api/0338-Fix-NotePlayEvent.patch
index d3f827bfd8..d3f827bfd8 100644
--- a/patches/api/0339-Fix-NotePlayEvent.patch
+++ b/patches/api/0338-Fix-NotePlayEvent.patch
diff --git a/patches/api/0340-Freeze-Tick-Lock-API.patch b/patches/api/0339-Freeze-Tick-Lock-API.patch
index ab42b3657d..8d16a0e1d3 100644
--- a/patches/api/0340-Freeze-Tick-Lock-API.patch
+++ b/patches/api/0339-Freeze-Tick-Lock-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Freeze Tick Lock API
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
-index 6456f7bfc8aa8cb5c9aaf0c06f9130242003ee3e..f090368dbb5acf352e1bee34d78b55eb92373c6d 100644
+index bdc2bbeddc47587334a8e92f5e0728f3c50218f6..e1fe5d93eb7a1f96954d907dbbe0758f25bd1ce7 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -283,6 +283,26 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
diff --git a/patches/api/0341-Dolphin-API.patch b/patches/api/0340-Dolphin-API.patch
index 73beed437b..73beed437b 100644
--- a/patches/api/0341-Dolphin-API.patch
+++ b/patches/api/0340-Dolphin-API.patch
diff --git a/patches/api/0342-More-PotionEffectType-API.patch b/patches/api/0341-More-PotionEffectType-API.patch
index 7e3682f8b4..7e3682f8b4 100644
--- a/patches/api/0342-More-PotionEffectType-API.patch
+++ b/patches/api/0341-More-PotionEffectType-API.patch
diff --git a/patches/api/0343-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/api/0342-API-for-creating-command-sender-which-forwards-feedb.patch
index 5c1c336819..5c1c336819 100644
--- a/patches/api/0343-API-for-creating-command-sender-which-forwards-feedb.patch
+++ b/patches/api/0342-API-for-creating-command-sender-which-forwards-feedb.patch
diff --git a/patches/api/0344-Implement-regenerateChunk.patch b/patches/api/0343-Implement-regenerateChunk.patch
index 8023a26d0f..8023a26d0f 100644
--- a/patches/api/0344-Implement-regenerateChunk.patch
+++ b/patches/api/0343-Implement-regenerateChunk.patch
diff --git a/patches/api/0345-Add-GameEvent-tags.patch b/patches/api/0344-Add-GameEvent-tags.patch
index ca433ecee7..1bbdc9c696 100644
--- a/patches/api/0345-Add-GameEvent-tags.patch
+++ b/patches/api/0344-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 31bdecf8cbea40129a568c1761f27fa1ae0f535a..741c34b74811666c3b38e9d6fbb74b0a7bc64699 100644
+index 894e72aa97cd272ae57a91165cca0737a6d5742d..dd509bd1f7e80a04a63d2ba6eca1ff845d12fb2d 100644
--- a/src/main/java/org/bukkit/Tag.java
+++ b/src/main/java/org/bukkit/Tag.java
-@@ -985,6 +985,25 @@ public interface Tag<T extends Keyed> extends Keyed {
+@@ -983,6 +983,25 @@ public interface Tag<T extends Keyed> extends Keyed {
*/
Tag<EntityType> ENTITY_TYPES_CAN_TURN_IN_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_turn_in_boats"), EntityType.class);
diff --git a/patches/api/0346-Furnace-RecipesUsed-API.patch b/patches/api/0345-Furnace-RecipesUsed-API.patch
index 7fed82db21..7fed82db21 100644
--- a/patches/api/0346-Furnace-RecipesUsed-API.patch
+++ b/patches/api/0345-Furnace-RecipesUsed-API.patch
diff --git a/patches/api/0347-Configurable-sculk-sensor-listener-range.patch b/patches/api/0346-Configurable-sculk-sensor-listener-range.patch
index b1ad0cdb5b..b1ad0cdb5b 100644
--- a/patches/api/0347-Configurable-sculk-sensor-listener-range.patch
+++ b/patches/api/0346-Configurable-sculk-sensor-listener-range.patch
diff --git a/patches/api/0348-Add-missing-block-data-mins-and-maxes.patch b/patches/api/0347-Add-missing-block-data-mins-and-maxes.patch
index 600497b952..600497b952 100644
--- a/patches/api/0348-Add-missing-block-data-mins-and-maxes.patch
+++ b/patches/api/0347-Add-missing-block-data-mins-and-maxes.patch
diff --git a/patches/api/0349-Custom-Potion-Mixes.patch b/patches/api/0348-Custom-Potion-Mixes.patch
index 3881038adb..3881038adb 100644
--- a/patches/api/0349-Custom-Potion-Mixes.patch
+++ b/patches/api/0348-Custom-Potion-Mixes.patch
diff --git a/patches/api/0350-Expose-furnace-minecart-push-values.patch b/patches/api/0349-Expose-furnace-minecart-push-values.patch
index 3d8c2336e7..3d8c2336e7 100644
--- a/patches/api/0350-Expose-furnace-minecart-push-values.patch
+++ b/patches/api/0349-Expose-furnace-minecart-push-values.patch
diff --git a/patches/api/0351-More-Projectile-API.patch b/patches/api/0350-More-Projectile-API.patch
index 569c337346..569c337346 100644
--- a/patches/api/0351-More-Projectile-API.patch
+++ b/patches/api/0350-More-Projectile-API.patch
diff --git a/patches/api/0352-Add-getComputedBiome-API.patch b/patches/api/0351-Add-getComputedBiome-API.patch
index 260ec7d327..6d24c2c66a 100644
--- a/patches/api/0352-Add-getComputedBiome-API.patch
+++ b/patches/api/0351-Add-getComputedBiome-API.patch
@@ -51,7 +51,7 @@ index b68367f123f029c3ff47eab6bfabd7a894a99da4..44ee56a5956cc17194c767a0c1071a2a
* Sets the {@link Biome} at the given {@link Location}.
*
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
-index 05fd2aa8a1639598b488712d2fe5f739019f41dc..732e8ea9e1bdcbc8f9a0888e07940fe21617b490 100644
+index 42cc4f2ee960c0abf9c6688aeee4150754612c32..cf9600c743e977312c0a15c455d602391797ef34 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -371,10 +371,22 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
diff --git a/patches/api/0353-Add-enchantWithLevels-API.patch b/patches/api/0352-Add-enchantWithLevels-API.patch
index 1c94264d8f..1c94264d8f 100644
--- a/patches/api/0353-Add-enchantWithLevels-API.patch
+++ b/patches/api/0352-Add-enchantWithLevels-API.patch
diff --git a/patches/api/0354-Add-TameableDeathMessageEvent.patch b/patches/api/0353-Add-TameableDeathMessageEvent.patch
index aec53f13ba..aec53f13ba 100644
--- a/patches/api/0354-Add-TameableDeathMessageEvent.patch
+++ b/patches/api/0353-Add-TameableDeathMessageEvent.patch
diff --git a/patches/api/0355-Allow-to-change-the-podium-of-the-EnderDragon.patch b/patches/api/0354-Allow-to-change-the-podium-of-the-EnderDragon.patch
index 08ffa1fdde..08ffa1fdde 100644
--- a/patches/api/0355-Allow-to-change-the-podium-of-the-EnderDragon.patch
+++ b/patches/api/0354-Allow-to-change-the-podium-of-the-EnderDragon.patch
diff --git a/patches/api/0356-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch b/patches/api/0355-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch
index 21b3f85c0b..21b3f85c0b 100644
--- a/patches/api/0356-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch
+++ b/patches/api/0355-Fix-incorrect-new-blockstate-in-EntityBreakDoorEvent.patch
diff --git a/patches/api/0357-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch b/patches/api/0356-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch
index 5775b6f33c..5775b6f33c 100644
--- a/patches/api/0357-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch
+++ b/patches/api/0356-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch
diff --git a/patches/api/0358-WorldCreator-keepSpawnLoaded.patch b/patches/api/0357-WorldCreator-keepSpawnLoaded.patch
index 287c313c58..287c313c58 100644
--- a/patches/api/0358-WorldCreator-keepSpawnLoaded.patch
+++ b/patches/api/0357-WorldCreator-keepSpawnLoaded.patch
diff --git a/patches/api/0359-Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/api/0358-Add-EntityDyeEvent-and-CollarColorable-interface.patch
index 9b70c2dc74..9b70c2dc74 100644
--- a/patches/api/0359-Add-EntityDyeEvent-and-CollarColorable-interface.patch
+++ b/patches/api/0358-Add-EntityDyeEvent-and-CollarColorable-interface.patch
diff --git a/patches/api/0360-Add-PlayerStopUsingItemEvent.patch b/patches/api/0359-Add-PlayerStopUsingItemEvent.patch
index c8de1f6ed0..c8de1f6ed0 100644
--- a/patches/api/0360-Add-PlayerStopUsingItemEvent.patch
+++ b/patches/api/0359-Add-PlayerStopUsingItemEvent.patch
diff --git a/patches/api/0361-Expand-FallingBlock-API.patch b/patches/api/0360-Expand-FallingBlock-API.patch
index bbff3129a4..bbff3129a4 100644
--- a/patches/api/0361-Expand-FallingBlock-API.patch
+++ b/patches/api/0360-Expand-FallingBlock-API.patch
diff --git a/patches/api/0362-Add-method-isTickingWorlds-to-Bukkit.patch b/patches/api/0361-Add-method-isTickingWorlds-to-Bukkit.patch
index 91e4d0fdac..91e4d0fdac 100644
--- a/patches/api/0362-Add-method-isTickingWorlds-to-Bukkit.patch
+++ b/patches/api/0361-Add-method-isTickingWorlds-to-Bukkit.patch
diff --git a/patches/api/0363-Add-WardenAngerChangeEvent.patch b/patches/api/0362-Add-WardenAngerChangeEvent.patch
index 4291ccd615..4291ccd615 100644
--- a/patches/api/0363-Add-WardenAngerChangeEvent.patch
+++ b/patches/api/0362-Add-WardenAngerChangeEvent.patch
diff --git a/patches/api/0364-Nameable-Banner-API.patch b/patches/api/0363-Nameable-Banner-API.patch
index eba196daaf..eba196daaf 100644
--- a/patches/api/0364-Nameable-Banner-API.patch
+++ b/patches/api/0363-Nameable-Banner-API.patch
diff --git a/patches/api/0365-Add-Player-getFishHook.patch b/patches/api/0364-Add-Player-getFishHook.patch
index 291eac5db5..291eac5db5 100644
--- a/patches/api/0365-Add-Player-getFishHook.patch
+++ b/patches/api/0364-Add-Player-getFishHook.patch
diff --git a/patches/api/0366-More-Teleport-API.patch b/patches/api/0365-More-Teleport-API.patch
index a7561dc079..5b2f5bb571 100644
--- a/patches/api/0366-More-Teleport-API.patch
+++ b/patches/api/0365-More-Teleport-API.patch
@@ -120,7 +120,7 @@ index 0000000000000000000000000000000000000000..c8b5b570d44da9524bfc59c7e11b2ae5
+
+}
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
-index 29a34fa6bef077550526e00d0cdd0d8f49872e0c..3905c12b23bbfc88c9667b04e60fad7ad2febd60 100644
+index e1fe5d93eb7a1f96954d907dbbe0758f25bd1ce7..948d6a08ff459afd5d4d5b151c41d94d1d5847b6 100644
--- a/src/main/java/org/bukkit/entity/Entity.java
+++ b/src/main/java/org/bukkit/entity/Entity.java
@@ -126,10 +126,32 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
diff --git a/patches/api/0367-Add-EntityPortalReadyEvent.patch b/patches/api/0366-Add-EntityPortalReadyEvent.patch
index b9321a8e0d..b9321a8e0d 100644
--- a/patches/api/0367-Add-EntityPortalReadyEvent.patch
+++ b/patches/api/0366-Add-EntityPortalReadyEvent.patch
diff --git a/patches/api/0368-Custom-Chat-Completion-Suggestions-API.patch b/patches/api/0367-Custom-Chat-Completion-Suggestions-API.patch
index 1eb0e934e4..1eb0e934e4 100644
--- a/patches/api/0368-Custom-Chat-Completion-Suggestions-API.patch
+++ b/patches/api/0367-Custom-Chat-Completion-Suggestions-API.patch
diff --git a/patches/api/0369-Collision-API.patch b/patches/api/0368-Collision-API.patch
index fc4f5486d9..fc4f5486d9 100644
--- a/patches/api/0369-Collision-API.patch
+++ b/patches/api/0368-Collision-API.patch
diff --git a/patches/api/0370-Block-Ticking-API.patch b/patches/api/0369-Block-Ticking-API.patch
index e2fa606e8c..aba95a2d13 100644
--- a/patches/api/0370-Block-Ticking-API.patch
+++ b/patches/api/0369-Block-Ticking-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Block Ticking API
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
-index efae68513fe59e95866cdbc6c8c1d9031907bedc..25650e9a31bcaf672acd115547abc1ec41a1de34 100644
+index cf9600c743e977312c0a15c455d602391797ef34..38cf77e32b76bc7d9db7523f7f21427ebb72f913 100644
--- a/src/main/java/org/bukkit/block/Block.java
+++ b/src/main/java/org/bukkit/block/Block.java
@@ -589,6 +589,21 @@ public interface Block extends Metadatable, Translatable, net.kyori.adventure.tr
diff --git a/patches/api/0371-Add-NamespacedKey-biome-methods.patch b/patches/api/0370-Add-NamespacedKey-biome-methods.patch
index f11f727f1a..f11f727f1a 100644
--- a/patches/api/0371-Add-NamespacedKey-biome-methods.patch
+++ b/patches/api/0370-Add-NamespacedKey-biome-methods.patch
diff --git a/patches/api/0372-Also-load-resources-from-LibraryLoader.patch b/patches/api/0371-Also-load-resources-from-LibraryLoader.patch
index c999e55c24..c2a41c2e53 100644
--- a/patches/api/0372-Also-load-resources-from-LibraryLoader.patch
+++ b/patches/api/0371-Also-load-resources-from-LibraryLoader.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Also load resources from LibraryLoader
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
-index 877bfe10b858145278133acbc7049f700d2b4f8a..f9b57b872780aa6b9b959494874b57c7a8ff0c53 100644
+index de017d10db19ca7ca7f73ff0ac08fe6e1773d7dc..7e4f7cb2afbc145e532285c793573ad107bc3033 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -109,14 +109,35 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
diff --git a/patches/api/0373-Added-byte-array-serialization-deserialization-for-P.patch b/patches/api/0372-Added-byte-array-serialization-deserialization-for-P.patch
index 9b71f12681..9b71f12681 100644
--- a/patches/api/0373-Added-byte-array-serialization-deserialization-for-P.patch
+++ b/patches/api/0372-Added-byte-array-serialization-deserialization-for-P.patch
diff --git a/patches/api/0374-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch b/patches/api/0373-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch
index 291761dadb..291761dadb 100644
--- a/patches/api/0374-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch
+++ b/patches/api/0373-Add-a-consumer-parameter-to-ProjectileSource-launchP.patch
diff --git a/patches/api/0375-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch b/patches/api/0374-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch
index 9b5ef25cf4..9b5ef25cf4 100644
--- a/patches/api/0375-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch
+++ b/patches/api/0374-Expose-codepoint-limit-in-YamlConfigOptions-and-incr.patch
diff --git a/patches/api/0376-Add-getDrops-to-BlockState.patch b/patches/api/0375-Add-getDrops-to-BlockState.patch
index 0a8d8ad13a..0a8d8ad13a 100644
--- a/patches/api/0376-Add-getDrops-to-BlockState.patch
+++ b/patches/api/0375-Add-getDrops-to-BlockState.patch
diff --git a/patches/api/0377-Add-PlayerInventorySlotChangeEvent.patch b/patches/api/0376-Add-PlayerInventorySlotChangeEvent.patch
index d76df6d87d..d76df6d87d 100644
--- a/patches/api/0377-Add-PlayerInventorySlotChangeEvent.patch
+++ b/patches/api/0376-Add-PlayerInventorySlotChangeEvent.patch
diff --git a/patches/api/0378-Elder-Guardian-appearance-API.patch b/patches/api/0377-Elder-Guardian-appearance-API.patch
index 338c1b65a3..338c1b65a3 100644
--- a/patches/api/0378-Elder-Guardian-appearance-API.patch
+++ b/patches/api/0377-Elder-Guardian-appearance-API.patch
diff --git a/patches/api/0379-Allow-changing-bed-s-occupied-property.patch b/patches/api/0378-Allow-changing-bed-s-occupied-property.patch
index 8dfafd6d33..8dfafd6d33 100644
--- a/patches/api/0379-Allow-changing-bed-s-occupied-property.patch
+++ b/patches/api/0378-Allow-changing-bed-s-occupied-property.patch
diff --git a/patches/api/0380-Add-EquipmentSlot-convenience-methods.patch b/patches/api/0379-Add-EquipmentSlot-convenience-methods.patch
index 0ef6b4c9b0..0ef6b4c9b0 100644
--- a/patches/api/0380-Add-EquipmentSlot-convenience-methods.patch
+++ b/patches/api/0379-Add-EquipmentSlot-convenience-methods.patch
diff --git a/patches/api/0381-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch b/patches/api/0380-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch
index 92640093f6..6d0cf289d9 100644
--- a/patches/api/0381-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch
+++ b/patches/api/0380-Add-LivingEntity-swingHand-EquipmentSlot-convenience.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#swingHand(EquipmentSlot) convenience method
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index ef13c72963af2356f37a724066fe5b42416dd3eb..d0ceef72c2691c441739a0100cb68504cbb3220e 100644
+index d083cffe0b61642bf4c4ea0fecc529090702042f..ab6ba48c76271f60fc51f758ff823e45be4bce93 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1201,5 +1201,23 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
diff --git a/patches/api/0382-Add-entity-knockback-API.patch b/patches/api/0381-Add-entity-knockback-API.patch
index 7b30a3759b..56310d9bef 100644
--- a/patches/api/0382-Add-entity-knockback-API.patch
+++ b/patches/api/0381-Add-entity-knockback-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add entity knockback API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index d0ceef72c2691c441739a0100cb68504cbb3220e..798bcc0fe7d21179df885d30d8e0dc7d6eee3b40 100644
+index ab6ba48c76271f60fc51f758ff823e45be4bce93..21ddbe3399b1b4a4d51c5a752fa72c5d8832b415 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1219,5 +1219,17 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
diff --git a/patches/api/0383-Added-EntityToggleSitEvent.patch b/patches/api/0382-Added-EntityToggleSitEvent.patch
index d5a8c46dc8..d5a8c46dc8 100644
--- a/patches/api/0383-Added-EntityToggleSitEvent.patch
+++ b/patches/api/0382-Added-EntityToggleSitEvent.patch
diff --git a/patches/api/0384-Add-Moving-Piston-API.patch b/patches/api/0383-Add-Moving-Piston-API.patch
index 8f889f1e3d..8f889f1e3d 100644
--- a/patches/api/0384-Add-Moving-Piston-API.patch
+++ b/patches/api/0383-Add-Moving-Piston-API.patch
diff --git a/patches/api/0385-Add-PrePlayerAttackEntityEvent.patch b/patches/api/0384-Add-PrePlayerAttackEntityEvent.patch
index ac0ebedde7..ac0ebedde7 100644
--- a/patches/api/0385-Add-PrePlayerAttackEntityEvent.patch
+++ b/patches/api/0384-Add-PrePlayerAttackEntityEvent.patch
diff --git a/patches/api/0386-Add-Player-Warden-Warning-API.patch b/patches/api/0385-Add-Player-Warden-Warning-API.patch
index 1bc7d6a95a..1bc7d6a95a 100644
--- a/patches/api/0386-Add-Player-Warden-Warning-API.patch
+++ b/patches/api/0385-Add-Player-Warden-Warning-API.patch
diff --git a/patches/api/0387-More-vanilla-friendly-methods-to-update-trades.patch b/patches/api/0386-More-vanilla-friendly-methods-to-update-trades.patch
index f13fdb5601..f13fdb5601 100644
--- a/patches/api/0387-More-vanilla-friendly-methods-to-update-trades.patch
+++ b/patches/api/0386-More-vanilla-friendly-methods-to-update-trades.patch
diff --git a/patches/api/0388-Add-paper-dumplisteners-command.patch b/patches/api/0387-Add-paper-dumplisteners-command.patch
index a5d858851f..a5d858851f 100644
--- a/patches/api/0388-Add-paper-dumplisteners-command.patch
+++ b/patches/api/0387-Add-paper-dumplisteners-command.patch
diff --git a/patches/api/0389-ItemStack-damage-API.patch b/patches/api/0388-ItemStack-damage-API.patch
index 420415c28f..f0444dae84 100644
--- a/patches/api/0389-ItemStack-damage-API.patch
+++ b/patches/api/0388-ItemStack-damage-API.patch
@@ -8,7 +8,7 @@ to simulate damage done to an itemstack and all
the logic associated with damaging them
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index 798bcc0fe7d21179df885d30d8e0dc7d6eee3b40..5b32ab4f1260183627aed7ba832f3237e5665011 100644
+index 21ddbe3399b1b4a4d51c5a752fa72c5d8832b415..cb5ba5d115406d12a2af0811fcfbf510f836b03b 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -1231,5 +1231,52 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
diff --git a/patches/api/0390-Add-Tick-TemporalUnit.patch b/patches/api/0389-Add-Tick-TemporalUnit.patch
index 562eb00082..562eb00082 100644
--- a/patches/api/0390-Add-Tick-TemporalUnit.patch
+++ b/patches/api/0389-Add-Tick-TemporalUnit.patch
diff --git a/patches/api/0391-Friction-API.patch b/patches/api/0390-Friction-API.patch
index 0129149291..013ab9a8d3 100644
--- a/patches/api/0391-Friction-API.patch
+++ b/patches/api/0390-Friction-API.patch
@@ -46,7 +46,7 @@ index 0000000000000000000000000000000000000000..6eb88c664d873506372ad14075bfcbe4
+
+}
diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java
-index d0bef15785493b512ff0f7414c1d58d38fead581..58017fce436cdbda255f7172fbdadb726d4b113c 100644
+index ced419f8655bff72f0257b639d5f7d73afe3c2e2..bcc6ba95bd21c7972865838c636a03f50b6c1f1a 100644
--- a/src/main/java/org/bukkit/entity/Item.java
+++ b/src/main/java/org/bukkit/entity/Item.java
@@ -8,7 +8,7 @@ import org.jetbrains.annotations.Nullable;
@@ -59,7 +59,7 @@ index d0bef15785493b512ff0f7414c1d58d38fead581..58017fce436cdbda255f7172fbdadb72
/**
* Gets the item stack associated with this item drop.
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index c0e31ebbb41bd3013fe4a1609dd9af754434736d..b6df5fd8eda6a30c119b3fa3844e6bb0425e2f39 100644
+index cb5ba5d115406d12a2af0811fcfbf510f836b03b..b9f98279789fe26181aa9c7aa253877d916034be 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
diff --git a/patches/api/0392-Player-Entity-Tracking-Events.patch b/patches/api/0391-Player-Entity-Tracking-Events.patch
index 3dfa72c922..3dfa72c922 100644
--- a/patches/api/0392-Player-Entity-Tracking-Events.patch
+++ b/patches/api/0391-Player-Entity-Tracking-Events.patch
diff --git a/patches/api/0393-Add-missing-Fluid-type.patch b/patches/api/0392-Add-missing-Fluid-type.patch
index c260bf8497..c260bf8497 100644
--- a/patches/api/0393-Add-missing-Fluid-type.patch
+++ b/patches/api/0392-Add-missing-Fluid-type.patch
diff --git a/patches/api/0394-fix-Instruments.patch b/patches/api/0393-fix-Instruments.patch
index 468dc80a34..468dc80a34 100644
--- a/patches/api/0394-fix-Instruments.patch
+++ b/patches/api/0393-fix-Instruments.patch
diff --git a/patches/api/0395-Add-BlockLockCheckEvent.patch b/patches/api/0394-Add-BlockLockCheckEvent.patch
index c5d560192c..c5d560192c 100644
--- a/patches/api/0395-Add-BlockLockCheckEvent.patch
+++ b/patches/api/0394-Add-BlockLockCheckEvent.patch
diff --git a/patches/api/0396-Add-Sneaking-API-for-Entities.patch b/patches/api/0395-Add-Sneaking-API-for-Entities.patch
index 224f784208..224f784208 100644
--- a/patches/api/0396-Add-Sneaking-API-for-Entities.patch
+++ b/patches/api/0395-Add-Sneaking-API-for-Entities.patch
diff --git a/patches/api/0397-Improve-PortalEvents.patch b/patches/api/0396-Improve-PortalEvents.patch
index f7f53b19fc..f7f53b19fc 100644
--- a/patches/api/0397-Improve-PortalEvents.patch
+++ b/patches/api/0396-Improve-PortalEvents.patch
diff --git a/patches/api/0398-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/api/0397-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
index de7e84ef8b..de7e84ef8b 100644
--- a/patches/api/0398-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
+++ b/patches/api/0397-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
diff --git a/patches/api/0399-Flying-Fall-Damage-API.patch b/patches/api/0398-Flying-Fall-Damage-API.patch
index 3c619f5b43..3c619f5b43 100644
--- a/patches/api/0399-Flying-Fall-Damage-API.patch
+++ b/patches/api/0398-Flying-Fall-Damage-API.patch
diff --git a/patches/api/0400-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch b/patches/api/0399-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch
index 3936bb4a92..3936bb4a92 100644
--- a/patches/api/0400-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch
+++ b/patches/api/0399-Replace-ItemFlag.HIDE_POTION_EFFECTS.patch
diff --git a/patches/api/0401-Win-Screen-API.patch b/patches/api/0400-Win-Screen-API.patch
index 3863beaa63..3863beaa63 100644
--- a/patches/api/0401-Win-Screen-API.patch
+++ b/patches/api/0400-Win-Screen-API.patch
diff --git a/patches/api/0402-Add-Entity-Body-Yaw-API.patch b/patches/api/0401-Add-Entity-Body-Yaw-API.patch
index ebcecf2aca..ebcecf2aca 100644
--- a/patches/api/0402-Add-Entity-Body-Yaw-API.patch
+++ b/patches/api/0401-Add-Entity-Body-Yaw-API.patch
diff --git a/patches/api/0403-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch b/patches/api/0402-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch
index 1ae7f17da6..1ae7f17da6 100644
--- a/patches/api/0403-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch
+++ b/patches/api/0402-Fix-HandlerList-for-InventoryBlockStartEvent-subclas.patch
diff --git a/patches/api/0404-Add-EntityFertilizeEggEvent.patch b/patches/api/0403-Add-EntityFertilizeEggEvent.patch
index 4ae6ff9f0f..4ae6ff9f0f 100644
--- a/patches/api/0404-Add-EntityFertilizeEggEvent.patch
+++ b/patches/api/0403-Add-EntityFertilizeEggEvent.patch
diff --git a/patches/api/0405-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/api/0404-Add-CompostItemEvent-and-EntityCompostItemEvent.patch
index 9dee250212..9dee250212 100644
--- a/patches/api/0405-Add-CompostItemEvent-and-EntityCompostItemEvent.patch
+++ b/patches/api/0404-Add-CompostItemEvent-and-EntityCompostItemEvent.patch
diff --git a/patches/api/0406-Add-Shearable-API.patch b/patches/api/0405-Add-Shearable-API.patch
index 4e49b17572..4e49b17572 100644
--- a/patches/api/0406-Add-Shearable-API.patch
+++ b/patches/api/0405-Add-Shearable-API.patch
diff --git a/patches/api/0407-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/api/0406-Fix-SpawnEggMeta-get-setSpawnedType.patch
index 27abcd1f93..27abcd1f93 100644
--- a/patches/api/0407-Fix-SpawnEggMeta-get-setSpawnedType.patch
+++ b/patches/api/0406-Fix-SpawnEggMeta-get-setSpawnedType.patch
diff --git a/patches/api/0408-Add-Mob-Experience-reward-API.patch b/patches/api/0407-Add-Mob-Experience-reward-API.patch
index 2e3a09921e..2e3a09921e 100644
--- a/patches/api/0408-Add-Mob-Experience-reward-API.patch
+++ b/patches/api/0407-Add-Mob-Experience-reward-API.patch
diff --git a/patches/api/0409-Expand-PlayerItemMendEvent.patch b/patches/api/0408-Expand-PlayerItemMendEvent.patch
index 223922e05e..223922e05e 100644
--- a/patches/api/0409-Expand-PlayerItemMendEvent.patch
+++ b/patches/api/0408-Expand-PlayerItemMendEvent.patch
diff --git a/patches/api/0410-Add-transient-modifier-API.patch b/patches/api/0409-Add-transient-modifier-API.patch
index a32e4c86a9..a32e4c86a9 100644
--- a/patches/api/0410-Add-transient-modifier-API.patch
+++ b/patches/api/0409-Add-transient-modifier-API.patch
diff --git a/patches/api/0411-Properly-remove-the-experimental-smithing-inventory-.patch b/patches/api/0410-Properly-remove-the-experimental-smithing-inventory-.patch
index 650b013220..650b013220 100644
--- a/patches/api/0411-Properly-remove-the-experimental-smithing-inventory-.patch
+++ b/patches/api/0410-Properly-remove-the-experimental-smithing-inventory-.patch
diff --git a/patches/api/0412-Add-method-to-remove-all-active-potion-effects.patch b/patches/api/0411-Add-method-to-remove-all-active-potion-effects.patch
index bf8ee9eb1b..f9f5110086 100644
--- a/patches/api/0412-Add-method-to-remove-all-active-potion-effects.patch
+++ b/patches/api/0411-Add-method-to-remove-all-active-potion-effects.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add method to remove all active potion effects
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index 15d26b5d4fd55a29680f7485c80e33b7ce787fbe..f396c214e71efa2c46ad853e9d2c4b5048895917 100644
+index 2dbb61df25967739c5a8308d6d89be20136816ba..12926d36a409448ce5aaae955968dbc89825a2c5 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -625,6 +625,15 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
diff --git a/patches/api/0413-Folia-scheduler-and-owned-region-API.patch b/patches/api/0412-Folia-scheduler-and-owned-region-API.patch
index 8d194d5375..8d194d5375 100644
--- a/patches/api/0413-Folia-scheduler-and-owned-region-API.patch
+++ b/patches/api/0412-Folia-scheduler-and-owned-region-API.patch
diff --git a/patches/api/0414-Add-event-for-player-editing-sign.patch b/patches/api/0413-Add-event-for-player-editing-sign.patch
index b534aebde9..b534aebde9 100644
--- a/patches/api/0414-Add-event-for-player-editing-sign.patch
+++ b/patches/api/0413-Add-event-for-player-editing-sign.patch
diff --git a/patches/api/0415-Add-Sign-getInteractableSideFor.patch b/patches/api/0414-Add-Sign-getInteractableSideFor.patch
index c339b5b034..1e085323ca 100644
--- a/patches/api/0415-Add-Sign-getInteractableSideFor.patch
+++ b/patches/api/0414-Add-Sign-getInteractableSideFor.patch
@@ -5,14 +5,13 @@ Subject: [PATCH] Add Sign#getInteractableSideFor
diff --git a/src/main/java/org/bukkit/block/Sign.java b/src/main/java/org/bukkit/block/Sign.java
-index 2813f96bb13b9be28867d2c045a3003a18456879..94e8f319fe0413a10496d7e5bba70633054765f4 100644
+index 1fdb1144949adc3a2b5cbc3aca94d2f8e0c6d9ee..7983ccb54f5f358dea1ffb530b9cc5bd716fb9b1 100644
--- a/src/main/java/org/bukkit/block/Sign.java
+++ b/src/main/java/org/bukkit/block/Sign.java
-@@ -167,4 +167,35 @@ public interface Sign extends TileState, Colorable {
+@@ -187,4 +187,34 @@ public interface Sign extends TileState, Colorable {
*/
- @NotNull
- public SignSide getSide(@NotNull Side side);
-+
+ @Nullable
+ public Player getAllowedEditor();
+ // Paper start - get side for player
+ /**
+ * Compute the side facing the specified entity.
diff --git a/patches/api/0416-Fix-BanList-API.patch b/patches/api/0415-Fix-BanList-API.patch
index 351f4dae16..351f4dae16 100644
--- a/patches/api/0416-Fix-BanList-API.patch
+++ b/patches/api/0415-Fix-BanList-API.patch
diff --git a/patches/api/0417-Add-whitelist-events.patch b/patches/api/0416-Add-whitelist-events.patch
index 75458e78df..75458e78df 100644
--- a/patches/api/0417-Add-whitelist-events.patch
+++ b/patches/api/0416-Add-whitelist-events.patch
diff --git a/patches/api/0418-API-for-updating-recipes-on-clients.patch b/patches/api/0417-API-for-updating-recipes-on-clients.patch
index c1665b9ba0..c1665b9ba0 100644
--- a/patches/api/0418-API-for-updating-recipes-on-clients.patch
+++ b/patches/api/0417-API-for-updating-recipes-on-clients.patch
diff --git a/patches/api/0419-Add-PlayerFailMoveEvent.patch b/patches/api/0418-Add-PlayerFailMoveEvent.patch
index c0687e2ae0..c0687e2ae0 100644
--- a/patches/api/0419-Add-PlayerFailMoveEvent.patch
+++ b/patches/api/0418-Add-PlayerFailMoveEvent.patch
diff --git a/patches/api/0420-Fix-custom-statistic-criteria-creation.patch b/patches/api/0419-Fix-custom-statistic-criteria-creation.patch
index 4ce5967963..4ce5967963 100644
--- a/patches/api/0420-Fix-custom-statistic-criteria-creation.patch
+++ b/patches/api/0419-Fix-custom-statistic-criteria-creation.patch
diff --git a/patches/api/0421-SculkCatalyst-bloom-API.patch b/patches/api/0420-SculkCatalyst-bloom-API.patch
index 49d8c8c2bd..49d8c8c2bd 100644
--- a/patches/api/0421-SculkCatalyst-bloom-API.patch
+++ b/patches/api/0420-SculkCatalyst-bloom-API.patch
diff --git a/patches/api/0422-API-for-an-entity-s-scoreboard-name.patch b/patches/api/0421-API-for-an-entity-s-scoreboard-name.patch
index 7be05d7421..7be05d7421 100644
--- a/patches/api/0422-API-for-an-entity-s-scoreboard-name.patch
+++ b/patches/api/0421-API-for-an-entity-s-scoreboard-name.patch
diff --git a/patches/api/0423-Deprecate-and-replace-methods-with-old-StructureType.patch b/patches/api/0422-Deprecate-and-replace-methods-with-old-StructureType.patch
index 177761f8cd..177761f8cd 100644
--- a/patches/api/0423-Deprecate-and-replace-methods-with-old-StructureType.patch
+++ b/patches/api/0422-Deprecate-and-replace-methods-with-old-StructureType.patch
diff --git a/patches/api/0424-Add-Listing-API-for-Player.patch b/patches/api/0423-Add-Listing-API-for-Player.patch
index 609dd75c87..609dd75c87 100644
--- a/patches/api/0424-Add-Listing-API-for-Player.patch
+++ b/patches/api/0423-Add-Listing-API-for-Player.patch
diff --git a/patches/api/0425-Expose-clicked-BlockFace-during-BlockDamageEvent.patch b/patches/api/0424-Expose-clicked-BlockFace-during-BlockDamageEvent.patch
index 34d1940866..34d1940866 100644
--- a/patches/api/0425-Expose-clicked-BlockFace-during-BlockDamageEvent.patch
+++ b/patches/api/0424-Expose-clicked-BlockFace-during-BlockDamageEvent.patch
diff --git a/patches/api/0426-Fix-NPE-on-Boat-getStatus.patch b/patches/api/0425-Fix-NPE-on-Boat-getStatus.patch
index 1cf6096a92..1cf6096a92 100644
--- a/patches/api/0426-Fix-NPE-on-Boat-getStatus.patch
+++ b/patches/api/0425-Fix-NPE-on-Boat-getStatus.patch
diff --git a/patches/api/0427-Expand-Pose-API.patch b/patches/api/0426-Expand-Pose-API.patch
index 7548f51038..7548f51038 100644
--- a/patches/api/0427-Expand-Pose-API.patch
+++ b/patches/api/0426-Expand-Pose-API.patch
diff --git a/patches/api/0428-MerchantRecipe-add-copy-constructor.patch b/patches/api/0427-MerchantRecipe-add-copy-constructor.patch
index 1c5ba2803c..1c5ba2803c 100644
--- a/patches/api/0428-MerchantRecipe-add-copy-constructor.patch
+++ b/patches/api/0427-MerchantRecipe-add-copy-constructor.patch
diff --git a/patches/api/0429-More-DragonBattle-API.patch b/patches/api/0428-More-DragonBattle-API.patch
index e25208ec19..e25208ec19 100644
--- a/patches/api/0429-More-DragonBattle-API.patch
+++ b/patches/api/0428-More-DragonBattle-API.patch
diff --git a/patches/api/0430-Add-PlayerPickItemEvent.patch b/patches/api/0429-Add-PlayerPickItemEvent.patch
index 6dd0be80a8..6dd0be80a8 100644
--- a/patches/api/0430-Add-PlayerPickItemEvent.patch
+++ b/patches/api/0429-Add-PlayerPickItemEvent.patch
diff --git a/patches/api/0431-Allow-trident-custom-damage.patch b/patches/api/0430-Allow-trident-custom-damage.patch
index 870b735548..870b735548 100644
--- a/patches/api/0431-Allow-trident-custom-damage.patch
+++ b/patches/api/0430-Allow-trident-custom-damage.patch
diff --git a/patches/api/0432-Expose-hand-during-BlockCanBuildEvent.patch b/patches/api/0431-Expose-hand-during-BlockCanBuildEvent.patch
index 97d99a40d2..97d99a40d2 100644
--- a/patches/api/0432-Expose-hand-during-BlockCanBuildEvent.patch
+++ b/patches/api/0431-Expose-hand-during-BlockCanBuildEvent.patch
diff --git a/patches/api/0433-Limit-setBurnTime-to-valid-short-values.patch b/patches/api/0432-Limit-setBurnTime-to-valid-short-values.patch
index 2faac56fd8..2faac56fd8 100644
--- a/patches/api/0433-Limit-setBurnTime-to-valid-short-values.patch
+++ b/patches/api/0432-Limit-setBurnTime-to-valid-short-values.patch
diff --git a/patches/api/0434-Add-OfflinePlayer-isConnected.patch b/patches/api/0433-Add-OfflinePlayer-isConnected.patch
index 1b0749a7f1..f1e75ce3e4 100644
--- a/patches/api/0434-Add-OfflinePlayer-isConnected.patch
+++ b/patches/api/0433-Add-OfflinePlayer-isConnected.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Add OfflinePlayer#isConnected
This adds an alternative to OfflinePlayer#isOnline that returns true only if the same instance of the player is still online. This is generally more useful than isOnline as it allows you to determine if you have an instance of a Player that still exists. If a player relogs an old Player instance becomes unlinked leading to e.g. messages sent to the old player no longer arriving despite isOnline returning true. Checking against isConnected is more useful there to discard invalid instances.
diff --git a/src/main/java/org/bukkit/OfflinePlayer.java b/src/main/java/org/bukkit/OfflinePlayer.java
-index 9b84cb5abdf3db55cbc7ba19c8cd6955bf4fc5ec..bce07d84cafca677bb6fad78c21b82097f06430c 100644
+index ef6cb124adc98cb5231dc44e243450a2340f74af..abb5109ed08a3a651c2c27d4d17a3d49eb06da1e 100644
--- a/src/main/java/org/bukkit/OfflinePlayer.java
+++ b/src/main/java/org/bukkit/OfflinePlayer.java
@@ -24,10 +24,26 @@ public interface OfflinePlayer extends ServerOperator, AnimalTamer, Configuratio
diff --git a/patches/api/0435-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/api/0434-Add-titleOverride-to-InventoryOpenEvent.patch
index 68e755f010..68e755f010 100644
--- a/patches/api/0435-Add-titleOverride-to-InventoryOpenEvent.patch
+++ b/patches/api/0434-Add-titleOverride-to-InventoryOpenEvent.patch
diff --git a/patches/api/0436-Allow-proper-checking-of-empty-item-stacks.patch b/patches/api/0435-Allow-proper-checking-of-empty-item-stacks.patch
index 716a6140d9..716a6140d9 100644
--- a/patches/api/0436-Allow-proper-checking-of-empty-item-stacks.patch
+++ b/patches/api/0435-Allow-proper-checking-of-empty-item-stacks.patch
diff --git a/patches/api/0437-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch b/patches/api/0436-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch
index e72f86be5d..e72f86be5d 100644
--- a/patches/api/0437-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch
+++ b/patches/api/0436-Fix-PlayerSwapHandItemsEvent-throwing-exception-when.patch
diff --git a/patches/api/0438-Add-player-idle-duration-API.patch b/patches/api/0437-Add-player-idle-duration-API.patch
index 9c44c6b889..9c44c6b889 100644
--- a/patches/api/0438-Add-player-idle-duration-API.patch
+++ b/patches/api/0437-Add-player-idle-duration-API.patch
diff --git a/patches/api/0439-Add-API-to-get-the-collision-shape-of-a-block-before.patch b/patches/api/0438-Add-API-to-get-the-collision-shape-of-a-block-before.patch
index 9528da025b..0481690ad4 100644
--- a/patches/api/0439-Add-API-to-get-the-collision-shape-of-a-block-before.patch
+++ b/patches/api/0438-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/block/data/BlockData.java b/src/main/java/org/bukkit/block/data/BlockData.java
-index d30ac3edc475796cf7f1d7ea04f665eef4ce755f..647536e1f1a323447dc510b2406bb39c22083945 100644
+index 64188a78211195fe792eac427e483e1984f52318..fb4c7cf0f67f3e4227d17f6702ae7b7bf1c110ab 100644
--- a/src/main/java/org/bukkit/block/data/BlockData.java
+++ b/src/main/java/org/bukkit/block/data/BlockData.java
@@ -205,6 +205,19 @@ public interface BlockData extends Cloneable {
diff --git a/patches/api/0440-Add-predicate-for-blocks-when-raytracing.patch b/patches/api/0439-Add-predicate-for-blocks-when-raytracing.patch
index 67d10e420e..67d10e420e 100644
--- a/patches/api/0440-Add-predicate-for-blocks-when-raytracing.patch
+++ b/patches/api/0439-Add-predicate-for-blocks-when-raytracing.patch
diff --git a/patches/api/0441-Add-hand-to-fish-event-for-all-player-interactions.patch b/patches/api/0440-Add-hand-to-fish-event-for-all-player-interactions.patch
index b431332b9a..b431332b9a 100644
--- a/patches/api/0441-Add-hand-to-fish-event-for-all-player-interactions.patch
+++ b/patches/api/0440-Add-hand-to-fish-event-for-all-player-interactions.patch
diff --git a/patches/api/0442-Add-UUID-attribute-modifier-API.patch b/patches/api/0441-Add-UUID-attribute-modifier-API.patch
index 251ae6e425..251ae6e425 100644
--- a/patches/api/0442-Add-UUID-attribute-modifier-API.patch
+++ b/patches/api/0441-Add-UUID-attribute-modifier-API.patch
diff --git a/patches/api/0443-Expand-LingeringPotion-API.patch b/patches/api/0442-Expand-LingeringPotion-API.patch
index 40b5a5f547..40b5a5f547 100644
--- a/patches/api/0443-Expand-LingeringPotion-API.patch
+++ b/patches/api/0442-Expand-LingeringPotion-API.patch
diff --git a/patches/api/0444-Remove-unnecessary-durability-check-in-ItemStack-isS.patch b/patches/api/0443-Remove-unnecessary-durability-check-in-ItemStack-isS.patch
index 215fc0e435..0ac5bf3ef0 100644
--- a/patches/api/0444-Remove-unnecessary-durability-check-in-ItemStack-isS.patch
+++ b/patches/api/0443-Remove-unnecessary-durability-check-in-ItemStack-isS.patch
@@ -9,7 +9,7 @@ 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 0af73cc04edb93b9772136d4d808f657ea40e733..36e3fbc727cd748aa138f52976154ba32954cd87 100644
+index c3872213acc75d913580002cf70c2abb4ec69ca0..7adf54c561d64e6337af8a2d86f6b574b083edb5 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -295,7 +295,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
diff --git a/patches/api/0445-Add-Structure-check-API.patch b/patches/api/0444-Add-Structure-check-API.patch
index 693f5dbf09..693f5dbf09 100644
--- a/patches/api/0445-Add-Structure-check-API.patch
+++ b/patches/api/0444-Add-Structure-check-API.patch
diff --git a/patches/api/0446-add-missing-Experimental-annotations.patch b/patches/api/0445-add-missing-Experimental-annotations.patch
index 0cebb60f97..d8d8192ab3 100644
--- a/patches/api/0446-add-missing-Experimental-annotations.patch
+++ b/patches/api/0445-add-missing-Experimental-annotations.patch
@@ -579,10 +579,10 @@ index 72ea6ddd00eed73459d700d657929f83ba1ca7ee..bb1b6bc9349af6dec369420035e86092
ITEM_CHORUS_FRUIT_TELEPORT("item.chorus_fruit.teleport"),
ITEM_CROP_PLANT("item.crop.plant"),
diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
-index 741c34b74811666c3b38e9d6fbb74b0a7bc64699..1137a21afa0283fa3d391415e98171e3c160aa1f 100644
+index dd509bd1f7e80a04a63d2ba6eca1ff845d12fb2d..8ca9c7c8d0d6138c825d765c270c29bce11fe09e 100644
--- a/src/main/java/org/bukkit/Tag.java
+++ b/src/main/java/org/bukkit/Tag.java
-@@ -975,14 +975,17 @@ public interface Tag<T extends Keyed> extends Keyed {
+@@ -973,14 +973,17 @@ public interface Tag<T extends Keyed> extends Keyed {
/**
* Vanilla tag representing entities which deflect arrows.
*/
diff --git a/patches/api/0447-Add-more-scoreboard-API.patch b/patches/api/0446-Add-more-scoreboard-API.patch
index 201af36b0c..201af36b0c 100644
--- a/patches/api/0447-Add-more-scoreboard-API.patch
+++ b/patches/api/0446-Add-more-scoreboard-API.patch
diff --git a/patches/api/0448-Improve-Registry.patch b/patches/api/0447-Improve-Registry.patch
index da9c8aeaeb..da9c8aeaeb 100644
--- a/patches/api/0448-Improve-Registry.patch
+++ b/patches/api/0447-Improve-Registry.patch
diff --git a/patches/api/0449-Add-experience-points-API.patch b/patches/api/0448-Add-experience-points-API.patch
index eac15c7249..eac15c7249 100644
--- a/patches/api/0449-Add-experience-points-API.patch
+++ b/patches/api/0448-Add-experience-points-API.patch
diff --git a/patches/api/0450-Add-missing-InventoryType.patch b/patches/api/0449-Add-missing-InventoryType.patch
index 67b4504ad3..67b4504ad3 100644
--- a/patches/api/0450-Add-missing-InventoryType.patch
+++ b/patches/api/0449-Add-missing-InventoryType.patch
diff --git a/patches/api/0451-Add-drops-to-shear-events.patch b/patches/api/0450-Add-drops-to-shear-events.patch
index c87460e48d..c87460e48d 100644
--- a/patches/api/0451-Add-drops-to-shear-events.patch
+++ b/patches/api/0450-Add-drops-to-shear-events.patch
diff --git a/patches/api/0452-Add-HiddenPotionEffect-API.patch b/patches/api/0451-Add-HiddenPotionEffect-API.patch
index 29a1e75388..39585cefba 100644
--- a/patches/api/0452-Add-HiddenPotionEffect-API.patch
+++ b/patches/api/0451-Add-HiddenPotionEffect-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add HiddenPotionEffect API
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
-index f396c214e71efa2c46ad853e9d2c4b5048895917..e6c78d1f4222badae27b49590c2f9be46608d5d1 100644
+index 12926d36a409448ce5aaae955968dbc89825a2c5..e67455efc84f1e06d3396291d104ce65fee4591b 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -559,6 +559,9 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
diff --git a/patches/api/0453-Add-PlayerShieldDisableEvent.patch b/patches/api/0452-Add-PlayerShieldDisableEvent.patch
index 29c7daa0e3..29c7daa0e3 100644
--- a/patches/api/0453-Add-PlayerShieldDisableEvent.patch
+++ b/patches/api/0452-Add-PlayerShieldDisableEvent.patch
diff --git a/patches/api/0454-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch b/patches/api/0453-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch
index 742314fff8..742314fff8 100644
--- a/patches/api/0454-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch
+++ b/patches/api/0453-Return-null-for-empty-String-in-NamespacedKey.fromSt.patch
diff --git a/patches/api/0455-Add-BlockStateMeta-clearBlockState.patch b/patches/api/0454-Add-BlockStateMeta-clearBlockState.patch
index 1a81132aa8..1a81132aa8 100644
--- a/patches/api/0455-Add-BlockStateMeta-clearBlockState.patch
+++ b/patches/api/0454-Add-BlockStateMeta-clearBlockState.patch
diff --git a/patches/api/0456-Expose-LootTable-of-DecoratedPot.patch b/patches/api/0455-Expose-LootTable-of-DecoratedPot.patch
index 42a8de4123..42a8de4123 100644
--- a/patches/api/0456-Expose-LootTable-of-DecoratedPot.patch
+++ b/patches/api/0455-Expose-LootTable-of-DecoratedPot.patch
diff --git a/patches/api/0457-Add-ShulkerDuplicateEvent.patch b/patches/api/0456-Add-ShulkerDuplicateEvent.patch
index a0a81094ce..a0a81094ce 100644
--- a/patches/api/0457-Add-ShulkerDuplicateEvent.patch
+++ b/patches/api/0456-Add-ShulkerDuplicateEvent.patch
diff --git a/patches/api/0458-Add-api-for-spawn-egg-texture-colors.patch b/patches/api/0457-Add-api-for-spawn-egg-texture-colors.patch
index 22ba7c25bf..22ba7c25bf 100644
--- a/patches/api/0458-Add-api-for-spawn-egg-texture-colors.patch
+++ b/patches/api/0457-Add-api-for-spawn-egg-texture-colors.patch
diff --git a/patches/api/0459-Add-Lifecycle-Event-system.patch b/patches/api/0458-Add-Lifecycle-Event-system.patch
index 635d4a7325..635d4a7325 100644
--- a/patches/api/0459-Add-Lifecycle-Event-system.patch
+++ b/patches/api/0458-Add-Lifecycle-Event-system.patch
diff --git a/patches/api/0460-Conduit-API.patch b/patches/api/0459-Conduit-API.patch
index 57f43f96a3..57f43f96a3 100644
--- a/patches/api/0460-Conduit-API.patch
+++ b/patches/api/0459-Conduit-API.patch
diff --git a/patches/api/0461-ItemStack-Tooltip-API.patch b/patches/api/0460-ItemStack-Tooltip-API.patch
index 9aa55ce1a9..9aa55ce1a9 100644
--- a/patches/api/0461-ItemStack-Tooltip-API.patch
+++ b/patches/api/0460-ItemStack-Tooltip-API.patch
diff --git a/patches/api/0462-Add-getChunkSnapshot-includeLightData-parameter.patch b/patches/api/0461-Add-getChunkSnapshot-includeLightData-parameter.patch
index 0437924b94..0437924b94 100644
--- a/patches/api/0462-Add-getChunkSnapshot-includeLightData-parameter.patch
+++ b/patches/api/0461-Add-getChunkSnapshot-includeLightData-parameter.patch
diff --git a/patches/api/0463-Add-FluidState-API.patch b/patches/api/0462-Add-FluidState-API.patch
index 3235c393f5..3235c393f5 100644
--- a/patches/api/0463-Add-FluidState-API.patch
+++ b/patches/api/0462-Add-FluidState-API.patch
diff --git a/patches/api/0464-add-number-format-api.patch b/patches/api/0463-add-number-format-api.patch
index 6d32302ad0..6d32302ad0 100644
--- a/patches/api/0464-add-number-format-api.patch
+++ b/patches/api/0463-add-number-format-api.patch
diff --git a/patches/server/0001-Setup-Gradle-project.patch b/patches/server/0001-Setup-Gradle-project.patch
index 1b657abc0b..858c5fc329 100644
--- a/patches/server/0001-Setup-Gradle-project.patch
+++ b/patches/server/0001-Setup-Gradle-project.patch
@@ -28,10 +28,10 @@ index 37dab9e868dbfb019c271a547d975a48ad1cb571..3811c0d849a3eb028ed1a6b7a2d4747f
+/.factorypath
diff --git a/build.gradle.kts b/build.gradle.kts
new file mode 100644
-index 0000000000000000000000000000000000000000..09bffd973b184c40cce29d81430700ee4065555f
+index 0000000000000000000000000000000000000000..74849d7b20e3c3831a6a6c3715a6e875d6ff8a48
--- /dev/null
+++ b/build.gradle.kts
-@@ -0,0 +1,140 @@
+@@ -0,0 +1,141 @@
+import io.papermc.paperweight.util.*
+
+plugins {
@@ -58,6 +58,7 @@ index 0000000000000000000000000000000000000000..09bffd973b184c40cce29d81430700ee
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
+ testImplementation("org.hamcrest:hamcrest:2.2")
+ testImplementation("org.mockito:mockito-core:5.5.0")
++ testImplementation("org.ow2.asm:asm-tree:9.5")
+}
+
+val craftbukkitPackageVersion = "1_20_R3" // Paper
@@ -174,10 +175,10 @@ index 0000000000000000000000000000000000000000..09bffd973b184c40cce29d81430700ee
+}
diff --git a/pom.xml b/pom.xml
deleted file mode 100644
-index d18fdadf925df41f04941dcc7eecdd3cadf5364a..0000000000000000000000000000000000000000
+index 22a2e4d92ba6774aa27c0bd123dac912b3e1ee65..0000000000000000000000000000000000000000
--- a/pom.xml
+++ /dev/null
-@@ -1,608 +0,0 @@
+@@ -1,614 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
@@ -474,6 +475,12 @@ index d18fdadf925df41f04941dcc7eecdd3cadf5364a..00000000000000000000000000000000
- <version>5.5.0</version>
- <scope>test</scope>
- </dependency>
+- <dependency>
+- <groupId>org.ow2.asm</groupId>
+- <artifactId>asm-tree</artifactId>
+- <version>9.5</version>
+- <scope>test</scope>
+- </dependency>
- </dependencies>
-
- <!-- This builds a completely 'ready to start' jar with all dependencies inside -->
diff --git a/patches/server/0003-Build-system-changes.patch b/patches/server/0003-Build-system-changes.patch
index facc352dca..163868dafe 100644
--- a/patches/server/0003-Build-system-changes.patch
+++ b/patches/server/0003-Build-system-changes.patch
@@ -9,7 +9,7 @@ public net.minecraft.server.packs.VanillaPackResourcesBuilder safeGetPath(Ljava/
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index 09bffd973b184c40cce29d81430700ee4065555f..e7fa464573909d4c3d649ebb5f40ef54055e09a8 100644
+index 74849d7b20e3c3831a6a6c3715a6e875d6ff8a48..517aaae21f8fbd6916ab23d85dac5f74aea9e984 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -9,9 +9,7 @@ plugins {
@@ -23,7 +23,7 @@ index 09bffd973b184c40cce29d81430700ee4065555f..e7fa464573909d4c3d649ebb5f40ef54
implementation("org.ow2.asm:asm-commons:9.5")
implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
-@@ -35,6 +33,7 @@ tasks.jar {
+@@ -36,6 +34,7 @@ tasks.jar {
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
@@ -31,7 +31,7 @@ index 09bffd973b184c40cce29d81430700ee4065555f..e7fa464573909d4c3d649ebb5f40ef54
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
"Implementation-Title" to "CraftBukkit",
-@@ -43,6 +42,9 @@ tasks.jar {
+@@ -44,6 +43,9 @@ tasks.jar {
"Specification-Title" to "Bukkit",
"Specification-Version" to project.version,
"Specification-Vendor" to "Bukkit Team",
@@ -41,7 +41,7 @@ index 09bffd973b184c40cce29d81430700ee4065555f..e7fa464573909d4c3d649ebb5f40ef54
)
for (tld in setOf("net", "com", "org")) {
attributes("$tld/bukkit", "Sealed" to true)
-@@ -50,6 +52,11 @@ tasks.jar {
+@@ -51,6 +53,11 @@ tasks.jar {
}
}
@@ -53,7 +53,7 @@ index 09bffd973b184c40cce29d81430700ee4065555f..e7fa464573909d4c3d649ebb5f40ef54
publishing {
publications.create<MavenPublication>("maven") {
artifact(tasks.shadowJar)
-@@ -76,6 +83,17 @@ tasks.shadowJar {
+@@ -77,6 +84,17 @@ tasks.shadowJar {
}
}
@@ -71,7 +71,7 @@ index 09bffd973b184c40cce29d81430700ee4065555f..e7fa464573909d4c3d649ebb5f40ef54
tasks.test {
exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
useJUnitPlatform()
-@@ -134,7 +152,14 @@ tasks.registerRunTask("runReobf") {
+@@ -135,7 +153,14 @@ tasks.registerRunTask("runReobf") {
classpath(runtimeClasspathWithoutVanillaServer)
}
diff --git a/patches/server/0004-Test-changes.patch b/patches/server/0004-Test-changes.patch
index 63baf3d138..5684d8af80 100644
--- a/patches/server/0004-Test-changes.patch
+++ b/patches/server/0004-Test-changes.patch
@@ -5,18 +5,18 @@ Subject: [PATCH] Test changes
diff --git a/build.gradle.kts b/build.gradle.kts
-index e7fa464573909d4c3d649ebb5f40ef54055e09a8..8d2aa99b4bd0d1c46c66274907a1f11d605a75da 100644
+index 517aaae21f8fbd6916ab23d85dac5f74aea9e984..9098a40f944a3c6c0e907013c212eb3f1895e010 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
-@@ -22,6 +22,7 @@ dependencies {
- testImplementation("org.junit.jupiter:junit-jupiter:5.10.0")
+@@ -23,6 +23,7 @@ dependencies {
testImplementation("org.hamcrest:hamcrest:2.2")
testImplementation("org.mockito:mockito-core:5.5.0")
+ testImplementation("org.ow2.asm:asm-tree:9.5")
+ testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
}
val craftbukkitPackageVersion = "1_20_R3" // Paper
-@@ -57,6 +58,12 @@ tasks.compileJava {
+@@ -58,6 +59,12 @@ tasks.compileJava {
options.setIncremental(false)
}
diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch
index 5de7f3ff84..480ae295af 100644
--- a/patches/server/0009-MC-Utils.patch
+++ b/patches/server/0009-MC-Utils.patch
@@ -6342,7 +6342,7 @@ index 1641bdf8725df778ba91bf5cd22c1ebbb3745058..facfdbb87e89f4db33ce13233c2ba436
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index f083356fe490ecebdc1486784f4833d778b816f4..59b608d9722898470010413bef0cb6a6b83500b2 100644
+index 37527f5cb6e96410a5679b8b27f763727afc8657..8908511590adab6025ff02928591aa3cce4e480e 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -168,6 +168,62 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -6830,7 +6830,7 @@ index 1d12a7934308aa48d7ea7fa10c7b6b5ccb27e707..2c4727bf4571e1596bb0696b25104155
ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 93867b8883c6f5d5086e8fdc153e6d7c1e5d9fec..68a0192f3b1c9491a6f64309ccc919274cdfe178 100644
+index 30fc222c384938fb4fdd4c6715295aeea57094bc..9ea829aafa7a874a784d02da889576c80de17d0c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -230,6 +230,98 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -6998,10 +6998,10 @@ index 43040b678206092bcb06acde919b75ecb78564df..d11741d2618976bdb51f75d823f260f3
public BlockState getBlockState(BlockPos pos) {
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 6e26ee14195493a9c4eab60a3c4cd0dd09786ec2..6e1b20bfe61339fa22d4403ed77b961cc0f0105c 100644
+index 93e0de052ea54cc1dee1ebc017fefb634eb42f8d..2e8e786407869b53cb4d7e4ec8f91fe0a3ad8e1a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -177,6 +177,7 @@ public abstract class PlayerList {
+@@ -178,6 +178,7 @@ public abstract class PlayerList {
}
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
@@ -7028,10 +7028,10 @@ index 337e0a7b3c14e1b1a28744920e0dc0a69e0c5a87..f5829ae484d93b547a5437b85a962134
@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 449635563afcb6a43e036dc0f3988efddbb622b2..e945daf877068625d4ad0f0b534f2eb23ee658a9 100644
+index 02a90d4719b53f8538ed79c1f1a5c6d8833e495c..01c2ccb29dd74655ef65cc29ff2cafe6b467e5a5 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -330,6 +330,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -331,6 +331,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return this.level.hasChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4);
}
// CraftBukkit end
@@ -7044,10 +7044,10 @@ index 449635563afcb6a43e036dc0f3988efddbb622b2..e945daf877068625d4ad0f0b534f2eb2
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 db768130e7b7c21e111687ebe761608e7494a739..44bfb8778f2894be9633be7ddc4f3c6881c9b05d 100644
+index a038920172102f5ad4ceb77abef4f7b61fca5862..ea73e8a04ee767625d06483dce83d68262887a27 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -258,6 +258,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -259,6 +259,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public boolean collides = true;
public Set<UUID> collidableExemptions = new HashSet<>();
public boolean bukkitPickUpLoot;
@@ -7056,10 +7056,10 @@ index db768130e7b7c21e111687ebe761608e7494a739..44bfb8778f2894be9633be7ddc4f3c68
@Override
public float getBukkitYaw() {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 0f24a32334e66b0c93287c9b2b14484da799738f..fc264864d4a6f56f94d884f4892257452b360b73 100644
+index 13adb7f79073ff4b01906df61098c5436eb613e3..8892a6344b3a96a3d412528b80ce7bcf1ab30003 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -277,6 +277,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -278,6 +278,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
return this.target;
}
@@ -7710,10 +7710,10 @@ index 51a0ddcee9a9cb1040fda643a6442d2e2e15b8a0..38ec21faaa16df5485a81a581506700a
public BlockState getBlockState(BlockPos pos) {
int i = pos.getY();
diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
-index 98836000cbca2a21649cb8f2a466986373405ea1..bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd 100644
+index e3709b2b40beb8f95e5b9bb7d20141e16b3192e3..8f23b45dce35617bb56b21fb4f7a09baf36d40c5 100644
--- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
+++ b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
-@@ -90,6 +90,18 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -91,6 +91,18 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
private boolean addEntity(T entity, boolean existing) {
@@ -7827,10 +7827,10 @@ index fcf06c157fa8ecdb742c301a95da8489e951ea20..1ce9787b04e28b3a50fdc7779a430c3b
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 70165d287156f46b793eb23dd30b601289c0ffb1..758bf988432bb34aad9386e3f4e8bba68891660b 100644
+index f5a5496e21e29c6ae9f497f5939823078ac8c1c0..7126d8cdeea5eb23176af6a97a99b33961749d71 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -897,4 +897,37 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -898,4 +898,37 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.spigot;
}
// Spigot end
diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch
index aa725c31cf..f778dc3ba4 100644
--- a/patches/server/0010-Adventure.patch
+++ b/patches/server/0010-Adventure.patch
@@ -3081,10 +3081,10 @@ index b23480fab4a7cba922b36cb31d4f77f720bf3aac..7dd3dfd2ccc820d45849a89707239b7d
@Override
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87eca2f28a0 100644
+index 2e8e786407869b53cb4d7e4ec8f91fe0a3ad8e1a..5e00df1cd2b8a6691b2f9490b1f4c3ed4d6a988a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -269,7 +269,7 @@ public abstract class PlayerList {
+@@ -270,7 +270,7 @@ public abstract class PlayerList {
}
// CraftBukkit start
ichatmutablecomponent.withStyle(ChatFormatting.YELLOW);
@@ -3093,7 +3093,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
playerconnection.teleport(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot());
ServerStatus serverping = this.server.getStatus();
-@@ -290,19 +290,18 @@ public abstract class PlayerList {
+@@ -291,19 +291,18 @@ public abstract class PlayerList {
// Ensure that player inventory is populated with its viewer
player.containerMenu.transferTo(player.containerMenu, bukkitPlayer);
@@ -3118,7 +3118,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
}
// CraftBukkit end
-@@ -500,7 +499,7 @@ public abstract class PlayerList {
+@@ -501,7 +500,7 @@ public abstract class PlayerList {
}
@@ -3127,7 +3127,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
ServerLevel worldserver = entityplayer.serverLevel();
entityplayer.awardStat(Stats.LEAVE_GAME);
-@@ -511,7 +510,7 @@ public abstract class PlayerList {
+@@ -512,7 +511,7 @@ public abstract class PlayerList {
entityplayer.closeContainer();
}
@@ -3136,7 +3136,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
this.cserver.getPluginManager().callEvent(playerQuitEvent);
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
-@@ -564,7 +563,7 @@ public abstract class PlayerList {
+@@ -565,7 +564,7 @@ public abstract class PlayerList {
this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
// CraftBukkit end
@@ -3145,7 +3145,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
}
// CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
-@@ -610,10 +609,10 @@ public abstract class PlayerList {
+@@ -611,11 +610,11 @@ public abstract class PlayerList {
}
// return chatmessage;
@@ -3154,11 +3154,13 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
} else if (!this.isWhiteListed(gameprofile)) {
ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted");
- event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, org.spigotmc.SpigotConfig.whitelistMessage); // Spigot
+- } else if (this.ipBans.isBanned(socketaddress)) {
+ event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure
- } else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
++ } else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
-@@ -623,17 +622,17 @@ public abstract class PlayerList {
+ ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned_ip.reason", ipbanentry.getReason());
+@@ -624,17 +623,17 @@ public abstract class PlayerList {
}
// return chatmessage;
@@ -3179,7 +3181,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
return null;
}
return entity;
-@@ -1153,7 +1152,7 @@ public abstract class PlayerList {
+@@ -1154,7 +1153,7 @@ public abstract class PlayerList {
public void removeAll() {
// CraftBukkit start - disconnect safely
for (ServerPlayer player : this.players) {
@@ -3188,7 +3190,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
}
// CraftBukkit end
-@@ -1194,24 +1193,43 @@ public abstract class PlayerList {
+@@ -1195,24 +1194,43 @@ public abstract class PlayerList {
}
public void broadcastChatMessage(PlayerChatMessage message, ServerPlayer sender, ChatType.Bound params) {
@@ -3235,7 +3237,7 @@ index 6e1b20bfe61339fa22d4403ed77b961cc0f0105c..6e9f5a404511f3703298def67402b87e
}
if (flag1 && sender != null) {
-@@ -1220,7 +1238,7 @@ public abstract class PlayerList {
+@@ -1221,7 +1239,7 @@ public abstract class PlayerList {
}
@@ -3759,10 +3761,10 @@ index 459e134e96121e611dd864f66a3f2cb64dbaf61c..ecb6f846cdaa2e9f01853001b1626315
public String getCustomName() {
EnchantmentTableBlockEntity enchant = this.getSnapshot();
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
-index 1791d435552b812856f38dc6d8a97182b1a8eb12..94caa0915e1a9ec1c46c7a0380db840901cc8063 100644
+index 87b415c4d7abb32afc74986ff3de4a75987d2a68..d1b335d7342aa85478daeb7801a999ccd4be7136 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
-@@ -33,6 +33,23 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
+@@ -35,6 +35,23 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
this.back = new CraftSignSide(this.getSnapshot().getBackText());
}
@@ -3786,7 +3788,7 @@ index 1791d435552b812856f38dc6d8a97182b1a8eb12..94caa0915e1a9ec1c46c7a0380db8409
@Override
public String[] getLines() {
return this.front.getLines();
-@@ -132,6 +149,20 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
+@@ -155,6 +172,20 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side);
}
@@ -4054,10 +4056,10 @@ index 24052b8102061c6fbf01b3e9b2346ed9783787e6..f0f7fb977edb7e7009716429f007e44f
@Override
public boolean equals(Object other) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 758bf988432bb34aad9386e3f4e8bba68891660b..e269812e6193492afc3f25612edafa1a58325fa3 100644
+index 7126d8cdeea5eb23176af6a97a99b33961749d71..e78a378f0de48cde3702774970e6cda241b8ddda 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -66,6 +66,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -67,6 +67,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
private final EntityType entityType;
private EntityDamageEvent lastDamageEvent;
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
@@ -4065,7 +4067,7 @@ index 758bf988432bb34aad9386e3f4e8bba68891660b..e269812e6193492afc3f25612edafa1a
public CraftEntity(final CraftServer server, final Entity entity) {
this.server = server;
-@@ -522,6 +523,32 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -523,6 +524,32 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.getHandle().getVehicle().getBukkitEntity();
}
@@ -4098,7 +4100,7 @@ index 758bf988432bb34aad9386e3f4e8bba68891660b..e269812e6193492afc3f25612edafa1a
@Override
public void setCustomName(String name) {
// sane limit for name length
-@@ -618,6 +645,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -619,6 +646,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public String getName() {
return CraftChatMessage.fromComponent(this.getHandle().getName());
}
@@ -4702,10 +4704,10 @@ index 5725b0281ac53a2354b233223259d6784353bc6e..9ef939b76d06874b856e0c850addb364
@Override
public int getLineWidth() {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 249d271338a75c49ec9bc886d034af637618bc7b..da100f451238a093bcaad83343a79254d4aa31ce 100644
+index 2496f4462b35a7297dd9320c35f109d3c2a9867f..6571adf5285ab3f84513c2f5b32ff0523c2cccd6 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -904,7 +904,7 @@ public class CraftEventFactory {
+@@ -905,7 +905,7 @@ public class CraftEventFactory {
return event;
}
@@ -4714,7 +4716,7 @@ index 249d271338a75c49ec9bc886d034af637618bc7b..da100f451238a093bcaad83343a79254
CraftPlayer entity = victim.getBukkitEntity();
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
event.setKeepInventory(keepInventory);
-@@ -931,7 +931,7 @@ public class CraftEventFactory {
+@@ -932,7 +932,7 @@ public class CraftEventFactory {
* Server methods
*/
public static ServerListPingEvent callServerListPingEvent(SocketAddress address, String motd, int numPlayers, int maxPlayers) {
diff --git a/patches/server/0014-Timings-v2.patch b/patches/server/0014-Timings-v2.patch
index 4d99a43a43..d9cb8e1ef6 100644
--- a/patches/server/0014-Timings-v2.patch
+++ b/patches/server/0014-Timings-v2.patch
@@ -976,7 +976,7 @@ index 4917aa64505870a0521bc09ce4d4d3e37c03eaae..65dbd05fa904eb8f0f0ef5d3fc3c1e88
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 59b608d9722898470010413bef0cb6a6b83500b2..7245b93a4935aece23567fda0474104686485395 100644
+index 8908511590adab6025ff02928591aa3cce4e480e..97bb0fc7e890273f2f975f137ec1194a1a83fde7 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1,8 +1,10 @@
@@ -1125,7 +1125,7 @@ index 2c4727bf4571e1596bb0696b25104155f6302065..e0ae7274da59ff043cd423d282ed8db0
gameprofilerfiller.pop();
gameprofilerfiller.pop();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 68a0192f3b1c9491a6f64309ccc919274cdfe178..73608abb5a39749c326ce6fe1bf014422941b2d1 100644
+index 9ea829aafa7a874a784d02da889576c80de17d0c..13725b794e923a4de0d06edcba1adf1b04611c95 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1,6 +1,8 @@
@@ -1244,7 +1244,7 @@ index 68a0192f3b1c9491a6f64309ccc919274cdfe178..73608abb5a39749c326ce6fe1bf01442
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 acd53d9005fc5f43b94c80ec5e7d0e1f9c86ca98..01c70d149b306030c775427f744c4dfab19411cf 100644
+index 93ef520b8f047870f48e908ae55590547ad88729..4be0935a36bd7b2e0d83e30b6edc43a6429dac22 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -322,7 +322,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -1291,7 +1291,7 @@ index acd53d9005fc5f43b94c80ec5e7d0e1f9c86ca98..01c70d149b306030c775427f744c4dfa
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 6e9f5a404511f3703298def67402b87eca2f28a0..f5a4191977e8675952fc689744c8a39e86f62a07 100644
+index 5e00df1cd2b8a6691b2f9490b1f4c3ed4d6a988a..72488b0d499e4e0d0ccba38622cc5a3f88a9e3fa 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1,5 +1,6 @@
@@ -1301,7 +1301,7 @@ index 6e9f5a404511f3703298def67402b87eca2f28a0..f5a4191977e8675952fc689744c8a39e
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
-@@ -1039,10 +1040,11 @@ public abstract class PlayerList {
+@@ -1040,10 +1041,11 @@ public abstract class PlayerList {
}
public void saveAll() {
@@ -1315,7 +1315,7 @@ index 6e9f5a404511f3703298def67402b87eca2f28a0..f5a4191977e8675952fc689744c8a39e
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 e945daf877068625d4ad0f0b534f2eb23ee658a9..0ecdc0d671f744d85072ca0d157ef37bb28bab9c 100644
+index 01c2ccb29dd74655ef65cc29ff2cafe6b467e5a5..cdb4acbaf019608c57d7a40c6928ddc9c00fd1d5 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -135,7 +135,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
@@ -1326,7 +1326,7 @@ index e945daf877068625d4ad0f0b534f2eb23ee658a9..0ecdc0d671f744d85072ca0d157ef37b
import org.bukkit.event.entity.EntityCombustByEntityEvent;
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
-@@ -314,7 +313,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -315,7 +314,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// Marks an entity, that it was removed by a plugin via Entity#remove
// Main use case currently is for SPIGOT-7487, preventing dropping of leash when leash is removed
public boolean pluginRemoved = false;
@@ -1334,7 +1334,7 @@ index e945daf877068625d4ad0f0b534f2eb23ee658a9..0ecdc0d671f744d85072ca0d157ef37b
// Spigot start
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
-@@ -810,7 +808,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -823,7 +821,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void move(MoverType movementType, Vec3 movement) {
@@ -1342,7 +1342,7 @@ index e945daf877068625d4ad0f0b534f2eb23ee658a9..0ecdc0d671f744d85072ca0d157ef37b
if (this.noPhysics) {
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
} else {
-@@ -971,7 +968,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -984,7 +981,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.level().getProfiler().pop();
}
}
@@ -1393,10 +1393,10 @@ index c4bc491eed487c0a7e30538b0fb46fde91cd7b31..382b55167dede435b034866bd394455f
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 44bfb8778f2894be9633be7ddc4f3c6881c9b05d..e111bdb614f173322ed0cc0386db6870a984fff7 100644
+index ea73e8a04ee767625d06483dce83d68262887a27..5ae9f9a4cb903909cb26a612a847d12515c52d91 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -141,7 +141,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
+@@ -142,7 +142,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
import org.bukkit.event.player.PlayerItemConsumeEvent;
// CraftBukkit end
@@ -1405,7 +1405,7 @@ index 44bfb8778f2894be9633be7ddc4f3c6881c9b05d..e111bdb614f173322ed0cc0386db6870
public abstract class LivingEntity extends Entity implements Attackable {
-@@ -2879,7 +2879,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2887,7 +2887,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public void tick() {
@@ -1413,7 +1413,7 @@ index 44bfb8778f2894be9633be7ddc4f3c6881c9b05d..e111bdb614f173322ed0cc0386db6870
super.tick();
this.updatingUsingItem();
this.updateSwimAmount();
-@@ -2921,9 +2920,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2929,9 +2928,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
if (!this.isRemoved()) {
@@ -1423,7 +1423,7 @@ index 44bfb8778f2894be9633be7ddc4f3c6881c9b05d..e111bdb614f173322ed0cc0386db6870
}
double d0 = this.getX() - this.xo;
-@@ -3007,7 +3004,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3015,7 +3012,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.refreshDirtyAttributes();
@@ -1431,7 +1431,7 @@ index 44bfb8778f2894be9633be7ddc4f3c6881c9b05d..e111bdb614f173322ed0cc0386db6870
}
public void detectEquipmentUpdatesPublic() { // CraftBukkit
-@@ -3182,7 +3178,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3190,7 +3186,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.setDeltaMovement(d0, d1, d2);
this.level().getProfiler().push("ai");
@@ -1439,7 +1439,7 @@ index 44bfb8778f2894be9633be7ddc4f3c6881c9b05d..e111bdb614f173322ed0cc0386db6870
if (this.isImmobile()) {
this.jumping = false;
this.xxa = 0.0F;
-@@ -3192,7 +3187,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3200,7 +3195,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.serverAiStep();
this.level().getProfiler().pop();
}
@@ -1447,7 +1447,7 @@ index 44bfb8778f2894be9633be7ddc4f3c6881c9b05d..e111bdb614f173322ed0cc0386db6870
this.level().getProfiler().pop();
this.level().getProfiler().push("jump");
-@@ -3232,7 +3226,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3240,7 +3234,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.resetFallDistance();
}
@@ -1455,7 +1455,7 @@ index 44bfb8778f2894be9633be7ddc4f3c6881c9b05d..e111bdb614f173322ed0cc0386db6870
label104:
{
LivingEntity entityliving = this.getControllingPassenger();
-@@ -3248,7 +3241,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3256,7 +3249,6 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.travel(vec3d1);
}
@@ -1463,7 +1463,7 @@ index 44bfb8778f2894be9633be7ddc4f3c6881c9b05d..e111bdb614f173322ed0cc0386db6870
this.level().getProfiler().pop();
this.level().getProfiler().push("freezing");
-@@ -3275,9 +3267,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3283,9 +3275,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.checkAutoSpinAttack(axisalignedbb, this.getBoundingBox());
}
diff --git a/patches/server/0021-Configurable-fishing-time-ranges.patch b/patches/server/0021-Configurable-fishing-time-ranges.patch
index 1ac9a0454c..117f93cdbf 100644
--- a/patches/server/0021-Configurable-fishing-time-ranges.patch
+++ b/patches/server/0021-Configurable-fishing-time-ranges.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Configurable fishing time ranges
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-index e5d9902331e3c4e461e855290a95980b41f5efe2..8b27b5118cbeeb0b25fb6a23056e51899be32035 100644
+index 6d81bc003647ba593cd895a57d6651080efdf4a3..9bf5b67922f3368e1ee4d76f6297ebe425f3ceab 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-@@ -92,6 +92,10 @@ public class FishingHook extends Projectile {
+@@ -93,6 +93,10 @@ public class FishingHook extends Projectile {
this.noCulling = true;
this.luck = Math.max(0, luckOfTheSeaLevel);
this.lureSpeed = Math.max(0, lureLevel);
@@ -19,7 +19,7 @@ index e5d9902331e3c4e461e855290a95980b41f5efe2..8b27b5118cbeeb0b25fb6a23056e5189
}
public FishingHook(EntityType<? extends FishingHook> type, Level world) {
-@@ -409,7 +413,7 @@ public class FishingHook extends Projectile {
+@@ -410,7 +414,7 @@ public class FishingHook extends Projectile {
} else {
// CraftBukkit start - logic to modify fishing wait time
this.timeUntilLured = Mth.nextInt(this.random, this.minWaitTime, this.maxWaitTime);
diff --git a/patches/server/0022-Allow-nerfed-mobs-to-jump.patch b/patches/server/0022-Allow-nerfed-mobs-to-jump.patch
index 963c4fa032..4840e50748 100644
--- a/patches/server/0022-Allow-nerfed-mobs-to-jump.patch
+++ b/patches/server/0022-Allow-nerfed-mobs-to-jump.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Allow nerfed mobs to jump
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index fc264864d4a6f56f94d884f4892257452b360b73..b86ad4fbf1245c4c040d84daf9f93bd1aee6beae 100644
+index 8892a6344b3a96a3d412528b80ce7bcf1ab30003..8395130fcc148ed1500342ead78b20a1387f23e9 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -112,6 +112,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -113,6 +113,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
private final BodyRotationControl bodyRotationControl;
protected PathNavigation navigation;
public GoalSelector goalSelector;
@@ -16,7 +16,7 @@ index fc264864d4a6f56f94d884f4892257452b360b73..b86ad4fbf1245c4c040d84daf9f93bd1
public GoalSelector targetSelector;
@Nullable
private LivingEntity target;
-@@ -877,7 +878,15 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -878,7 +879,15 @@ public abstract class Mob extends LivingEntity implements Targeting {
@Override
protected final void serverAiStep() {
++this.noActionTime;
diff --git a/patches/server/0023-Add-configurable-entity-despawn-distances.patch b/patches/server/0023-Add-configurable-entity-despawn-distances.patch
index dca9b87b3b..e43e0a2d4c 100644
--- a/patches/server/0023-Add-configurable-entity-despawn-distances.patch
+++ b/patches/server/0023-Add-configurable-entity-despawn-distances.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable entity despawn distances
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index b86ad4fbf1245c4c040d84daf9f93bd1aee6beae..1de4c45f1a3a69e63eccf063be5516b163f7882a 100644
+index 8395130fcc148ed1500342ead78b20a1387f23e9..1ab169b362cc18d2467e5ed6a4af325d7f6dd247 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -853,14 +853,14 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -854,14 +854,14 @@ public abstract class Mob extends LivingEntity implements Targeting {
if (entityhuman != null) {
double d0 = entityhuman.distanceToSqr((Entity) this);
@@ -17,7 +17,7 @@ index b86ad4fbf1245c4c040d84daf9f93bd1aee6beae..1de4c45f1a3a69e63eccf063be5516b1
int j = i * i;
if (d0 > (double) j && this.removeWhenFarAway(d0)) {
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
}
- int k = this.getType().getCategory().getNoDespawnDistance();
diff --git a/patches/server/0025-Drop-falling-block-and-tnt-entities-at-the-specified.patch b/patches/server/0025-Drop-falling-block-and-tnt-entities-at-the-specified.patch
index 79d4064bb4..e81eb5fef1 100644
--- a/patches/server/0025-Drop-falling-block-and-tnt-entities-at-the-specified.patch
+++ b/patches/server/0025-Drop-falling-block-and-tnt-entities-at-the-specified.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Drop falling block and tnt entities at the specified height
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-index 66c0b74a41cb9e7403826b4fd54a8575d6f16faa..ee5ef4fe16ce6397bba30900b9c6690e3c4f51e6 100644
+index 4d0fa6caf55605f2f53a374ce6bad0081213f248..9136b0c907d331e100d47e1a800ae2e2c2ec6dad 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-@@ -142,6 +142,16 @@ public class FallingBlockEntity extends Entity {
+@@ -143,6 +143,16 @@ public class FallingBlockEntity extends Entity {
}
this.move(MoverType.SELF, this.getDeltaMovement());
@@ -19,7 +19,7 @@ index 66c0b74a41cb9e7403826b4fd54a8575d6f16faa..ee5ef4fe16ce6397bba30900b9c6690e
+ this.spawnAtLocation(block);
+ }
+
-+ this.discard();
++ this.discard(EntityRemoveEvent.Cause.OUT_OF_WORLD);
+ return;
+ }
+ // Paper end - Configurable falling blocks height nerf
@@ -27,16 +27,16 @@ index 66c0b74a41cb9e7403826b4fd54a8575d6f16faa..ee5ef4fe16ce6397bba30900b9c6690e
BlockPos blockposition = this.blockPosition();
boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock;
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
-index 36d93ee421406302c05945db17d46b04b485e4c0..19e2f2005bd1fb4d199debd34e92a0794a3d3fe4 100644
+index 8d512e43cdae52c16d1bb7c4ad8b91a947fa367f..f068b57167b183e68db897c70036cdc366a83c98 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
-@@ -77,6 +77,12 @@ public class PrimedTnt extends Entity implements TraceableEntity {
+@@ -78,6 +78,12 @@ public class PrimedTnt extends Entity implements TraceableEntity {
}
this.move(MoverType.SELF, this.getDeltaMovement());
+ // Paper start - Configurable TNT height nerf
+ if (this.level().paperConfig().fixes.tntEntityHeightNerf.test(v -> this.getY() > v)) {
-+ this.discard();
++ this.discard(EntityRemoveEvent.Cause.OUT_OF_WORLD);
+ return;
+ }
+ // Paper end - Configurable TNT height nerf
@@ -44,16 +44,16 @@ index 36d93ee421406302c05945db17d46b04b485e4c0..19e2f2005bd1fb4d199debd34e92a079
if (this.onGround()) {
this.setDeltaMovement(this.getDeltaMovement().multiply(0.7D, -0.5D, 0.7D));
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
-index 0fc58f38bbd855414ad36b682e60b069d7b68cb1..48f531da21fa0305ab1e8d5b50276e61e3155a38 100644
+index 6e127279c78b490c5b6c87eb75f3cb991a1afee2..5e17947b256ea6622f9a9b3e51fa8e473fc909ed 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
-@@ -53,6 +53,12 @@ public class MinecartTNT extends AbstractMinecart {
+@@ -54,6 +54,12 @@ public class MinecartTNT extends AbstractMinecart {
public void tick() {
super.tick();
if (this.fuse > 0) {
+ // Paper start - Configurable TNT height nerf
+ if (this.level().paperConfig().fixes.tntEntityHeightNerf.test(v -> this.getY() > v)) {
-+ this.discard();
++ this.discard(EntityRemoveEvent.Cause.OUT_OF_WORLD);
+ return;
+ }
+ // Paper end - Configurable TNT height nerf
diff --git a/patches/server/0029-Player-affects-spawning-API.patch b/patches/server/0029-Player-affects-spawning-API.patch
index 5b8a0b37ce..75e68bbdc9 100644
--- a/patches/server/0029-Player-affects-spawning-API.patch
+++ b/patches/server/0029-Player-affects-spawning-API.patch
@@ -21,12 +21,12 @@ index 3126e8cab3c40e3af47f4c8925e1c6a9523309ba..3207166061bf9c4d7bf3f38e5a9f7aff
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
double d4 = max * max;
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 1de4c45f1a3a69e63eccf063be5516b163f7882a..fa5d8a041858d17c785f033dd2aa3ab242069749 100644
+index 1ab169b362cc18d2467e5ed6a4af325d7f6dd247..2de1ad28d42d4beec69901bf985ac0be582f00b9 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -849,7 +849,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -850,7 +850,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
if (this.level().getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
- Player entityhuman = this.level().getNearestPlayer(this, -1.0D);
+ Player entityhuman = this.level().findNearbyPlayer(this, -1.0D, EntitySelector.PLAYER_AFFECTS_SPAWNING); // Paper - Affects Spawning API
@@ -47,10 +47,10 @@ index c7ab59aa0e2fd0f3e7252647ddb25b82ac604830..8f20239f3ef7ebe41fac8ee6e024c36d
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
-index 96181e8925aef7f3d0a2010305caf1f6d9bcfcc9..6f452605e9dc9ebd9980eae9fdeea34417a37a88 100644
+index 38fb2a14b7c7c535f5a0b13d698a2521ca9d0c1a..0e2725d92002c181f542e2335cdd6e6de69155e1 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
-@@ -127,7 +127,7 @@ public class Silverfish extends Monster {
+@@ -128,7 +128,7 @@ public class Silverfish extends Monster {
if (checkAnyLightMonsterSpawnRules(type, world, spawnReason, pos, random)) {
Player entityhuman = world.getNearestPlayer((double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, 5.0D, true);
@@ -73,10 +73,10 @@ index a779d32f87b59f347408974e402fad22fdc47f09..15ccde8ee8bac1f70c6047464595aff6
entityzombie.finalizeSpawn(worldserver, this.level().getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.REINFORCEMENT, (SpawnGroupData) null, (CompoundTag) null);
worldserver.addFreshEntityWithPassengers(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 79f823c2ce2c5d03c34e580555a7e44a6747bf02..10c2c9d7c7feb878319eb19cd1fb6401da3b9189 100644
+index 1ac22d4cbab0f385b1c1e0b4ced59ca7c3ca4af4..0cd534ddc28758f7fa6203c66505f167ecbdd3de 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -180,6 +180,7 @@ public abstract class Player extends LivingEntity {
+@@ -181,6 +181,7 @@ public abstract class Player extends LivingEntity {
@Nullable
public FishingHook fishing;
protected float hurtDir;
diff --git a/patches/server/0032-Entity-Origin-API.patch b/patches/server/0032-Entity-Origin-API.patch
index b5fb102df6..c0c5164e71 100644
--- a/patches/server/0032-Entity-Origin-API.patch
+++ b/patches/server/0032-Entity-Origin-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 73608abb5a39749c326ce6fe1bf014422941b2d1..1315822ce37e5011880b24afb4fbe18cd1dfe80f 100644
+index 13725b794e923a4de0d06edcba1adf1b04611c95..4c0e12d9f36c78eeae4dcb2f58d41503d3a046e4 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2149,6 +2149,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -25,10 +25,10 @@ index 73608abb5a39749c326ce6fe1bf014422941b2d1..1315822ce37e5011880b24afb4fbe18c
public void onTrackingEnd(Entity entity) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 0ecdc0d671f744d85072ca0d157ef37bb28bab9c..1212943cf64a716ceae187c76ff9be6241595ba2 100644
+index cdb4acbaf019608c57d7a40c6928ddc9c00fd1d5..c21c4d6df21bc9741f087ac4a328aad04b1cda38 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -319,7 +319,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -320,7 +320,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public long activatedTick = Integer.MIN_VALUE;
public void inactiveTick() { }
// Spigot end
@@ -56,7 +56,7 @@ index 0ecdc0d671f744d85072ca0d157ef37bb28bab9c..1212943cf64a716ceae187c76ff9be62
public float getBukkitYaw() {
return this.yRot;
}
-@@ -2042,6 +2062,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2055,6 +2075,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.bukkitEntity.storeBukkitValues(nbttagcompound);
}
// CraftBukkit end
@@ -72,7 +72,7 @@ index 0ecdc0d671f744d85072ca0d157ef37bb28bab9c..1212943cf64a716ceae187c76ff9be62
return nbttagcompound;
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
-@@ -2169,6 +2198,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2182,6 +2211,20 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
// CraftBukkit end
@@ -94,10 +94,10 @@ index 0ecdc0d671f744d85072ca0d157ef37bb28bab9c..1212943cf64a716ceae187c76ff9be62
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index e269812e6193492afc3f25612edafa1a58325fa3..49294a8d580d891f21d8d4cbae14ae477c01ff8d 100644
+index e78a378f0de48cde3702774970e6cda241b8ddda..6871fe86c9cda00d0187f3df827772200eca1bcc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -967,5 +967,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -968,5 +968,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return ret;
}
diff --git a/patches/server/0033-Prevent-block-entity-and-entity-crashes.patch b/patches/server/0033-Prevent-block-entity-and-entity-crashes.patch
index 857d78d6c7..c08c35d2fe 100644
--- a/patches/server/0033-Prevent-block-entity-and-entity-crashes.patch
+++ b/patches/server/0033-Prevent-block-entity-and-entity-crashes.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Prevent block entity and entity crashes
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 9cfc60863caeaa1fd0df153889cadd88fef9e111..dfe8eea789a6dd5476da0c194236dba3868a2cb7 100644
+index 9cfc60863caeaa1fd0df153889cadd88fef9e111..3442bfe428f6d0655082468f281cbda97f88f6ea 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -734,11 +734,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -20,7 +20,7 @@ index 9cfc60863caeaa1fd0df153889cadd88fef9e111..dfe8eea789a6dd5476da0c194236dba3
+ // Paper start - Prevent block entity and entity crashes
+ final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
+ MinecraftServer.LOGGER.error(msg, throwable);
-+ entity.discard();
++ entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD);
+ // Paper end - Prevent block entity and entity crashes
}
}
diff --git a/patches/server/0034-Configurable-top-of-nether-void-damage.patch b/patches/server/0034-Configurable-top-of-nether-void-damage.patch
index e8fedeba3f..e1dc631598 100644
--- a/patches/server/0034-Configurable-top-of-nether-void-damage.patch
+++ b/patches/server/0034-Configurable-top-of-nether-void-damage.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Configurable top of nether void damage
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 1212943cf64a716ceae187c76ff9be6241595ba2..3577829c2386779913f4d2aebd1825051da2d364 100644
+index c21c4d6df21bc9741f087ac4a328aad04b1cda38..60d94e4d8f69fb7ab8a94a926d18d38fe1c1d6c7 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -670,7 +670,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -683,7 +683,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void checkBelowWorld() {
diff --git a/patches/server/0049-Add-PlayerInitialSpawnEvent.patch b/patches/server/0049-Add-PlayerInitialSpawnEvent.patch
index 52241d8e84..2ea1d3a2b7 100644
--- a/patches/server/0049-Add-PlayerInitialSpawnEvent.patch
+++ b/patches/server/0049-Add-PlayerInitialSpawnEvent.patch
@@ -12,10 +12,10 @@ improve setPosition to use raw
public net.minecraft.world.entity.Entity setRot(FF)V
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index f5a4191977e8675952fc689744c8a39e86f62a07..e870be760f00bac1d5eb32ed6d22c4dc8a8ebf78 100644
+index 72488b0d499e4e0d0ccba38622cc5a3f88a9e3fa..50ceb120d04c3149dd1cca7908a9ea862b25e5ab 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -227,7 +227,7 @@ public abstract class PlayerList {
+@@ -228,7 +228,7 @@ public abstract class PlayerList {
// Spigot start - spawn location event
Player spawnPlayer = player.getBukkitEntity();
@@ -24,7 +24,7 @@ index f5a4191977e8675952fc689744c8a39e86f62a07..e870be760f00bac1d5eb32ed6d22c4dc
this.cserver.getPluginManager().callEvent(ev);
Location loc = ev.getSpawnLocation();
-@@ -235,7 +235,10 @@ public abstract class PlayerList {
+@@ -236,7 +236,10 @@ public abstract class PlayerList {
player.spawnIn(worldserver1);
player.gameMode.setLevel((ServerLevel) player.level());
diff --git a/patches/server/0052-All-chunks-are-slime-spawn-chunks-toggle.patch b/patches/server/0052-All-chunks-are-slime-spawn-chunks-toggle.patch
index a1e73b56c2..a5e068d4c4 100644
--- a/patches/server/0052-All-chunks-are-slime-spawn-chunks-toggle.patch
+++ b/patches/server/0052-All-chunks-are-slime-spawn-chunks-toggle.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] All chunks are slime spawn chunks toggle
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
-index 8b2206c5c56341ecd96837bdb3e0c6ab7c874af5..897c815fb448d1e9ca75b7f8b93b4021dccf7596 100644
+index 1405c8ba8578d65cc00d807f31b37d6ddc2d1afb..d536df2c23f8cae6bf920a5304d91f10a9902251 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
-@@ -338,7 +338,7 @@ public class Slime extends Mob implements Enemy {
+@@ -346,7 +346,7 @@ public class Slime extends Mob implements Enemy {
}
ChunkPos chunkcoordintpair = new ChunkPos(pos);
diff --git a/patches/server/0056-Add-configurable-portal-search-radius.patch b/patches/server/0056-Add-configurable-portal-search-radius.patch
index dde721afeb..7bba890fae 100644
--- a/patches/server/0056-Add-configurable-portal-search-radius.patch
+++ b/patches/server/0056-Add-configurable-portal-search-radius.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable portal search radius
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 3577829c2386779913f4d2aebd1825051da2d364..4c7a2d64ab4a5269fdea0b30e6c91fa1cb9f509c 100644
+index 60d94e4d8f69fb7ab8a94a926d18d38fe1c1d6c7..71c4b75901ca55e3e08fd59f0e906a0cc5334b89 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -3179,7 +3179,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3192,7 +3192,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
double d0 = DimensionType.getTeleportationScale(this.level().dimensionType(), destination.dimensionType());
BlockPos blockposition = worldborder.clampToBounds(this.getX() * d0, this.getY(), this.getZ() * d0);
// CraftBukkit start
diff --git a/patches/server/0057-Add-velocity-warnings.patch b/patches/server/0057-Add-velocity-warnings.patch
index f81b57b344..8439175a6d 100644
--- a/patches/server/0057-Add-velocity-warnings.patch
+++ b/patches/server/0057-Add-velocity-warnings.patch
@@ -17,10 +17,10 @@ index 6135e8c0669886260afacdaa7405bf55597b17a6..2b2d0c8ed68eb86812877026a0bb5c4a
static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 49294a8d580d891f21d8d4cbae14ae477c01ff8d..74937603e7b8308fd314d650d9d966e8abd2c725 100644
+index 6871fe86c9cda00d0187f3df827772200eca1bcc..4a875d038f1ab7f2bdc5f290a6ad71e4b61c6822 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -128,10 +128,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -129,10 +129,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public void setVelocity(Vector velocity) {
Preconditions.checkArgument(velocity != null, "velocity");
velocity.checkFinite();
diff --git a/patches/server/0059-Add-exception-reporting-event.patch b/patches/server/0059-Add-exception-reporting-event.patch
index 03c495af9b..5ca616d57f 100644
--- a/patches/server/0059-Add-exception-reporting-event.patch
+++ b/patches/server/0059-Add-exception-reporting-event.patch
@@ -81,7 +81,7 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..2b5b2869589991be37a4f128faabbff5
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 6fbadd278138743f87fcf6b3c3d3c57af41d437c..eb2b4ba79488c3d43421c39852c36c4387372f38 100644
+index c74102a53daab92f0d7d4d7619af0e3264322847..3452010631eede3907b29b9f76ba12c9c6808b6f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -736,6 +736,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -89,7 +89,7 @@ index 6fbadd278138743f87fcf6b3c3d3c57af41d437c..eb2b4ba79488c3d43421c39852c36c43
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable);
+ getCraftServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerInternalException(msg, throwable))); // Paper - ServerExceptionEvent
- entity.discard();
+ entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD);
// Paper end - Prevent block entity and entity crashes
}
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
diff --git a/patches/server/0060-Disable-Scoreboards-for-non-players-by-default.patch b/patches/server/0060-Disable-Scoreboards-for-non-players-by-default.patch
index b562b1b373..b0ec269133 100644
--- a/patches/server/0060-Disable-Scoreboards-for-non-players-by-default.patch
+++ b/patches/server/0060-Disable-Scoreboards-for-non-players-by-default.patch
@@ -11,10 +11,10 @@ So avoid looking up scoreboards and short circuit to the "not on a team"
logic which is most likely to be true.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 4c7a2d64ab4a5269fdea0b30e6c91fa1cb9f509c..e7157ff6cd6f2c52593bba63129fdaa60fcbf886 100644
+index 71c4b75901ca55e3e08fd59f0e906a0cc5334b89..4dc659760272a13fc8c0f05c543bed634784af6c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2807,6 +2807,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2820,6 +2820,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@Nullable
public PlayerTeam getTeam() {
@@ -23,10 +23,10 @@ index 4c7a2d64ab4a5269fdea0b30e6c91fa1cb9f509c..e7157ff6cd6f2c52593bba63129fdaa6
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index e111bdb614f173322ed0cc0386db6870a984fff7..0a573b188111e84290317f2ce5620b6ea6c8b6de 100644
+index 5ae9f9a4cb903909cb26a612a847d12515c52d91..7f85da14097ad559e5a8f82474f7a71a078b3e77 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -833,6 +833,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -841,6 +841,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (nbt.contains("Team", 8)) {
String s = nbt.getString("Team");
PlayerTeam scoreboardteam = this.level().getScoreboard().getPlayerTeam(s);
diff --git a/patches/server/0068-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/patches/server/0068-Configurable-Non-Player-Arrow-Despawn-Rate.patch
index a2f39fff2f..8e51094c58 100644
--- a/patches/server/0068-Configurable-Non-Player-Arrow-Despawn-Rate.patch
+++ b/patches/server/0068-Configurable-Non-Player-Arrow-Despawn-Rate.patch
@@ -6,15 +6,15 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate
Can set a much shorter despawn rate for arrows that players can not pick up.
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-index 95d49d1f47a9c04535e94350bdcb4da88a1e5d27..0f700442a7559fac5d27d1fb6b3716f3853a9897 100644
+index fb68ed6db051577488b209d51f65db7267324751..c210ae3795b1bbaefbe84a6f62b9d3dd75d642a4 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-@@ -319,7 +319,7 @@ public abstract class AbstractArrow extends Projectile {
+@@ -320,7 +320,7 @@ public abstract class AbstractArrow extends Projectile {
protected void tickDespawn() {
++this.life;
- if (this.life >= ((this instanceof ThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)) { // Spigot
+ if (this.life >= (pickup == Pickup.CREATIVE_ONLY ? this.level().paperConfig().entities.spawning.creativeArrowDespawnRate.value() : (pickup == Pickup.DISALLOWED ? this.level().paperConfig().entities.spawning.nonPlayerArrowDespawnRate.value() : ((this instanceof ThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)))) { // Spigot // Paper - Configurable non-player arrow despawn rate; TODO: Extract this to init?
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
}
diff --git a/patches/server/0070-Custom-replacement-for-eaten-items.patch b/patches/server/0070-Custom-replacement-for-eaten-items.patch
index c44df3eced..dc47f3b1f3 100644
--- a/patches/server/0070-Custom-replacement-for-eaten-items.patch
+++ b/patches/server/0070-Custom-replacement-for-eaten-items.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 0a573b188111e84290317f2ce5620b6ea6c8b6de..13da8e684172f9f95fbcb63a322b559b733f2469 100644
+index 7f85da14097ad559e5a8f82474f7a71a078b3e77..2356ceb62216086e7ac19e994803d5f6a0f89f83 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3711,10 +3711,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3719,10 +3719,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@@ -21,7 +21,7 @@ index 0a573b188111e84290317f2ce5620b6ea6c8b6de..13da8e684172f9f95fbcb63a322b559b
this.level().getCraftServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
-@@ -3728,6 +3729,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3736,6 +3737,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
} else {
itemstack = this.useItem.finishUsingItem(this.level(), this);
}
@@ -34,7 +34,7 @@ index 0a573b188111e84290317f2ce5620b6ea6c8b6de..13da8e684172f9f95fbcb63a322b559b
// CraftBukkit end
if (itemstack != this.useItem) {
-@@ -3735,6 +3742,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3743,6 +3750,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.stopUsingItem();
diff --git a/patches/server/0071-handle-NaN-health-absorb-values-and-repair-bad-data.patch b/patches/server/0071-handle-NaN-health-absorb-values-and-repair-bad-data.patch
index 47da543ce4..cc09649ab9 100644
--- a/patches/server/0071-handle-NaN-health-absorb-values-and-repair-bad-data.patch
+++ b/patches/server/0071-handle-NaN-health-absorb-values-and-repair-bad-data.patch
@@ -5,10 +5,10 @@ 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 13da8e684172f9f95fbcb63a322b559b733f2469..406559f3a493e1be0d2bee8a6f3cc79668e2bb38 100644
+index 2356ceb62216086e7ac19e994803d5f6a0f89f83..ba79c3153a2679d6a0d9ed3d1a25a999f7e78950 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -794,7 +794,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -802,7 +802,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public void readAdditionalSaveData(CompoundTag nbt) {
@@ -23,7 +23,7 @@ index 13da8e684172f9f95fbcb63a322b559b733f2469..406559f3a493e1be0d2bee8a6f3cc796
if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) {
this.getAttributes().load(nbt.getList("Attributes", 10));
}
-@@ -1344,6 +1350,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1352,6 +1358,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void setHealth(float health) {
@@ -34,7 +34,7 @@ index 13da8e684172f9f95fbcb63a322b559b733f2469..406559f3a493e1be0d2bee8a6f3cc796
// CraftBukkit start - Handle scaled health
if (this instanceof ServerPlayer) {
org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
-@@ -3544,7 +3554,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3552,7 +3562,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public final void setAbsorptionAmount(float absorptionAmount) {
diff --git a/patches/server/0072-Use-a-Shared-Random-for-Entities.patch b/patches/server/0072-Use-a-Shared-Random-for-Entities.patch
index 38fbe5985f..072a1ee29a 100644
--- a/patches/server/0072-Use-a-Shared-Random-for-Entities.patch
+++ b/patches/server/0072-Use-a-Shared-Random-for-Entities.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Use a Shared Random for Entities
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index e7157ff6cd6f2c52593bba63129fdaa60fcbf886..dba9588d9c8b1291ec8fe401e4990f4750b790db 100644
+index 4dc659760272a13fc8c0f05c543bed634784af6c..93dc90cc4e90d9db4712efff80f811d7c9d55caa 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -165,6 +165,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -166,6 +166,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
}
@@ -89,7 +89,7 @@ index e7157ff6cd6f2c52593bba63129fdaa60fcbf886..dba9588d9c8b1291ec8fe401e4990f47
private CraftEntity bukkitEntity;
public CraftEntity getBukkitEntity() {
-@@ -361,7 +434,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -362,7 +435,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.bb = Entity.INITIAL_AABB;
this.stuckSpeedMultiplier = Vec3.ZERO;
this.nextStep = 1.0F;
diff --git a/patches/server/0080-Add-PlayerUseUnknownEntityEvent.patch b/patches/server/0080-Add-PlayerUseUnknownEntityEvent.patch
index 6da346104e..ec19e93768 100644
--- a/patches/server/0080-Add-PlayerUseUnknownEntityEvent.patch
+++ b/patches/server/0080-Add-PlayerUseUnknownEntityEvent.patch
@@ -59,14 +59,13 @@ index 37cba1e693490e42908f45dc68e60ac3afebbb49..801e1727bd291f647c91e2c325810ead
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index da100f451238a093bcaad83343a79254d4aa31ce..b48c07a49f39e303bc5d1faed0c444b6f0118054 100644
+index 6571adf5285ab3f84513c2f5b32ff0523c2cccd6..c8f20543cb7f69af010e3fd53f31b7253426f2d0 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1833,4 +1833,14 @@ public class CraftEventFactory {
- Bukkit.getPluginManager().callEvent(event);
- return event;
+@@ -1850,4 +1850,13 @@ public class CraftEventFactory {
+
+ Bukkit.getPluginManager().callEvent(new EntityRemoveEvent(entity.getBukkitEntity(), cause));
}
-+
+ // Paper start - PlayerUseUnknownEntityEvent
+ public static void callPlayerUseUnknownEntityEvent(net.minecraft.world.entity.player.Player player, net.minecraft.network.protocol.game.ServerboundInteractPacket packet, InteractionHand hand, @Nullable net.minecraft.world.phys.Vec3 vector) {
+ new com.destroystokyo.paper.event.player.PlayerUseUnknownEntityEvent(
diff --git a/patches/server/0085-Configurable-Player-Collision.patch b/patches/server/0085-Configurable-Player-Collision.patch
index 61efd80be7..2404b35354 100644
--- a/patches/server/0085-Configurable-Player-Collision.patch
+++ b/patches/server/0085-Configurable-Player-Collision.patch
@@ -43,10 +43,10 @@ index a4df17bf15ac8e427039428f947df4f08c746de6..866ff31a6057eda7612cfa48c0028fb9
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
this.connection.acceptConnections();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index e870be760f00bac1d5eb32ed6d22c4dc8a8ebf78..a8a0b00a6bcc52a94b99d520915c21cc3155bb06 100644
+index 50ceb120d04c3149dd1cca7908a9ea862b25e5ab..e1d9f11a9d5333811fc8cb5dd95c0ca79fd3543c 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -156,6 +156,7 @@ public abstract class PlayerList {
+@@ -157,6 +157,7 @@ public abstract class PlayerList {
// CraftBukkit start
private CraftServer cserver;
private final Map<String,ServerPlayer> playersByName = new java.util.HashMap<>();
@@ -54,7 +54,7 @@ index e870be760f00bac1d5eb32ed6d22c4dc8a8ebf78..a8a0b00a6bcc52a94b99d520915c21cc
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
-@@ -398,6 +399,13 @@ public abstract class PlayerList {
+@@ -399,6 +400,13 @@ public abstract class PlayerList {
player.initInventoryMenu();
// CraftBukkit - Moved from above, added world
@@ -68,7 +68,7 @@ index e870be760f00bac1d5eb32ed6d22c4dc8a8ebf78..a8a0b00a6bcc52a94b99d520915c21cc
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
}
-@@ -521,6 +529,16 @@ public abstract class PlayerList {
+@@ -522,6 +530,16 @@ public abstract class PlayerList {
entityplayer.doTick(); // SPIGOT-924
// CraftBukkit end
@@ -85,7 +85,7 @@ index e870be760f00bac1d5eb32ed6d22c4dc8a8ebf78..a8a0b00a6bcc52a94b99d520915c21cc
this.save(entityplayer);
if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getRootVehicle();
-@@ -1161,6 +1179,13 @@ public abstract class PlayerList {
+@@ -1162,6 +1180,13 @@ public abstract class PlayerList {
}
// CraftBukkit end
diff --git a/patches/server/0088-EntityRegainHealthEvent-isFastRegen-API.patch b/patches/server/0088-EntityRegainHealthEvent-isFastRegen-API.patch
index 5b69457aa9..6027fb24b2 100644
--- a/patches/server/0088-EntityRegainHealthEvent-isFastRegen-API.patch
+++ b/patches/server/0088-EntityRegainHealthEvent-isFastRegen-API.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
Don't even get me started
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 406559f3a493e1be0d2bee8a6f3cc79668e2bb38..9b55a2b2863c546e88f1bfa9014eb84fd317f3c8 100644
+index ba79c3153a2679d6a0d9ed3d1a25a999f7e78950..5ba65d647903077b39d9475ef28bfa0c400edd7a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1323,10 +1323,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1331,10 +1331,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
diff --git a/patches/server/0092-LootTable-API-and-replenishable-lootables.patch b/patches/server/0092-LootTable-API-and-replenishable-lootables.patch
index 2c728e93f8..d3cd902aae 100644
--- a/patches/server/0092-LootTable-API-and-replenishable-lootables.patch
+++ b/patches/server/0092-LootTable-API-and-replenishable-lootables.patch
@@ -504,10 +504,10 @@ index 0000000000000000000000000000000000000000..9cfa5d36a6991067a3866e0d437749fa
+ }
+}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index dba9588d9c8b1291ec8fe401e4990f4750b790db..158d830e7615ed396f7edd6b82daa4e4f876c894 100644
+index 93dc90cc4e90d9db4712efff80f811d7c9d55caa..3112eace3d9d3d7b21dfc267993cb9d84819dc11 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -238,6 +238,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -239,6 +239,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
// Paper end - Share random for entities to make them more random
@@ -516,10 +516,10 @@ index dba9588d9c8b1291ec8fe401e4990f4750b790db..158d830e7615ed396f7edd6b82daa4e4
public CraftEntity getBukkitEntity() {
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
-index 364cfa220b5c7c5351f1eb909066bef933da2c08..6d23c39e4eadf23616080d6d08672e13b5d3c37d 100644
+index c163a1219e614ab12b17ae9ba9c7cc4721cecc84..756d0434472921992c9d84597d7c9c824e93614c 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
-@@ -32,6 +32,20 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
+@@ -33,6 +33,20 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
public ResourceLocation lootTable;
public long lootTableSeed;
@@ -540,7 +540,7 @@ index 364cfa220b5c7c5351f1eb909066bef933da2c08..6d23c39e4eadf23616080d6d08672e13
// CraftBukkit start
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
private int maxStack = MAX_STACK;
-@@ -134,12 +148,14 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
+@@ -142,12 +156,14 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
@Override
protected void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
@@ -556,10 +556,10 @@ index 364cfa220b5c7c5351f1eb909066bef933da2c08..6d23c39e4eadf23616080d6d08672e13
}
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
-index 7bfdffc9b3c637bd6ac8ac3eb10961abdc5b1a7a..bc3fe45d12ffc2069a03d1587b7623d31130565a 100644
+index 0e68f692bb9b397cffd7352e7340465b5e3719f4..58af87b8faf4f8d6bdb111c49a429466acface68 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
-@@ -66,12 +66,14 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
+@@ -68,12 +68,14 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
@Override
protected void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
@@ -574,7 +574,7 @@ index 7bfdffc9b3c637bd6ac8ac3eb10961abdc5b1a7a..bc3fe45d12ffc2069a03d1587b7623d3
this.readChestVehicleSaveData(nbt);
}
-@@ -246,6 +248,20 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
+@@ -255,6 +257,20 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
this.level().gameEvent(GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of((Entity) player));
}
diff --git a/patches/server/0095-Optional-TNT-doesn-t-move-in-water.patch b/patches/server/0095-Optional-TNT-doesn-t-move-in-water.patch
index 2eb88ee368..297948a26c 100644
--- a/patches/server/0095-Optional-TNT-doesn-t-move-in-water.patch
+++ b/patches/server/0095-Optional-TNT-doesn-t-move-in-water.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Optional TNT doesn't move in water
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
-index 19e2f2005bd1fb4d199debd34e92a0794a3d3fe4..3408337b11f04337bb2f62de343e430d94d3a093 100644
+index f068b57167b183e68db897c70036cdc366a83c98..16f9d38687c0fdda18468b5bfb61b09b98254968 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
-@@ -106,6 +106,27 @@ public class PrimedTnt extends Entity implements TraceableEntity {
+@@ -107,6 +107,27 @@ public class PrimedTnt extends Entity implements TraceableEntity {
}
}
@@ -36,7 +36,7 @@ index 19e2f2005bd1fb4d199debd34e92a0794a3d3fe4..3408337b11f04337bb2f62de343e430d
}
private void explode() {
-@@ -171,4 +192,11 @@ public class PrimedTnt extends Entity implements TraceableEntity {
+@@ -172,4 +193,11 @@ public class PrimedTnt extends Entity implements TraceableEntity {
public BlockState getBlockState() {
return (BlockState) this.entityData.get(PrimedTnt.DATA_BLOCK_STATE_ID);
}
diff --git a/patches/server/0098-Fix-global-sound-handling.patch b/patches/server/0098-Fix-global-sound-handling.patch
index e7c99fa5b6..fa6f2eff95 100644
--- a/patches/server/0098-Fix-global-sound-handling.patch
+++ b/patches/server/0098-Fix-global-sound-handling.patch
@@ -11,7 +11,7 @@ Co-authored-by: lexikiq <[email protected]>
Co-authored-by: Aikar <[email protected]>
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index ddab865f4237b91020f3c5f9726d93f8dbf0eda6..5f0885c13116ad070dc076cca5a527b2a616c541 100644
+index c9c711398cf90fc1990a0145196fa05894f9ffff..76246fdacf70309918ce413f494bdb4d8683241d 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1318,7 +1318,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -24,10 +24,10 @@ index ddab865f4237b91020f3c5f9726d93f8dbf0eda6..5f0885c13116ad070dc076cca5a527b2
public int getLogicalHeight() {
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 aea9366215973555de88e67310b7fbe033f45cd5..2471800014d1661c2f422e5a24f0f3b00fa838f2 100644
+index 99f390e64477e92939bf0552878ed11d0db0137f..0df9780c1689532d0d9f236077400b298d8e9f68 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
-@@ -680,11 +680,12 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -681,11 +681,12 @@ public class EnderDragon extends Mob implements Enemy {
// CraftBukkit start - Use relative location for far away sounds
// this.level().globalLevelEvent(1028, this.blockPosition(), 0);
int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16;
@@ -43,10 +43,10 @@ index aea9366215973555de88e67310b7fbe033f45cd5..2471800014d1661c2f422e5a24f0f3b0
double deltaLength = Math.sqrt(distanceSquared);
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-index 8d3f3987f2a6816752bdb2e477338d6dbdd6b7b7..14b09adeb9222600c24f3fb846ea8aee467952e6 100644
+index c098ce5ab4b01d352e5e351f81773134128ce90b..e3da459190625a037e5542aa6ba3365f05f9f532 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-@@ -271,11 +271,12 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
+@@ -272,11 +272,12 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
// CraftBukkit start - Use relative location for far away sounds
// this.level().globalLevelEvent(1023, new BlockPosition(this), 0);
int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16;
@@ -81,7 +81,7 @@ index 5bc68514a1e8a212e2681f06b918548c0ec565b6..1977e702f6af39ebf100c1f2f2edc2d1
double deltaLength = Math.sqrt(distanceSquared);
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index f11e00b3a7164e8af6e33a9a09328539df5405fc..610ce2574a61fcee00f5224b554b285079a75698 100644
+index ebdb6e838ecd378edc81b92cc3a8a1955d2498c1..29b17f408e1ad304996ce116737ee4fbc248da4c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1268,4 +1268,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
diff --git a/patches/server/0105-Add-EntityZapEvent.patch b/patches/server/0105-Add-EntityZapEvent.patch
index 4b7810f5ba..1fae09a95d 100644
--- a/patches/server/0105-Add-EntityZapEvent.patch
+++ b/patches/server/0105-Add-EntityZapEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityZapEvent
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-index 22f7318711041bfc2847d519933c46b9fd523d01..4034b8e7503f611dc9be121d8da2020ae7155b8c 100644
+index e1311841cdf79fa2769cfa6817985007ace2e4d8..e7db715d45d27cbc9b3ed7cad1d907273b225c7f 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-@@ -851,10 +851,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
+@@ -852,10 +852,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@Override
public void thunderHit(ServerLevel world, LightningBolt lightning) {
if (world.getDifficulty() != Difficulty.PEACEFUL) {
@@ -28,10 +28,10 @@ index 22f7318711041bfc2847d519933c46b9fd523d01..4034b8e7503f611dc9be121d8da2020a
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) 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 b48c07a49f39e303bc5d1faed0c444b6f0118054..96b72d0194ccb1d8198f9a94306ddb1699aa6c06 100644
+index c8f20543cb7f69af010e3fd53f31b7253426f2d0..c47eac1e442162192a35e841a06c4d028d71cd15 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1196,6 +1196,14 @@ public class CraftEventFactory {
+@@ -1197,6 +1197,14 @@ public class CraftEventFactory {
return !event.isCancelled();
}
diff --git a/patches/server/0106-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch b/patches/server/0106-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch
index 6d8cb39694..9d998d7123 100644
--- a/patches/server/0106-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch
+++ b/patches/server/0106-Filter-bad-block-entity-nbt-data-from-falling-blocks.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Filter bad block entity nbt data from falling blocks
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-index ee5ef4fe16ce6397bba30900b9c6690e3c4f51e6..e2f90b822f25bf100eaba0cf4518849f788ee2fa 100644
+index 9136b0c907d331e100d47e1a800ae2e2c2ec6dad..c0477f913867c67809978a4f240303151d81e6ea 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-@@ -332,7 +332,7 @@ public class FallingBlockEntity extends Entity {
+@@ -333,7 +333,7 @@ public class FallingBlockEntity extends Entity {
this.dropItem = nbt.getBoolean("DropItem");
}
diff --git a/patches/server/0109-Add-source-to-PlayerExpChangeEvent.patch b/patches/server/0109-Add-source-to-PlayerExpChangeEvent.patch
index 9d09ace4ca..ef872164d1 100644
--- a/patches/server/0109-Add-source-to-PlayerExpChangeEvent.patch
+++ b/patches/server/0109-Add-source-to-PlayerExpChangeEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-index 79943167c7e16111a81ff608fd9ed6c06bcb9468..59bad6c92cc421dd05c7315e2ab694a669433ab4 100644
+index dfa16aa79e94d85a49c9c28229b29a972ec6e216..7ce46bd254e0f14b1bbafe37e0eb97a468a07083 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-@@ -254,7 +254,7 @@ public class ExperienceOrb extends Entity {
+@@ -255,7 +255,7 @@ public class ExperienceOrb extends Entity {
int i = this.repairPlayerItems(player, this.value);
if (i > 0) {
@@ -18,10 +18,10 @@ index 79943167c7e16111a81ff608fd9ed6c06bcb9468..59bad6c92cc421dd05c7315e2ab694a6
--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 96b72d0194ccb1d8198f9a94306ddb1699aa6c06..85340e48507cdb44d494e5cc6054560c61dddff9 100644
+index c47eac1e442162192a35e841a06c4d028d71cd15..b2b07587c50e6c6f55a8cd36405833f4a4f9674c 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1149,6 +1149,17 @@ public class CraftEventFactory {
+@@ -1150,6 +1150,17 @@ public class CraftEventFactory {
return event;
}
diff --git a/patches/server/0110-Add-ProjectileCollideEvent.patch b/patches/server/0110-Add-ProjectileCollideEvent.patch
index 1a501079ca..2ba2ad895f 100644
--- a/patches/server/0110-Add-ProjectileCollideEvent.patch
+++ b/patches/server/0110-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 85340e48507cdb44d494e5cc6054560c61dddff9..d461f56cbc64efba422d748c42ec106f84423833 100644
+index b2b07587c50e6c6f55a8cd36405833f4a4f9674c..c1f3086d37e2959bbcc23bc1b779215bc35c99c4 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1293,6 +1293,17 @@ public class CraftEventFactory {
+@@ -1294,6 +1294,17 @@ public class CraftEventFactory {
return CraftItemStack.asNMSCopy(bitem);
}
@@ -27,7 +27,7 @@ index 85340e48507cdb44d494e5cc6054560c61dddff9..d461f56cbc64efba422d748c42ec106f
public static ProjectileLaunchEvent callProjectileLaunchEvent(Entity entity) {
Projectile bukkitEntity = (Projectile) entity.getBukkitEntity();
ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity);
-@@ -1317,8 +1328,15 @@ public class CraftEventFactory {
+@@ -1318,8 +1329,15 @@ public class CraftEventFactory {
if (position.getType() == HitResult.Type.ENTITY) {
hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
}
diff --git a/patches/server/0115-Add-API-methods-to-control-if-armor-stands-can-move.patch b/patches/server/0115-Add-API-methods-to-control-if-armor-stands-can-move.patch
index d2511f7abe..d1601d12d7 100644
--- a/patches/server/0115-Add-API-methods-to-control-if-armor-stands-can-move.patch
+++ b/patches/server/0115-Add-API-methods-to-control-if-armor-stands-can-move.patch
@@ -5,10 +5,10 @@ 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 412271af1581a6805f867c67abcd3d7803156bef..d04d0b9cbf91beb57da7e37e72f8e7c98cf6cf4c 100644
+index 7e105760198c3b6ce782c14d71cd915e3b071684..1353bb583ec576345b7bfea5134c4b0d59811a07 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-@@ -92,6 +92,7 @@ public class ArmorStand extends LivingEntity {
+@@ -93,6 +93,7 @@ public class ArmorStand extends LivingEntity {
public Rotations rightArmPose;
public Rotations leftLegPose;
public Rotations rightLegPose;
@@ -16,7 +16,7 @@ index 412271af1581a6805f867c67abcd3d7803156bef..d04d0b9cbf91beb57da7e37e72f8e7c9
public ArmorStand(EntityType<? extends ArmorStand> type, Level world) {
super(type, world);
-@@ -937,4 +938,13 @@ public class ArmorStand extends LivingEntity {
+@@ -938,4 +939,13 @@ public class ArmorStand extends LivingEntity {
public boolean canBeSeenByAnyone() {
return !this.isInvisible() && !this.isMarker();
}
diff --git a/patches/server/0118-Firework-API-s.patch b/patches/server/0118-Firework-API-s.patch
index ae36b2bdc6..a137c1c66f 100644
--- a/patches/server/0118-Firework-API-s.patch
+++ b/patches/server/0118-Firework-API-s.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Firework API's
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
-index 764c15e6e35c358f0d04d15c20cf8f382f77c419..7005b3a26e9b5d79064981a4a41bee21b65a9fc3 100644
+index 9d637e005205a32fa5406ba47de7cd2b22ead9cf..5b3b59057b962438c6f4fc8a1507342865b3bc11 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
-@@ -37,6 +37,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
+@@ -40,6 +40,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
public int lifetime;
@Nullable
public LivingEntity attachedToEntity;
@@ -18,7 +18,7 @@ index 764c15e6e35c358f0d04d15c20cf8f382f77c419..7005b3a26e9b5d79064981a4a41bee21
public FireworkRocketEntity(EntityType<? extends FireworkRocketEntity> type, Level world) {
super(type, world);
-@@ -312,6 +313,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
+@@ -315,6 +316,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
}
nbt.putBoolean("ShotAtAngle", (Boolean) this.entityData.get(FireworkRocketEntity.DATA_SHOT_AT_ANGLE));
@@ -30,7 +30,7 @@ index 764c15e6e35c358f0d04d15c20cf8f382f77c419..7005b3a26e9b5d79064981a4a41bee21
}
@Override
-@@ -328,7 +334,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
+@@ -331,7 +337,11 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
if (nbt.contains("ShotAtAngle")) {
this.entityData.set(FireworkRocketEntity.DATA_SHOT_AT_ANGLE, nbt.getBoolean("ShotAtAngle"));
}
diff --git a/patches/server/0119-PlayerTeleportEndGatewayEvent.patch b/patches/server/0119-PlayerTeleportEndGatewayEvent.patch
index 1f2d258cb4..250433d156 100644
--- a/patches/server/0119-PlayerTeleportEndGatewayEvent.patch
+++ b/patches/server/0119-PlayerTeleportEndGatewayEvent.patch
@@ -7,10 +7,10 @@ Allows you to access the Gateway being used in a teleport event
Fix the offset used for player teleportation
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
-index 8e63135d42d1a06cc7741e33eb3e057321ea53bc..08d34dff616b6c117a969809cdeb3853e28dc473 100644
+index 9e0da9a5ca64c67da5c07989f9c1872fbc2a5d26..1606c8c0dd5e27b42d0fd9da0db8a02e50efc5f9 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
-@@ -207,11 +207,11 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
+@@ -208,11 +208,11 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
// CraftBukkit start - Fire PlayerTeleportEvent/EntityTeleportEvent
if (entity1 instanceof ServerPlayer) {
org.bukkit.craftbukkit.entity.CraftPlayer player = (CraftPlayer) entity1.getBukkitEntity();
diff --git a/patches/server/0121-Enforce-Sync-Player-Saves.patch b/patches/server/0121-Enforce-Sync-Player-Saves.patch
index 3a87480826..398e56eb2c 100644
--- a/patches/server/0121-Enforce-Sync-Player-Saves.patch
+++ b/patches/server/0121-Enforce-Sync-Player-Saves.patch
@@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index a8a0b00a6bcc52a94b99d520915c21cc3155bb06..18d1056b9a3d936a851f7e7a49981dd4bb203f1d 100644
+index e1d9f11a9d5333811fc8cb5dd95c0ca79fd3543c..e45568112220b246adf3efdc43d26258336efbf9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1061,11 +1061,13 @@ public abstract class PlayerList {
+@@ -1062,11 +1062,13 @@ public abstract class PlayerList {
}
public void saveAll() {
diff --git a/patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch b/patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
index 60cce7817d..0294d6985b 100644
--- a/patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
+++ b/patches/server/0122-ExperienceOrbs-API-for-Reason-Source-Triggering-play.patch
@@ -21,10 +21,10 @@ index 4f3c82f1b5ae24d5f70318fa96fae2a58ce7fd9f..45236a077d798d6a257a2e982b589011
return true;
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-index 59bad6c92cc421dd05c7315e2ab694a669433ab4..ae70ad9d6c02fcb5631a3c45db283b29844bbb0d 100644
+index 7ce46bd254e0f14b1bbafe37e0eb97a468a07083..00b46fd0b4a718756f8b21f203fd5679bc2a79d8 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-@@ -39,9 +39,63 @@ public class ExperienceOrb extends Entity {
+@@ -40,9 +40,63 @@ public class ExperienceOrb extends Entity {
public int value;
private int count;
private Player followingPlayer;
@@ -88,7 +88,7 @@ index 59bad6c92cc421dd05c7315e2ab694a669433ab4..ae70ad9d6c02fcb5631a3c45db283b29
this.setPos(x, y, z);
this.setYRot((float) (this.random.nextDouble() * 360.0D));
this.setDeltaMovement((this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D, this.random.nextDouble() * 0.2D * 2.0D, (this.random.nextDouble() * 0.20000000298023224D - 0.10000000149011612D) * 2.0D);
-@@ -160,12 +214,20 @@ public class ExperienceOrb extends Entity {
+@@ -161,12 +215,20 @@ public class ExperienceOrb extends Entity {
}
public static void award(ServerLevel world, Vec3 pos, int amount) {
@@ -110,7 +110,7 @@ index 59bad6c92cc421dd05c7315e2ab694a669433ab4..ae70ad9d6c02fcb5631a3c45db283b29
}
}
-@@ -235,6 +297,7 @@ public class ExperienceOrb extends Entity {
+@@ -236,6 +298,7 @@ public class ExperienceOrb extends Entity {
nbt.putShort("Age", (short) this.age);
nbt.putShort("Value", (short) this.value);
nbt.putInt("Count", this.count);
@@ -118,7 +118,7 @@ index 59bad6c92cc421dd05c7315e2ab694a669433ab4..ae70ad9d6c02fcb5631a3c45db283b29
}
@Override
-@@ -243,6 +306,7 @@ public class ExperienceOrb extends Entity {
+@@ -244,6 +307,7 @@ public class ExperienceOrb extends Entity {
this.age = nbt.getShort("Age");
this.value = nbt.getShort("Value");
this.count = Math.max(nbt.getInt("Count"), 1);
@@ -127,10 +127,10 @@ index 59bad6c92cc421dd05c7315e2ab694a669433ab4..ae70ad9d6c02fcb5631a3c45db283b29
@Override
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 9b55a2b2863c546e88f1bfa9014eb84fd317f3c8..6ac549316d056a0de02e062fd4a28d7ac02a9d98 100644
+index 5ba65d647903077b39d9475ef28bfa0c400edd7a..2c3439d12e40003032904ebdb480fa95dd2a9682 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1787,7 +1787,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1795,7 +1795,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
protected void dropExperience() {
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
@@ -173,10 +173,10 @@ index f307f9077917f426a90523708c572b95cc7b6778..907ed82fea71254d6624eda878e2668c
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
-index 335249181f34bfe8b0e359c591e4eae0af63b0fe..8670d8b2a08e96df787a91f36c48df8b345080dc 100644
+index d2d89a47ceae2431969502cb81ae93391a2ee16c..6376908df89af1eff3a948ca1faef5d4925f0c3b 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
-@@ -909,7 +909,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
+@@ -913,7 +913,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
// CraftBukkit start - use event experience
if (experience > 0) {
@@ -199,10 +199,10 @@ index 5385f0a1d0c5522a94e2a5ded779d68826537883..11322066522a3268063bad7267ef4dd4
}
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 2471800014d1661c2f422e5a24f0f3b00fa838f2..f5ce6423b8146cc741023e15004fe9814a035da8 100644
+index 0df9780c1689532d0d9f236077400b298d8e9f68..9ab60fb1b7f9c8a342d9116e99f7f0a1e463a626 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
-@@ -673,7 +673,7 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -674,7 +674,7 @@ public class EnderDragon extends Mob implements Enemy {
if (this.level() instanceof ServerLevel) {
if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
@@ -211,7 +211,7 @@ index 2471800014d1661c2f422e5a24f0f3b00fa838f2..f5ce6423b8146cc741023e15004fe981
}
if (this.dragonDeathTime == 1 && !this.isSilent()) {
-@@ -702,7 +702,7 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -703,7 +703,7 @@ public class EnderDragon extends Mob implements Enemy {
this.move(MoverType.SELF, new Vec3(0.0D, 0.10000000149011612D, 0.0D));
if (this.dragonDeathTime == 200 && this.level() instanceof ServerLevel) {
if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
@@ -221,10 +221,10 @@ index 2471800014d1661c2f422e5a24f0f3b00fa838f2..f5ce6423b8146cc741023e15004fe981
if (this.dragonFight != null) {
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-index 4034b8e7503f611dc9be121d8da2020ae7155b8c..f0d5e45d0d6ac51106379d20690d34a032a24c39 100644
+index e7db715d45d27cbc9b3ed7cad1d907273b225c7f..0b34003058205f26a89d18dad06b2067dbe897d7 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-@@ -638,7 +638,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
+@@ -639,7 +639,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
}
if (offer.shouldRewardExp()) {
@@ -234,10 +234,10 @@ index 4034b8e7503f611dc9be121d8da2020ae7155b8c..f0d5e45d0d6ac51106379d20690d34a0
}
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
-index d4d1cad7963a5adcc8c32e1bc02104eb70514331..0321b4bb622930bfe57661b0e6b893d7635668fb 100644
+index 09448ca61b7d1faf3b2f83d7c9f8a14afee39b7b..6b8d6ae203b7f7f2b591c35586baa4e8951a3677 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
-@@ -207,7 +207,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
+@@ -208,7 +208,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
if (offer.shouldRewardExp()) {
int i = 3 + this.random.nextInt(4);
@@ -247,10 +247,10 @@ index d4d1cad7963a5adcc8c32e1bc02104eb70514331..0321b4bb622930bfe57661b0e6b893d7
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-index 8b27b5118cbeeb0b25fb6a23056e51899be32035..94bdd467108bc5fd0211f67a792787ef7c356619 100644
+index 9bf5b67922f3368e1ee4d76f6297ebe425f3ceab..d7548eb7cd6986dcea6fbf4efb76b647cc350642 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-@@ -522,7 +522,7 @@ public class FishingHook extends Projectile {
+@@ -523,7 +523,7 @@ public class FishingHook extends Projectile {
this.level().addFreshEntity(entityitem);
// CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
if (playerFishEvent.getExpToDrop() > 0) {
@@ -260,16 +260,16 @@ index 8b27b5118cbeeb0b25fb6a23056e51899be32035..94bdd467108bc5fd0211f67a792787ef
// CraftBukkit end
if (itemstack1.is(ItemTags.FISHES)) {
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
-index 5d0e2c53d41e897532a8ec3c0a7b33e9b60e9ab5..e53046c6d47b4fd3d82132bc980a31b9491df6a7 100644
+index fdab4a51ec7068047e899771aad1b9949a0113cb..7e46b1958f1139b3a97a5f11e06c6f85172d6192 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
-@@ -51,7 +51,7 @@ public class ThrownExperienceBottle extends ThrowableItemProjectile {
+@@ -54,7 +54,7 @@ public class ThrownExperienceBottle extends ThrowableItemProjectile {
}
// CraftBukkit end
- ExperienceOrb.award((ServerLevel) this.level(), this.position(), i);
+ ExperienceOrb.award((ServerLevel) this.level(), this.position(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.EXP_BOTTLE, this.getOwner(), this); // Paper
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
diff --git a/patches/server/0123-Cap-Entity-Collisions.patch b/patches/server/0123-Cap-Entity-Collisions.patch
index 3c1709eb9b..7faa5f0876 100644
--- a/patches/server/0123-Cap-Entity-Collisions.patch
+++ b/patches/server/0123-Cap-Entity-Collisions.patch
@@ -12,10 +12,10 @@ just as it does in Vanilla, but entity pushing logic will be capped.
You can set this to 0 to disable collisions.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 158d830e7615ed396f7edd6b82daa4e4f876c894..0a31747076225d1221dce554135cde704c76eec4 100644
+index 3112eace3d9d3d7b21dfc267993cb9d84819dc11..c261971ab482abfa5a1ca51abd189eff16421534 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -393,6 +393,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -394,6 +394,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public long activatedTick = Integer.MIN_VALUE;
public void inactiveTick() { }
// Spigot end
@@ -24,10 +24,10 @@ index 158d830e7615ed396f7edd6b82daa4e4f876c894..0a31747076225d1221dce554135cde70
@javax.annotation.Nullable
private org.bukkit.util.Vector origin;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 6ac549316d056a0de02e062fd4a28d7ac02a9d98..ec862d3a70b9d9f71873a71c1f1d143bc95799ae 100644
+index 2c3439d12e40003032904ebdb480fa95dd2a9682..ded2c573533699133309d9ed5250e6a0ce97cc54 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3361,10 +3361,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3369,10 +3369,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
Iterator iterator1 = list.iterator();
diff --git a/patches/server/0125-Properly-handle-async-calls-to-restart-the-server.patch b/patches/server/0125-Properly-handle-async-calls-to-restart-the-server.patch
index 8096104d81..0bacd60877 100644
--- a/patches/server/0125-Properly-handle-async-calls-to-restart-the-server.patch
+++ b/patches/server/0125-Properly-handle-async-calls-to-restart-the-server.patch
@@ -64,10 +64,10 @@ index fcaa31ccd6f6e6affaccf76403dbab26e6932571..1d8e17f4b862e71cc5ef8c5eabfb80dc
if (waitForShutdown) {
try {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 18d1056b9a3d936a851f7e7a49981dd4bb203f1d..40af2325afea3e4831a9d8795ce1932a6a5663bf 100644
+index e45568112220b246adf3efdc43d26258336efbf9..1c313dbfc501ce5782fb2d7500b9af35f0855c46 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1175,8 +1175,15 @@ public abstract class PlayerList {
+@@ -1176,8 +1176,15 @@ public abstract class PlayerList {
}
public void removeAll() {
diff --git a/patches/server/0126-Add-option-to-make-parrots-stay-on-shoulders-despite.patch b/patches/server/0126-Add-option-to-make-parrots-stay-on-shoulders-despite.patch
index 3a0dec28f7..458383d6ba 100644
--- a/patches/server/0126-Add-option-to-make-parrots-stay-on-shoulders-despite.patch
+++ b/patches/server/0126-Add-option-to-make-parrots-stay-on-shoulders-despite.patch
@@ -14,7 +14,7 @@ To be converted into a Paper-API event at some point in the future?
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 6fec49a0833300ff0e4ef0f22d21480dfac9a2c7..12cfc3ed36d6eebd477dfd9058b2852e0a0d98eb 100644
+index 69e525776d57b2fe80d8bb9e94e981e553f329a3..00870f788b40fc0943ef54da1e84c6e357640a32 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2177,6 +2177,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -32,10 +32,10 @@ index 6fec49a0833300ff0e4ef0f22d21480dfac9a2c7..12cfc3ed36d6eebd477dfd9058b2852e
case RELEASE_SHIFT_KEY:
this.player.setShiftKeyDown(false);
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 10c2c9d7c7feb878319eb19cd1fb6401da3b9189..6ff0c2107fa0623d30d9159e3c67388faf597440 100644
+index 0cd534ddc28758f7fa6203c66505f167ecbdd3de..7429df8c6f29f7216e33cde3226424936de97cf9 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -588,6 +588,7 @@ public abstract class Player extends LivingEntity {
+@@ -589,6 +589,7 @@ public abstract class Player extends LivingEntity {
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
if (!this.level().isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
diff --git a/patches/server/0128-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0128-Use-TerminalConsoleAppender-for-console-improvements.patch
index 6eb8e387d2..fd8780e2cb 100644
--- a/patches/server/0128-Use-TerminalConsoleAppender-for-console-improvements.patch
+++ b/patches/server/0128-Use-TerminalConsoleAppender-for-console-improvements.patch
@@ -25,7 +25,7 @@ Other changes:
Co-Authored-By: Emilia Kond <[email protected]>
diff --git a/build.gradle.kts b/build.gradle.kts
-index e865c5ce514770f4fde9146b6e7138e88932c33b..d8f909f4f108343e3973e965af617596c91e3d0e 100644
+index f838b058e6cad9061929509047bbe25c65baecf6..f4d33c9c4c04e1a09259dd9cc7cb909e30506580 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -6,9 +6,30 @@ plugins {
@@ -60,7 +60,7 @@ index e865c5ce514770f4fde9146b6e7138e88932c33b..d8f909f4f108343e3973e965af617596
implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion
implementation("org.ow2.asm:asm-commons:9.5")
implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
-@@ -79,7 +100,7 @@ relocation {
+@@ -80,7 +101,7 @@ relocation {
}
tasks.shadowJar {
@@ -372,10 +372,10 @@ index 75083eeb9b413e6dd5375007360dce6857a08fff..d292fdb165436f0b9b46b32110f5e09a
if (!SwingUtilities.isEventDispatchThread()) {
SwingUtilities.invokeLater(() -> {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 40af2325afea3e4831a9d8795ce1932a6a5663bf..db4480778e4b917a073c61f29cd45663ed859597 100644
+index 1c313dbfc501ce5782fb2d7500b9af35f0855c46..e35e202d49f01c0c97b8c3e41a14254cbd4f2c49 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -160,8 +160,7 @@ public abstract class PlayerList {
+@@ -161,8 +161,7 @@ public abstract class PlayerList {
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
diff --git a/patches/server/0129-provide-a-configurable-option-to-disable-creeper-lin.patch b/patches/server/0129-provide-a-configurable-option-to-disable-creeper-lin.patch
index 6b82339bcc..98fcd80dba 100644
--- a/patches/server/0129-provide-a-configurable-option-to-disable-creeper-lin.patch
+++ b/patches/server/0129-provide-a-configurable-option-to-disable-creeper-lin.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering
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 1c6ebab20ac03f0553e2a25eff10171a39e06a3f..db7485806d90fe90f806736ac55143564488467d 100644
+index 2c2dbe18e7c3c7fa9c98aaa619637f399e83f72e..79614aaa4832c969443d6393e7d5bb8a622a5d98 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
-@@ -287,7 +287,7 @@ public class Creeper extends Monster implements PowerableMob {
+@@ -288,7 +288,7 @@ public class Creeper extends Monster implements PowerableMob {
private void spawnLingeringCloud() {
Collection<MobEffectInstance> collection = this.getActiveEffects();
diff --git a/patches/server/0130-Item-canEntityPickup.patch b/patches/server/0130-Item-canEntityPickup.patch
index 24f6e98a31..4714e6c080 100644
--- a/patches/server/0130-Item-canEntityPickup.patch
+++ b/patches/server/0130-Item-canEntityPickup.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index fa5d8a041858d17c785f033dd2aa3ab242069749..bb051d73a048b0a8ce245914f3564e39702b8452 100644
+index 2de1ad28d42d4beec69901bf985ac0be582f00b9..655dfa9113ca82dc56bc8f4b083ea049ee5b4bee 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -670,6 +670,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -671,6 +671,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
ItemEntity entityitem = (ItemEntity) iterator.next();
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {
@@ -21,10 +21,10 @@ index fa5d8a041858d17c785f033dd2aa3ab242069749..bb051d73a048b0a8ce245914f3564e39
}
}
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index 5bb26ca5c81635d27ca59352d5184d8b4300e0b5..6c2e22f1b2b1ce2903c0ee1d2dbde96b40bd1624 100644
+index 270ae75863ff6e97e80641e94ce2ade07f683c5a..d1bd8b5e5b0873a526ae449986593867b10eec12 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -54,6 +54,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -55,6 +55,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
public UUID target;
public final float bobOffs;
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
diff --git a/patches/server/0131-PlayerPickupItemEvent-setFlyAtPlayer.patch b/patches/server/0131-PlayerPickupItemEvent-setFlyAtPlayer.patch
index ced79db4dd..fc6964aaae 100644
--- a/patches/server/0131-PlayerPickupItemEvent-setFlyAtPlayer.patch
+++ b/patches/server/0131-PlayerPickupItemEvent-setFlyAtPlayer.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index 6c2e22f1b2b1ce2903c0ee1d2dbde96b40bd1624..1d7d3a7e3b4153b97d69eb1ae6e43a43a4ebabd4 100644
+index d1bd8b5e5b0873a526ae449986593867b10eec12..a66abc5e759ee0f170b5aadd2640613b98ef6942 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -423,6 +423,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -424,6 +424,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
// CraftBukkit start - fire PlayerPickupItemEvent
int canHold = player.getInventory().canHold(itemstack);
int remaining = i - canHold;
@@ -16,7 +16,7 @@ index 6c2e22f1b2b1ce2903c0ee1d2dbde96b40bd1624..1d7d3a7e3b4153b97d69eb1ae6e43a43
if (this.pickupDelay <= 0 && canHold > 0) {
itemstack.setCount(canHold);
-@@ -430,8 +431,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -431,8 +432,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems());
this.level().getCraftServer().getPluginManager().callEvent(playerEvent);
@@ -31,11 +31,11 @@ index 6c2e22f1b2b1ce2903c0ee1d2dbde96b40bd1624..1d7d3a7e3b4153b97d69eb1ae6e43a43
return;
}
-@@ -461,6 +468,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -462,6 +469,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
// CraftBukkit end
if (this.pickupDelay == 0 && (this.target == null || this.target.equals(player.getUUID())) && player.getInventory().add(itemstack)) {
+ if (flyAtPlayer) // Paper - PlayerPickupItemEvent
player.take(this, i);
if (itemstack.isEmpty()) {
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
diff --git a/patches/server/0132-PlayerAttemptPickupItemEvent.patch b/patches/server/0132-PlayerAttemptPickupItemEvent.patch
index 55df96a705..ccaf080546 100644
--- a/patches/server/0132-PlayerAttemptPickupItemEvent.patch
+++ b/patches/server/0132-PlayerAttemptPickupItemEvent.patch
@@ -5,18 +5,18 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index 1d7d3a7e3b4153b97d69eb1ae6e43a43a4ebabd4..1523be0c9f7ae3b8015b8017797601489c068e8c 100644
+index a66abc5e759ee0f170b5aadd2640613b98ef6942..d568726f80308e29bcfa3714728096d7d0aa822c 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -36,6 +36,7 @@ import org.bukkit.entity.Player;
- import org.bukkit.event.entity.EntityPickupItemEvent;
+@@ -37,6 +37,7 @@ import org.bukkit.event.entity.EntityPickupItemEvent;
+ import org.bukkit.event.entity.EntityRemoveEvent;
import org.bukkit.event.player.PlayerPickupItemEvent;
// CraftBukkit end
+import org.bukkit.event.player.PlayerAttemptPickupItemEvent; // Paper
public class ItemEntity extends Entity implements TraceableEntity {
-@@ -425,6 +426,22 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -426,6 +427,22 @@ public class ItemEntity extends Entity implements TraceableEntity {
int remaining = i - canHold;
boolean flyAtPlayer = false; // Paper
diff --git a/patches/server/0136-Shoulder-Entities-Release-API.patch b/patches/server/0136-Shoulder-Entities-Release-API.patch
index 4e178e4c6a..eb728998dd 100644
--- a/patches/server/0136-Shoulder-Entities-Release-API.patch
+++ b/patches/server/0136-Shoulder-Entities-Release-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 6ff0c2107fa0623d30d9159e3c67388faf597440..cd5a4e91ee8da2a2a5d34ecc9a24394e131e79d0 100644
+index 7429df8c6f29f7216e33cde3226424936de97cf9..4bbf8bb418e3585be2efce5d9a8785faafe7cdde 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1948,20 +1948,45 @@ public abstract class Player extends LivingEntity {
+@@ -1956,20 +1956,45 @@ public abstract class Player extends LivingEntity {
}
diff --git a/patches/server/0139-Entity-fromMobSpawner.patch b/patches/server/0139-Entity-fromMobSpawner.patch
index 9b5e7349f6..eb0d96afdd 100644
--- a/patches/server/0139-Entity-fromMobSpawner.patch
+++ b/patches/server/0139-Entity-fromMobSpawner.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 0a31747076225d1221dce554135cde704c76eec4..6fbde57320a58600f8c4b9ce598fa93bd2772e8b 100644
+index c261971ab482abfa5a1ca51abd189eff16421534..fe314015f8cbc44e29a8ec73ecca4eeadd1da39f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -394,6 +394,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -395,6 +395,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void inactiveTick() { }
// Spigot end
protected int numCollisions = 0; // Paper - Cap entity collisions
@@ -16,7 +16,7 @@ index 0a31747076225d1221dce554135cde704c76eec4..6fbde57320a58600f8c4b9ce598fa93b
// Paper start - Entity origin API
@javax.annotation.Nullable
private org.bukkit.util.Vector origin;
-@@ -2149,6 +2150,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2162,6 +2163,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
}
@@ -27,7 +27,7 @@ index 0a31747076225d1221dce554135cde704c76eec4..6fbde57320a58600f8c4b9ce598fa93b
// Paper end
return nbttagcompound;
} catch (Throwable throwable) {
-@@ -2289,6 +2294,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2302,6 +2307,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.originWorld = originWorld;
origin = new org.bukkit.util.Vector(originTag.getDouble(0), originTag.getDouble(1), originTag.getDouble(2));
}
@@ -49,10 +49,10 @@ index a46293dafeb73f9206b92a2850df18a6a5f688b4..487e4211d6486d2b3052c931c27cee97
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
continue;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 74937603e7b8308fd314d650d9d966e8abd2c725..deb355b2188a49f818aaddad6c4ce60de94428e0 100644
+index 4a875d038f1ab7f2bdc5f290a6ad71e4b61c6822..d715dcc9155ad9938bd4fbe0cde43079f614f203 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1012,5 +1012,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1013,5 +1013,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
//noinspection ConstantConditions
return originVector.toLocation(world);
}
diff --git a/patches/server/0143-ProfileWhitelistVerifyEvent.patch b/patches/server/0143-ProfileWhitelistVerifyEvent.patch
index b792b6feaf..759f285156 100644
--- a/patches/server/0143-ProfileWhitelistVerifyEvent.patch
+++ b/patches/server/0143-ProfileWhitelistVerifyEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] ProfileWhitelistVerifyEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index db4480778e4b917a073c61f29cd45663ed859597..7552d1b9e6c286daaa6b094af0fdebc2b300272a 100644
+index e35e202d49f01c0c97b8c3e41a14254cbd4f2c49..d2002567e10883bcf61a2036cea1b598aacc00da 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -631,9 +631,9 @@ public abstract class PlayerList {
+@@ -632,9 +632,9 @@ public abstract class PlayerList {
// return chatmessage;
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, io.papermc.paper.adventure.PaperAdventure.asAdventure(ichatmutablecomponent)); // Paper - Adventure
@@ -21,7 +21,7 @@ index db4480778e4b917a073c61f29cd45663ed859597..7552d1b9e6c286daaa6b094af0fdebc2
} else if (this.getIpBans().isBanned(socketaddress) && !this.getIpBans().get(socketaddress).hasExpired()) {
IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
-@@ -1024,7 +1024,23 @@ public abstract class PlayerList {
+@@ -1025,7 +1025,23 @@ public abstract class PlayerList {
}
public boolean isWhiteListed(GameProfile profile) {
diff --git a/patches/server/0155-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/patches/server/0155-Send-attack-SoundEffects-only-to-players-who-can-see.patch
index 089df28228..ad10a37d50 100644
--- a/patches/server/0155-Send-attack-SoundEffects-only-to-players-who-can-see.patch
+++ b/patches/server/0155-Send-attack-SoundEffects-only-to-players-who-can-see.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index cd5a4e91ee8da2a2a5d34ecc9a24394e131e79d0..056b816c2959b44c24fca04e14e8d764b4a06b0f 100644
+index 4bbf8bb418e3585be2efce5d9a8785faafe7cdde..0043a1f877a0a74d361a37dfa0652d1931835988 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1226,7 +1226,7 @@ public abstract class Player extends LivingEntity {
+@@ -1227,7 +1227,7 @@ public abstract class Player extends LivingEntity {
int i = b0 + EnchantmentHelper.getKnockbackBonus(this);
if (this.isSprinting() && flag) {
@@ -18,7 +18,7 @@ index cd5a4e91ee8da2a2a5d34ecc9a24394e131e79d0..056b816c2959b44c24fca04e14e8d764
++i;
flag1 = true;
}
-@@ -1301,7 +1301,7 @@ public abstract class Player extends LivingEntity {
+@@ -1302,7 +1302,7 @@ public abstract class Player extends LivingEntity {
}
}
@@ -27,7 +27,7 @@ index cd5a4e91ee8da2a2a5d34ecc9a24394e131e79d0..056b816c2959b44c24fca04e14e8d764
this.sweepAttack();
}
-@@ -1329,15 +1329,15 @@ public abstract class Player extends LivingEntity {
+@@ -1330,15 +1330,15 @@ public abstract class Player extends LivingEntity {
}
if (flag2) {
@@ -46,7 +46,7 @@ index cd5a4e91ee8da2a2a5d34ecc9a24394e131e79d0..056b816c2959b44c24fca04e14e8d764
}
}
-@@ -1389,7 +1389,7 @@ public abstract class Player extends LivingEntity {
+@@ -1390,7 +1390,7 @@ public abstract class Player extends LivingEntity {
this.causeFoodExhaustion(this.level().spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
} else {
@@ -55,7 +55,7 @@ index cd5a4e91ee8da2a2a5d34ecc9a24394e131e79d0..056b816c2959b44c24fca04e14e8d764
if (flag4) {
target.clearFire();
}
-@@ -1783,6 +1783,14 @@ public abstract class Player extends LivingEntity {
+@@ -1791,6 +1791,14 @@ public abstract class Player extends LivingEntity {
public int getXpNeededForNextLevel() {
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
}
diff --git a/patches/server/0156-Add-PlayerArmorChangeEvent.patch b/patches/server/0156-Add-PlayerArmorChangeEvent.patch
index 58c26b9342..b880ce1c49 100644
--- a/patches/server/0156-Add-PlayerArmorChangeEvent.patch
+++ b/patches/server/0156-Add-PlayerArmorChangeEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index ec862d3a70b9d9f71873a71c1f1d143bc95799ae..1203387260e5e2727ffb682882da85b8c89c1f4c 100644
+index ded2c573533699133309d9ed5250e6a0ce97cc54..bbf3286cb69f931be528726e45784eec9f8e0af3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3060,6 +3060,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3068,6 +3068,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
ItemStack itemstack1 = this.getItemBySlot(enumitemslot);
if (this.equipmentHasChanged(itemstack, itemstack1)) {
diff --git a/patches/server/0162-PlayerPickupExperienceEvent.patch b/patches/server/0162-PlayerPickupExperienceEvent.patch
index c4ef53a205..3b2845e66a 100644
--- a/patches/server/0162-PlayerPickupExperienceEvent.patch
+++ b/patches/server/0162-PlayerPickupExperienceEvent.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] PlayerPickupExperienceEvent
Allows plugins to cancel a player picking up an experience orb
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-index ae70ad9d6c02fcb5631a3c45db283b29844bbb0d..0f55715f2d97ab09746a51f9d39134b513778fdd 100644
+index 00b46fd0b4a718756f8b21f203fd5679bc2a79d8..97524656b8af7b80aeb7845575c704585dade725 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-@@ -312,7 +312,7 @@ public class ExperienceOrb extends Entity {
+@@ -313,7 +313,7 @@ public class ExperienceOrb extends Entity {
@Override
public void playerTouch(Player player) {
if (!this.level().isClientSide) {
diff --git a/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch b/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch
index fb84ea1014..63a742ef9b 100644
--- a/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch
+++ b/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch
@@ -14,7 +14,7 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I
public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 901a1c98024eb81d2fa3e7ca13add63864a9c5ef..1444b633a2b49ce492a8a3c2a9c4befb8c7618fd 100644
+index 901a1c98024eb81d2fa3e7ca13add63864a9c5ef..0eea0024deb19da924df584e5af58917c2f41188 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1546,7 +1546,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -38,7 +38,7 @@ index 901a1c98024eb81d2fa3e7ca13add63864a9c5ef..1444b633a2b49ce492a8a3c2a9c4befb
+ int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue());
+ org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, stackEntry.getKey(), i);
+ i = event.getRepairAmount();
-+ orb.discard();
++ orb.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN);
+ if (!event.isCancelled()) {
+ amount -= orb.durabilityToXp(i);
+ itemstack.setDamageValue(itemstack.getDamageValue() - i);
diff --git a/patches/server/0166-PreCreatureSpawnEvent.patch b/patches/server/0166-PreCreatureSpawnEvent.patch
index 2882defd98..379a3aedda 100644
--- a/patches/server/0166-PreCreatureSpawnEvent.patch
+++ b/patches/server/0166-PreCreatureSpawnEvent.patch
@@ -15,7 +15,7 @@ instead and save a lot of server resources.
See: https://github.com/PaperMC/Paper/issues/917
diff --git a/src/main/java/net/minecraft/util/SpawnUtil.java b/src/main/java/net/minecraft/util/SpawnUtil.java
-index b77ebe04f1018962b85110258c8a0a2db8612485..1954fdc7b72700d5948e93ebcb0e6a26fe244a1b 100644
+index d83444ccca674011c7c32c4a9287fbadc9b64494..c5d54abfcbd74c3041d9a46f77705460fa65ce30 100644
--- a/src/main/java/net/minecraft/util/SpawnUtil.java
+++ b/src/main/java/net/minecraft/util/SpawnUtil.java
@@ -22,10 +22,10 @@ public class SpawnUtil {
@@ -76,10 +76,10 @@ index 382b55167dede435b034866bd394455f0f6f2a00..035af9ccf679a562203a4a2c4f2b3809
if (t0 != null) {
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-index f0d5e45d0d6ac51106379d20690d34a032a24c39..bfd156acbae31619234fffb1804726090802fbae 100644
+index 0b34003058205f26a89d18dad06b2067dbe897d7..0a1a70edda66bf348b3e3a9df4670cd81561cd1f 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-@@ -975,7 +975,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
+@@ -976,7 +976,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
}).limit(5L).collect(Collectors.toList());
if (list1.size() >= requiredCount) {
diff --git a/patches/server/0172-Toggleable-player-crits.patch b/patches/server/0172-Toggleable-player-crits.patch
index a43d2d76dd..1acbcc3568 100644
--- a/patches/server/0172-Toggleable-player-crits.patch
+++ b/patches/server/0172-Toggleable-player-crits.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Toggleable player crits
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 056b816c2959b44c24fca04e14e8d764b4a06b0f..e38f2e9a2ea616ebe5f167583fe339fc7244ccbf 100644
+index 0043a1f877a0a74d361a37dfa0652d1931835988..654654b1d9c10934af333dfe69c27a5d3997eda4 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1233,6 +1233,7 @@ public abstract class Player extends LivingEntity {
+@@ -1234,6 +1234,7 @@ public abstract class Player extends LivingEntity {
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround() && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity;
diff --git a/patches/server/0176-Player.setPlayerProfile-API.patch b/patches/server/0176-Player.setPlayerProfile-API.patch
index 17827ed57f..2fb088dd67 100644
--- a/patches/server/0176-Player.setPlayerProfile-API.patch
+++ b/patches/server/0176-Player.setPlayerProfile-API.patch
@@ -9,7 +9,7 @@ This can be useful for changing name or skins after a player has logged in.
public-f net.minecraft.world.entity.player.Player gameProfile
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index f60d754cb617df3c5ab8654eba66016c1cc04617..39af3e197502c1f262fbdd4e06dc0e3fc7537b77 100644
+index 5d4730b9ced378c1e77d7734f2f8aba6d09a19d0..f19ab219dc51e9f9fff119637b33281dac4e03d2 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1467,7 +1467,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -40,10 +40,10 @@ index b41aa61f80cd4ab8ddd19da397244392f9efde78..e745061f3e6a4541f44ba119106915cd
playerName = gameprofile.getName();
uniqueId = gameprofile.getId();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 7552d1b9e6c286daaa6b094af0fdebc2b300272a..9f8a95c8f46a11f36ff16863922a91a8d81d0bb3 100644
+index d2002567e10883bcf61a2036cea1b598aacc00da..31f9d5b32a562cd33d8989810026d996b3ab69aa 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -862,10 +862,16 @@ public abstract class PlayerList {
+@@ -863,10 +863,16 @@ public abstract class PlayerList {
}
public void sendPlayerPermissionLevel(ServerPlayer player) {
@@ -77,7 +77,7 @@ index 954825dcd011716dcd859aa285a8e3cdb6ff5464..34925d6448e0ef1d5bb4b24359f732b6
public Server getServer() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 1444b633a2b49ce492a8a3c2a9c4befb8c7618fd..f33aee99de2007701bd593917a63e05c7fa5e349 100644
+index 0eea0024deb19da924df584e5af58917c2f41188..ac42d245f14c9b0565f64689b4646d84791b6a86 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -236,11 +236,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
diff --git a/patches/server/0183-Configurable-sprint-interruption-on-attack.patch b/patches/server/0183-Configurable-sprint-interruption-on-attack.patch
index dd26e680bc..a6eebae304 100644
--- a/patches/server/0183-Configurable-sprint-interruption-on-attack.patch
+++ b/patches/server/0183-Configurable-sprint-interruption-on-attack.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Configurable sprint interruption on attack
If the sprint interruption is disabled players continue sprinting when they attack entities.
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index e38f2e9a2ea616ebe5f167583fe339fc7244ccbf..cd85cc78cc25a2291c1202d53af82c7c00ac39d2 100644
+index 654654b1d9c10934af333dfe69c27a5d3997eda4..b97a3c78ef2fc2865817ca2166f87a8d6e19055c 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1282,7 +1282,11 @@ public abstract class Player extends LivingEntity {
+@@ -1283,7 +1283,11 @@ public abstract class Player extends LivingEntity {
}
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
diff --git a/patches/server/0192-WitchReadyPotionEvent.patch b/patches/server/0192-WitchReadyPotionEvent.patch
index f558e9c173..b01cacf58e 100644
--- a/patches/server/0192-WitchReadyPotionEvent.patch
+++ b/patches/server/0192-WitchReadyPotionEvent.patch
@@ -22,10 +22,10 @@ index 96a87db9f8976d3f1ff09beb9598db31fff72d5b..25a1edf64602a13c07779e58b167a847
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 d461f56cbc64efba422d748c42ec106f84423833..e0234ea1d55e918072574fb5d4b6cc75fc5d46d6 100644
+index c1f3086d37e2959bbcc23bc1b779215bc35c99c4..096e80bb71d10c897a20bb3c0b4b761328c9f56e 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1880,4 +1880,14 @@ public class CraftEventFactory {
+@@ -1896,4 +1896,14 @@ public class CraftEventFactory {
).callEvent();
}
// Paper end - PlayerUseUnknownEntityEvent
diff --git a/patches/server/0194-Add-EntityTeleportEndGatewayEvent.patch b/patches/server/0194-Add-EntityTeleportEndGatewayEvent.patch
index abb94eac9b..52e4054b8e 100644
--- a/patches/server/0194-Add-EntityTeleportEndGatewayEvent.patch
+++ b/patches/server/0194-Add-EntityTeleportEndGatewayEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityTeleportEndGatewayEvent
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
-index 08d34dff616b6c117a969809cdeb3853e28dc473..223550eccdf0a5596b8595a30f02ad891ffd91ea 100644
+index 1606c8c0dd5e27b42d0fd9da0db8a02e50efc5f9..a57743b21b6075ba01def0a41fecbf90b2df7f85 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
-@@ -224,8 +224,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
+@@ -225,8 +225,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
}
diff --git a/patches/server/0195-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/patches/server/0195-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch
index cd0b43941d..632fa334b5 100644
--- a/patches/server/0195-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch
+++ b/patches/server/0195-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Unset Ignited flag on cancel of Explosion Event
Otherwise the creeper infinite explodes
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 db7485806d90fe90f806736ac55143564488467d..d08ccf5eb52e5975b161f5f7bcbdd385eb8318c9 100644
+index 79614aaa4832c969443d6393e7d5bb8a622a5d98..83b407e865e2ff4debb89c350727809601be1fa6 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
-@@ -278,6 +278,7 @@ public class Creeper extends Monster implements PowerableMob {
+@@ -279,6 +279,7 @@ public class Creeper extends Monster implements PowerableMob {
// CraftBukkit start
} else {
this.swell = 0;
diff --git a/patches/server/0196-Fix-CraftEntity-hashCode.patch b/patches/server/0196-Fix-CraftEntity-hashCode.patch
index a9def43722..9ff8123f58 100644
--- a/patches/server/0196-Fix-CraftEntity-hashCode.patch
+++ b/patches/server/0196-Fix-CraftEntity-hashCode.patch
@@ -21,10 +21,10 @@ check is essentially the same as this.getHandle() == other.getHandle()
However, replaced it too to make it clearer of intent.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index deb355b2188a49f818aaddad6c4ce60de94428e0..388c9db9d130071122e9f80749fb2eef05455408 100644
+index d715dcc9155ad9938bd4fbe0cde43079f614f203..34e4dd733a2e9ccc3c7f1b228825428100e583e9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -499,14 +499,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -500,14 +500,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return false;
}
final CraftEntity other = (CraftEntity) obj;
diff --git a/patches/server/0199-Make-shield-blocking-delay-configurable.patch b/patches/server/0199-Make-shield-blocking-delay-configurable.patch
index 202e56a0ff..1c6990bb95 100644
--- a/patches/server/0199-Make-shield-blocking-delay-configurable.patch
+++ b/patches/server/0199-Make-shield-blocking-delay-configurable.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Make shield blocking delay configurable
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 1203387260e5e2727ffb682882da85b8c89c1f4c..001179978a81f2f7f1c56270b2a131dda7aaa881 100644
+index bbf3286cb69f931be528726e45784eec9f8e0af3..21bef887193c777ec1e311b3bf5c0213180ea4ca 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3820,12 +3820,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3828,12 +3828,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.isUsingItem() && !this.useItem.isEmpty()) {
Item item = this.useItem.getItem();
@@ -35,7 +35,7 @@ index 1203387260e5e2727ffb682882da85b8c89c1f4c..001179978a81f2f7f1c56270b2a131dd
return this.isShiftKeyDown();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 82773a05783b731e2f7bd00c8ec68090d15a7b66..ca92ece290c6dd164b3ba2ba46289350ae6829e8 100644
+index a2b2c3da97979b1684ec48934f82a784f1e63b6b..ccd2880da35263d1d16597eba2ec35b8b343cb5d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -839,5 +839,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
diff --git a/patches/server/0201-PlayerReadyArrowEvent.patch b/patches/server/0201-PlayerReadyArrowEvent.patch
index 75712ba31e..7c34bd8506 100644
--- a/patches/server/0201-PlayerReadyArrowEvent.patch
+++ b/patches/server/0201-PlayerReadyArrowEvent.patch
@@ -7,10 +7,10 @@ Called when a player is firing a bow and the server is choosing an arrow to use.
Plugins can skip selection of certain arrows and control which is used.
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index cd85cc78cc25a2291c1202d53af82c7c00ac39d2..aad9add92eaff7205383033a0b03d072724bf428 100644
+index b97a3c78ef2fc2865817ca2166f87a8d6e19055c..0bff92eeade590852b9b37105a18df35f587559b 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -2168,18 +2168,29 @@ public abstract class Player extends LivingEntity {
+@@ -2176,18 +2176,29 @@ public abstract class Player extends LivingEntity {
return ImmutableList.of(Pose.STANDING, Pose.CROUCHING, Pose.SWIMMING);
}
diff --git a/patches/server/0202-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch b/patches/server/0202-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch
index a20073e8c7..65f116cfbc 100644
--- a/patches/server/0202-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch
+++ b/patches/server/0202-Add-EntityKnockbackByEntityEvent-and-EntityPushedByE.patch
@@ -9,10 +9,10 @@ Co-authored-by: aerulion <[email protected]>
This event is called when an entity receives knockback by another entity.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 6fbde57320a58600f8c4b9ce598fa93bd2772e8b..cf907e0c1a89639639b6453032f8f6fe4e05a81c 100644
+index fe314015f8cbc44e29a8ec73ecca4eeadd1da39f..17a8c7e42b31513a4586cd2d40b2d58911814f75 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -1856,8 +1856,22 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1869,8 +1869,22 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void push(double deltaX, double deltaY, double deltaZ) {
@@ -37,10 +37,10 @@ index 6fbde57320a58600f8c4b9ce598fa93bd2772e8b..cf907e0c1a89639639b6453032f8f6fe
protected void markHurt() {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 001179978a81f2f7f1c56270b2a131dda7aaa881..4324c1d8d03f69bb40740269170fd70a317d299e 100644
+index 21bef887193c777ec1e311b3bf5c0213180ea4ca..83a56061ce23d3d6f7d8ad3201ce325106f8a4d0 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1561,7 +1561,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1569,7 +1569,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
protected void blockedByShield(LivingEntity target) {
@@ -49,7 +49,7 @@ index 001179978a81f2f7f1c56270b2a131dda7aaa881..4324c1d8d03f69bb40740269170fd70a
}
private boolean checkTotemDeathProtection(DamageSource source) {
-@@ -1824,7 +1824,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1832,7 +1832,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.knockback(strength, x, z, null, EntityKnockbackEvent.KnockbackCause.UNKNOWN);
}
@@ -58,7 +58,7 @@ index 001179978a81f2f7f1c56270b2a131dda7aaa881..4324c1d8d03f69bb40740269170fd70a
d0 *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE);
if (true || d0 > 0.0D) { // CraftBukkit - Call event even when force is 0
//this.hasImpulse = true; // CraftBukkit - Move down
-@@ -1836,8 +1836,22 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1844,8 +1844,22 @@ public abstract class LivingEntity extends Entity implements Attackable {
return;
}
@@ -109,10 +109,10 @@ index 29cfd065f246bbd3d3c2a5bbd32c3f4813a02951..771d798fa3b367043129f41101c65f13
}
}
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 f5ce6423b8146cc741023e15004fe9814a035da8..666c62d796cae9a70516680e26196f7e02c53918 100644
+index 9ab60fb1b7f9c8a342d9116e99f7f0a1e463a626..0d84f1fb53384a827d7418c322a32e3286f4081a 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
-@@ -458,7 +458,7 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -459,7 +459,7 @@ public class EnderDragon extends Mob implements Enemy {
double d3 = entity.getZ() - d1;
double d4 = Math.max(d2 * d2 + d3 * d3, 0.1D);
@@ -148,10 +148,10 @@ index 81003ce3f05c6be6f52a92b86a4721235f4ce12a..cae7e3e85c3b911f50f8a06badf695c3
}
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index aad9add92eaff7205383033a0b03d072724bf428..de537f4e89ccadefafb0f3e6075dba5f030f2654 100644
+index 0bff92eeade590852b9b37105a18df35f587559b..c934c7614281f77376858909c86d9a1a73c8e174 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1278,7 +1278,7 @@ public abstract class Player extends LivingEntity {
+@@ -1279,7 +1279,7 @@ public abstract class Player extends LivingEntity {
if (target instanceof LivingEntity) {
((LivingEntity) target).knockback((double) ((float) i * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this, EntityKnockbackEvent.KnockbackCause.ENTITY_ATTACK); // CraftBukkit
} else {
@@ -161,10 +161,10 @@ index aad9add92eaff7205383033a0b03d072724bf428..de537f4e89ccadefafb0f3e6075dba5f
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-index 0f700442a7559fac5d27d1fb6b3716f3853a9897..f3861cea4eb6a39fa16936383f8dabc6689a58a9 100644
+index c210ae3795b1bbaefbe84a6f62b9d3dd75d642a4..f1d7f202b99b8ae4c16d10956d68d74efae8445b 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-@@ -409,7 +409,7 @@ public abstract class AbstractArrow extends Projectile {
+@@ -410,7 +410,7 @@ public abstract class AbstractArrow extends Projectile {
Vec3 vec3d = this.getDeltaMovement().multiply(1.0D, 0.0D, 1.0D).normalize().scale((double) this.knockback * 0.6D * d0);
if (vec3d.lengthSqr() > 0.0D) {
diff --git a/patches/server/0208-InventoryCloseEvent-Reason-API.patch b/patches/server/0208-InventoryCloseEvent-Reason-API.patch
index c2a0831410..0963978228 100644
--- a/patches/server/0208-InventoryCloseEvent-Reason-API.patch
+++ b/patches/server/0208-InventoryCloseEvent-Reason-API.patch
@@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 180a9ade7bbc84d8c64b6c92583ba870464c23a5..a6749080a192a591dd4e52f56b691df8d9cfcd98 100644
+index 256b9c6cbf52c252f8174d0aa74e1270fb092ae9..113dce44ce086272fe7f20a2007efadee142ff85 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1235,7 +1235,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -96,10 +96,10 @@ index f19ab219dc51e9f9fff119637b33281dac4e03d2..29ffe034b3b7838e20be4d6a52a82cec
this.player.doCloseContainer();
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 9f8a95c8f46a11f36ff16863922a91a8d81d0bb3..e68a0c86f73325189a67186b058062509663f6e7 100644
+index 31f9d5b32a562cd33d8989810026d996b3ab69aa..2dac6be5b320d7c12aa70fd09d7d218b8cd89287 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -518,7 +518,7 @@ public abstract class PlayerList {
+@@ -519,7 +519,7 @@ public abstract class PlayerList {
// CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
// See SPIGOT-5799, SPIGOT-6145
if (entityplayer.containerMenu != entityplayer.inventoryMenu) {
@@ -109,10 +109,10 @@ index 9f8a95c8f46a11f36ff16863922a91a8d81d0bb3..e68a0c86f73325189a67186b05806250
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(entityplayer.getDisplayName()))); // Paper - Adventure
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index de537f4e89ccadefafb0f3e6075dba5f030f2654..c794fa6290be9904f3e97e74be9959f243c00f58 100644
+index c934c7614281f77376858909c86d9a1a73c8e174..83c7ba56900ce40f71d98062bf15110a76597dce 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -264,7 +264,7 @@ public abstract class Player extends LivingEntity {
+@@ -265,7 +265,7 @@ public abstract class Player extends LivingEntity {
this.updateIsUnderwater();
super.tick();
if (!this.level().isClientSide && this.containerMenu != null && !this.containerMenu.stillValid(this)) {
@@ -121,7 +121,7 @@ index de537f4e89ccadefafb0f3e6075dba5f030f2654..c794fa6290be9904f3e97e74be9959f2
this.containerMenu = this.inventoryMenu;
}
-@@ -496,6 +496,13 @@ public abstract class Player extends LivingEntity {
+@@ -497,6 +497,13 @@ public abstract class Player extends LivingEntity {
}
@@ -165,7 +165,7 @@ index 092d2bfab7e8fd9840e853f09adc85311ab29046..af6f8d11f0384c353332f5c5bb0967e5
@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 a77c15a9c351c9cd5e8b4832016ec6de30483ed6..ddf089d73a05792d99a96bb449717d82755f5cd9 100644
+index dbf67a52ae2e18589952b2d019b5258324ff3edc..b4212f5a5b3b1e5476f7598be165ffb1defb5c21 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1182,7 +1182,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -178,10 +178,10 @@ index a77c15a9c351c9cd5e8b4832016ec6de30483ed6..ddf089d73a05792d99a96bb449717d82
// 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 e0234ea1d55e918072574fb5d4b6cc75fc5d46d6..9e2007967d093d7a72e980f578657e4bcb9badae 100644
+index 096e80bb71d10c897a20bb3c0b4b761328c9f56e..139d9b4a290d9089ba9a6c92ddcf04e1404c1074 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1262,7 +1262,7 @@ public class CraftEventFactory {
+@@ -1263,7 +1263,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 e0234ea1d55e918072574fb5d4b6cc75fc5d46d6..9e2007967d093d7a72e980f578657e4b
}
CraftServer server = player.level().getCraftServer();
-@@ -1449,8 +1449,18 @@ public class CraftEventFactory {
+@@ -1450,8 +1450,18 @@ public class CraftEventFactory {
return event;
}
diff --git a/patches/server/0212-add-more-information-to-Entity.toString.patch b/patches/server/0212-add-more-information-to-Entity.toString.patch
index 5c23622818..9b1f740570 100644
--- a/patches/server/0212-add-more-information-to-Entity.toString.patch
+++ b/patches/server/0212-add-more-information-to-Entity.toString.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index cf907e0c1a89639639b6453032f8f6fe4e05a81c..dadf26ee5b6be851473429dbef703037f0c0d9fe 100644
+index 17a8c7e42b31513a4586cd2d40b2d58911814f75..b718e5a1dd49dc855a1161106b53a1d6615e8b69 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -3153,7 +3153,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3166,7 +3166,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public String toString() {
String s = this.level() == null ? "~NULL~" : this.level().toString();
diff --git a/patches/server/0213-EnderDragon-Events.patch b/patches/server/0213-EnderDragon-Events.patch
index 2b7a35d8de..c2dbb91e76 100644
--- a/patches/server/0213-EnderDragon-Events.patch
+++ b/patches/server/0213-EnderDragon-Events.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] EnderDragon Events
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
-index f72ad2e7d0d5953c906d0d9f8adb9ba74d1841be..bb8f50a47a88f4e4d440ae0b70a56e7f9c1467ca 100644
+index 3eaf64a6f66c6a844e30967e6b87432e559a59e7..5c5c71db73a2bfebbb33cebd6325a0f4fef1f239 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
-@@ -83,7 +83,13 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase {
+@@ -88,7 +88,13 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase {
this.flame.setDuration(200);
this.flame.setParticle(ParticleTypes.DRAGON_BREATH);
this.flame.addEffect(new MobEffectInstance(MobEffects.HARM));
@@ -23,7 +23,7 @@ index f72ad2e7d0d5953c906d0d9f8adb9ba74d1841be..bb8f50a47a88f4e4d440ae0b70a56e7f
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java
-index f54576f6450e24f574bfe7f4b8e2ad5d8c9f1ba3..9bf04f18d37356cdef1ef3a7f1e38a1801ad5713 100644
+index f54576f6450e24f574bfe7f4b8e2ad5d8c9f1ba3..561e9525c37952c6b2fb52811b3767eb1044773b 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonStrafePlayerPhase.java
@@ -74,7 +74,9 @@ public class DragonStrafePlayerPhase extends AbstractDragonPhaseInstance {
@@ -32,22 +32,22 @@ index f54576f6450e24f574bfe7f4b8e2ad5d8c9f1ba3..9bf04f18d37356cdef1ef3a7f1e38a18
dragonFireball.moveTo(o, p, q, 0.0F, 0.0F);
+ if (new com.destroystokyo.paper.event.entity.EnderDragonShootFireballEvent((org.bukkit.entity.EnderDragon) dragon.getBukkitEntity(), (org.bukkit.entity.DragonFireball) dragonFireball.getBukkitEntity()).callEvent()) // Paper - EnderDragon Events
this.dragon.level().addFreshEntity(dragonFireball);
-+ else dragonFireball.discard(); // Paper - EnderDragon Events
++ else dragonFireball.discard(null); // Paper - EnderDragon Events
this.fireballCharge = 0;
if (this.currentPath != null) {
while(!this.currentPath.isDone()) {
diff --git a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
-index 796a2a88134eee4021423fef132537a5e0680bc5..61a36c4e97ee532e53eee4da00a9aa7e4b3438f5 100644
+index a425659d89165610fdb1afa3095bf4ac867646ae..58723ea75f7db9bf3889b99139669b14a284a3a1 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
-@@ -52,8 +52,10 @@ public class DragonFireball extends AbstractHurtingProjectile {
+@@ -62,8 +62,10 @@ public class DragonFireball extends AbstractHurtingProjectile {
}
}
-+ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) areaEffectCloud.getBukkitEntity()).callEvent()) { // Paper - EnderDragon Events
++ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) entityareaeffectcloud.getBukkitEntity()).callEvent()) { // Paper - EnderDragon Events
this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1);
- this.level().addFreshEntity(areaEffectCloud);
-+ } else areaEffectCloud.discard(); // Paper - EnderDragon Events
- this.discard();
+ this.level().addFreshEntity(entityareaeffectcloud);
++ } else entityareaeffectcloud.discard(null); // Paper - EnderDragon Events
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
diff --git a/patches/server/0217-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/0217-Option-to-prevent-armor-stands-from-doing-entity-loo.patch
index a621cabe07..5cc5596785 100644
--- a/patches/server/0217-Option-to-prevent-armor-stands-from-doing-entity-loo.patch
+++ b/patches/server/0217-Option-to-prevent-armor-stands-from-doing-entity-loo.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Option to prevent armor stands from doing entity lookups
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 d04d0b9cbf91beb57da7e37e72f8e7c98cf6cf4c..e6e3a7ae08f7346ccbce02b9d36239485133e93a 100644
+index 1353bb583ec576345b7bfea5134c4b0d59811a07..1a3727bbd9d67c32846e7ad4bd4bc9001a4aa313 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-@@ -337,6 +337,7 @@ public class ArmorStand extends LivingEntity {
+@@ -338,6 +338,7 @@ public class ArmorStand extends LivingEntity {
@Override
protected void pushEntities() {
@@ -17,7 +17,7 @@ index d04d0b9cbf91beb57da7e37e72f8e7c98cf6cf4c..e6e3a7ae08f7346ccbce02b9d3623948
Iterator iterator = list.iterator();
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 8a7276f83744252ac5a418f9acb219e02c508b2f..37c50c9da4249a92811aaa5cef5743ccefdcb4a8 100644
+index 2bd7ad1065273c2a9150b3762aff13437bf4bec0..09d62573b013590e66bbd988be1442944775090e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -767,6 +767,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
diff --git a/patches/server/0218-Vanished-players-don-t-have-rights.patch b/patches/server/0218-Vanished-players-don-t-have-rights.patch
index 1b1fe50a96..3a1097f1e7 100644
--- a/patches/server/0218-Vanished-players-don-t-have-rights.patch
+++ b/patches/server/0218-Vanished-players-don-t-have-rights.patch
@@ -39,7 +39,7 @@ index a6638e626600e4304a973497a39e3fac52203b16..c19069f65a9ecbc9000ea4333417a2df
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 37c50c9da4249a92811aaa5cef5743ccefdcb4a8..181201ecd6c617cc37ba097a667bd96ae3b1823e 100644
+index 09d62573b013590e66bbd988be1442944775090e..776aea2518aaa5e15bdd63f49b6948818cb9ad10 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -271,6 +271,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -89,10 +89,10 @@ index 37c50c9da4249a92811aaa5cef5743ccefdcb4a8..181201ecd6c617cc37ba097a667bd96a
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 9e2007967d093d7a72e980f578657e4bcb9badae..9d95dba058dd26db42d9e32b90399a78211bcd79 100644
+index 139d9b4a290d9089ba9a6c92ddcf04e1404c1074..4498bb89b219de0d1c62950b7aa5f17fe6eab7d0 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1299,6 +1299,14 @@ public class CraftEventFactory {
+@@ -1300,6 +1300,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/0219-Allow-disabling-armor-stand-ticking.patch b/patches/server/0219-Allow-disabling-armor-stand-ticking.patch
index 9d074fefe4..6106bf3ff7 100644
--- a/patches/server/0219-Allow-disabling-armor-stand-ticking.patch
+++ b/patches/server/0219-Allow-disabling-armor-stand-ticking.patch
@@ -5,10 +5,10 @@ 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 e6e3a7ae08f7346ccbce02b9d36239485133e93a..ecce8036e58a9ed1408e110e75980bf77c18779a 100644
+index 1a3727bbd9d67c32846e7ad4bd4bc9001a4aa313..0634b88a5bbfb549d5ec5931e19f674fb9ca4cbe 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-@@ -93,9 +93,16 @@ public class ArmorStand extends LivingEntity {
+@@ -94,9 +94,16 @@ public class ArmorStand extends LivingEntity {
public Rotations leftLegPose;
public Rotations rightLegPose;
public boolean canMove = true; // Paper
@@ -25,7 +25,7 @@ index e6e3a7ae08f7346ccbce02b9d36239485133e93a..ecce8036e58a9ed1408e110e75980bf7
this.handItems = NonNullList.withSize(2, ItemStack.EMPTY);
this.armorItems = NonNullList.withSize(4, ItemStack.EMPTY);
this.headPose = ArmorStand.DEFAULT_HEAD_POSE;
-@@ -190,6 +197,7 @@ public class ArmorStand extends LivingEntity {
+@@ -191,6 +198,7 @@ public class ArmorStand extends LivingEntity {
this.onEquipItem(enumitemslot, (ItemStack) this.armorItems.set(enumitemslot.getIndex(), itemstack), itemstack, silent); // CraftBukkit
}
@@ -33,7 +33,7 @@ index e6e3a7ae08f7346ccbce02b9d36239485133e93a..ecce8036e58a9ed1408e110e75980bf7
}
@Override
-@@ -240,6 +248,7 @@ public class ArmorStand extends LivingEntity {
+@@ -241,6 +249,7 @@ public class ArmorStand extends LivingEntity {
}
nbt.put("Pose", this.writePose());
@@ -41,7 +41,7 @@ index e6e3a7ae08f7346ccbce02b9d36239485133e93a..ecce8036e58a9ed1408e110e75980bf7
}
@Override
-@@ -271,6 +280,12 @@ public class ArmorStand extends LivingEntity {
+@@ -272,6 +281,12 @@ public class ArmorStand extends LivingEntity {
this.setNoBasePlate(nbt.getBoolean("NoBasePlate"));
this.setMarker(nbt.getBoolean("Marker"));
this.noPhysics = !this.hasPhysics();
@@ -54,7 +54,7 @@ index e6e3a7ae08f7346ccbce02b9d36239485133e93a..ecce8036e58a9ed1408e110e75980bf7
CompoundTag nbttagcompound1 = nbt.getCompound("Pose");
this.readPose(nbttagcompound1);
-@@ -658,7 +673,29 @@ public class ArmorStand extends LivingEntity {
+@@ -659,7 +674,29 @@ public class ArmorStand extends LivingEntity {
@Override
public void tick() {
@@ -84,7 +84,7 @@ index e6e3a7ae08f7346ccbce02b9d36239485133e93a..ecce8036e58a9ed1408e110e75980bf7
Rotations vector3f = (Rotations) this.entityData.get(ArmorStand.DATA_HEAD_POSE);
if (!this.headPose.equals(vector3f)) {
-@@ -787,31 +824,37 @@ public class ArmorStand extends LivingEntity {
+@@ -788,31 +825,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/0224-Add-TNTPrimeEvent.patch b/patches/server/0224-Add-TNTPrimeEvent.patch
index fa2d4a8822..acace9251d 100644
--- a/patches/server/0224-Add-TNTPrimeEvent.patch
+++ b/patches/server/0224-Add-TNTPrimeEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add TNTPrimeEvent
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 666c62d796cae9a70516680e26196f7e02c53918..623a4cc921442dbba4f80df3be06762b4b1289ae 100644
+index 0d84f1fb53384a827d7418c322a32e3286f4081a..6d01175ea2092bc5f5ebb7aa066450bfec2443a1 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
-@@ -558,6 +558,11 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -559,6 +559,11 @@ public class EnderDragon extends Mob implements Enemy {
});
craftBlock.getNMS().spawnAfterBreak((ServerLevel) this.level(), blockposition, ItemStack.EMPTY, false);
}
diff --git a/patches/server/0226-Fix-NBT-type-issues.patch b/patches/server/0226-Fix-NBT-type-issues.patch
index 58e82e71e9..6a16b60735 100644
--- a/patches/server/0226-Fix-NBT-type-issues.patch
+++ b/patches/server/0226-Fix-NBT-type-issues.patch
@@ -8,10 +8,10 @@ Addresses two issues:
- Allay duplication cooldown is saved and exposed as a long, but loaded as an int
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-index 0f55715f2d97ab09746a51f9d39134b513778fdd..36d5d1736bf826f3abc756277de431c94cabb744 100644
+index 97524656b8af7b80aeb7845575c704585dade725..a9c30fb4cfe4ff7bb27d498218373c572031fab8 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-@@ -295,7 +295,7 @@ public class ExperienceOrb extends Entity {
+@@ -296,7 +296,7 @@ public class ExperienceOrb extends Entity {
public void addAdditionalSaveData(CompoundTag nbt) {
nbt.putShort("Health", (short) this.health);
nbt.putShort("Age", (short) this.age);
@@ -20,7 +20,7 @@ index 0f55715f2d97ab09746a51f9d39134b513778fdd..36d5d1736bf826f3abc756277de431c9
nbt.putInt("Count", this.count);
this.savePaperNBT(nbt); // Paper
}
-@@ -304,7 +304,7 @@ public class ExperienceOrb extends Entity {
+@@ -305,7 +305,7 @@ public class ExperienceOrb extends Entity {
public void readAdditionalSaveData(CompoundTag nbt) {
this.health = nbt.getShort("Health");
this.age = nbt.getShort("Age");
diff --git a/patches/server/0228-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0228-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
index 004d23918b..8ca9496478 100644
--- a/patches/server/0228-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
+++ b/patches/server/0228-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index de328a93abcf23d3ff265557a7d8bad5be56287c..9f8ee9d9b5fec9ca9c5e8462ed1aef742fa628ac 100644
+index 2a0e81a3ec0774ad98e2d74ac7672c167e28f38e..05b838f7008d5d031b18e161bbde7e72b8205b90 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1425,6 +1425,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -26,7 +26,7 @@ index de328a93abcf23d3ff265557a7d8bad5be56287c..9f8ee9d9b5fec9ca9c5e8462ed1aef74
protected void tick() {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index a6749080a192a591dd4e52f56b691df8d9cfcd98..e1518465e4ffc473a75a57e4d9b3ad399a022589 100644
+index 113dce44ce086272fe7f20a2007efadee142ff85..0811a2e87192b46c39f54c26ce0e56fc6e9d87e5 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1197,6 +1197,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -43,10 +43,10 @@ index a6749080a192a591dd4e52f56b691df8d9cfcd98..e1518465e4ffc473a75a57e4d9b3ad39
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 803802380883cb198b4a40c08d1540cacaca8c2f..5a837807037b2bf8c3cd5f7fd5965c26cbc79e1b 100644
+index b718e5a1dd49dc855a1161106b53a1d6615e8b69..31ff851cc15216fb5855f829f3fc22c1d26ece21 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -241,6 +241,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -242,6 +242,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
private CraftEntity bukkitEntity;
diff --git a/patches/server/0230-Use-ConcurrentHashMap-in-JsonList.patch b/patches/server/0230-Use-ConcurrentHashMap-in-JsonList.patch
index 9977232428..c49796dc40 100644
--- a/patches/server/0230-Use-ConcurrentHashMap-in-JsonList.patch
+++ b/patches/server/0230-Use-ConcurrentHashMap-in-JsonList.patch
@@ -23,10 +23,10 @@ Modified isEmpty to use the isEmpty() method instead of the slightly confusing s
The point of this is readability, but does have a side-benefit of a small microptimization
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index e68a0c86f73325189a67186b058062509663f6e7..455f14d758551229d15d703990bb5225fff37700 100644
+index 2dac6be5b320d7c12aa70fd09d7d218b8cd89287..7d81334b8bbfc04f1188de777b0cacd6f80131d3 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -634,7 +634,7 @@ public abstract class PlayerList {
+@@ -635,7 +635,7 @@ public abstract class PlayerList {
} else if (!this.isWhiteListed(gameprofile, event)) { // Paper - ProfileWhitelistVerifyEvent
//ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted"); // Paper
//event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(org.spigotmc.SpigotConfig.whitelistMessage)); // Spigot // Paper - Adventure - moved to isWhitelisted
@@ -36,10 +36,10 @@ index e68a0c86f73325189a67186b058062509663f6e7..455f14d758551229d15d703990bb5225
ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned_ip.reason", ipbanentry.getReason());
diff --git a/src/main/java/net/minecraft/server/players/StoredUserList.java b/src/main/java/net/minecraft/server/players/StoredUserList.java
-index 4d6f5e627d386f9ca2d7653b0f485c82a13557f5..35f973cc2c0989256fa21abaf0327c2f36dbe4c9 100644
+index 36d87cb87c1c31b649bf9ae39191553acfc2cb0f..7e133752ccb1ea7c0b4fa781feb1a88e2cfdcf6d 100644
--- a/src/main/java/net/minecraft/server/players/StoredUserList.java
+++ b/src/main/java/net/minecraft/server/players/StoredUserList.java
-@@ -31,7 +31,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
+@@ -30,7 +30,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
private static final Logger LOGGER = LogUtils.getLogger();
private static final Gson GSON = (new GsonBuilder()).setPrettyPrinting().create();
private final File file;
@@ -48,7 +48,7 @@ index 4d6f5e627d386f9ca2d7653b0f485c82a13557f5..35f973cc2c0989256fa21abaf0327c2f
public StoredUserList(File file) {
this.file = file;
-@@ -54,8 +54,11 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
+@@ -53,8 +53,11 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
@Nullable
public V get(K key) {
@@ -62,7 +62,7 @@ index 4d6f5e627d386f9ca2d7653b0f485c82a13557f5..35f973cc2c0989256fa21abaf0327c2f
}
public void remove(K key) {
-@@ -78,7 +81,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
+@@ -77,7 +80,7 @@ public abstract class StoredUserList<K, V extends StoredUserEntry<K>> {
}
public boolean isEmpty() {
diff --git a/patches/server/0235-Slime-Pathfinder-Events.patch b/patches/server/0235-Slime-Pathfinder-Events.patch
index 80b0cd1b08..69e65adef2 100644
--- a/patches/server/0235-Slime-Pathfinder-Events.patch
+++ b/patches/server/0235-Slime-Pathfinder-Events.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Slime Pathfinder Events
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
-index 897c815fb448d1e9ca75b7f8b93b4021dccf7596..168b422ac9f3f98630c4d05b64a9f0470b20fe61 100644
+index d536df2c23f8cae6bf920a5304d91f10a9902251..00dcbcbf20995ab6aca508d7ffe703bcb0d9b1a9 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
-@@ -115,6 +115,7 @@ public class Slime extends Mob implements Enemy {
+@@ -116,6 +116,7 @@ public class Slime extends Mob implements Enemy {
@Override
public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
@@ -16,7 +16,7 @@ index 897c815fb448d1e9ca75b7f8b93b4021dccf7596..168b422ac9f3f98630c4d05b64a9f047
nbt.putInt("Size", this.getSize() - 1);
nbt.putBoolean("wasOnGround", this.wasOnGround);
}
-@@ -123,6 +124,11 @@ public class Slime extends Mob implements Enemy {
+@@ -124,6 +125,11 @@ public class Slime extends Mob implements Enemy {
public void readAdditionalSaveData(CompoundTag nbt) {
this.setSize(nbt.getInt("Size") + 1, false);
super.readAdditionalSaveData(nbt);
@@ -28,7 +28,7 @@ index 897c815fb448d1e9ca75b7f8b93b4021dccf7596..168b422ac9f3f98630c4d05b64a9f047
this.wasOnGround = nbt.getBoolean("wasOnGround");
}
-@@ -471,7 +477,7 @@ public class Slime extends Mob implements Enemy {
+@@ -479,7 +485,7 @@ public class Slime extends Mob implements Enemy {
@Override
public boolean canUse() {
@@ -37,7 +37,7 @@ index 897c815fb448d1e9ca75b7f8b93b4021dccf7596..168b422ac9f3f98630c4d05b64a9f047
}
@Override
-@@ -510,7 +516,15 @@ public class Slime extends Mob implements Enemy {
+@@ -518,7 +524,15 @@ public class Slime extends Mob implements Enemy {
public boolean canUse() {
LivingEntity entityliving = this.slime.getTarget();
@@ -54,7 +54,7 @@ index 897c815fb448d1e9ca75b7f8b93b4021dccf7596..168b422ac9f3f98630c4d05b64a9f047
}
@Override
-@@ -523,7 +537,15 @@ public class Slime extends Mob implements Enemy {
+@@ -531,7 +545,15 @@ public class Slime extends Mob implements Enemy {
public boolean canContinueToUse() {
LivingEntity entityliving = this.slime.getTarget();
@@ -71,7 +71,7 @@ index 897c815fb448d1e9ca75b7f8b93b4021dccf7596..168b422ac9f3f98630c4d05b64a9f047
}
@Override
-@@ -548,6 +570,13 @@ public class Slime extends Mob implements Enemy {
+@@ -556,6 +578,13 @@ public class Slime extends Mob implements Enemy {
}
}
@@ -85,7 +85,7 @@ index 897c815fb448d1e9ca75b7f8b93b4021dccf7596..168b422ac9f3f98630c4d05b64a9f047
}
private static class SlimeRandomDirectionGoal extends Goal {
-@@ -563,7 +592,7 @@ public class Slime extends Mob implements Enemy {
+@@ -571,7 +600,7 @@ public class Slime extends Mob implements Enemy {
@Override
public boolean canUse() {
@@ -94,7 +94,7 @@ index 897c815fb448d1e9ca75b7f8b93b4021dccf7596..168b422ac9f3f98630c4d05b64a9f047
}
@Override
-@@ -571,6 +600,11 @@ public class Slime extends Mob implements Enemy {
+@@ -579,6 +608,11 @@ public class Slime extends Mob implements Enemy {
if (--this.nextRandomizeTime <= 0) {
this.nextRandomizeTime = this.adjustedTickDelay(40 + this.slime.getRandom().nextInt(60));
this.chosenDegrees = (float) this.slime.getRandom().nextInt(360);
@@ -106,7 +106,7 @@ index 897c815fb448d1e9ca75b7f8b93b4021dccf7596..168b422ac9f3f98630c4d05b64a9f047
}
MoveControl controllermove = this.slime.getMoveControl();
-@@ -595,7 +629,7 @@ public class Slime extends Mob implements Enemy {
+@@ -603,7 +637,7 @@ public class Slime extends Mob implements Enemy {
@Override
public boolean canUse() {
@@ -115,7 +115,7 @@ index 897c815fb448d1e9ca75b7f8b93b4021dccf7596..168b422ac9f3f98630c4d05b64a9f047
}
@Override
-@@ -610,4 +644,15 @@ public class Slime extends Mob implements Enemy {
+@@ -618,4 +652,15 @@ public class Slime extends Mob implements Enemy {
}
}
diff --git a/patches/server/0240-Add-More-Creeper-API.patch b/patches/server/0240-Add-More-Creeper-API.patch
index 042306c22c..a0cc33b49f 100644
--- a/patches/server/0240-Add-More-Creeper-API.patch
+++ b/patches/server/0240-Add-More-Creeper-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add More Creeper API
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 d08ccf5eb52e5975b161f5f7bcbdd385eb8318c9..6a91960f93e624a4b975c1cf76698eb45ceda838 100644
+index 83b407e865e2ff4debb89c350727809601be1fa6..9657796d08f4a102d9d5ff7685f2a152d1a87fda 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
-@@ -132,7 +132,7 @@ public class Creeper extends Monster implements PowerableMob {
+@@ -133,7 +133,7 @@ public class Creeper extends Monster implements PowerableMob {
}
if (nbt.getBoolean("ignited")) {
@@ -17,7 +17,7 @@ index d08ccf5eb52e5975b161f5f7bcbdd385eb8318c9..6a91960f93e624a4b975c1cf76698eb4
}
}
-@@ -315,7 +315,18 @@ public class Creeper extends Monster implements PowerableMob {
+@@ -316,7 +316,18 @@ public class Creeper extends Monster implements PowerableMob {
}
public void ignite() {
diff --git a/patches/server/0243-Add-ray-tracing-methods-to-LivingEntity.patch b/patches/server/0243-Add-ray-tracing-methods-to-LivingEntity.patch
index 7cb609e3e7..71ee314ddc 100644
--- a/patches/server/0243-Add-ray-tracing-methods-to-LivingEntity.patch
+++ b/patches/server/0243-Add-ray-tracing-methods-to-LivingEntity.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add ray tracing methods to LivingEntity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 2900326a87d21c8a92edb303ed42fd11ea7f3010..b9d202cb06672f0791792ac676761c404ffb02bc 100644
+index 83a56061ce23d3d6f7d8ad3201ce325106f8a4d0..e8c4d42b1637752e69ea128fa7d0148bb5ffae06 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3841,6 +3841,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3849,6 +3849,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
// Paper start - Make shield blocking delay configurable
@@ -29,7 +29,7 @@ index 2900326a87d21c8a92edb303ed42fd11ea7f3010..b9d202cb06672f0791792ac676761c40
public int getShieldBlockingDelay() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 8ac3beab73904db7362caa3054994b214c997cf7..1510b4d8fc08f4455b38ad4edb6bdf91ad317c96 100644
+index be06dda82db09947f60a353b0d5504955738b6b6..eb74778c0bb6fe6b7c09209eb58195e7fedc54ac 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -201,6 +201,33 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
diff --git a/patches/server/0245-Improve-death-events.patch b/patches/server/0245-Improve-death-events.patch
index 076aeeb785..74e5a00048 100644
--- a/patches/server/0245-Improve-death-events.patch
+++ b/patches/server/0245-Improve-death-events.patch
@@ -80,10 +80,10 @@ index 38a3b264ba72631c27203a178ac0bbdd36e10a10..80cedd5221d3c0dc475c631113e87825
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index b9d202cb06672f0791792ac676761c404ffb02bc..78f601ff13b160c0661ba0b60365403f9eb7fffb 100644
+index e8c4d42b1637752e69ea128fa7d0148bb5ffae06..39ff6dd7ee8e821f5693f6a6e01b713b25d30393 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -259,6 +259,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -260,6 +260,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public Set<UUID> collidableExemptions = new HashSet<>();
public boolean bukkitPickUpLoot;
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
@@ -91,7 +91,7 @@ index b9d202cb06672f0791792ac676761c404ffb02bc..78f601ff13b160c0661ba0b60365403f
@Override
public float getBukkitYaw() {
-@@ -1522,13 +1523,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1530,13 +1531,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.isDeadOrDying()) {
if (!this.checkTotemDeathProtection(source)) {
@@ -109,7 +109,7 @@ index b9d202cb06672f0791792ac676761c404ffb02bc..78f601ff13b160c0661ba0b60365403f
}
} else if (flag1) {
this.playHurtSound(source);
-@@ -1680,6 +1680,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1688,6 +1688,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Entity entity = damageSource.getEntity();
LivingEntity entityliving = this.getKillCredit();
@@ -117,7 +117,7 @@ index b9d202cb06672f0791792ac676761c404ffb02bc..78f601ff13b160c0661ba0b60365403f
if (this.deathScore >= 0 && entityliving != null) {
entityliving.awardKillScore(this, this.deathScore, damageSource);
}
-@@ -1691,24 +1692,59 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1699,24 +1700,59 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!this.level().isClientSide && this.hasCustomName()) {
if (org.spigotmc.SpigotConfig.logNamedDeaths) LivingEntity.LOGGER.info("Named entity {} died: {}", this, this.getCombatTracker().getDeathMessage().getString()); // Spigot
}
@@ -182,7 +182,7 @@ index b9d202cb06672f0791792ac676761c404ffb02bc..78f601ff13b160c0661ba0b60365403f
}
}
-@@ -1716,7 +1752,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1724,7 +1760,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!this.level().isClientSide) {
boolean flag = false;
@@ -191,7 +191,7 @@ index b9d202cb06672f0791792ac676761c404ffb02bc..78f601ff13b160c0661ba0b60365403f
if (this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
BlockPos blockposition = this.blockPosition();
BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
-@@ -1745,7 +1781,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1753,7 +1789,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
}
@@ -204,7 +204,7 @@ index b9d202cb06672f0791792ac676761c404ffb02bc..78f601ff13b160c0661ba0b60365403f
Entity entity = source.getEntity();
int i;
-@@ -1760,18 +1800,27 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1768,18 +1808,27 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.dropEquipment(); // CraftBukkit - from below
if (this.shouldDropLoot() && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
this.dropFromLootTable(source, flag);
@@ -234,10 +234,10 @@ index b9d202cb06672f0791792ac676761c404ffb02bc..78f601ff13b160c0661ba0b60365403f
// CraftBukkit start
public int getExpReward() {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index bb051d73a048b0a8ce245914f3564e39702b8452..645fb2ec7d969068eb10d59d43a512c74cca5a58 100644
+index 655dfa9113ca82dc56bc8f4b083ea049ee5b4bee..3e6706671b3dc06b376eaa9d6d463c6a098104d1 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -1057,6 +1057,12 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -1058,6 +1058,12 @@ public abstract class Mob extends LivingEntity implements Targeting {
}
@@ -250,7 +250,7 @@ index bb051d73a048b0a8ce245914f3564e39702b8452..645fb2ec7d969068eb10d59d43a512c7
@Override
protected void dropCustomDeathLoot(DamageSource source, int lootingMultiplier, boolean allowDrops) {
super.dropCustomDeathLoot(source, lootingMultiplier, allowDrops);
-@@ -1065,6 +1071,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -1066,6 +1072,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
for (int k = 0; k < j; ++k) {
EquipmentSlot enumitemslot = aenumitemslot[k];
@@ -258,7 +258,7 @@ index bb051d73a048b0a8ce245914f3564e39702b8452..645fb2ec7d969068eb10d59d43a512c7
ItemStack itemstack = this.getItemBySlot(enumitemslot);
float f = this.getEquipmentDropChance(enumitemslot);
boolean flag1 = f > 1.0F;
-@@ -1075,7 +1082,13 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -1076,7 +1083,13 @@ public abstract class Mob extends LivingEntity implements Targeting {
}
this.spawnAtLocation(itemstack);
@@ -273,10 +273,10 @@ index bb051d73a048b0a8ce245914f3564e39702b8452..645fb2ec7d969068eb10d59d43a512c7
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
-index 8670d8b2a08e96df787a91f36c48df8b345080dc..950e4b476a03fb5c26351a3b4d1578975a0b0ea8 100644
+index 6376908df89af1eff3a948ca1faef5d4925f0c3b..4ac32078cb074a78a2bb83307013b849f8d59f23 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
-@@ -711,16 +711,38 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
+@@ -715,16 +715,38 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
return this.getTrustedUUIDs().contains(uuid);
}
@@ -344,10 +344,10 @@ index bb399f775a5530a01f59332848c8ab9b8eceb2b5..14edfe103e61024b569f33de0b6608f3
public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(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 ecce8036e58a9ed1408e110e75980bf77c18779a..ddd512e1d7608ec051fb5adf6ec2c6bbb93f5a9d 100644
+index 0634b88a5bbfb549d5ec5931e19f674fb9ca4cbe..11555d1b771f93234098a3bc6a6eaacddeeeb4f6 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-@@ -492,8 +492,10 @@ public class ArmorStand extends LivingEntity {
+@@ -493,8 +493,10 @@ public class ArmorStand extends LivingEntity {
}
// CraftBukkit end
if (source.is(DamageTypeTags.IS_EXPLOSION)) {
@@ -360,19 +360,19 @@ index ecce8036e58a9ed1408e110e75980bf77c18779a..ddd512e1d7608ec051fb5adf6ec2c6bb
return false;
} else if (source.is(DamageTypeTags.IGNITES_ARMOR_STANDS)) {
if (this.isOnFire()) {
-@@ -536,9 +538,9 @@ public class ArmorStand extends LivingEntity {
+@@ -537,9 +539,9 @@ public class ArmorStand extends LivingEntity {
this.gameEvent(GameEvent.ENTITY_DAMAGE, source.getEntity());
this.lastHit = i;
} else {
- this.brokenByPlayer(source);
+ org.bukkit.event.entity.EntityDeathEvent event = this.brokenByPlayer(source); // Paper
this.showBreakingParticles();
-- this.discard(); // CraftBukkit - SPIGOT-4890: remain as this.discard() since above damagesource method will call death event
+- 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...)
}
return true;
-@@ -590,8 +592,10 @@ public class ArmorStand extends LivingEntity {
+@@ -591,8 +593,10 @@ public class ArmorStand extends LivingEntity {
f1 -= amount;
if (f1 <= 0.5F) {
@@ -385,7 +385,7 @@ index ecce8036e58a9ed1408e110e75980bf77c18779a..ddd512e1d7608ec051fb5adf6ec2c6bb
} else {
this.setHealth(f1);
this.gameEvent(GameEvent.ENTITY_DAMAGE, damageSource.getEntity());
-@@ -599,7 +603,7 @@ public class ArmorStand extends LivingEntity {
+@@ -600,7 +604,7 @@ public class ArmorStand extends LivingEntity {
}
@@ -394,7 +394,7 @@ index ecce8036e58a9ed1408e110e75980bf77c18779a..ddd512e1d7608ec051fb5adf6ec2c6bb
ItemStack itemstack = new ItemStack(Items.ARMOR_STAND);
if (this.hasCustomName()) {
-@@ -607,10 +611,10 @@ public class ArmorStand extends LivingEntity {
+@@ -608,10 +612,10 @@ public class ArmorStand extends LivingEntity {
}
this.drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
@@ -407,7 +407,7 @@ index ecce8036e58a9ed1408e110e75980bf77c18779a..ddd512e1d7608ec051fb5adf6ec2c6bb
this.playBrokenSound();
// this.dropAllDeathLoot(damagesource); // CraftBukkit - moved down
-@@ -632,7 +636,7 @@ public class ArmorStand extends LivingEntity {
+@@ -633,7 +637,7 @@ public class ArmorStand extends LivingEntity {
this.armorItems.set(i, ItemStack.EMPTY);
}
}
@@ -416,7 +416,7 @@ index ecce8036e58a9ed1408e110e75980bf77c18779a..ddd512e1d7608ec051fb5adf6ec2c6bb
}
-@@ -759,7 +763,16 @@ public class ArmorStand extends LivingEntity {
+@@ -760,7 +764,16 @@ public class ArmorStand extends LivingEntity {
@Override
public void kill() {
@@ -431,11 +431,11 @@ index ecce8036e58a9ed1408e110e75980bf77c18779a..ddd512e1d7608ec051fb5adf6ec2c6bb
+ 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);
+ this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
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 27d29187b5471fa9d1588b7e8e35539be8a861a0..8cda792c1700bbc511e364e28fd7ee6893fe8db2 100644
+index 65c56d29e04fd0853a8bfe9f943d27fe71849cc2..317fb90ad77aaaddc6a84d719de94d52bba12508 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2434,7 +2434,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -455,10 +455,10 @@ index 27d29187b5471fa9d1588b7e8e35539be8a861a0..8cda792c1700bbc511e364e28fd7ee68
public void injectScaledMaxHealth(Collection<AttributeInstance> 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 9d95dba058dd26db42d9e32b90399a78211bcd79..a08d1250cd5a5cc70e3796ac56a0cfaee6fe2b83 100644
+index 4498bb89b219de0d1c62950b7aa5f17fe6eab7d0..542b9ff7d845dcebcf6569a6d4bd9e97ac3a436d 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -890,9 +890,16 @@ public class CraftEventFactory {
+@@ -891,9 +891,16 @@ public class CraftEventFactory {
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List<org.bukkit.inventory.ItemStack> drops) {
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
@@ -475,7 +475,7 @@ index 9d95dba058dd26db42d9e32b90399a78211bcd79..a08d1250cd5a5cc70e3796ac56a0cfae
victim.expToDrop = event.getDroppedExp();
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
-@@ -909,8 +916,15 @@ public class CraftEventFactory {
+@@ -910,8 +917,15 @@ public class CraftEventFactory {
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
event.setKeepInventory(keepInventory);
event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel
@@ -491,7 +491,7 @@ index 9d95dba058dd26db42d9e32b90399a78211bcd79..a08d1250cd5a5cc70e3796ac56a0cfae
victim.keepLevel = event.getKeepLevel();
victim.newLevel = event.getNewLevel();
-@@ -927,6 +941,31 @@ public class CraftEventFactory {
+@@ -928,6 +942,31 @@ public class CraftEventFactory {
return event;
}
diff --git a/patches/server/0252-Honor-EntityAgeable.ageLock.patch b/patches/server/0252-Honor-EntityAgeable.ageLock.patch
index 6a5ceecb1f..54501c6962 100644
--- a/patches/server/0252-Honor-EntityAgeable.ageLock.patch
+++ b/patches/server/0252-Honor-EntityAgeable.ageLock.patch
@@ -17,10 +17,10 @@ index be5e603d505566feac61cc7e591d35ce483a92df..8dcdc664470fcac00c203b9499ea0a45
int k = j;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
-index 2700f7dc650dc19da75e9351f6d558d05be80dc5..949eda8e743df7ab83f18f15471a33e538aecdc5 100644
+index 70400c9d8835046523c55e3777a2f02da6168dcb..b0c57922fa6160772ba1aaf61c0e97c03a0e6e8c 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
-@@ -299,6 +299,7 @@ public class BeehiveBlockEntity extends BlockEntity {
+@@ -303,6 +303,7 @@ public class BeehiveBlockEntity extends BlockEntity {
}
private static void setBeeReleaseData(int ticks, Bee bee) {
@@ -28,7 +28,7 @@ index 2700f7dc650dc19da75e9351f6d558d05be80dc5..949eda8e743df7ab83f18f15471a33e5
int j = bee.getAge();
if (j < 0) {
-@@ -306,6 +307,7 @@ public class BeehiveBlockEntity extends BlockEntity {
+@@ -310,6 +311,7 @@ public class BeehiveBlockEntity extends BlockEntity {
} else if (j > 0) {
bee.setAge(Math.max(0, j - ticks));
}
diff --git a/patches/server/0257-Add-LivingEntity-getTargetEntity.patch b/patches/server/0257-Add-LivingEntity-getTargetEntity.patch
index fb454512de..577dd4e729 100644
--- a/patches/server/0257-Add-LivingEntity-getTargetEntity.patch
+++ b/patches/server/0257-Add-LivingEntity-getTargetEntity.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 78f601ff13b160c0661ba0b60365403f9eb7fffb..792473529c8afbabe2e501ab223eacaac08fcb96 100644
+index 39ff6dd7ee8e821f5693f6a6e01b713b25d30393..5a1dc8f196b274a822db4aa1fa48cd066f12da94 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -115,6 +115,7 @@ import net.minecraft.world.level.storage.loot.LootTable;
@@ -16,7 +16,7 @@ index 78f601ff13b160c0661ba0b60365403f9eb7fffb..792473529c8afbabe2e501ab223eacaa
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.scores.PlayerTeam;
-@@ -3903,6 +3904,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3911,6 +3912,38 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.level().clip(raytrace);
}
@@ -56,7 +56,7 @@ index 78f601ff13b160c0661ba0b60365403f9eb7fffb..792473529c8afbabe2e501ab223eacaa
public int getShieldBlockingDelay() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 1510b4d8fc08f4455b38ad4edb6bdf91ad317c96..ea9a6446ed2dbddedbc615df93c9856a0a1f1a2e 100644
+index eb74778c0bb6fe6b7c09209eb58195e7fedc54ac..c9a487c1b85d46c1ce25147bd8a610a5631cdb5d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1,5 +1,6 @@
diff --git a/patches/server/0274-force-entity-dismount-during-teleportation.patch b/patches/server/0274-force-entity-dismount-during-teleportation.patch
index ff8e4534d9..83d7c13e24 100644
--- a/patches/server/0274-force-entity-dismount-during-teleportation.patch
+++ b/patches/server/0274-force-entity-dismount-during-teleportation.patch
@@ -20,10 +20,10 @@ this is going to be the best soultion all around.
Improvements/suggestions welcome!
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index c8c781aac68beb72e9efd671fcbb3fecc53d686d..4f37305c032255a33d641da66333ae7cf2fdf668 100644
+index 31ff851cc15216fb5855f829f3fc22c1d26ece21..cb453b843ecf82454a8ade369d424d5e7bbda4c4 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2557,11 +2557,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2570,11 +2570,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void removeVehicle() {
@@ -41,7 +41,7 @@ index c8c781aac68beb72e9efd671fcbb3fecc53d686d..4f37305c032255a33d641da66333ae7c
}
}
-@@ -2592,7 +2597,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2605,7 +2610,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
}
@@ -53,7 +53,7 @@ index c8c781aac68beb72e9efd671fcbb3fecc53d686d..4f37305c032255a33d641da66333ae7c
if (entity.getVehicle() == this) {
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
} else {
-@@ -2602,7 +2610,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2615,7 +2623,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
VehicleExitEvent event = new VehicleExitEvent(
(Vehicle) this.getBukkitEntity(),
@@ -62,7 +62,7 @@ index c8c781aac68beb72e9efd671fcbb3fecc53d686d..4f37305c032255a33d641da66333ae7c
);
// Suppress during worldgen
if (this.valid) {
-@@ -2615,7 +2623,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2628,7 +2636,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
}
@@ -72,10 +72,10 @@ index c8c781aac68beb72e9efd671fcbb3fecc53d686d..4f37305c032255a33d641da66333ae7c
if (this.valid) {
Bukkit.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 792473529c8afbabe2e501ab223eacaac08fcb96..7fb9880caa964df65402153b87a953200b930e24 100644
+index 5a1dc8f196b274a822db4aa1fa48cd066f12da94..f619171b3e436d7263d5229f7f9131954a0941f8 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3484,9 +3484,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3492,9 +3492,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public void stopRiding() {
@@ -93,10 +93,10 @@ index 792473529c8afbabe2e501ab223eacaac08fcb96..7fb9880caa964df65402153b87a95320
this.dismountVehicle(entity);
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index c794fa6290be9904f3e97e74be9959f243c00f58..6ab6f520f2ccb60646660cb2990c5b91a0e91909 100644
+index 83c7ba56900ce40f71d98062bf15110a76597dce..3c3c953f05c18279d3245fe6bc8afef83cd62cd1 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1140,7 +1140,13 @@ public abstract class Player extends LivingEntity {
+@@ -1141,7 +1141,13 @@ public abstract class Player extends LivingEntity {
@Override
public void removeVehicle() {
diff --git a/patches/server/0278-Replace-OfflinePlayer-getLastPlayed.patch b/patches/server/0278-Replace-OfflinePlayer-getLastPlayed.patch
index 3b0afeb2ba..d61e26f140 100644
--- a/patches/server/0278-Replace-OfflinePlayer-getLastPlayed.patch
+++ b/patches/server/0278-Replace-OfflinePlayer-getLastPlayed.patch
@@ -28,10 +28,10 @@ index 0627d51d41d492e07b230e9c398158d656493848..f500440ba1bcd36af3b3bc6470c108ec
public boolean queueHealthUpdatePacket;
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 455f14d758551229d15d703990bb5225fff37700..e2136ae52074f922a87ac30f5e34cb8035c70475 100644
+index 7d81334b8bbfc04f1188de777b0cacd6f80131d3..2a0d3319899f0b3f38135e25306b87b1974b3d83 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -179,6 +179,7 @@ public abstract class PlayerList {
+@@ -180,6 +180,7 @@ public abstract class PlayerList {
public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
player.isRealPlayer = true; // Paper
@@ -106,7 +106,7 @@ index 34925d6448e0ef1d5bb4b24359f732b67aaa4230..0c1b5f625a351905e082b2c2a63bfd73
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 8cda792c1700bbc511e364e28fd7ee6893fe8db2..f309b16670d1814b7c4a1f8464e60af512b86da3 100644
+index 317fb90ad77aaaddc6a84d719de94d52bba12508..4a07e7d3df71f3bfc026e1f1c0abfe25999c6b8e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -197,6 +197,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
diff --git a/patches/server/0286-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch b/patches/server/0286-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
index a9417173e8..406e5f78c6 100644
--- a/patches/server/0286-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
+++ b/patches/server/0286-Call-WhitelistToggleEvent-when-whitelist-is-toggled.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index e2136ae52074f922a87ac30f5e34cb8035c70475..c137899597bf94b75b1ff80fae910db72f791bb8 100644
+index 2a0d3319899f0b3f38135e25306b87b1974b3d83..28b81e29be07902ad4d04aeb18bffd49757c3029 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1157,6 +1157,7 @@ public abstract class PlayerList {
+@@ -1158,6 +1158,7 @@ public abstract class PlayerList {
}
public void setUsingWhiteList(boolean whitelistEnabled) {
diff --git a/patches/server/0287-Entity-getEntitySpawnReason.patch b/patches/server/0287-Entity-getEntitySpawnReason.patch
index b07fe3361e..8c8af028cb 100644
--- a/patches/server/0287-Entity-getEntitySpawnReason.patch
+++ b/patches/server/0287-Entity-getEntitySpawnReason.patch
@@ -22,7 +22,7 @@ index 2eddeb8d5239bbfeefbf4d3bd363f1ad083299b6..e2b44b8ddb8afc6e1f7dddadb434c226
});
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index e1518465e4ffc473a75a57e4d9b3ad399a022589..4e7e3935a0040f48a1dc8f32e3da6d5a3ba154cb 100644
+index 0811a2e87192b46c39f54c26ce0e56fc6e9d87e5..57f129651778d6c20c695bf7b3a8b4d40c402a20 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1203,6 +1203,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -34,10 +34,10 @@ index e1518465e4ffc473a75a57e4d9b3ad399a022589..4e7e3935a0040f48a1dc8f32e3da6d5a
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
return false;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index c137899597bf94b75b1ff80fae910db72f791bb8..6555d1e199f49c693270fb7068bc4c495038f77b 100644
+index 28b81e29be07902ad4d04aeb18bffd49757c3029..bc440f9a239d3935bf6837edf815d4fdc6093655 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -223,6 +223,11 @@ public abstract class PlayerList {
+@@ -224,6 +224,11 @@ public abstract class PlayerList {
worldserver1 = worldserver;
}
@@ -49,7 +49,7 @@ index c137899597bf94b75b1ff80fae910db72f791bb8..6555d1e199f49c693270fb7068bc4c49
player.setServerLevel(worldserver1);
String s1 = connection.getLoggableAddress(this.server.logIPs());
-@@ -354,7 +359,7 @@ public abstract class PlayerList {
+@@ -355,7 +360,7 @@ public abstract class PlayerList {
// CraftBukkit start
ServerLevel finalWorldServer = worldserver1;
Entity entity = EntityType.loadEntityRecursive(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> {
@@ -59,10 +59,10 @@ index c137899597bf94b75b1ff80fae910db72f791bb8..6555d1e199f49c693270fb7068bc4c49
});
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 4f37305c032255a33d641da66333ae7cf2fdf668..07613c1a337e4aa82daa83157f44056d90fc5c24 100644
+index cb453b843ecf82454a8ade369d424d5e7bbda4c4..dbca4d858dd3074fc0664bb6b578e94eeeed1298 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -237,6 +237,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -238,6 +238,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
}
// Paper end - Share random for entities to make them more random
@@ -70,7 +70,7 @@ index 4f37305c032255a33d641da66333ae7cf2fdf668..07613c1a337e4aa82daa83157f44056d
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
private CraftEntity bukkitEntity;
-@@ -2311,6 +2312,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2324,6 +2325,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
@@ -123,10 +123,10 @@ index faad948f089575e4988d989790cc1dd13f8a79cd..e143f42e71ac774d49b75e6d85591aa1
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 388c9db9d130071122e9f80749fb2eef05455408..3da7fbec0fb55fb590fc9ff4bd0f984a5cac9fba 100644
+index 34e4dd733a2e9ccc3c7f1b228825428100e583e9..d898b26d6d9c6999aa645f201bdbbd6e30073c0f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1018,5 +1018,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1019,5 +1019,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean fromMobSpawner() {
return getHandle().spawnedViaMobSpawner;
}
diff --git a/patches/server/0289-Add-PlayerPostRespawnEvent.patch b/patches/server/0289-Add-PlayerPostRespawnEvent.patch
index a7e32e98f6..15c48ae0e1 100644
--- a/patches/server/0289-Add-PlayerPostRespawnEvent.patch
+++ b/patches/server/0289-Add-PlayerPostRespawnEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerPostRespawnEvent
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 6555d1e199f49c693270fb7068bc4c495038f77b..60e50ce92414515c22f4d71e517504a7377c7e64 100644
+index bc440f9a239d3935bf6837edf815d4fdc6093655..6bd83549e2ff84b1bc993ef2be79a336ced28f67 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -751,9 +751,14 @@ public abstract class PlayerList {
+@@ -752,9 +752,14 @@ public abstract class PlayerList {
boolean flag2 = false;
@@ -24,7 +24,7 @@ index 6555d1e199f49c693270fb7068bc4c495038f77b..60e50ce92414515c22f4d71e517504a7
ServerLevel worldserver1 = this.server.getLevel(entityplayer.getRespawnDimension());
if (worldserver1 != null) {
Optional optional;
-@@ -805,6 +810,7 @@ public abstract class PlayerList {
+@@ -806,6 +811,7 @@ public abstract class PlayerList {
location = respawnEvent.getRespawnLocation();
if (!flag) entityplayer.reset(); // SPIGOT-4785
@@ -32,7 +32,7 @@ index 6555d1e199f49c693270fb7068bc4c495038f77b..60e50ce92414515c22f4d71e517504a7
} else {
location.setWorld(worldserver.getWorld());
}
-@@ -863,6 +869,13 @@ public abstract class PlayerList {
+@@ -864,6 +870,13 @@ public abstract class PlayerList {
if (entityplayer.connection.isDisconnected()) {
this.save(entityplayer);
}
diff --git a/patches/server/0290-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch b/patches/server/0290-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch
index 6af7f0c025..e83c1e11e6 100644
--- a/patches/server/0290-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch
+++ b/patches/server/0290-don-t-go-below-0-for-pickupDelay-breaks-picking-up-i.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items
vanilla checks for == 0
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index 1523be0c9f7ae3b8015b8017797601489c068e8c..9badb48b6004c5799132ed70ddcc767bdd72510c 100644
+index d568726f80308e29bcfa3714728096d7d0aa822c..bfbbb9382cf483a23acf35c17250f6f9223f7507 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -140,6 +140,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -141,6 +141,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
// CraftBukkit start - Use wall time for pickup and despawn timers
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
@@ -17,7 +17,7 @@ index 1523be0c9f7ae3b8015b8017797601489c068e8c..9badb48b6004c5799132ed70ddcc767b
if (this.age != -32768) this.age += elapsedTicks;
this.lastTick = MinecraftServer.currentTick;
// CraftBukkit end
-@@ -226,6 +227,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -227,6 +228,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
// CraftBukkit start - Use wall time for pickup and despawn timers
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
diff --git a/patches/server/0304-offset-item-frame-ticking.patch b/patches/server/0304-offset-item-frame-ticking.patch
index 36a404e8ff..58d95fb98a 100644
--- a/patches/server/0304-offset-item-frame-ticking.patch
+++ b/patches/server/0304-offset-item-frame-ticking.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] offset item frame ticking
diff --git a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
-index 469e4cc75eab1344a159ed5addd53f50cea7bd90..f88918b7c15b72f4cb1dd313734f550432fd5858 100644
+index b3d05578f38af41f242f6634864ce1d2ecac14f8..2446d649225f96748e2fbb1a53a9e1902ac22aa1 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/HangingEntity.java
-@@ -38,7 +38,7 @@ public abstract class HangingEntity extends Entity {
+@@ -39,7 +39,7 @@ public abstract class HangingEntity extends Entity {
protected static final Predicate<Entity> HANGING_ENTITY = (entity) -> {
return entity instanceof HangingEntity;
};
diff --git a/patches/server/0305-Prevent-consuming-the-wrong-itemstack.patch b/patches/server/0305-Prevent-consuming-the-wrong-itemstack.patch
index c1bcfd2f72..9a56dc421d 100644
--- a/patches/server/0305-Prevent-consuming-the-wrong-itemstack.patch
+++ b/patches/server/0305-Prevent-consuming-the-wrong-itemstack.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 7fb9880caa964df65402153b87a953200b930e24..a2b13486bdcd4d50631053c0611ad86d628b7f1f 100644
+index f619171b3e436d7263d5229f7f9131954a0941f8..40ad459823268af0e57a348d241ac19bb576683a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3722,9 +3722,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3730,9 +3730,14 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void startUsingItem(InteractionHand hand) {
@@ -24,7 +24,7 @@ index 7fb9880caa964df65402153b87a953200b930e24..a2b13486bdcd4d50631053c0611ad86d
this.useItem = itemstack;
this.useItemRemaining = itemstack.getUseDuration();
if (!this.level().isClientSide) {
-@@ -3804,6 +3809,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3812,6 +3817,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.releaseUsingItem();
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
@@ -32,7 +32,7 @@ index 7fb9880caa964df65402153b87a953200b930e24..a2b13486bdcd4d50631053c0611ad86d
this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
-@@ -3838,8 +3844,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3846,8 +3852,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.stopUsingItem();
diff --git a/patches/server/0310-Duplicate-UUID-Resolve-Option.patch b/patches/server/0310-Duplicate-UUID-Resolve-Option.patch
index e2ec1d638a..fd0e3d51f3 100644
--- a/patches/server/0310-Duplicate-UUID-Resolve-Option.patch
+++ b/patches/server/0310-Duplicate-UUID-Resolve-Option.patch
@@ -33,11 +33,11 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 9f8ee9d9b5fec9ca9c5e8462ed1aef742fa628ac..1b102f4c800dc6aa4e977c8ae8c9aada5d94e194 100644
+index 05b838f7008d5d031b18e161bbde7e72b8205b90..8805fd57e7198aa9afaafe45fab13fd343e2a545 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -880,6 +880,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
- entity.discard();
+ entity.discard(null); // CraftBukkit - add Bukkit remove cause
needsRemoval = true;
}
+ checkDupeUUID(world, entity); // Paper - duplicate uuid resolving
@@ -67,7 +67,7 @@ index 9f8ee9d9b5fec9ca9c5e8462ed1aef742fa628ac..1b102f4c800dc6aa4e977c8ae8c9aada
+ && Objects.equals(other.getEncodeId(), entity.getEncodeId())
+ && entity.getBukkitEntity().getLocation().distance(other.getBukkitEntity().getLocation()) < level.paperConfig().entities.spawning.duplicateUuid.safeRegenDeleteRange
+ ) {
-+ entity.discard();
++ entity.discard(null);
+ return true;
+ }
+ if (!other.isRemoved()) {
@@ -77,7 +77,7 @@ index 9f8ee9d9b5fec9ca9c5e8462ed1aef742fa628ac..1b102f4c800dc6aa4e977c8ae8c9aada
+ break;
+ }
+ case DELETE: {
-+ entity.discard();
++ entity.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD);
+ return true;
+ }
+ default:
diff --git a/patches/server/0315-Fix-items-not-falling-correctly.patch b/patches/server/0315-Fix-items-not-falling-correctly.patch
index dc83e6fd0b..304ae24a45 100644
--- a/patches/server/0315-Fix-items-not-falling-correctly.patch
+++ b/patches/server/0315-Fix-items-not-falling-correctly.patch
@@ -15,10 +15,10 @@ This patch resolves the conflict by offsetting checking Spigot's entity
activation range check from an item's move method.
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index 9badb48b6004c5799132ed70ddcc767bdd72510c..7d12bedc4b80b9bcf50f468a9204191bea0894c1 100644
+index bfbbb9382cf483a23acf35c17250f6f9223f7507..5994cb69575d365f435f5ef6da5fa61ee9298fe1 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -168,7 +168,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -169,7 +169,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
}
}
diff --git a/patches/server/0319-Alternative-item-despawn-rate.patch b/patches/server/0319-Alternative-item-despawn-rate.patch
index ea7f7848df..86340551c0 100644
--- a/patches/server/0319-Alternative-item-despawn-rate.patch
+++ b/patches/server/0319-Alternative-item-despawn-rate.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Alternative item-despawn-rate
Co-authored-by: Noah van der Aa <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index 7d12bedc4b80b9bcf50f468a9204191bea0894c1..7f8b35d6ae27086fa128abfe9b2369bb6c91ce60 100644
+index 5994cb69575d365f435f5ef6da5fa61ee9298fe1..e67e8d0593e3ba3fc8e9da59ad6494ea589ab337 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -56,6 +56,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -57,6 +57,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
public final float bobOffs;
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
public boolean canMobPickup = true; // Paper - Item#canEntityPickup
@@ -17,7 +17,7 @@ index 7d12bedc4b80b9bcf50f468a9204191bea0894c1..7f8b35d6ae27086fa128abfe9b2369bb
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
super(type, world);
-@@ -208,7 +209,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -209,7 +210,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
}
}
@@ -26,7 +26,7 @@ index 7d12bedc4b80b9bcf50f468a9204191bea0894c1..7f8b35d6ae27086fa128abfe9b2369bb
// CraftBukkit start - fire ItemDespawnEvent
if (CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
this.age = 0;
-@@ -232,7 +233,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -233,7 +234,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
this.lastTick = MinecraftServer.currentTick;
// CraftBukkit end
@@ -35,7 +35,7 @@ index 7d12bedc4b80b9bcf50f468a9204191bea0894c1..7f8b35d6ae27086fa128abfe9b2369bb
// CraftBukkit start - fire ItemDespawnEvent
if (org.bukkit.craftbukkit.event.CraftEventFactory.callItemDespawnEvent(this).isCancelled()) {
this.age = 0;
-@@ -288,7 +289,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -289,7 +290,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
private boolean isMergable() {
ItemStack itemstack = this.getItem();
@@ -44,7 +44,7 @@ index 7d12bedc4b80b9bcf50f468a9204191bea0894c1..7f8b35d6ae27086fa128abfe9b2369bb
}
private void tryToMerge(ItemEntity other) {
-@@ -531,6 +532,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -532,6 +533,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
public void setItem(ItemStack stack) {
this.getEntityData().set(ItemEntity.DATA_ITEM, stack);
@@ -52,7 +52,7 @@ index 7d12bedc4b80b9bcf50f468a9204191bea0894c1..7f8b35d6ae27086fa128abfe9b2369bb
}
@Override
-@@ -585,7 +587,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -586,7 +588,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
public void makeFakeItem() {
this.setNeverPickUp();
diff --git a/patches/server/0321-Fix-items-vanishing-through-end-portal.patch b/patches/server/0321-Fix-items-vanishing-through-end-portal.patch
index 5c6d4febc3..73800a3205 100644
--- a/patches/server/0321-Fix-items-vanishing-through-end-portal.patch
+++ b/patches/server/0321-Fix-items-vanishing-through-end-portal.patch
@@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the
heightmap resolves the issue without having to load all spawn chunks.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 07613c1a337e4aa82daa83157f44056d90fc5c24..ee095e846697e316f5cb1506ee6f14519cbf51b0 100644
+index dbca4d858dd3074fc0664bb6b578e94eeeed1298..d539252518edcf9849acf5174f8285b571769780 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -3347,6 +3347,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3360,6 +3360,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (flag1) {
blockposition1 = ServerLevel.END_SPAWN_POINT;
} else {
diff --git a/patches/server/0327-Add-ThrownEggHatchEvent.patch b/patches/server/0327-Add-ThrownEggHatchEvent.patch
index ff26a49628..acec0a7669 100644
--- a/patches/server/0327-Add-ThrownEggHatchEvent.patch
+++ b/patches/server/0327-Add-ThrownEggHatchEvent.patch
@@ -7,10 +7,10 @@ Adds a new event similar to PlayerEggThrowEvent, but without the Player requirem
(dispensers can throw eggs to hatch them, too).
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
-index 98d42143e70c5be809deb6c03270987ff9db46d5..785196e6f4677074890ca965e9add85ccfd0e6e3 100644
+index 02da4d1ff3c72e8adad2f4cee449ad21dec34e02..82bb8004635865f5202578d5a6f520048e7269d5 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEgg.java
-@@ -82,6 +82,13 @@ public class ThrownEgg extends ThrowableItemProjectile {
+@@ -83,6 +83,13 @@ public class ThrownEgg extends ThrowableItemProjectile {
}
}
// CraftBukkit end
diff --git a/patches/server/0328-Entity-Jump-API.patch b/patches/server/0328-Entity-Jump-API.patch
index ffc89eac23..676ae3c4cc 100644
--- a/patches/server/0328-Entity-Jump-API.patch
+++ b/patches/server/0328-Entity-Jump-API.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Entity Jump API
public net.minecraft.world.entity.LivingEntity jumping
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index a2b13486bdcd4d50631053c0611ad86d628b7f1f..c68eba06077c6f6894f2cc2947f51d8d1c86ef94 100644
+index 40ad459823268af0e57a348d241ac19bb576683a..f441d7a1188cecd91206d78b58457c330e4e8663 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3296,8 +3296,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3304,8 +3304,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
} else if (this.isInLava() && (!this.onGround() || d3 > d4)) {
this.jumpInLiquid(FluidTags.LAVA);
} else if ((this.onGround() || flag && d3 <= d4) && this.noJumpDelay == 0) {
@@ -22,10 +22,10 @@ index a2b13486bdcd4d50631053c0611ad86d628b7f1f..c68eba06077c6f6894f2cc2947f51d8d
} else {
this.noJumpDelay = 0;
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
-index 3d947293d33407e5d24f8fba738ab872e1d890b6..48df7de02e0765bfe62ae1b8a4c0029743430221 100644
+index 9c70f3bf7cc37a7df9d1b8c5d5f0f6264680e421..4224e8e75613b6ec0228b2757cb98140d83bc2e2 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
-@@ -527,7 +527,9 @@ public class Panda extends Animal {
+@@ -528,7 +528,9 @@ public class Panda extends Animal {
Panda entitypanda = (Panda) iterator.next();
if (!entitypanda.isBaby() && entitypanda.onGround() && !entitypanda.isInWater() && entitypanda.canPerformAction()) {
@@ -50,7 +50,7 @@ index aba20a4352d8983b01ab5d329187588f68d3e405..aac60e85cd6dba7d87f4a1663c2c6295
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index ea9a6446ed2dbddedbc615df93c9856a0a1f1a2e..fd18531ff94daa6dc2994a69e1e647078a5a664c 100644
+index c9a487c1b85d46c1ce25147bd8a610a5631cdb5d..4cd34eb1930b9324be08e83aab21fc960eb7fca6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -935,5 +935,19 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
diff --git a/patches/server/0329-Add-option-to-nerf-pigmen-from-nether-portals.patch b/patches/server/0329-Add-option-to-nerf-pigmen-from-nether-portals.patch
index 14213f70e5..42e967d07a 100644
--- a/patches/server/0329-Add-option-to-nerf-pigmen-from-nether-portals.patch
+++ b/patches/server/0329-Add-option-to-nerf-pigmen-from-nether-portals.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index ee095e846697e316f5cb1506ee6f14519cbf51b0..fa0f57779251ea785dfa4fe299c1505e46aa1446 100644
+index d539252518edcf9849acf5174f8285b571769780..c113175f392710d2032f03a08e0243a02efe0709 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -396,6 +396,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -397,6 +397,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void inactiveTick() { }
// Spigot end
protected int numCollisions = 0; // Paper - Cap entity collisions
@@ -16,7 +16,7 @@ index ee095e846697e316f5cb1506ee6f14519cbf51b0..fa0f57779251ea785dfa4fe299c1505e
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
// Paper start - Entity origin API
@javax.annotation.Nullable
-@@ -2170,6 +2171,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2183,6 +2184,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (spawnedViaMobSpawner) {
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
}
@@ -26,7 +26,7 @@ index ee095e846697e316f5cb1506ee6f14519cbf51b0..fa0f57779251ea785dfa4fe299c1505e
// Paper end
return nbttagcompound;
} catch (Throwable throwable) {
-@@ -2312,6 +2316,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2325,6 +2329,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
diff --git a/patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch b/patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch
index c787ae5d9c..955f81df44 100644
--- a/patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch
+++ b/patches/server/0331-add-hand-to-BlockMultiPlaceEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] add hand to BlockMultiPlaceEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index a08d1250cd5a5cc70e3796ac56a0cfaee6fe2b83..2b342f81ae8bfefe2a240351f28fcafc40609a75 100644
+index 542b9ff7d845dcebcf6569a6d4bd9e97ac3a436d..3dee6c973d4b4ac6f64fdcb5ac7fa681cefbdb1c 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -400,13 +400,18 @@ public class CraftEventFactory {
+@@ -401,13 +401,18 @@ public class CraftEventFactory {
}
org.bukkit.inventory.ItemStack item;
diff --git a/patches/server/0345-Dead-Player-s-shouldn-t-be-able-to-move.patch b/patches/server/0345-Dead-Player-s-shouldn-t-be-able-to-move.patch
index 8f01e2761d..78095e6dba 100644
--- a/patches/server/0345-Dead-Player-s-shouldn-t-be-able-to-move.patch
+++ b/patches/server/0345-Dead-Player-s-shouldn-t-be-able-to-move.patch
@@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing
due to 1.15's new queue but processed while dead.
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 6ab6f520f2ccb60646660cb2990c5b91a0e91909..d00d6cf28212ed72f49953a198caa447aefc138c 100644
+index 3c3c953f05c18279d3245fe6bc8afef83cd62cd1..603e003fbd39870a0e249151885b3b8f3e120afe 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1152,7 +1152,7 @@ public abstract class Player extends LivingEntity {
+@@ -1153,7 +1153,7 @@ public abstract class Player extends LivingEntity {
@Override
protected boolean isImmobile() {
diff --git a/patches/server/0346-Don-t-move-existing-players-to-world-spawn.patch b/patches/server/0346-Don-t-move-existing-players-to-world-spawn.patch
index 6d3a5af0c4..f002120e54 100644
--- a/patches/server/0346-Don-t-move-existing-players-to-world-spawn.patch
+++ b/patches/server/0346-Don-t-move-existing-players-to-world-spawn.patch
@@ -35,10 +35,10 @@ index e695b5ee0b9ce5dad81a7f894ef1e7fd868f11eb..b6698a65d778cea6b7dc9b8ebfceec24
this.gameMode.setLevel((ServerLevel) world);
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 60e50ce92414515c22f4d71e517504a7377c7e64..4530ba80f7d3983cf4ed9908eb1109c58aa425f2 100644
+index 6bd83549e2ff84b1bc993ef2be79a336ced28f67..8f23597eee06e721a25f7be3a5a65dff6a59ee55 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -226,6 +226,7 @@ public abstract class PlayerList {
+@@ -227,6 +227,7 @@ public abstract class PlayerList {
// Paper start - Entity#getEntitySpawnReason
if (nbttagcompound == null) {
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
diff --git a/patches/server/0351-Don-t-run-entity-collision-code-if-not-needed.patch b/patches/server/0351-Don-t-run-entity-collision-code-if-not-needed.patch
index 9f5acbc6c1..5c6be151ec 100644
--- a/patches/server/0351-Don-t-run-entity-collision-code-if-not-needed.patch
+++ b/patches/server/0351-Don-t-run-entity-collision-code-if-not-needed.patch
@@ -12,10 +12,10 @@ The entity's current team collision rule causes them to NEVER collide.
Co-authored-by: Owen1212055 <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index c68eba06077c6f6894f2cc2947f51d8d1c86ef94..6112571e2e0bc9fe66d68fd095d395168c817822 100644
+index f441d7a1188cecd91206d78b58457c330e4e8663..178d8e9795a6c451e0ff350d9412bc2e0ee686ae 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3411,10 +3411,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3419,10 +3419,24 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.level().isClientSide()) {
this.level().getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
} else {
diff --git a/patches/server/0354-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch b/patches/server/0354-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch
index a42a520a66..be256ac7cb 100644
--- a/patches/server/0354-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch
+++ b/patches/server/0354-Fire-PlayerJoinEvent-when-Player-is-actually-ready.patch
@@ -31,7 +31,7 @@ delays anymore.
public net.minecraft.server.level.ChunkMap addEntity(Lnet/minecraft/world/entity/Entity;)V
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 2c954f8a91b9f50ce69eda475b22d4159b87d277..5ef08156aa2e93e42eed586a4014c6208ddb20c1 100644
+index 2fba58fd5c9b17512eadacb899c59a04df5d415f..4c1dd470ac561f61d7f49adf90d273b1f293d296 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1459,6 +1459,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -55,10 +55,10 @@ index eb0a0a9faacf3c7d879b435b637a9c8203319aa6..e5653695a3fbcd260ce44ca37291406a
// CraftBukkit end
public boolean isRealPlayer; // Paper
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 4530ba80f7d3983cf4ed9908eb1109c58aa425f2..16d43da0144eb3f77f639568a82e3c9d1bb7e260 100644
+index 8f23597eee06e721a25f7be3a5a65dff6a59ee55..c5614cc12789fdfad3519434e115a50c12844b3b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -295,6 +295,12 @@ public abstract class PlayerList {
+@@ -296,6 +296,12 @@ public abstract class PlayerList {
this.playersByUUID.put(player.getUUID(), player);
// this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
@@ -71,7 +71,7 @@ index 4530ba80f7d3983cf4ed9908eb1109c58aa425f2..16d43da0144eb3f77f639568a82e3c9d
// CraftBukkit start
CraftPlayer bukkitPlayer = player.getBukkitEntity();
-@@ -333,6 +339,8 @@ public abstract class PlayerList {
+@@ -334,6 +340,8 @@ public abstract class PlayerList {
player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1)));
}
player.sentListPacket = true;
@@ -80,7 +80,7 @@ index 4530ba80f7d3983cf4ed9908eb1109c58aa425f2..16d43da0144eb3f77f639568a82e3c9d
// CraftBukkit end
player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
-@@ -355,6 +363,11 @@ public abstract class PlayerList {
+@@ -356,6 +364,11 @@ public abstract class PlayerList {
playerconnection.send(new ClientboundUpdateMobEffectPacket(player.getId(), mobeffect));
}
@@ -92,7 +92,7 @@ index 4530ba80f7d3983cf4ed9908eb1109c58aa425f2..16d43da0144eb3f77f639568a82e3c9d
if (nbttagcompound != null && nbttagcompound.contains("RootVehicle", 10)) {
CompoundTag nbttagcompound1 = nbttagcompound.getCompound("RootVehicle");
// CraftBukkit start
-@@ -403,6 +416,10 @@ public abstract class PlayerList {
+@@ -404,6 +417,10 @@ public abstract class PlayerList {
}
}
diff --git a/patches/server/0355-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch b/patches/server/0355-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch
index b8cdeec362..b1783ef458 100644
--- a/patches/server/0355-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch
+++ b/patches/server/0355-Move-player-to-spawn-point-if-spawn-in-unloaded-worl.patch
@@ -10,10 +10,10 @@ Co-authored-by: Wyatt Childers <[email protected]>
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 16d43da0144eb3f77f639568a82e3c9d1bb7e260..54aba3118157f72491cb8c3d5fb5c63750ea6878 100644
+index c5614cc12789fdfad3519434e115a50c12844b3b..d0e158235915e4efc8bda99d552d029cd8680035 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -194,7 +194,7 @@ public abstract class PlayerList {
+@@ -195,7 +195,7 @@ public abstract class PlayerList {
}
CompoundTag nbttagcompound = this.load(player);
@@ -22,7 +22,7 @@ index 16d43da0144eb3f77f639568a82e3c9d1bb7e260..54aba3118157f72491cb8c3d5fb5c637
// CraftBukkit start - Better rename detection
if (nbttagcompound != null && nbttagcompound.contains("bukkit")) {
CompoundTag bukkit = nbttagcompound.getCompound("bukkit");
-@@ -202,15 +202,42 @@ public abstract class PlayerList {
+@@ -203,15 +203,42 @@ public abstract class PlayerList {
}
// CraftBukkit end
@@ -67,7 +67,7 @@ index 16d43da0144eb3f77f639568a82e3c9d1bb7e260..54aba3118157f72491cb8c3d5fb5c637
ResourceKey<Level> resourcekey1 = resourcekey;
ServerLevel worldserver = this.server.getLevel(resourcekey1);
-@@ -219,6 +246,7 @@ public abstract class PlayerList {
+@@ -220,6 +247,7 @@ public abstract class PlayerList {
if (worldserver == null) {
PlayerList.LOGGER.warn("Unknown respawn dimension {}, defaulting to overworld", resourcekey1);
worldserver1 = this.server.overworld();
@@ -75,7 +75,7 @@ index 16d43da0144eb3f77f639568a82e3c9d1bb7e260..54aba3118157f72491cb8c3d5fb5c637
} else {
worldserver1 = worldserver;
}
-@@ -226,6 +254,10 @@ public abstract class PlayerList {
+@@ -227,6 +255,10 @@ public abstract class PlayerList {
// Paper start - Entity#getEntitySpawnReason
if (nbttagcompound == null) {
player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
@@ -87,10 +87,10 @@ index 16d43da0144eb3f77f639568a82e3c9d1bb7e260..54aba3118157f72491cb8c3d5fb5c637
}
// Paper end - Entity#getEntitySpawnReason
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index fa0f57779251ea785dfa4fe299c1505e46aa1446..828ffad0902d28c0dc86995f5f7270c54cd9d32c 100644
+index c113175f392710d2032f03a08e0243a02efe0709..97dd8b932426496694b50984b1dcff390711e4c9 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2273,27 +2273,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2286,27 +2286,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
// CraftBukkit end
diff --git a/patches/server/0356-Add-PlayerAttackEntityCooldownResetEvent.patch b/patches/server/0356-Add-PlayerAttackEntityCooldownResetEvent.patch
index 98ecc333d3..35dea473a5 100644
--- a/patches/server/0356-Add-PlayerAttackEntityCooldownResetEvent.patch
+++ b/patches/server/0356-Add-PlayerAttackEntityCooldownResetEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerAttackEntityCooldownResetEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 6112571e2e0bc9fe66d68fd095d395168c817822..8fff7d4c98e198bba0b4076807adc67476fcaf4b 100644
+index 178d8e9795a6c451e0ff350d9412bc2e0ee686ae..d53069d6b0be5a82f7b34a336439fdfd356e4a79 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2203,7 +2203,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2211,7 +2211,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
EntityDamageEvent event = CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, hardHat, blocking, armor, resistance, magic, absorption);
if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {
diff --git a/patches/server/0359-Fix-item-duplication-and-teleport-issues.patch b/patches/server/0359-Fix-item-duplication-and-teleport-issues.patch
index 9929b92856..b15c4048e1 100644
--- a/patches/server/0359-Fix-item-duplication-and-teleport-issues.patch
+++ b/patches/server/0359-Fix-item-duplication-and-teleport-issues.patch
@@ -16,10 +16,10 @@ 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 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7bbf10475 100644
+index 97dd8b932426496694b50984b1dcff390711e4c9..4123d523d57f3a267753a871e938de675fcaf8c8 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2403,11 +2403,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2416,11 +2416,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} else {
// CraftBukkit start - Capture drops for death event
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
@@ -34,7 +34,7 @@ index 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7
entityitem.setDefaultPickUpDelay();
// CraftBukkit start
-@@ -3206,6 +3207,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3219,6 +3220,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@Nullable
public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
// CraftBukkit end
@@ -47,7 +47,7 @@ index 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7
if (this.level() instanceof ServerLevel && !this.isRemoved()) {
this.level().getProfiler().push("changeDimension");
// CraftBukkit start
-@@ -3232,6 +3239,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3245,6 +3252,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit end
this.level().getProfiler().popPush("reloading");
@@ -59,7 +59,7 @@ index 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7
Entity entity = this.getType().create(worldserver);
if (entity != null) {
-@@ -3249,10 +3261,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3262,10 +3274,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit start - Forward the CraftEntity to the new entity
this.getBukkitEntity().setHandle(entity);
entity.bukkitEntity = this.getBukkitEntity();
@@ -70,7 +70,7 @@ index 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7
// CraftBukkit end
}
-@@ -3371,7 +3379,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3384,7 +3392,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public boolean canChangeDimensions() {
@@ -80,10 +80,10 @@ index 828ffad0902d28c0dc86995f5f7270c54cd9d32c..7fc411c91b722d1f3494ef8eb37eeed7
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 8fff7d4c98e198bba0b4076807adc67476fcaf4b..035faf890c02ebd5bdbb430dc473e7a1bc7b9fd1 100644
+index d53069d6b0be5a82f7b34a336439fdfd356e4a79..67ff37d395f83c1a0f5c8305375f703cbe4c0609 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1706,9 +1706,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1714,9 +1714,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Paper start
org.bukkit.event.entity.EntityDeathEvent deathEvent = this.dropAllDeathLoot(damageSource);
if (deathEvent == null || !deathEvent.isCancelled()) {
@@ -96,7 +96,7 @@ index 8fff7d4c98e198bba0b4076807adc67476fcaf4b..035faf890c02ebd5bdbb430dc473e7a1
// Paper start - clear equipment if event is not cancelled
if (this instanceof Mob) {
for (EquipmentSlot slot : this.clearedEquipmentSlots) {
-@@ -1809,8 +1809,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1817,8 +1817,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.dropCustomDeathLoot(source, i, flag);
this.clearEquipmentSlots = prev; // Paper
}
@@ -113,10 +113,10 @@ index 8fff7d4c98e198bba0b4076807adc67476fcaf4b..035faf890c02ebd5bdbb430dc473e7a1
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 ddd512e1d7608ec051fb5adf6ec2c6bbb93f5a9d..4e3cf19b83410f3bcacd953a600bf0bed6e45450 100644
+index 11555d1b771f93234098a3bc6a6eaacddeeeb4f6..bc1a95f466b700bb0530cf0bb61fcbcbe21f5bbb 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-@@ -624,7 +624,7 @@ public class ArmorStand extends LivingEntity {
+@@ -625,7 +625,7 @@ public class ArmorStand extends LivingEntity {
for (i = 0; i < this.handItems.size(); ++i) {
itemstack = (ItemStack) this.handItems.get(i);
if (!itemstack.isEmpty()) {
@@ -125,7 +125,7 @@ index ddd512e1d7608ec051fb5adf6ec2c6bbb93f5a9d..4e3cf19b83410f3bcacd953a600bf0be
this.handItems.set(i, ItemStack.EMPTY);
}
}
-@@ -632,7 +632,7 @@ public class ArmorStand extends LivingEntity {
+@@ -633,7 +633,7 @@ public class ArmorStand extends LivingEntity {
for (i = 0; i < this.armorItems.size(); ++i) {
itemstack = (ItemStack) this.armorItems.get(i);
if (!itemstack.isEmpty()) {
@@ -135,10 +135,10 @@ index ddd512e1d7608ec051fb5adf6ec2c6bbb93f5a9d..4e3cf19b83410f3bcacd953a600bf0be
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 2b342f81ae8bfefe2a240351f28fcafc40609a75..c9fbc54d7ba10da4f4c376e029b64fb0249171a3 100644
+index 3dee6c973d4b4ac6f64fdcb5ac7fa681cefbdb1c..8da01bdaa2a1c621947b6a50b178eec10deb1250 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -893,6 +893,11 @@ public class CraftEventFactory {
+@@ -894,6 +894,11 @@ public class CraftEventFactory {
}
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, List<org.bukkit.inventory.ItemStack> drops) {
@@ -150,7 +150,7 @@ index 2b342f81ae8bfefe2a240351f28fcafc40609a75..c9fbc54d7ba10da4f4c376e029b64fb0
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
populateFields(victim, event); // Paper - make cancellable
-@@ -906,11 +911,13 @@ public class CraftEventFactory {
+@@ -907,11 +912,13 @@ public class CraftEventFactory {
playDeathSound(victim, event);
// Paper end
victim.expToDrop = event.getDroppedExp();
diff --git a/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch b/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch
index 0ceb6d01a5..0a587ebe4d 100644
--- a/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch
+++ b/patches/server/0366-Deobfuscate-stacktraces-in-log-messages-crash-report.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
diff --git a/build.gradle.kts b/build.gradle.kts
-index 1a0d26d4604b10fd85797a774a2d159cbd237d7e..76ae7fd188adc1c48d4a58253824e0ff75887339 100644
+index b48f8b7e248eb2349c7f06fdf282b741a91554d9..753624bbd4f051952c22cea9902de706626fa2ba 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -35,6 +35,7 @@ dependencies {
@@ -17,7 +17,7 @@ index 1a0d26d4604b10fd85797a774a2d159cbd237d7e..76ae7fd188adc1c48d4a58253824e0ff
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
runtimeOnly("com.mysql:mysql-connector-j:8.2.0")
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
-@@ -125,6 +126,18 @@ tasks.check {
+@@ -126,6 +127,18 @@ tasks.check {
}
// Paper end
diff --git a/patches/server/0369-Option-for-maximum-exp-value-when-merging-orbs.patch b/patches/server/0369-Option-for-maximum-exp-value-when-merging-orbs.patch
index 92d8c7cf17..415b0289b4 100644
--- a/patches/server/0369-Option-for-maximum-exp-value-when-merging-orbs.patch
+++ b/patches/server/0369-Option-for-maximum-exp-value-when-merging-orbs.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Option for maximum exp value when merging orbs
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index c9fbc54d7ba10da4f4c376e029b64fb0249171a3..fdfefa9cba2feb1d27676a6003780382b8f99cb4 100644
+index 8da01bdaa2a1c621947b6a50b178eec10deb1250..89469dd94c8baecaef5253ee3693c841302d5e57 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -702,16 +702,30 @@ public class CraftEventFactory {
+@@ -703,16 +703,30 @@ public class CraftEventFactory {
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
double radius = world.spigotConfig.expMerge;
if (radius > 0) {
@@ -30,7 +30,7 @@ index c9fbc54d7ba10da4f4c376e029b64fb0249171a3..fdfefa9cba2feb1d27676a6003780382
+ xp.value = maxValue;
+ } else {
xp.value += loopItem.value;
- loopItem.discard();
+ loopItem.discard(null); // Add Bukkit remove cause
+ } // Paper end - Maximum exp value when merging
}
}
diff --git a/patches/server/0370-ExperienceOrbMergeEvent.patch b/patches/server/0370-ExperienceOrbMergeEvent.patch
index 790fbce8a6..8795420449 100644
--- a/patches/server/0370-ExperienceOrbMergeEvent.patch
+++ b/patches/server/0370-ExperienceOrbMergeEvent.patch
@@ -9,10 +9,10 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor
metadata such as spawn reason, or conditionally move data from source to target.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index fdfefa9cba2feb1d27676a6003780382b8f99cb4..2fbcd11ff457c9569bf011f94ed9658c7a85b743 100644
+index 89469dd94c8baecaef5253ee3693c841302d5e57..0a169b4cf47ff3d05555af6c0e0b0cdb30ba9e45 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -711,7 +711,7 @@ public class CraftEventFactory {
+@@ -712,7 +712,7 @@ public class CraftEventFactory {
for (Entity e : entities) {
if (e instanceof net.minecraft.world.entity.ExperienceOrb loopItem) {
// Paper start
diff --git a/patches/server/0374-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch b/patches/server/0374-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch
index d47ba47011..8fe6d83626 100644
--- a/patches/server/0374-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch
+++ b/patches/server/0374-Ensure-EntityRaider-respects-game-and-entity-rules-f.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Ensure EntityRaider respects game and entity rules for
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
-index b35fcab88e9fd883a854c6861b6c69d725105539..49e07b33fccfe339712e5d1bd72e6c0edbd2e922 100644
+index c34a055f85820d9be653b0effbd5345aa4bca9c2..f696ae53bf1192b2ebfcd6406adfdb494ab2521c 100644
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
+++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java
-@@ -312,6 +312,7 @@ public abstract class Raider extends PatrollingMonster {
+@@ -315,6 +315,7 @@ public abstract class Raider extends PatrollingMonster {
@Override
public boolean canUse() {
diff --git a/patches/server/0375-Ensure-safe-gateway-teleport.patch b/patches/server/0375-Ensure-safe-gateway-teleport.patch
index f0c0928d23..cf80905d38 100644
--- a/patches/server/0375-Ensure-safe-gateway-teleport.patch
+++ b/patches/server/0375-Ensure-safe-gateway-teleport.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Ensure safe gateway teleport
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
-index 223550eccdf0a5596b8595a30f02ad891ffd91ea..d0e8842a2c4f7dbd0d6ac3694b2a6a5395d8a542 100644
+index a57743b21b6075ba01def0a41fecbf90b2df7f85..54f7bdd0e003ed170d739593199a2bb8ff0bbd68 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
-@@ -105,7 +105,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
+@@ -106,7 +106,14 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
List<Entity> list = world.getEntitiesOfClass(Entity.class, new AABB(pos), TheEndGatewayBlockEntity::canEntityTeleport);
if (!list.isEmpty()) {
diff --git a/patches/server/0382-Fix-sand-duping.patch b/patches/server/0382-Fix-sand-duping.patch
index 955e201da1..f99be8b6c7 100644
--- a/patches/server/0382-Fix-sand-duping.patch
+++ b/patches/server/0382-Fix-sand-duping.patch
@@ -7,10 +7,10 @@ If the falling block dies during teleportation (entity#move), then we need
to detect that by placing a check after the move.
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-index e2f90b822f25bf100eaba0cf4518849f788ee2fa..67875e854d66b62c36fcca455f02f5abf3ebfdb3 100644
+index c0477f913867c67809978a4f240303151d81e6ea..33cc2d1a4723ec07c4201eb6e0080d5e0281e1f0 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-@@ -131,6 +131,11 @@ public class FallingBlockEntity extends Entity {
+@@ -132,6 +132,11 @@ public class FallingBlockEntity extends Entity {
@Override
public void tick() {
@@ -20,9 +20,9 @@ index e2f90b822f25bf100eaba0cf4518849f788ee2fa..67875e854d66b62c36fcca455f02f5ab
+ }
+ // Paper end - fix sand duping
if (this.blockState.isAir()) {
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
} else {
-@@ -142,6 +147,11 @@ public class FallingBlockEntity extends Entity {
+@@ -143,6 +148,11 @@ public class FallingBlockEntity extends Entity {
}
this.move(MoverType.SELF, this.getDeltaMovement());
diff --git a/patches/server/0390-Ensure-Entity-position-and-AABB-are-never-invalid.patch b/patches/server/0390-Ensure-Entity-position-and-AABB-are-never-invalid.patch
index 3c79f53265..bd4d3fe4e9 100644
--- a/patches/server/0390-Ensure-Entity-position-and-AABB-are-never-invalid.patch
+++ b/patches/server/0390-Ensure-Entity-position-and-AABB-are-never-invalid.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Ensure Entity position and AABB are never invalid
Co-authored-by: Spottedleaf <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 7fc411c91b722d1f3494ef8eb37eeed7bbf10475..5528fc04283c4578a6c9b47e9ddcc63d6a77e76a 100644
+index 4123d523d57f3a267753a871e938de675fcaf8c8..dfea1879b8ab8d12bc7530ccf409f4d24978105d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -639,8 +639,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -652,8 +652,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void setPos(double x, double y, double z) {
@@ -20,7 +20,7 @@ index 7fc411c91b722d1f3494ef8eb37eeed7bbf10475..5528fc04283c4578a6c9b47e9ddcc63d
}
protected AABB makeBoundingBox() {
-@@ -4133,7 +4133,29 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4146,7 +4146,29 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale);
}
@@ -50,7 +50,7 @@ index 7fc411c91b722d1f3494ef8eb37eeed7bbf10475..5528fc04283c4578a6c9b47e9ddcc63d
if (this.position.x != x || this.position.y != y || this.position.z != z) {
this.position = new Vec3(x, y, z);
int i = Mth.floor(x);
-@@ -4151,6 +4173,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4164,6 +4186,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.levelCallback.onMove();
}
diff --git a/patches/server/0400-Add-entity-liquid-API.patch b/patches/server/0400-Add-entity-liquid-API.patch
index 3d2fc104d1..a13db460a4 100644
--- a/patches/server/0400-Add-entity-liquid-API.patch
+++ b/patches/server/0400-Add-entity-liquid-API.patch
@@ -8,10 +8,10 @@ public net.minecraft.world.entity.Entity isInRain()Z
public net.minecraft.world.entity.Entity isInBubbleColumn()Z
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 3da7fbec0fb55fb590fc9ff4bd0f984a5cac9fba..c17bb16567ad2354dc80e710469730b1dbc55b08 100644
+index d898b26d6d9c6999aa645f201bdbbd6e30073c0f..061b7215a678c8ec563bdb9c2a8beb65061faf0e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1023,5 +1023,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1024,5 +1024,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason getEntitySpawnReason() {
return getHandle().spawnReason;
}
diff --git a/patches/server/0402-Add-PrepareResultEvent.patch b/patches/server/0402-Add-PrepareResultEvent.patch
index 4a6f392905..8426a573bd 100644
--- a/patches/server/0402-Add-PrepareResultEvent.patch
+++ b/patches/server/0402-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 2fbcd11ff457c9569bf011f94ed9658c7a85b743..5a7946d3877eece469f21ee512342847101b2f67 100644
+index 0a169b4cf47ff3d05555af6c0e0b0cdb30ba9e45..67bfd38bd08c30eae597a4875ea4a8b26c2f5c5a 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1646,6 +1646,12 @@ public class CraftEventFactory {
+@@ -1647,6 +1647,12 @@ public class CraftEventFactory {
}
public static PrepareAnvilEvent callPrepareAnvilEvent(InventoryView view, ItemStack item) {
@@ -110,7 +110,7 @@ index 2fbcd11ff457c9569bf011f94ed9658c7a85b743..5a7946d3877eece469f21ee512342847
PrepareAnvilEvent event = new PrepareAnvilEvent(view, CraftItemStack.asCraftMirror(item).clone());
event.getView().getPlayer().getServer().getPluginManager().callEvent(event);
event.getInventory().setItem(2, event.getResult());
-@@ -1653,6 +1659,12 @@ public class CraftEventFactory {
+@@ -1654,6 +1660,12 @@ public class CraftEventFactory {
}
public static PrepareGrindstoneEvent callPrepareGrindstoneEvent(InventoryView view, ItemStack item) {
@@ -123,7 +123,7 @@ index 2fbcd11ff457c9569bf011f94ed9658c7a85b743..5a7946d3877eece469f21ee512342847
PrepareGrindstoneEvent event = new PrepareGrindstoneEvent(view, CraftItemStack.asCraftMirror(item).clone());
event.getView().getPlayer().getServer().getPluginManager().callEvent(event);
event.getInventory().setItem(2, event.getResult());
-@@ -1660,12 +1672,39 @@ public class CraftEventFactory {
+@@ -1661,12 +1673,39 @@ public class CraftEventFactory {
}
public static PrepareSmithingEvent callPrepareSmithingEvent(InventoryView view, ItemStack item) {
diff --git a/patches/server/0403-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch b/patches/server/0403-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch
index 08e42c9d20..c744a5628c 100644
--- a/patches/server/0403-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch
+++ b/patches/server/0403-Don-t-check-chunk-for-portal-on-world-gen-entity-add.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Don't check chunk for portal on world gen entity add
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 035faf890c02ebd5bdbb430dc473e7a1bc7b9fd1..0e009d34a17b7fbebb8bd815cef9df191cd906a5 100644
+index 67ff37d395f83c1a0f5c8305375f703cbe4c0609..4aad2d99148a0d6ee06049f20de2aaa6218c1d39 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3523,7 +3523,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3531,7 +3531,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Entity entity = this.getVehicle();
super.stopRiding(suppressCancellation); // Paper - Force entity dismount during teleportation
diff --git a/patches/server/0404-Fix-arrows-never-despawning-MC-125757.patch b/patches/server/0404-Fix-arrows-never-despawning-MC-125757.patch
index f18ca77619..d3111cf5b4 100644
--- a/patches/server/0404-Fix-arrows-never-despawning-MC-125757.patch
+++ b/patches/server/0404-Fix-arrows-never-despawning-MC-125757.patch
@@ -9,10 +9,10 @@ instead of getting stuck in a never despawn state (bubble columns,
etc).
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-index f3861cea4eb6a39fa16936383f8dabc6689a58a9..0e1d4bd6f70e439b33eca57bf06e9e090825f58a 100644
+index f1d7f202b99b8ae4c16d10956d68d74efae8445b..913f0eb1d9081cd224b54df401ff4a0af2989f1f 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-@@ -207,6 +207,7 @@ public abstract class AbstractArrow extends Projectile {
+@@ -208,6 +208,7 @@ public abstract class AbstractArrow extends Projectile {
++this.inGroundTime;
} else {
diff --git a/patches/server/0406-Fix-SPIGOT-5989.patch b/patches/server/0406-Fix-SPIGOT-5989.patch
index f71f29884f..fc6ae89551 100644
--- a/patches/server/0406-Fix-SPIGOT-5989.patch
+++ b/patches/server/0406-Fix-SPIGOT-5989.patch
@@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is
still at a respawn anchor.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 54aba3118157f72491cb8c3d5fb5c63750ea6878..4959c1cc9f1ceead9da42e6d12903d13882a1c17 100644
+index d0e158235915e4efc8bda99d552d029cd8680035..b43dd483d99a0021ccb0a2e690e19aec5f4da606 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -804,6 +804,7 @@ public abstract class PlayerList {
+@@ -805,6 +805,7 @@ public abstract class PlayerList {
// Paper start - Add PlayerPostRespawnEvent
boolean isBedSpawn = false;
boolean isRespawn = false;
@@ -21,7 +21,7 @@ index 54aba3118157f72491cb8c3d5fb5c63750ea6878..4959c1cc9f1ceead9da42e6d12903d13
// Paper end - Add PlayerPostRespawnEvent
// CraftBukkit start - fire PlayerRespawnEvent
-@@ -814,7 +815,7 @@ public abstract class PlayerList {
+@@ -815,7 +816,7 @@ public abstract class PlayerList {
Optional optional;
if (blockposition != null) {
@@ -30,7 +30,7 @@ index 54aba3118157f72491cb8c3d5fb5c63750ea6878..4959c1cc9f1ceead9da42e6d12903d13
} else {
optional = Optional.empty();
}
-@@ -858,7 +859,12 @@ public abstract class PlayerList {
+@@ -859,7 +860,12 @@ public abstract class PlayerList {
}
// Spigot End
@@ -44,7 +44,7 @@ index 54aba3118157f72491cb8c3d5fb5c63750ea6878..4959c1cc9f1ceead9da42e6d12903d13
if (!flag) entityplayer.reset(); // SPIGOT-4785
isRespawn = true; // Paper - Add PlayerPostRespawnEvent
} else {
-@@ -896,8 +902,14 @@ public abstract class PlayerList {
+@@ -897,8 +903,14 @@ public abstract class PlayerList {
}
// entityplayer1.initInventoryMenu();
entityplayer1.setHealth(entityplayer1.getHealth());
diff --git a/patches/server/0417-Add-moon-phase-API.patch b/patches/server/0417-Add-moon-phase-API.patch
index a3c7110453..7a3bfa49f6 100644
--- a/patches/server/0417-Add-moon-phase-API.patch
+++ b/patches/server/0417-Add-moon-phase-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add moon phase API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
-index 588d583201bdd850052bdd2beaf08fc9b5473689..0fb214ddd919b568da64541fd9b531c65caa5fad 100644
+index a9d3dbabd40e731dbe7db6cb957ed6d5b9856580..bb9b4ff9f5c983ef6fe0b295bc868bc1125921d5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
-@@ -499,4 +499,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
+@@ -505,4 +505,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
throw new IllegalArgumentException("Cannot spawn an entity for " + clazz.getName());
}
diff --git a/patches/server/0420-Add-BellRingEvent.patch b/patches/server/0420-Add-BellRingEvent.patch
index b242567509..58012313ff 100644
--- a/patches/server/0420-Add-BellRingEvent.patch
+++ b/patches/server/0420-Add-BellRingEvent.patch
@@ -7,10 +7,10 @@ Add a new event, BellRingEvent, to trigger whenever a player rings a
village bell. Passes along the bell block and the player who rang it.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 5a7946d3877eece469f21ee512342847101b2f67..42702b6196ad816bf1bd5df189cc99c58562da24 100644
+index 67bfd38bd08c30eae597a4875ea4a8b26c2f5c5a..c045e9503c76b869d58d93077fef130759615ff5 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -366,10 +366,11 @@ public class CraftEventFactory {
+@@ -367,10 +367,11 @@ public class CraftEventFactory {
return tradeSelectEvent;
}
diff --git a/patches/server/0429-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0429-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch
index 26f5e20693..92ccabf898 100644
--- a/patches/server/0429-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch
+++ b/patches/server/0429-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch
@@ -9,7 +9,7 @@ as this is how Vanilla teleports entities.
Cancel any pending motion when teleported.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 22d6c914ffbe591d3de19b89a0e87d1042bf1772..4e37b9a495babec58f60b59db0e034d5e033b198 100644
+index 789576f8b7b3001c243972b320b7dffbbf3baa5f..3b73565d295c09a5ab0d610338498f01c7b1520d 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -656,7 +656,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -31,10 +31,10 @@ index 22d6c914ffbe591d3de19b89a0e87d1042bf1772..4e37b9a495babec58f60b59db0e034d5
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 2811177ed3f1f58c63820ddf6ec382f9c806ecd8..0d1afa04c234837f3bc2b50b62e4171ce653cdb2 100644
+index dfea1879b8ab8d12bc7530ccf409f4d24978105d..a3d1f7ccac58cfec8f50dbdb3a620daa4894fffb 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -161,6 +161,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -162,6 +162,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit start
private static final int CURRENT_LEVEL = 2;
@@ -42,7 +42,7 @@ index 2811177ed3f1f58c63820ddf6ec382f9c806ecd8..0d1afa04c234837f3bc2b50b62e4171c
static boolean isLevelAtLeast(CompoundTag tag, int level) {
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
}
-@@ -1772,6 +1773,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1785,6 +1786,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void moveTo(double x, double y, double z, float yaw, float pitch) {
@@ -69,10 +69,10 @@ index b771f954f3fccd92e15196bf542e0d3703cfb71a..41d2793e69bd664456b5e3c5891b03bd
if (entity instanceof Mob) {
Mob entityinsentient = (Mob) entity;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index c17bb16567ad2354dc80e710469730b1dbc55b08..d5e8c8ed7528cdac203a7594ccf9576db0e5f019 100644
+index 061b7215a678c8ec563bdb9c2a8beb65061faf0e..c8033bde8976c128da832befe4225238737a992a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -237,7 +237,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -238,7 +238,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
}
// entity.setLocation() throws no event, and so cannot be cancelled
diff --git a/patches/server/0433-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0433-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
index 4c2ebf298d..b2cb163430 100644
--- a/patches/server/0433-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch
+++ b/patches/server/0433-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/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 8dc1bb56bc3d82d7b3dd7b3a495c5bd5740f49ad..d9b5e3ea1defabff373a4f90e41effc086e75bab 100644
+index a3d1f7ccac58cfec8f50dbdb3a620daa4894fffb..525664c1c985ae8eb9cc4973d28f588c26336e5c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -4387,4 +4387,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4408,4 +4408,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
void accept(Entity entity, double x, double y, double z);
}
diff --git a/patches/server/0435-Entity-isTicking.patch b/patches/server/0435-Entity-isTicking.patch
index 0ce0d8633a..f6138d0f26 100644
--- a/patches/server/0435-Entity-isTicking.patch
+++ b/patches/server/0435-Entity-isTicking.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Entity#isTicking
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index d9b5e3ea1defabff373a4f90e41effc086e75bab..7c436b2a6d9b516469088a6d67f07b6b621f5201 100644
+index 525664c1c985ae8eb9cc4973d28f588c26336e5c..2b962ef7f167cc3ee17d26b994b6ecc2916f6242 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -4392,5 +4392,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4413,5 +4413,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public static int nextEntityId() {
return ENTITY_COUNTER.incrementAndGet();
}
@@ -19,10 +19,10 @@ index d9b5e3ea1defabff373a4f90e41effc086e75bab..7c436b2a6d9b516469088a6d67f07b6b
// Paper end - Expose entity id counter
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index d5e8c8ed7528cdac203a7594ccf9576db0e5f019..6e302dff4c0b48694d234091b1637ff3b7b4b098 100644
+index c8033bde8976c128da832befe4225238737a992a..103e8707ae9434c8e60059f75dafdd9e0fcc8b39 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1058,5 +1058,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1059,5 +1059,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean isInLava() {
return getHandle().isInLava();
}
diff --git a/patches/server/0446-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch b/patches/server/0446-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch
index b254322735..741bc6d269 100644
--- a/patches/server/0446-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch
+++ b/patches/server/0446-Avoid-error-bubbling-up-when-item-stack-is-empty-in-.patch
@@ -8,10 +8,10 @@ This can realistically only happen if there's custom loot active on fishing
which can return 0 items. This would disconnect the player who's fishing.
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-index 94bdd467108bc5fd0211f67a792787ef7c356619..b6ebae97dc863ba1748e9b32555f940077846be8 100644
+index d7548eb7cd6986dcea6fbf4efb76b647cc350642..a87fcd5b837e1c824cbd5587c3350986e2fd7acb 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-@@ -503,9 +503,15 @@ public class FishingHook extends Projectile {
+@@ -504,9 +504,15 @@ public class FishingHook extends Projectile {
while (iterator.hasNext()) {
ItemStack itemstack1 = (ItemStack) iterator.next();
@@ -29,7 +29,7 @@ index 94bdd467108bc5fd0211f67a792787ef7c356619..b6ebae97dc863ba1748e9b32555f9400
playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1);
this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent);
-@@ -518,8 +524,12 @@ public class FishingHook extends Projectile {
+@@ -519,8 +525,12 @@ public class FishingHook extends Projectile {
double d2 = entityhuman.getZ() - this.getZ();
double d3 = 0.1D;
diff --git a/patches/server/0448-Add-ignore-discounts-API.patch b/patches/server/0448-Add-ignore-discounts-API.patch
index 2cf4261e19..a0354c3ea6 100644
--- a/patches/server/0448-Add-ignore-discounts-API.patch
+++ b/patches/server/0448-Add-ignore-discounts-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add ignore discounts API
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-index bfd156acbae31619234fffb1804726090802fbae..3653193effdecd969b5ac159b6d5ce633451d706 100644
+index 0a1a70edda66bf348b3e3a9df4670cd81561cd1f..a01e089ed7689485a7ac33ab29bc27c4b68bc1df 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-@@ -490,6 +490,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
+@@ -491,6 +491,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
while (iterator.hasNext()) {
MerchantOffer merchantrecipe = (MerchantOffer) iterator.next();
@@ -16,7 +16,7 @@ index bfd156acbae31619234fffb1804726090802fbae..3653193effdecd969b5ac159b6d5ce63
merchantrecipe.addToSpecialPriceDiff(-Mth.floor((float) i * merchantrecipe.getPriceMultiplier()));
}
-@@ -502,6 +503,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
+@@ -503,6 +504,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
while (iterator1.hasNext()) {
MerchantOffer merchantrecipe1 = (MerchantOffer) iterator1.next();
diff --git a/patches/server/0449-Toggle-for-removing-existing-dragon.patch b/patches/server/0449-Toggle-for-removing-existing-dragon.patch
index 7f400cb1aa..410f6cec83 100644
--- a/patches/server/0449-Toggle-for-removing-existing-dragon.patch
+++ b/patches/server/0449-Toggle-for-removing-existing-dragon.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Toggle for removing existing dragon
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
-index 3953bbfdaf3e93468108d194c215e6242e14f067..46f286a68d04aced44acbb97041a74e2668c13d8 100644
+index f615b7f43f1444cf1e34b92cb0c05242a5dc26fd..c4555320d1f283a41c47d08d68c2633717f6fda8 100644
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
@@ -209,7 +209,7 @@ public class EndDragonFight {
@@ -15,5 +15,5 @@ index 3953bbfdaf3e93468108d194c215e6242e14f067..46f286a68d04aced44acbb97041a74e2
- if (!flag) {
+ if (!flag && this.level.paperConfig().entities.behavior.shouldRemoveDragon) { // Paper - Toggle for removing existing dragon
EndDragonFight.LOGGER.info("But we didn't have a portal, let's remove it.");
- entityenderdragon.discard();
+ entityenderdragon.discard(null); // CraftBukkit - add Bukkit remove cause
this.dragonUUID = null;
diff --git a/patches/server/0453-Add-API-for-quit-reason.patch b/patches/server/0453-Add-API-for-quit-reason.patch
index d179e40552..b506a95e94 100644
--- a/patches/server/0453-Add-API-for-quit-reason.patch
+++ b/patches/server/0453-Add-API-for-quit-reason.patch
@@ -49,10 +49,10 @@ index 6597e6e9987ddb5906909c22704fdfb6557aee8e..6bb846d3ee2fb54ab3ffa116607f2a83
this.connection.disconnect(ichatbasecomponent);
}));
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 4959c1cc9f1ceead9da42e6d12903d13882a1c17..5777bb6bd01d01c0ff333d7a593744b6e62ddd58 100644
+index b43dd483d99a0021ccb0a2e690e19aec5f4da606..f8e6dda015d6feec2d06ca84a734f371d72b5267 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -577,7 +577,7 @@ public abstract class PlayerList {
+@@ -578,7 +578,7 @@ public abstract class PlayerList {
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper - Inventory close reason
}
diff --git a/patches/server/0455-Expose-world-spawn-angle.patch b/patches/server/0455-Expose-world-spawn-angle.patch
index dcaa00771f..ccaebc75f6 100644
--- a/patches/server/0455-Expose-world-spawn-angle.patch
+++ b/patches/server/0455-Expose-world-spawn-angle.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose world spawn angle
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 5777bb6bd01d01c0ff333d7a593744b6e62ddd58..08e4e8da49676f2fb20eb6fc42a399bee426a340 100644
+index f8e6dda015d6feec2d06ca84a734f371d72b5267..b560d28562c27bfa2f4da5e79d73eed8eea80e15 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -847,7 +847,7 @@ public abstract class PlayerList {
+@@ -848,7 +848,7 @@ public abstract class PlayerList {
if (location == null) {
worldserver1 = this.server.getLevel(Level.OVERWORLD);
blockposition = entityplayer1.getSpawnPoint(worldserver1);
diff --git a/patches/server/0462-Climbing-should-not-bypass-cramming-gamerule.patch b/patches/server/0462-Climbing-should-not-bypass-cramming-gamerule.patch
index 851360dd1b..08c77e01c3 100644
--- a/patches/server/0462-Climbing-should-not-bypass-cramming-gamerule.patch
+++ b/patches/server/0462-Climbing-should-not-bypass-cramming-gamerule.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 7c436b2a6d9b516469088a6d67f07b6b621f5201..863cca1cb36fd8cd147fe8526b2ebd5294e16236 100644
+index 2b962ef7f167cc3ee17d26b994b6ecc2916f6242..a0c4f6edc87d653bcbe23621bfcf9fbbd20b013d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -1970,6 +1970,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1983,6 +1983,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public boolean isPushable() {
@@ -44,10 +44,10 @@ index ee4495b67c46cf1282cdd6ad15b224b0b7b10bfb..e382a29b441b656f35bc24cb90f95cb4
} else if (entity.level().isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
return false;
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 0e009d34a17b7fbebb8bd815cef9df191cd906a5..ec47dc4cb19e742b033f98706b52619483a8bec0 100644
+index 4aad2d99148a0d6ee06049f20de2aaa6218c1d39..87fb0fe5579ba09534e379d34b134c868e838143 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3439,7 +3439,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3447,7 +3447,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
return;
}
// Paper end - don't run getEntities if we're not going to use its result
@@ -56,7 +56,7 @@ index 0e009d34a17b7fbebb8bd815cef9df191cd906a5..ec47dc4cb19e742b033f98706b526194
if (!list.isEmpty()) {
// Paper - don't run getEntities if we're not going to use its result; moved up
-@@ -3629,9 +3629,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3637,9 +3637,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
return !this.isRemoved() && this.collides; // CraftBukkit
}
@@ -116,10 +116,10 @@ index 6b7453281e32aae20778f26b4098df418401c45b..8fc65fd7347340a89dba0b9839497aad
}
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 4e3cf19b83410f3bcacd953a600bf0bed6e45450..e3412f9dd86dddd241bea8f6dcaeed77a7e67f08 100644
+index bc1a95f466b700bb0530cf0bb61fcbcbe21f5bbb..f62b5976e307a69ca40d51ae76126005c801df0c 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-@@ -343,7 +343,7 @@ public class ArmorStand extends LivingEntity {
+@@ -344,7 +344,7 @@ public class ArmorStand extends LivingEntity {
}
@Override
diff --git a/patches/server/0469-Expose-LivingEntity-hurt-direction.patch b/patches/server/0469-Expose-LivingEntity-hurt-direction.patch
index 1cb5f9dcf7..73f36c0bb3 100644
--- a/patches/server/0469-Expose-LivingEntity-hurt-direction.patch
+++ b/patches/server/0469-Expose-LivingEntity-hurt-direction.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose LivingEntity hurt direction
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index d00d6cf28212ed72f49953a198caa447aefc138c..203f36776f41c46172b77a195d3702dd6af7409e 100644
+index 603e003fbd39870a0e249151885b3b8f3e120afe..6fe21c29aa9d119490fbf1d69eb03c146674cde5 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -179,7 +179,7 @@ public abstract class Player extends LivingEntity {
+@@ -180,7 +180,7 @@ public abstract class Player extends LivingEntity {
private Optional<GlobalPos> lastDeathLocation;
@Nullable
public FishingHook fishing;
@@ -36,7 +36,7 @@ index 93644aefd2e6c97eca2735812b2b7b4bd039cfb5..40f848d117c1a4f4fc2f11861c5f1420
public int getSleepTicks() {
return this.getHandle().sleepCounter;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index e71f71988790af1a09f65d73dd081490002b821c..06f25a9453bcc8f304cc83b599f8a54112a6ed01 100644
+index aac0fb198fb912dc59dc56f449e586839600fa13..3b2d54d7a365e268107c4abc5a15c996954e5e9c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -961,5 +961,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
diff --git a/patches/server/0470-Add-OBSTRUCTED-reason-to-BedEnterResult.patch b/patches/server/0470-Add-OBSTRUCTED-reason-to-BedEnterResult.patch
index 28d1b8ccb1..27ff4645d2 100644
--- a/patches/server/0470-Add-OBSTRUCTED-reason-to-BedEnterResult.patch
+++ b/patches/server/0470-Add-OBSTRUCTED-reason-to-BedEnterResult.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 42702b6196ad816bf1bd5df189cc99c58562da24..40d6e655a09888ee95eb136cb8a6f919a1f74aa6 100644
+index c045e9503c76b869d58d93077fef130759615ff5..430d54feb4224fb73d31aa205b883af66f29b226 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -301,6 +301,10 @@ public class CraftEventFactory {
+@@ -302,6 +302,10 @@ public class CraftEventFactory {
return BedEnterResult.TOO_FAR_AWAY;
case NOT_SAFE:
return BedEnterResult.NOT_SAFE;
diff --git a/patches/server/0473-MC-4-Fix-item-position-desync.patch b/patches/server/0473-MC-4-Fix-item-position-desync.patch
index f4df6d1b58..d0dd6a0f5d 100644
--- a/patches/server/0473-MC-4-Fix-item-position-desync.patch
+++ b/patches/server/0473-MC-4-Fix-item-position-desync.patch
@@ -28,10 +28,10 @@ index 05ac41e136da43284fb24a6b698ebd36318278fb..3c4ac79c094dc2fff7de94150a34b7bf
public Vec3 decode(long x, long y, long z) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 863cca1cb36fd8cd147fe8526b2ebd5294e16236..7b4ddf822a8948a233d831946df97cc84692ba65 100644
+index a0c4f6edc87d653bcbe23621bfcf9fbbd20b013d..745e22b78613f8c45f5432fb27e3b9c87cdf2313 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -4170,6 +4170,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4183,6 +4183,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return;
}
// Paper end - Block invalid positions and bounding box
diff --git a/patches/server/0483-Fix-nerfed-slime-when-splitting.patch b/patches/server/0483-Fix-nerfed-slime-when-splitting.patch
index d6cfcc1ead..91c9da2246 100644
--- a/patches/server/0483-Fix-nerfed-slime-when-splitting.patch
+++ b/patches/server/0483-Fix-nerfed-slime-when-splitting.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix nerfed slime when splitting
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
-index 168b422ac9f3f98630c4d05b64a9f0470b20fe61..2977e5986958cbee987893dd9de1dfb3764b291d 100644
+index 00dcbcbf20995ab6aca508d7ffe703bcb0d9b1a9..0b8bcf9fc13ec6645c9e11cf52047272cdfce68c 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
-@@ -243,6 +243,7 @@ public class Slime extends Mob implements Enemy {
+@@ -251,6 +251,7 @@ public class Slime extends Mob implements Enemy {
entityslime.setPersistenceRequired();
}
diff --git a/patches/server/0488-Add-BlockFailedDispenseEvent.patch b/patches/server/0488-Add-BlockFailedDispenseEvent.patch
index 4b6e082326..6c46c1fc7e 100644
--- a/patches/server/0488-Add-BlockFailedDispenseEvent.patch
+++ b/patches/server/0488-Add-BlockFailedDispenseEvent.patch
@@ -32,10 +32,10 @@ index 913ed110d8402d377152753325901eb7f3ac82d6..1d13f8a1009d6eda351c697052d499d5
} 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 40d6e655a09888ee95eb136cb8a6f919a1f74aa6..29473d4bd174e8d2e6ee9ecf348edb41af5f6ea3 100644
+index 430d54feb4224fb73d31aa205b883af66f29b226..0a44f7f2ab9c824f1a32d9dc5feb6a96eb00d8de 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -2017,4 +2017,12 @@ public class CraftEventFactory {
+@@ -2033,4 +2033,12 @@ public class CraftEventFactory {
return org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(event.getPotion());
}
// Paper end - WitchReadyPotionEvent
diff --git a/patches/server/0494-Fix-villager-boat-exploit.patch b/patches/server/0494-Fix-villager-boat-exploit.patch
index 68b28966e8..1f01745885 100644
--- a/patches/server/0494-Fix-villager-boat-exploit.patch
+++ b/patches/server/0494-Fix-villager-boat-exploit.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix villager boat exploit
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 08e4e8da49676f2fb20eb6fc42a399bee426a340..e629a560ae2163ea45ede727b97a301e8fa6f1e8 100644
+index b560d28562c27bfa2f4da5e79d73eed8eea80e15..6fed863a0400ba23e0e299b0f0a0f28af19fa226 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -602,6 +602,14 @@ public abstract class PlayerList {
+@@ -603,6 +603,14 @@ public abstract class PlayerList {
PlayerList.LOGGER.debug("Removing player mount");
entityplayer.stopRiding();
entity.getPassengersAndSelf().forEach((entity1) -> {
@@ -20,6 +20,6 @@ index 08e4e8da49676f2fb20eb6fc42a399bee426a340..e629a560ae2163ea45ede727b97a301e
+ }
+ }
+ // Paper end - Fix villager boat exploit
- entity1.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER);
+ entity1.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER, EntityRemoveEvent.Cause.PLAYER_QUIT); // CraftBukkit - add Bukkit remove cause
});
}
diff --git a/patches/server/0495-Add-sendOpLevel-API.patch b/patches/server/0495-Add-sendOpLevel-API.patch
index c311c2ba8a..e5fdb1c643 100644
--- a/patches/server/0495-Add-sendOpLevel-API.patch
+++ b/patches/server/0495-Add-sendOpLevel-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index e629a560ae2163ea45ede727b97a301e8fa6f1e8..f336b52a529c3c0ddccb36ace8b441fba61b99dd 100644
+index 6fed863a0400ba23e0e299b0f0a0f28af19fa226..65c11774b9e3c724b5ac67a557bd84efcd53fbab 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1100,6 +1100,11 @@ public abstract class PlayerList {
+@@ -1101,6 +1101,11 @@ public abstract class PlayerList {
}
private void sendPlayerPermissionLevel(ServerPlayer player, int permissionLevel) {
@@ -20,7 +20,7 @@ index e629a560ae2163ea45ede727b97a301e8fa6f1e8..f336b52a529c3c0ddccb36ace8b441fb
if (player.connection != null) {
byte b0;
-@@ -1114,8 +1119,10 @@ public abstract class PlayerList {
+@@ -1115,8 +1120,10 @@ public abstract class PlayerList {
player.connection.send(new ClientboundEntityEventPacket(player, b0));
}
@@ -32,7 +32,7 @@ index e629a560ae2163ea45ede727b97a301e8fa6f1e8..f336b52a529c3c0ddccb36ace8b441fb
public boolean isWhiteListed(GameProfile profile) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index ec4ebbdde676806c4b2348408a8004dd66cbc44b..a9f30ba8d6d6e3d488f46b0bd79bf77b660c1b82 100644
+index f9188664f868c0c55c92c0ec7ca43204d267b91e..f4cf8cc4cf085c621cc0d3e71f3ad10b8ef9f15a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -597,6 +597,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
diff --git a/patches/server/0498-Collision-option-for-requiring-a-player-participant.patch b/patches/server/0498-Collision-option-for-requiring-a-player-participant.patch
index befdb58361..f7b52564b1 100644
--- a/patches/server/0498-Collision-option-for-requiring-a-player-participant.patch
+++ b/patches/server/0498-Collision-option-for-requiring-a-player-participant.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Collision option for requiring a player participant
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 5443895e76c9822a5bdfb20d0364c9492cb8f58c..54283c4534f485a50a0cb5c34518dca5013c894f 100644
+index 745e22b78613f8c45f5432fb27e3b9c87cdf2313..baedc48d788d51799d2d3b1816aee2782ba35d25 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -1835,6 +1835,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1848,6 +1848,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void push(Entity entity) {
if (!this.isPassengerOfSameVehicle(entity)) {
if (!entity.noPhysics && !this.noPhysics) {
diff --git a/patches/server/0499-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch b/patches/server/0499-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch
index 345522a05d..95ecd8b67e 100644
--- a/patches/server/0499-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch
+++ b/patches/server/0499-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch
@@ -7,10 +7,10 @@ The duplicate ProjectileHitEvent in EntityFireball was removed. The
event was always called before the duplicate call.
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
-index 503bf8d19dd17619f620e0bbe5331b9fe93f37b1..c4ecc5faa4f61e7974e8c475762924a89615b377 100644
+index fba92238d8a025fa5d02a9f3b89980ddb99f84d2..20ce474b72894a8bb3fc21018b9d79bbdc8bb14b 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
-@@ -99,7 +99,7 @@ public abstract class AbstractHurtingProjectile extends Projectile {
+@@ -102,7 +102,7 @@ public abstract class AbstractHurtingProjectile extends Projectile {
// CraftBukkit start - Fire ProjectileHitEvent
if (this.isRemoved()) {
diff --git a/patches/server/0503-Add-BlockPreDispenseEvent.patch b/patches/server/0503-Add-BlockPreDispenseEvent.patch
index 98d1f8bb39..7772764b33 100644
--- a/patches/server/0503-Add-BlockPreDispenseEvent.patch
+++ b/patches/server/0503-Add-BlockPreDispenseEvent.patch
@@ -29,10 +29,10 @@ index 1d13f8a1009d6eda351c697052d499d594a6aaa8..9a8a0fb958e8ec782111507bae957f85
} 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 29473d4bd174e8d2e6ee9ecf348edb41af5f6ea3..b3f20ea2a334856200004ed72d709853396fa024 100644
+index 0a44f7f2ab9c824f1a32d9dc5feb6a96eb00d8de..4b3e246475821b71fe023fea602d68c0e2f84964 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -2024,5 +2024,11 @@ public class CraftEventFactory {
+@@ -2040,5 +2040,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/0507-Expand-EntityUnleashEvent.patch b/patches/server/0507-Expand-EntityUnleashEvent.patch
index 6f5459abac..5586344bbe 100644
--- a/patches/server/0507-Expand-EntityUnleashEvent.patch
+++ b/patches/server/0507-Expand-EntityUnleashEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expand EntityUnleashEvent
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 645fb2ec7d969068eb10d59d43a512c74cca5a58..8b239769a3a7ce6f85d472ddb2ff7ea7de0ce5c0 100644
+index 3e6706671b3dc06b376eaa9d6d463c6a098104d1..d1833dcc92b1570e62a1941bbea6d66ff0b2ee5f 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -1299,12 +1299,15 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -1300,12 +1300,15 @@ public abstract class Mob extends LivingEntity implements Targeting {
return InteractionResult.PASS;
} else if (this.getLeashHolder() == player) {
// CraftBukkit start - fire PlayerUnleashEntityEvent
@@ -26,7 +26,7 @@ index 645fb2ec7d969068eb10d59d43a512c74cca5a58..8b239769a3a7ce6f85d472ddb2ff7ea7
this.gameEvent(GameEvent.ENTITY_INTERACT, player);
return InteractionResult.sidedSuccess(this.level().isClientSide);
} else {
-@@ -1472,8 +1475,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -1473,8 +1476,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
if (this.leashHolder != null) {
if (!this.isAlive() || !this.leashHolder.isAlive()) {
@@ -40,7 +40,7 @@ index 645fb2ec7d969068eb10d59d43a512c74cca5a58..8b239769a3a7ce6f85d472ddb2ff7ea7
}
}
-@@ -1536,8 +1542,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -1537,8 +1543,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
boolean flag1 = super.startRiding(entity, force);
if (flag1 && this.isLeashed()) {
@@ -54,7 +54,7 @@ index 645fb2ec7d969068eb10d59d43a512c74cca5a58..8b239769a3a7ce6f85d472ddb2ff7ea7
}
return flag1;
-@@ -1727,8 +1736,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -1728,8 +1737,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
@Override
protected void removeAfterChangingDimensions() {
super.removeAfterChangingDimensions();
@@ -101,10 +101,10 @@ index 85a9bcbd229b56317c2de15670a04c6d0eb51e18..d6393210cfee53685f83c8491bea8b9c
} else if (f > 6.0F) {
double d0 = (entity.getX() - this.getX()) / (double) f;
diff --git a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
-index 16784fcc853e23689a854e7dc6c03ed8182a164e..006aba8bbb34a0d45ef626a1d299e81909cf9ba1 100644
+index 6a6526b7b1b578e08a41f85c0443c5f04177efb0..0b88bd258c4f2bce100bf96bcbe61c20493f8e40 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
-@@ -126,11 +126,14 @@ public class LeashFenceKnotEntity extends HangingEntity {
+@@ -127,11 +127,14 @@ public class LeashFenceKnotEntity extends HangingEntity {
if (entityinsentient1.isLeashed() && entityinsentient1.getLeashHolder() == this) {
// CraftBukkit start
@@ -122,10 +122,10 @@ index 16784fcc853e23689a854e7dc6c03ed8182a164e..006aba8bbb34a0d45ef626a1d299e819
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 b3f20ea2a334856200004ed72d709853396fa024..75b0a6327d8fbf82ac816eae4fdf4f922a0f3113 100644
+index 4b3e246475821b71fe023fea602d68c0e2f84964..43548c4c96dae63fe32640a6dff5410cc32ed501 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1568,8 +1568,10 @@ public class CraftEventFactory {
+@@ -1569,8 +1569,10 @@ public class CraftEventFactory {
Bukkit.getPluginManager().callEvent(new PlayerRecipeBookSettingsChangeEvent(player.getBukkitEntity(), bukkitType, open, filter));
}
diff --git a/patches/server/0510-Add-EntityMoveEvent.patch b/patches/server/0510-Add-EntityMoveEvent.patch
index 567b6fa9e2..54dd0d6264 100644
--- a/patches/server/0510-Add-EntityMoveEvent.patch
+++ b/patches/server/0510-Add-EntityMoveEvent.patch
@@ -17,7 +17,7 @@ index 06b7816bafa3ac1093b796ca6e7bb3462df8bfec..3f061e1135bac08e6ea1530407ff2667
this.profiler.push(() -> {
return worldserver + " " + worldserver.dimension().location();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index b93976abbc98c1beffe4b464735c9b5a71cb45a4..f75722633789155af38184982ce6459a6ff1178e 100644
+index a2113c01d8ea3da13efbf4f0b23460e7fa4e8c68..125e3425af05541e5c848ee0e9390cea44a29302 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -29,10 +29,10 @@ index b93976abbc98c1beffe4b464735c9b5a71cb45a4..f75722633789155af38184982ce6459a
public LevelChunk getChunkIfLoaded(int x, int z) {
return this.chunkSource.getChunk(x, z, false);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index ec47dc4cb19e742b033f98706b52619483a8bec0..2dddf7a6f3bab4acf0c9d02a35a0cedb27154dea 100644
+index 87fb0fe5579ba09534e379d34b134c868e838143..26ac98e0dbcac5d20a013cc1b8f5d70133e23154 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3374,6 +3374,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3382,6 +3382,20 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.pushEntities();
this.level().getProfiler().pop();
diff --git a/patches/server/0513-Allow-adding-items-to-BlockDropItemEvent.patch b/patches/server/0513-Allow-adding-items-to-BlockDropItemEvent.patch
index ac583d715b..65b594a18e 100644
--- a/patches/server/0513-Allow-adding-items-to-BlockDropItemEvent.patch
+++ b/patches/server/0513-Allow-adding-items-to-BlockDropItemEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Allow adding items to BlockDropItemEvent
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 75b0a6327d8fbf82ac816eae4fdf4f922a0f3113..5112da69c528be09c2b5d5bcac70fce0fb0054a1 100644
+index 43548c4c96dae63fe32640a6dff5410cc32ed501..11b42f349edefb6961b61d709bfbe3ad4b55c7f8 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -450,13 +450,30 @@ public class CraftEventFactory {
+@@ -451,13 +451,30 @@ public class CraftEventFactory {
}
public static void handleBlockDropItemEvent(Block block, BlockState state, ServerPlayer player, List<ItemEntity> items) {
diff --git a/patches/server/0518-Expose-Tracked-Players.patch b/patches/server/0518-Expose-Tracked-Players.patch
index 075b73c5c5..e31f586e35 100644
--- a/patches/server/0518-Expose-Tracked-Players.patch
+++ b/patches/server/0518-Expose-Tracked-Players.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expose Tracked Players
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 6e302dff4c0b48694d234091b1637ff3b7b4b098..a6492b6a9f66d8bcda8928fadf0a5920ff7f0dab 100644
+index 103e8707ae9434c8e60059f75dafdd9e0fcc8b39..07158732dd6a5b7d622b7f2ea10ca87b50365b8a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1063,5 +1063,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1064,5 +1064,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean isTicking() {
return getHandle().isTicking();
}
diff --git a/patches/server/0520-fix-converting-txt-to-json-file.patch b/patches/server/0520-fix-converting-txt-to-json-file.patch
index 6b167b94ba..5f13006cc4 100644
--- a/patches/server/0520-fix-converting-txt-to-json-file.patch
+++ b/patches/server/0520-fix-converting-txt-to-json-file.patch
@@ -48,10 +48,10 @@ index ebea8a827aad108dd6d4222e8dfd251d2cea657a..2a0d3212edeee828b9fe04c153ee05ea
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
return false;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index f336b52a529c3c0ddccb36ace8b441fba61b99dd..41c682c24b2f984e6cd0cc63eed5acc09f00d649 100644
+index 65c11774b9e3c724b5ac67a557bd84efcd53fbab..6a00304ea9eac600162eae03e70aa28f39149c5f 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -176,6 +176,7 @@ public abstract class PlayerList {
+@@ -177,6 +177,7 @@ public abstract class PlayerList {
this.maxPlayers = maxPlayers;
this.playerIo = saveHandler;
}
diff --git a/patches/server/0527-Expand-world-key-API.patch b/patches/server/0527-Expand-world-key-API.patch
index aff4443614..b4d1977540 100644
--- a/patches/server/0527-Expand-world-key-API.patch
+++ b/patches/server/0527-Expand-world-key-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expand world key API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
-index 0fb214ddd919b568da64541fd9b531c65caa5fad..9cd267f53505658d1c75187b662c4d9f68cd6bae 100644
+index bb9b4ff9f5c983ef6fe0b295bc868bc1125921d5..b9262b681b51cb68024156b28d33624fddd17b26 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
-@@ -505,5 +505,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
+@@ -511,5 +511,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
public io.papermc.paper.world.MoonPhase getMoonPhase() {
return io.papermc.paper.world.MoonPhase.getPhase(this.getHandle().dayTime() / 24000L);
}
diff --git a/patches/server/0530-Drop-carried-item-when-player-has-disconnected.patch b/patches/server/0530-Drop-carried-item-when-player-has-disconnected.patch
index f8a056ade3..c5c564c74e 100644
--- a/patches/server/0530-Drop-carried-item-when-player-has-disconnected.patch
+++ b/patches/server/0530-Drop-carried-item-when-player-has-disconnected.patch
@@ -7,10 +7,10 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro
Closes #5036
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 41c682c24b2f984e6cd0cc63eed5acc09f00d649..0ec9312fb2992aa2a7972734cd4be4b1621c594a 100644
+index 6a00304ea9eac600162eae03e70aa28f39149c5f..563e287cfb885f212ebe9dfc8309aa123713897a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -595,6 +595,14 @@ public abstract class PlayerList {
+@@ -596,6 +596,14 @@ public abstract class PlayerList {
}
// Paper end - Configurable player collision
diff --git a/patches/server/0535-Fix-PlayerItemConsumeEvent-cancelling-properly.patch b/patches/server/0535-Fix-PlayerItemConsumeEvent-cancelling-properly.patch
index 5acc31dd36..23fd145ca7 100644
--- a/patches/server/0535-Fix-PlayerItemConsumeEvent-cancelling-properly.patch
+++ b/patches/server/0535-Fix-PlayerItemConsumeEvent-cancelling-properly.patch
@@ -9,10 +9,10 @@ till their item is switched.
This patch clears the active item when the event is cancelled
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 2dddf7a6f3bab4acf0c9d02a35a0cedb27154dea..89842b86b419117a92f79b7bfb57a4aa4351f9f8 100644
+index 26ac98e0dbcac5d20a013cc1b8f5d70133e23154..dad6481439c54567fd6135b39c9209e74a3acba0 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3872,6 +3872,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3880,6 +3880,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.level().getCraftServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
diff --git a/patches/server/0543-Add-PlayerDeepSleepEvent.patch b/patches/server/0543-Add-PlayerDeepSleepEvent.patch
index 7dfa56bff7..4ae6ac9026 100644
--- a/patches/server/0543-Add-PlayerDeepSleepEvent.patch
+++ b/patches/server/0543-Add-PlayerDeepSleepEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerDeepSleepEvent
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 203f36776f41c46172b77a195d3702dd6af7409e..e765b6f1163edb363ddebe0c83ca733a061ff103 100644
+index 6fe21c29aa9d119490fbf1d69eb03c146674cde5..8ab62f37c9e1eb1582fba4adc02c3404bebc80f4 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -247,6 +247,13 @@ public abstract class Player extends LivingEntity {
+@@ -248,6 +248,13 @@ public abstract class Player extends LivingEntity {
if (this.isSleeping()) {
++this.sleepCounter;
diff --git a/patches/server/0547-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch b/patches/server/0547-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch
index 565946f990..95d33b962c 100644
--- a/patches/server/0547-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch
+++ b/patches/server/0547-Expand-PlayerRespawnEvent-fix-passed-parameter-issue.patch
@@ -19,10 +19,10 @@ index 12b81d6dc04586d2491a382b6198f986b2b5bae1..e12740f601acbe2b344d8e1fffc4bee2
} else {
if (this.player.getHealth() > 0.0F) {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 0ec9312fb2992aa2a7972734cd4be4b1621c594a..27ae2ac95d4f53c1c16b35f737fa6c138ddcc644 100644
+index 563e287cfb885f212ebe9dfc8309aa123713897a..e913acef00c0a1a2f49779800b46997588b46253 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -779,6 +779,12 @@ public abstract class PlayerList {
+@@ -780,6 +780,12 @@ public abstract class PlayerList {
}
public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation, RespawnReason reason) {
@@ -35,7 +35,7 @@ index 0ec9312fb2992aa2a7972734cd4be4b1621c594a..27ae2ac95d4f53c1c16b35f737fa6c13
entityplayer.stopRiding(); // CraftBukkit
this.players.remove(entityplayer);
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
-@@ -820,6 +826,7 @@ public abstract class PlayerList {
+@@ -821,6 +827,7 @@ public abstract class PlayerList {
// Paper start - Add PlayerPostRespawnEvent
boolean isBedSpawn = false;
@@ -43,7 +43,7 @@ index 0ec9312fb2992aa2a7972734cd4be4b1621c594a..27ae2ac95d4f53c1c16b35f737fa6c13
boolean isRespawn = false;
boolean isLocAltered = false; // Paper - Fix SPIGOT-5989
// Paper end - Add PlayerPostRespawnEvent
-@@ -840,6 +847,7 @@ public abstract class PlayerList {
+@@ -841,6 +848,7 @@ public abstract class PlayerList {
if (optional.isPresent()) {
BlockState iblockdata = worldserver1.getBlockState(blockposition);
boolean flag3 = iblockdata.is(Blocks.RESPAWN_ANCHOR);
@@ -51,7 +51,7 @@ index 0ec9312fb2992aa2a7972734cd4be4b1621c594a..27ae2ac95d4f53c1c16b35f737fa6c13
Vec3 vec3d = (Vec3) optional.get();
float f1;
-@@ -868,7 +876,7 @@ public abstract class PlayerList {
+@@ -869,7 +877,7 @@ public abstract class PlayerList {
}
Player respawnPlayer = entityplayer1.getBukkitEntity();
diff --git a/patches/server/0551-Add-more-WanderingTrader-API.patch b/patches/server/0551-Add-more-WanderingTrader-API.patch
index 9e049337bc..6e3c9d60f5 100644
--- a/patches/server/0551-Add-more-WanderingTrader-API.patch
+++ b/patches/server/0551-Add-more-WanderingTrader-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add more WanderingTrader API
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
-index 0321b4bb622930bfe57661b0e6b893d7635668fb..594e82a09d21c39331c391f2aec5bc8d87649ea3 100644
+index 6b8d6ae203b7f7f2b591c35586baa4e8951a3677..9b0f54af3160c5756784e31cf1347eb97ca77e47 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
-@@ -60,6 +60,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
+@@ -61,6 +61,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
@Nullable
private BlockPos wanderTarget;
private int despawnDelay;
@@ -19,7 +19,7 @@ index 0321b4bb622930bfe57661b0e6b893d7635668fb..594e82a09d21c39331c391f2aec5bc8d
public WanderingTrader(EntityType<? extends WanderingTrader> type, Level world) {
super(type, world);
-@@ -70,10 +74,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
+@@ -71,10 +75,10 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
protected void registerGoals() {
this.goalSelector.addGoal(0, new FloatGoal(this));
this.goalSelector.addGoal(0, new UseItemGoal<>(this, PotionUtils.setPotion(new ItemStack(Items.POTION), Potions.INVISIBILITY), SoundEvents.WANDERING_TRADER_DISAPPEARED, (entityvillagertrader) -> {
diff --git a/patches/server/0552-Add-EntityBlockStorage-clearEntities.patch b/patches/server/0552-Add-EntityBlockStorage-clearEntities.patch
index 35a0f1cab5..1297267437 100644
--- a/patches/server/0552-Add-EntityBlockStorage-clearEntities.patch
+++ b/patches/server/0552-Add-EntityBlockStorage-clearEntities.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityBlockStorage#clearEntities()
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
-index 949eda8e743df7ab83f18f15471a33e538aecdc5..d36373cb1fda4d4f2b41dd181306ea697a2fe7a8 100644
+index b0c57922fa6160772ba1aaf61c0e97c03a0e6e8c..a69a81ba6a2b65978b5cf00810ed12156a5f89e6 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
-@@ -139,6 +139,11 @@ public class BeehiveBlockEntity extends BlockEntity {
+@@ -143,6 +143,11 @@ public class BeehiveBlockEntity extends BlockEntity {
return this.stored.size();
}
diff --git a/patches/server/0571-Add-PlayerKickEvent-causes.patch b/patches/server/0571-Add-PlayerKickEvent-causes.patch
index 6eb017bac2..cba228a0e1 100644
--- a/patches/server/0571-Add-PlayerKickEvent-causes.patch
+++ b/patches/server/0571-Add-PlayerKickEvent-causes.patch
@@ -437,10 +437,10 @@ index a5dd14014fd214ec900e0c49064ee54b2f43ff8e..2e1a0b3d2dee21d6deba62ec710d92ef
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 27ae2ac95d4f53c1c16b35f737fa6c138ddcc644..1f3f316cd1946c4a0e1ba767a93beec7eb9f3f2b 100644
+index e913acef00c0a1a2f49779800b46997588b46253..dcb8de1c28b767068aa10f044bd8cf72ef6cfcaf 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -682,7 +682,7 @@ public abstract class PlayerList {
+@@ -683,7 +683,7 @@ public abstract class PlayerList {
while (iterator.hasNext()) {
entityplayer = (ServerPlayer) iterator.next();
this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved
@@ -449,7 +449,7 @@ index 27ae2ac95d4f53c1c16b35f737fa6c138ddcc644..1f3f316cd1946c4a0e1ba767a93beec7
}
// Instead of kicking then returning, we need to store the kick reason
-@@ -1318,8 +1318,8 @@ public abstract class PlayerList {
+@@ -1319,8 +1319,8 @@ public abstract class PlayerList {
// Paper end
// CraftBukkit start - disconnect safely
for (ServerPlayer player : this.players) {
@@ -491,7 +491,7 @@ index 6724d0a1af13e97bc1d3bd94fd43fef742a0deab..20ba0a0c9eae28658888a77dd2170f62
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index fa5bf1ef9cb4df06eabce00ccdd86a408ddaef8f..5ff0081fa3cdd34698b4d995a0845709bb5b397f 100644
+index 2b8a85008b9562358265cfb28743f889159c21eb..bc6c973ca53e1fa0275875296a2f2da6a004825e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -555,7 +555,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
diff --git a/patches/server/0575-Add-option-to-fix-items-merging-through-walls.patch b/patches/server/0575-Add-option-to-fix-items-merging-through-walls.patch
index abc3aaaa57..718a84a02c 100644
--- a/patches/server/0575-Add-option-to-fix-items-merging-through-walls.patch
+++ b/patches/server/0575-Add-option-to-fix-items-merging-through-walls.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add option to fix items merging through walls
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index 7f8b35d6ae27086fa128abfe9b2369bb6c91ce60..459f793a6603d4f98c84df4e549f069298c54985 100644
+index e67e8d0593e3ba3fc8e9da59ad6494ea589ab337..78acc580d66917e52d89632e3f0b7c1e979714d4 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -276,6 +276,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -277,6 +277,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
ItemEntity entityitem = (ItemEntity) iterator.next();
if (entityitem.isMergable()) {
diff --git a/patches/server/0577-Fix-invulnerable-end-crystals.patch b/patches/server/0577-Fix-invulnerable-end-crystals.patch
index 8d9e818ef4..75347e76f0 100644
--- a/patches/server/0577-Fix-invulnerable-end-crystals.patch
+++ b/patches/server/0577-Fix-invulnerable-end-crystals.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix invulnerable end crystals
MC-108513
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
-index cc3f1532a2108ea915d0e8c840e87bc56ab60a65..c99ab157e43fc990549fc06f5b6fb1e227014fde 100644
+index e7e01effab5f727d9b84a0575d165127e3dfe4c9..036640d49a5e891e9a0f767abe33f1f51d6d4cde 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
-@@ -29,6 +29,7 @@ public class EndCrystal extends Entity {
+@@ -30,6 +30,7 @@ public class EndCrystal extends Entity {
private static final EntityDataAccessor<Optional<BlockPos>> DATA_BEAM_TARGET = SynchedEntityData.defineId(EndCrystal.class, EntityDataSerializers.OPTIONAL_BLOCK_POS);
private static final EntityDataAccessor<Boolean> DATA_SHOW_BOTTOM = SynchedEntityData.defineId(EndCrystal.class, EntityDataSerializers.BOOLEAN);
public int time;
@@ -17,7 +17,7 @@ index cc3f1532a2108ea915d0e8c840e87bc56ab60a65..c99ab157e43fc990549fc06f5b6fb1e2
public EndCrystal(EntityType<? extends EndCrystal> type, Level world) {
super(type, world);
-@@ -65,6 +66,17 @@ public class EndCrystal extends Entity {
+@@ -66,6 +67,17 @@ public class EndCrystal extends Entity {
}
// CraftBukkit end
}
@@ -35,7 +35,7 @@ index cc3f1532a2108ea915d0e8c840e87bc56ab60a65..c99ab157e43fc990549fc06f5b6fb1e2
}
}
-@@ -76,6 +88,7 @@ public class EndCrystal extends Entity {
+@@ -77,6 +89,7 @@ public class EndCrystal extends Entity {
}
nbt.putBoolean("ShowBottom", this.showsBottom());
@@ -43,7 +43,7 @@ index cc3f1532a2108ea915d0e8c840e87bc56ab60a65..c99ab157e43fc990549fc06f5b6fb1e2
}
@Override
-@@ -87,6 +100,7 @@ public class EndCrystal extends Entity {
+@@ -88,6 +101,7 @@ public class EndCrystal extends Entity {
if (nbt.contains("ShowBottom", 1)) {
this.setShowBottom(nbt.getBoolean("ShowBottom"));
}
diff --git a/patches/server/0579-Fix-dangerous-end-portal-logic.patch b/patches/server/0579-Fix-dangerous-end-portal-logic.patch
index cde0c19f0c..f12d150b67 100644
--- a/patches/server/0579-Fix-dangerous-end-portal-logic.patch
+++ b/patches/server/0579-Fix-dangerous-end-portal-logic.patch
@@ -11,10 +11,10 @@ Move the tick logic into the post tick, where portaling was
designed to happen in the first place.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 7a0ad3e2600517d1472fd31d0f1b2e04c5e2d804..e4ba2914184072835e4447511b70a94f1ebc9eea 100644
+index baedc48d788d51799d2d3b1816aee2782ba35d25..3fe696d2657812857427f9ffe5f0585f1cfde3c9 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -420,6 +420,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -421,6 +421,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return this.originWorld;
}
// Paper end - Entity origin API
@@ -51,7 +51,7 @@ index 7a0ad3e2600517d1472fd31d0f1b2e04c5e2d804..e4ba2914184072835e4447511b70a94f
public float getBukkitYaw() {
return this.yRot;
}
-@@ -2782,6 +2812,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2795,6 +2825,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
this.processPortalCooldown();
diff --git a/patches/server/0582-Line-Of-Sight-Changes.patch b/patches/server/0582-Line-Of-Sight-Changes.patch
index 89f7b37eeb..e828baea33 100644
--- a/patches/server/0582-Line-Of-Sight-Changes.patch
+++ b/patches/server/0582-Line-Of-Sight-Changes.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Line Of Sight Changes
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 89842b86b419117a92f79b7bfb57a4aa4351f9f8..78befbf1e5f506c9dfd703c3e796742fe17d13d7 100644
+index dad6481439c54567fd6135b39c9209e74a3acba0..f7244a0cbb06258d6e553ad35e1040e338cce4eb 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3619,7 +3619,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3627,7 +3627,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
Vec3 vec3d = new Vec3(this.getX(), this.getEyeY(), this.getZ());
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());
@@ -19,10 +19,10 @@ index 89842b86b419117a92f79b7bfb57a4aa4351f9f8..78befbf1e5f506c9dfd703c3e796742f
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
-index 9cd267f53505658d1c75187b662c4d9f68cd6bae..5f4958d28b6d79fe9e589e4794d9a7e8ab67c8b3 100644
+index b9262b681b51cb68024156b28d33624fddd17b26..af14244caba22e750ee7baba03bb7ce267795b21 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
-@@ -510,5 +510,21 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
+@@ -516,5 +516,21 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
public org.bukkit.NamespacedKey getKey() {
return org.bukkit.craftbukkit.util.CraftNamespacedKey.fromMinecraft(this.getHandle().getLevel().dimension().location());
}
@@ -45,7 +45,7 @@ index 9cd267f53505658d1c75187b662c4d9f68cd6bae..5f4958d28b6d79fe9e589e4794d9a7e8
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 40fbd911943abd6f6cc7910b5179c196bb3fe8f8..cc3de2a961f474afee982cb94813bc48649d352a 100644
+index aab6948060d8870729690449064b34e1b01c925e..9ce82b203e37ff1f5a7618fe864ed7616bd8d52e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -612,6 +612,23 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
diff --git a/patches/server/0584-Fix-potions-splash-events.patch b/patches/server/0584-Fix-potions-splash-events.patch
index c3914e23c4..15190dbc0f 100644
--- a/patches/server/0584-Fix-potions-splash-events.patch
+++ b/patches/server/0584-Fix-potions-splash-events.patch
@@ -8,10 +8,10 @@ Fixes SPIGOT-6221: https://hub.spigotmc.org/jira/projects/SPIGOT/issues/SPIGOT-6
Fix splash events cancellation that still show particles/sound
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
-index b87077c47a0131c5f4ca085b6b32e657043a9e1a..77235314f4ccc28255b98f2bb52f553fe93313f3 100644
+index 6e921bf7101224d6b8261ab8d87724080c4095d7..0204257ca0245830534592922e400a362c347715 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
-@@ -105,56 +105,77 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -106,56 +106,77 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
Potion potionregistry = PotionUtils.getPotion(itemstack);
List<MobEffectInstance> list = PotionUtils.getMobEffects(itemstack);
boolean flag = potionregistry == Potions.WATER && list.isEmpty();
@@ -35,7 +35,7 @@ index b87077c47a0131c5f4ca085b6b32e657043a9e1a..77235314f4ccc28255b98f2bb52f553f
this.level().levelEvent(i, this.blockPosition(), PotionUtils.getColor(itemstack));
+ } // Paper - Fix potions splash events
- this.discard();
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
}
@@ -104,7 +104,7 @@ index b87077c47a0131c5f4ca085b6b32e657043a9e1a..77235314f4ccc28255b98f2bb52f553f
AABB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D);
List<net.minecraft.world.entity.LivingEntity> list1 = this.level().getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb);
Map<LivingEntity, Double> affected = new HashMap<LivingEntity, Double>(); // CraftBukkit
-@@ -172,6 +193,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -173,6 +194,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
if (d0 < 16.0D) {
double d1;
@@ -112,7 +112,7 @@ index b87077c47a0131c5f4ca085b6b32e657043a9e1a..77235314f4ccc28255b98f2bb52f553f
if (entityliving == entity) {
d1 = 1.0D;
} else {
-@@ -226,10 +248,11 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -227,10 +249,11 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
}
}
}
@@ -125,7 +125,7 @@ index b87077c47a0131c5f4ca085b6b32e657043a9e1a..77235314f4ccc28255b98f2bb52f553f
AreaEffectCloud entityareaeffectcloud = new AreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ());
Entity entity = this.getOwner();
-@@ -244,10 +267,12 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -245,10 +268,12 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
entityareaeffectcloud.setPotion(potionregistry);
Iterator iterator = PotionUtils.getCustomEffects(itemstack).iterator();
@@ -138,7 +138,7 @@ index b87077c47a0131c5f4ca085b6b32e657043a9e1a..77235314f4ccc28255b98f2bb52f553f
}
CompoundTag nbttagcompound = itemstack.getTag();
-@@ -258,12 +283,13 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -259,12 +284,13 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
// CraftBukkit start
org.bukkit.event.entity.LingeringPotionSplashEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callLingeringPotionSplashEvent(this, position, entityareaeffectcloud);
@@ -146,7 +146,7 @@ index b87077c47a0131c5f4ca085b6b32e657043a9e1a..77235314f4ccc28255b98f2bb52f553f
+ if (!(event.isCancelled() || entityareaeffectcloud.isRemoved() || (noEffects && entityareaeffectcloud.effects.isEmpty() && entityareaeffectcloud.getPotion().getEffects().isEmpty()))) { // Paper - don't spawn area effect cloud if the effects were empty and not changed during the event handling
this.level().addFreshEntity(entityareaeffectcloud);
} else {
- entityareaeffectcloud.discard();
+ entityareaeffectcloud.discard(null); // CraftBukkit - add Bukkit remove cause
}
// CraftBukkit end
+ return !event.isCancelled(); // Paper - Fix potions splash events
@@ -154,10 +154,10 @@ index b87077c47a0131c5f4ca085b6b32e657043a9e1a..77235314f4ccc28255b98f2bb52f553f
public boolean isLingering() {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 5112da69c528be09c2b5d5bcac70fce0fb0054a1..e57bafa1d071a2fefe44a150bc5754e76d78cdd9 100644
+index 11b42f349edefb6961b61d709bfbe3ad4b55c7f8..fef616ed1deac6cf400a2f39a2eba11b94921415 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -874,6 +874,32 @@ public class CraftEventFactory {
+@@ -875,6 +875,32 @@ public class CraftEventFactory {
return event;
}
diff --git a/patches/server/0586-Fix-PlayerDropItemEvent-using-wrong-item.patch b/patches/server/0586-Fix-PlayerDropItemEvent-using-wrong-item.patch
index 612146273a..e0ef67f1e5 100644
--- a/patches/server/0586-Fix-PlayerDropItemEvent-using-wrong-item.patch
+++ b/patches/server/0586-Fix-PlayerDropItemEvent-using-wrong-item.patch
@@ -18,10 +18,10 @@ index a09ef51e94a0bf9f51bf358e7cf77dd5d272aab2..d0369b9db86dc3436e6a016f138f2ffe
this.awardStat(Stats.DROP);
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index e765b6f1163edb363ddebe0c83ca733a061ff103..bc205c48460f6b90fbdc83f979f7bf029c1e0f9d 100644
+index 8ab62f37c9e1eb1582fba4adc02c3404bebc80f4..4d967016ac34d21161f10217db494f5bb537bd07 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -726,6 +726,11 @@ public abstract class Player extends LivingEntity {
+@@ -727,6 +727,11 @@ public abstract class Player extends LivingEntity {
}
double d0 = this.getEyeY() - 0.30000001192092896D;
diff --git a/patches/server/0587-Missing-Entity-API.patch b/patches/server/0587-Missing-Entity-API.patch
index 7dacfb50ba..520f0899c0 100644
--- a/patches/server/0587-Missing-Entity-API.patch
+++ b/patches/server/0587-Missing-Entity-API.patch
@@ -139,10 +139,10 @@ index 07ecc038a1000581335b8d18c094298f2f3b100f..91ea960ba223bae42655c581b9b6c098
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
-index 71a08510a928d4570822282bb31f14013ec3834a..4aeab90e778629c355189dfe79c39c4b21f5f5ac 100644
+index 3eb83b6b76d12336d3fcee9e5ef19edc836eec7f..958816ce2166248b542c96c10c398a52d769b4db 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Tadpole.java
-@@ -44,6 +44,7 @@ public class Tadpole extends AbstractFish {
+@@ -47,6 +47,7 @@ public class Tadpole extends AbstractFish {
public int age;
protected static final ImmutableList<SensorType<? extends Sensor<? super Tadpole>>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_PLAYERS, SensorType.HURT_BY, SensorType.FROG_TEMPTATIONS);
protected static final ImmutableList<MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.LOOK_TARGET, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.NEAREST_VISIBLE_ADULT, MemoryModuleType.TEMPTATION_COOLDOWN_TICKS, MemoryModuleType.IS_TEMPTED, MemoryModuleType.TEMPTING_PLAYER, MemoryModuleType.BREED_TARGET, MemoryModuleType.IS_PANICKING);
@@ -150,7 +150,7 @@ index 71a08510a928d4570822282bb31f14013ec3834a..4aeab90e778629c355189dfe79c39c4b
public Tadpole(EntityType<? extends AbstractFish> type, Level world) {
super(type, world);
-@@ -94,7 +95,7 @@ public class Tadpole extends AbstractFish {
+@@ -97,7 +98,7 @@ public class Tadpole extends AbstractFish {
@Override
public void aiStep() {
super.aiStep();
@@ -159,7 +159,7 @@ index 71a08510a928d4570822282bb31f14013ec3834a..4aeab90e778629c355189dfe79c39c4b
this.setAge(this.age + 1);
}
-@@ -104,12 +105,14 @@ public class Tadpole extends AbstractFish {
+@@ -107,12 +108,14 @@ public class Tadpole extends AbstractFish {
public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
nbt.putInt("Age", this.age);
@@ -174,7 +174,7 @@ index 71a08510a928d4570822282bb31f14013ec3834a..4aeab90e778629c355189dfe79c39c4b
}
@Nullable
-@@ -162,6 +165,7 @@ public class Tadpole extends AbstractFish {
+@@ -165,6 +168,7 @@ public class Tadpole extends AbstractFish {
CompoundTag nbttagcompound = stack.getOrCreateTag();
nbttagcompound.putInt("Age", this.getAge());
@@ -182,7 +182,7 @@ index 71a08510a928d4570822282bb31f14013ec3834a..4aeab90e778629c355189dfe79c39c4b
}
@Override
-@@ -171,6 +175,7 @@ public class Tadpole extends AbstractFish {
+@@ -174,6 +178,7 @@ public class Tadpole extends AbstractFish {
this.setAge(nbt.getInt("Age"));
}
@@ -190,7 +190,7 @@ index 71a08510a928d4570822282bb31f14013ec3834a..4aeab90e778629c355189dfe79c39c4b
}
@Override
-@@ -205,6 +210,7 @@ public class Tadpole extends AbstractFish {
+@@ -208,6 +213,7 @@ public class Tadpole extends AbstractFish {
}
private void ageUp(int seconds) {
@@ -244,10 +244,10 @@ index edbb933d1f6f7fc6432f7a8b074c5dc20f47adfb..91fb62807b3c5600c83d4dc8d3fadf36
public Llama(EntityType<? extends Llama> type, Level world) {
super(type, world);
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-index 14b09adeb9222600c24f3fb846ea8aee467952e6..8241dbf7591b2f56b25cdc3ce9009c7133d2e4ef 100644
+index e3da459190625a037e5542aa6ba3365f05f9f532..bd9453a92e1b2eca0a6dc56aef921e31a18a20c3 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-@@ -84,6 +84,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
+@@ -85,6 +85,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
return entityliving.getMobType() != MobType.UNDEAD && entityliving.attackable();
};
private static final TargetingConditions TARGETING_CONDITIONS = TargetingConditions.forCombat().range(20.0D).selector(WitherBoss.LIVING_ENTITY_SELECTOR);
@@ -259,7 +259,7 @@ index 14b09adeb9222600c24f3fb846ea8aee467952e6..8241dbf7591b2f56b25cdc3ce9009c71
public WitherBoss(EntityType<? extends WitherBoss> type, Level world) {
super(type, world);
-@@ -596,7 +601,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
+@@ -597,7 +602,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@Override
public boolean canChangeDimensions() {
@@ -333,10 +333,10 @@ index c043f63ff861ccb0194fc8cf102c27af5bcfe491..d4ac3e566b47cfc8688bcc2ab08385b6
@Override
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
-index 2645f52f5071bf57daf584e21a1f5cb6098110a8..cbe8593cecd84f1598649801bebcb46364044eef 100644
+index a2a7d465540a328bb2c231e00f97319374ab754f..870db6ab82ef2ecb989342bb6a66435f823a9263 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
-@@ -98,6 +98,20 @@ public class ThrownTrident extends AbstractArrow {
+@@ -101,6 +101,20 @@ public class ThrownTrident extends AbstractArrow {
return (Boolean) this.entityData.get(ThrownTrident.ID_FOIL);
}
@@ -735,7 +735,7 @@ index 2cec61a1bb050c1ef81c5fc3d0afafe9ff29d459..97fa4e1e70203194bd939618b2fad926
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index cc3de2a961f474afee982cb94813bc48649d352a..8eb4b6c2752d68b866eab64263ede1d449ee2458 100644
+index 9ce82b203e37ff1f5a7618fe864ed7616bd8d52e..9a7a670c1e99674e8a554342165b7b77001083fc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -913,6 +913,22 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
diff --git a/patches/server/0593-Fix-kick-event-leave-message-not-being-sent.patch b/patches/server/0593-Fix-kick-event-leave-message-not-being-sent.patch
index 58972f4e99..cbe89274cd 100644
--- a/patches/server/0593-Fix-kick-event-leave-message-not-being-sent.patch
+++ b/patches/server/0593-Fix-kick-event-leave-message-not-being-sent.patch
@@ -50,7 +50,7 @@ index a65a1466dab52fca75cda16a4b22fef03b6207a0..0306771b8f90dcdd77f151c19c6c2d75
MinecraftServer minecraftserver = this.server;
Connection networkmanager = this.connection;
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index c0f29e612a69b33bd79d05c472fe72529a6fd14b..8b6f37463e35162d4b228b732a0283d57dc2f1b9 100644
+index bce87f55ad85837a17f783b5341ef5b64ab0ede0..42c24ed58fab0f7ff9f58b2a65818f45a5b7cc06 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1882,6 +1882,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -96,10 +96,10 @@ index c0f29e612a69b33bd79d05c472fe72529a6fd14b..8b6f37463e35162d4b228b732a0283d5
this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false);
// Paper end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 1f3f316cd1946c4a0e1ba767a93beec7eb9f3f2b..569d1f1682b9c785701fbb04683fea880504c94c 100644
+index dcb8de1c28b767068aa10f044bd8cf72ef6cfcaf..57e7ce227666a2e273c9e61a102152efd2c0ebd9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -568,6 +568,11 @@ public abstract class PlayerList {
+@@ -569,6 +569,11 @@ public abstract class PlayerList {
}
public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // CraftBukkit - return string // Paper - return Component
diff --git a/patches/server/0594-Add-config-for-mobs-immune-to-default-effects.patch b/patches/server/0594-Add-config-for-mobs-immune-to-default-effects.patch
index 7eb0b594c2..756da20f44 100644
--- a/patches/server/0594-Add-config-for-mobs-immune-to-default-effects.patch
+++ b/patches/server/0594-Add-config-for-mobs-immune-to-default-effects.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add config for mobs immune to default effects
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 78befbf1e5f506c9dfd703c3e796742fe17d13d7..fadbb788bff1dc1c643ffbb28774d20ba6d55ce5 100644
+index f7244a0cbb06258d6e553ad35e1040e338cce4eb..a2edccc840f2ba76e236ea7441f3e4909b1a1898 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1164,7 +1164,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1172,7 +1172,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (this.getMobType() == MobType.UNDEAD) {
MobEffect mobeffectlist = effect.getEffect();
@@ -18,10 +18,10 @@ index 78befbf1e5f506c9dfd703c3e796742fe17d13d7..fadbb788bff1dc1c643ffbb28774d20b
}
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-index 8241dbf7591b2f56b25cdc3ce9009c7133d2e4ef..0a2c2b847dc516abf31870116056dbdbb22f31d9 100644
+index bd9453a92e1b2eca0a6dc56aef921e31a18a20c3..25f611b35a5710c595574d2d6ed50c442ca55721 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-@@ -606,7 +606,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
+@@ -607,7 +607,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@Override
public boolean canBeAffected(MobEffectInstance effect) {
diff --git a/patches/server/0597-Add-missing-forceDrop-toggles.patch b/patches/server/0597-Add-missing-forceDrop-toggles.patch
index 4df953f191..273710ee36 100644
--- a/patches/server/0597-Add-missing-forceDrop-toggles.patch
+++ b/patches/server/0597-Add-missing-forceDrop-toggles.patch
@@ -19,10 +19,10 @@ index 012586360a48369dad243dbb8892579a1dbcca90..edeb1899996e53d276d7481e8eddee65
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
-index 48df7de02e0765bfe62ae1b8a4c0029743430221..11694f103ebc522c2ad6eb6d494d39cc31ea3107 100644
+index 4224e8e75613b6ec0228b2757cb98140d83bc2e2..4abd26c7baf8f198f13dd41a3146f9ece13a4164 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
-@@ -534,7 +534,9 @@ public class Panda extends Animal {
+@@ -535,7 +535,9 @@ public class Panda extends Animal {
}
if (!this.level().isClientSide() && this.random.nextInt(700) == 0 && this.level().getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
@@ -32,7 +32,7 @@ index 48df7de02e0765bfe62ae1b8a4c0029743430221..11694f103ebc522c2ad6eb6d494d39cc
}
}
-@@ -658,7 +660,9 @@ public class Panda extends Animal {
+@@ -659,7 +661,9 @@ public class Panda extends Animal {
ItemStack itemstack1 = this.getItemBySlot(EquipmentSlot.MAINHAND);
if (!itemstack1.isEmpty() && !player.getAbilities().instabuild) {
@@ -42,7 +42,7 @@ index 48df7de02e0765bfe62ae1b8a4c0029743430221..11694f103ebc522c2ad6eb6d494d39cc
}
this.setItemSlot(EquipmentSlot.MAINHAND, new ItemStack(itemstack.getItem(), 1));
-@@ -940,7 +944,9 @@ public class Panda extends Animal {
+@@ -941,7 +945,9 @@ public class Panda extends Animal {
ItemStack itemstack = Panda.this.getItemBySlot(EquipmentSlot.MAINHAND);
if (!itemstack.isEmpty()) {
@@ -67,10 +67,10 @@ index 8231b48a9e88adb2a1ca3441ee81e3d653c9ae78..ea0902b4ba68a89b1f51281b10c1dfd1
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
-index a780b22553a65814c3d8bc21ad68b8bbdbaa3475..e00a1e6031b6de0f6900e004c9e9c97b0d84f8d3 100644
+index deabb58c4562b22d27e450c97812e18e30cbfde7..4a071dea48e86a962fd41a6ebecc5dfdaf9df78a 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
-@@ -270,7 +270,9 @@ public class PiglinAi {
+@@ -271,7 +271,9 @@ public class PiglinAi {
private static void holdInOffhand(Piglin piglin, ItemStack stack) {
if (PiglinAi.isHoldingItemInOffHand(piglin)) {
@@ -80,7 +80,7 @@ index a780b22553a65814c3d8bc21ad68b8bbdbaa3475..e00a1e6031b6de0f6900e004c9e9c97b
}
piglin.holdInOffHand(stack);
-@@ -330,7 +332,9 @@ public class PiglinAi {
+@@ -331,7 +333,9 @@ public class PiglinAi {
protected static void cancelAdmiring(Piglin piglin) {
if (PiglinAi.isAdmiringItem(piglin) && !piglin.getOffhandItem().isEmpty()) {
@@ -91,10 +91,10 @@ index a780b22553a65814c3d8bc21ad68b8bbdbaa3475..e00a1e6031b6de0f6900e004c9e9c97b
}
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
-index 49e07b33fccfe339712e5d1bd72e6c0edbd2e922..798a774c19361bfaf8583a602192e9e547fa85e8 100644
+index f696ae53bf1192b2ebfcd6406adfdb494ab2521c..d783b4d561e252af8928e4b1ea13c4e61598f8bf 100644
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
+++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java
-@@ -250,7 +250,9 @@ public abstract class Raider extends PatrollingMonster {
+@@ -253,7 +253,9 @@ public abstract class Raider extends PatrollingMonster {
double d0 = (double) this.getEquipmentDropChance(enumitemslot);
if (!itemstack1.isEmpty() && (double) Math.max(this.random.nextFloat() - 0.1F, 0.0F) < d0) {
diff --git a/patches/server/0604-Add-PlayerSetSpawnEvent.patch b/patches/server/0604-Add-PlayerSetSpawnEvent.patch
index ca1c60c115..aae9495179 100644
--- a/patches/server/0604-Add-PlayerSetSpawnEvent.patch
+++ b/patches/server/0604-Add-PlayerSetSpawnEvent.patch
@@ -154,10 +154,10 @@ index 751216261df86402c23d3f0d73944ae51e849caa..fb86824192f1fc850a55905757c65caf
public SectionPos getLastSectionPos() {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 569d1f1682b9c785701fbb04683fea880504c94c..75e3d7f81e21caaffd79d095022c4196507a9059 100644
+index 57e7ce227666a2e273c9e61a102152efd2c0ebd9..7cd6d91fe154d29ec0b0fc0a5a50713bbc2c1c83 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -870,7 +870,7 @@ public abstract class PlayerList {
+@@ -871,7 +871,7 @@ public abstract class PlayerList {
location = CraftLocation.toBukkit(vec3d, worldserver1.getWorld(), f1, 0.0F);
} else if (blockposition != null) {
entityplayer1.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.NO_RESPAWN_BLOCK_AVAILABLE, 0.0F));
@@ -187,7 +187,7 @@ index ecaa7f0b2bf795f16187f11fa27f6d5d435ccbfe..acd5ec218b8d4c096f44ae2eec1379ee
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 5ff0081fa3cdd34698b4d995a0845709bb5b397f..8b89f46aad11628a50d9f6c65caf52a558b9ee18 100644
+index bc6c973ca53e1fa0275875296a2f2da6a004825e..3c0be3eb7eb79fd2e62845d516f5d9a3c0f8403f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1321,9 +1321,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
diff --git a/patches/server/0605-Make-hoppers-respect-inventory-max-stack-size.patch b/patches/server/0605-Make-hoppers-respect-inventory-max-stack-size.patch
index f29d30a2c5..77dfd12340 100644
--- a/patches/server/0605-Make-hoppers-respect-inventory-max-stack-size.patch
+++ b/patches/server/0605-Make-hoppers-respect-inventory-max-stack-size.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Make hoppers respect inventory max stack size
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
-index d83b0c58ea9fba6ba0060ee20c3e8251561f301a..321d30f1c0d3838b9c3d210eedb03aa59e0761d8 100644
+index 8aabefdcbeb3fc5fb7d11fe04ee629fe7bc612c2..4dda44608320c2a872b23053a1c3de63b79741c2 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
-@@ -437,15 +437,17 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -438,15 +438,17 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
if (itemstack1.isEmpty()) {
// Spigot start - SPIGOT-6693, InventorySubcontainer#setItem
diff --git a/patches/server/0607-Config-option-for-Piglins-guarding-chests.patch b/patches/server/0607-Config-option-for-Piglins-guarding-chests.patch
index d32081e6b2..5b025d0fbb 100644
--- a/patches/server/0607-Config-option-for-Piglins-guarding-chests.patch
+++ b/patches/server/0607-Config-option-for-Piglins-guarding-chests.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Config option for Piglins guarding chests
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
-index e00a1e6031b6de0f6900e004c9e9c97b0d84f8d3..9c979aee4d1e6e72f599d3c5751267e17aa3d32a 100644
+index 4a071dea48e86a962fd41a6ebecc5dfdaf9df78a..9d905ba5c306409ff846f93e3569d1e4c3c6bbf7 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
-@@ -477,6 +477,7 @@ public class PiglinAi {
+@@ -478,6 +478,7 @@ public class PiglinAi {
}
public static void angerNearbyPiglins(Player player, boolean blockOpen) {
diff --git a/patches/server/0609-Optimize-indirect-passenger-iteration.patch b/patches/server/0609-Optimize-indirect-passenger-iteration.patch
index 27bb816c05..bf32217d33 100644
--- a/patches/server/0609-Optimize-indirect-passenger-iteration.patch
+++ b/patches/server/0609-Optimize-indirect-passenger-iteration.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index e4ba2914184072835e4447511b70a94f1ebc9eea..2d3d27840dc8435381c415dfe34325499e5638c3 100644
+index 3fe696d2657812857427f9ffe5f0585f1cfde3c9..2ede042815b2c51a6f506d3c99eca01db78529dc 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -3826,20 +3826,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3839,20 +3839,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
private Stream<Entity> getIndirectPassengersStream() {
@@ -43,7 +43,7 @@ index e4ba2914184072835e4447511b70a94f1ebc9eea..2d3d27840dc8435381c415dfe3432549
return () -> {
return this.getIndirectPassengersStream().iterator();
};
-@@ -3852,6 +3866,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3865,6 +3879,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public boolean hasExactlyOnePlayerPassenger() {
diff --git a/patches/server/0612-Change-EnderEye-target-without-changing-other-things.patch b/patches/server/0612-Change-EnderEye-target-without-changing-other-things.patch
index 4974686f9c..496056ab98 100644
--- a/patches/server/0612-Change-EnderEye-target-without-changing-other-things.patch
+++ b/patches/server/0612-Change-EnderEye-target-without-changing-other-things.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Change EnderEye target without changing other things
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java
-index ee6bbe96503e9205349e9a5c411dc60dd952ec9e..eb7c16b0291357445d408c0748a03f1a9b562a90 100644
+index 305e92007fa2466f9aa7be8b9224dcc04d20120f..d06a02f1868b911721477c149f1b321979d8d178 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/EyeOfEnder.java
-@@ -70,6 +70,11 @@ public class EyeOfEnder extends Entity implements ItemSupplier {
+@@ -73,6 +73,11 @@ public class EyeOfEnder extends Entity implements ItemSupplier {
}
public void signalTo(BlockPos pos) {
@@ -20,7 +20,7 @@ index ee6bbe96503e9205349e9a5c411dc60dd952ec9e..eb7c16b0291357445d408c0748a03f1a
double d0 = (double) pos.getX();
int i = pos.getY();
double d1 = (double) pos.getZ();
-@@ -87,8 +92,10 @@ public class EyeOfEnder extends Entity implements ItemSupplier {
+@@ -90,8 +95,10 @@ public class EyeOfEnder extends Entity implements ItemSupplier {
this.tz = d1;
}
diff --git a/patches/server/0617-Add-back-EntityPortalExitEvent.patch b/patches/server/0617-Add-back-EntityPortalExitEvent.patch
index 2228e9d709..7473887ef4 100644
--- a/patches/server/0617-Add-back-EntityPortalExitEvent.patch
+++ b/patches/server/0617-Add-back-EntityPortalExitEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 2d3d27840dc8435381c415dfe34325499e5638c3..7295dfa7010297e019aba979bda9ff133d05a3c1 100644
+index 2ede042815b2c51a6f506d3c99eca01db78529dc..fae9aa88bc672b3ac17dcbbf077a57cd3254a723 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -3275,6 +3275,28 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3288,6 +3288,28 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} else {
// CraftBukkit start
worldserver = shapedetectorshape.world;
@@ -37,7 +37,7 @@ index 2d3d27840dc8435381c415dfe34325499e5638c3..7295dfa7010297e019aba979bda9ff13
if (worldserver == this.level) {
// SPIGOT-6782: Just move the entity if a plugin changed the world to the one the entity is already in
this.moveTo(shapedetectorshape.pos.x, shapedetectorshape.pos.y, shapedetectorshape.pos.z, shapedetectorshape.yRot, shapedetectorshape.xRot);
-@@ -3294,8 +3316,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3307,8 +3329,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (entity != null) {
entity.restoreFrom(this);
diff --git a/patches/server/0623-Add-critical-damage-API.patch b/patches/server/0623-Add-critical-damage-API.patch
index 55b032eb41..56413a796a 100644
--- a/patches/server/0623-Add-critical-damage-API.patch
+++ b/patches/server/0623-Add-critical-damage-API.patch
@@ -28,10 +28,10 @@ index e055106c50944c9a23bc59fe23f58a62c5deb7e4..8187feffe52efa5c887f1910e581a37c
+ // Paper end - add critical damage API
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index bc205c48460f6b90fbdc83f979f7bf029c1e0f9d..e4cb4a12c8623d19ccceccaceeca528edf3848e4 100644
+index 4d967016ac34d21161f10217db494f5bb537bd07..cb91111c1ae1cfbf256ba09f76ce0b0c8fc91f32 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1256,7 +1256,7 @@ public abstract class Player extends LivingEntity {
+@@ -1257,7 +1257,7 @@ public abstract class Player extends LivingEntity {
flag1 = true;
}
@@ -40,7 +40,7 @@ index bc205c48460f6b90fbdc83f979f7bf029c1e0f9d..e4cb4a12c8623d19ccceccaceeca528e
flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits
flag2 = flag2 && !this.isSprinting();
-@@ -1296,7 +1296,7 @@ public abstract class Player extends LivingEntity {
+@@ -1297,7 +1297,7 @@ public abstract class Player extends LivingEntity {
}
Vec3 vec3d = target.getDeltaMovement();
@@ -49,7 +49,7 @@ index bc205c48460f6b90fbdc83f979f7bf029c1e0f9d..e4cb4a12c8623d19ccceccaceeca528e
if (flag5) {
if (i > 0) {
-@@ -1324,7 +1324,7 @@ public abstract class Player extends LivingEntity {
+@@ -1325,7 +1325,7 @@ public abstract class Player extends LivingEntity {
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
// CraftBukkit start - Only apply knockback if the damage hits
@@ -59,10 +59,10 @@ index bc205c48460f6b90fbdc83f979f7bf029c1e0f9d..e4cb4a12c8623d19ccceccaceeca528e
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-index 0e1d4bd6f70e439b33eca57bf06e9e090825f58a..5f75e54cde19614461dd8375ded1d6b3c395f674 100644
+index 913f0eb1d9081cd224b54df401ff4a0af2989f1f..b3972c0aececb1d7170a47bbe8f1d6ce02d11331 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-@@ -379,6 +379,7 @@ public abstract class AbstractArrow extends Projectile {
+@@ -380,6 +380,7 @@ public abstract class AbstractArrow extends Projectile {
}
}
@@ -71,10 +71,10 @@ index 0e1d4bd6f70e439b33eca57bf06e9e090825f58a..5f75e54cde19614461dd8375ded1d6b3
int k = entity.getRemainingFireTicks();
boolean flag1 = entity.getType().is(EntityTypeTags.DEFLECTS_ARROWS);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index e57bafa1d071a2fefe44a150bc5754e76d78cdd9..cbac5fa3864e7b2298f75a44f6ef3f0000c9e765 100644
+index fef616ed1deac6cf400a2f39a2eba11b94921415..ef45cf53ee3e5bf9da11f631c6eeeb8df00e9920 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1061,7 +1061,7 @@ public class CraftEventFactory {
+@@ -1062,7 +1062,7 @@ public class CraftEventFactory {
return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
}
DamageCause damageCause = (damager.getBukkitEntity() instanceof org.bukkit.entity.TNTPrimed) ? DamageCause.BLOCK_EXPLOSION : DamageCause.ENTITY_EXPLOSION;
@@ -83,7 +83,7 @@ index e57bafa1d071a2fefe44a150bc5754e76d78cdd9..cbac5fa3864e7b2298f75a44f6ef3f00
} else if (damager != null || source.getDirectEntity() != null) {
DamageCause cause = (source.isSweep()) ? DamageCause.ENTITY_SWEEP_ATTACK : DamageCause.ENTITY_ATTACK;
-@@ -1091,7 +1091,7 @@ public class CraftEventFactory {
+@@ -1092,7 +1092,7 @@ public class CraftEventFactory {
cause = DamageCause.MAGIC;
}
@@ -92,7 +92,7 @@ index e57bafa1d071a2fefe44a150bc5754e76d78cdd9..cbac5fa3864e7b2298f75a44f6ef3f00
} else if (source.is(DamageTypes.FELL_OUT_OF_WORLD)) {
return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), entity, DamageCause.VOID, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
} else if (source.is(DamageTypes.LAVA)) {
-@@ -1149,13 +1149,13 @@ public class CraftEventFactory {
+@@ -1150,13 +1150,13 @@ public class CraftEventFactory {
cause = DamageCause.CUSTOM;
}
diff --git a/patches/server/0628-Add-Raw-Byte-Entity-Serialization.patch b/patches/server/0628-Add-Raw-Byte-Entity-Serialization.patch
index ca05abcafd..f4056c9b60 100644
--- a/patches/server/0628-Add-Raw-Byte-Entity-Serialization.patch
+++ b/patches/server/0628-Add-Raw-Byte-Entity-Serialization.patch
@@ -7,10 +7,10 @@ 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 7295dfa7010297e019aba979bda9ff133d05a3c1..0d68d8016a033ae2745e27d6a39d9b529bb2f675 100644
+index fae9aa88bc672b3ac17dcbbf077a57cd3254a723..6cb7a7642a2b02a85d6a0da0fc6e66f81844016a 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2065,6 +2065,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2078,6 +2078,15 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
}
@@ -27,10 +27,10 @@ index 7295dfa7010297e019aba979bda9ff133d05a3c1..0d68d8016a033ae2745e27d6a39d9b52
return this.isPassenger() ? false : this.saveAsPassenger(nbt);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index a6492b6a9f66d8bcda8928fadf0a5920ff7f0dab..71845027ba1b755ead76cf75d011547d9910597a 100644
+index 07158732dd6a5b7d622b7f2ea10ca87b50365b8a..411e2eed16d5b774900fc12f5ad782ab229dde97 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1076,5 +1076,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1077,5 +1077,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
}
return set;
}
diff --git a/patches/server/0630-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch b/patches/server/0630-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch
index d33cd40a43..e55fef3b36 100644
--- a/patches/server/0630-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch
+++ b/patches/server/0630-Do-not-run-close-logic-for-inventories-on-chunk-unlo.patch
@@ -9,7 +9,7 @@ chunk through it. This should also be OK from a leak prevention/
state desync POV because the TE is getting unloaded anyways.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index c83f2be16953b5cc009ddef81fd082295f3b2f71..f2015ffc83696b7ab6a552d4bb6fec1d8f6c6031 100644
+index 14b3edc05a04f5049f994df5be68e4f01e8cf1ef..10eb5c342930d2efd7d919f286fe8fa64cebaea4 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1270,9 +1270,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -51,10 +51,10 @@ index fb86824192f1fc850a55905757c65cafec1edb6a..48edd0bf7a6f24aaf582a96ee7cb4c29
@Override
public void doCloseContainer() {
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index e4cb4a12c8623d19ccceccaceeca528edf3848e4..1a2083e5887dc8ba0ad908cc961dd090cbc165f5 100644
+index cb91111c1ae1cfbf256ba09f76ce0b0c8fc91f32..e06cb31f9e3eda651a44dcede095ef7b38ef2ba7 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -509,6 +509,11 @@ public abstract class Player extends LivingEntity {
+@@ -510,6 +510,11 @@ public abstract class Player extends LivingEntity {
this.containerMenu = this.inventoryMenu;
}
// Paper end - Inventory close reason
diff --git a/patches/server/0632-Improve-and-expand-AsyncCatcher.patch b/patches/server/0632-Improve-and-expand-AsyncCatcher.patch
index b488b6b593..70908f281c 100644
--- a/patches/server/0632-Improve-and-expand-AsyncCatcher.patch
+++ b/patches/server/0632-Improve-and-expand-AsyncCatcher.patch
@@ -17,7 +17,7 @@ Async catch modifications to critical entity state
Co-authored-by: Jake Potrebic <[email protected]>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 0fef0dda0586b70dc140406b55dba1d5e23c3c97..b0df4c822ad01f1ed0f8b858e4ca012a823c7f47 100644
+index 2941445ea453e2fb88ea8de38c24bf755b93936a..666c6cb6f600973e1d84839aed715606279d4630 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1570,6 +1570,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -29,10 +29,10 @@ index 0fef0dda0586b70dc140406b55dba1d5e23c3c97..b0df4c822ad01f1ed0f8b858e4ca012a
if (player.isRemoved()) {
LOGGER.info("Attempt to teleport removed player {} restricted", player.getScoreboardName());
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index fadbb788bff1dc1c643ffbb28774d20ba6d55ce5..16d8cc391f384bee57550f507484d60f344de76e 100644
+index a2edccc840f2ba76e236ea7441f3e4909b1a1898..18804ea960f8423d172d9119c0739226a18d4d56 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1118,7 +1118,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1126,7 +1126,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public boolean addEffect(MobEffectInstance mobeffect, @Nullable Entity entity, EntityPotionEffectEvent.Cause cause) {
@@ -42,10 +42,10 @@ index fadbb788bff1dc1c643ffbb28774d20ba6d55ce5..16d8cc391f384bee57550f507484d60f
this.effectsToProcess.add(new ProcessableEffect(mobeffect, cause));
return true;
diff --git a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
-index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39817a1b7e 100644
+index 8f23b45dce35617bb56b21fb4f7a09baf36d40c5..cbdb2a710a7217b750de3e782cad5b5a45c814b3 100644
--- a/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
+++ b/src/main/java/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
-@@ -77,6 +77,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -78,6 +78,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
private boolean addEntityUuid(T entity) {
@@ -53,7 +53,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
if (!this.knownUuids.add(entity.getUUID())) {
PersistentEntitySectionManager.LOGGER.warn("UUID of added entity already exists: {}", entity);
return false;
-@@ -90,6 +91,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -91,6 +92,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
private boolean addEntity(T entity, boolean existing) {
@@ -61,7 +61,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
// Paper start - chunk system hooks
if (existing) {
// I don't want to know why this is a generic type.
-@@ -145,19 +147,23 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -146,19 +148,23 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
void startTicking(T entity) {
@@ -85,7 +85,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
this.callbacks.onTrackingEnd(entity);
this.visibleEntityStorage.remove(entity);
}
-@@ -169,6 +175,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -170,6 +176,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
public void updateChunkStatus(ChunkPos chunkPos, Visibility trackingStatus) {
@@ -93,7 +93,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
long i = chunkPos.toLong();
if (trackingStatus == Visibility.HIDDEN) {
-@@ -213,6 +220,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -214,6 +221,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
public void ensureChunkQueuedForLoad(long chunkPos) {
@@ -101,7 +101,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
PersistentEntitySectionManager.ChunkLoadStatus persistententitysectionmanager_b = (PersistentEntitySectionManager.ChunkLoadStatus) this.chunkLoadStatuses.get(chunkPos);
if (persistententitysectionmanager_b == PersistentEntitySectionManager.ChunkLoadStatus.FRESH) {
-@@ -257,6 +265,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -258,6 +266,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
private void requestChunkLoad(long chunkPos) {
@@ -109,7 +109,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
this.chunkLoadStatuses.put(chunkPos, PersistentEntitySectionManager.ChunkLoadStatus.PENDING);
ChunkPos chunkcoordintpair = new ChunkPos(chunkPos);
CompletableFuture completablefuture = this.permanentStorage.loadEntities(chunkcoordintpair);
-@@ -270,6 +279,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -271,6 +280,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
private boolean processChunkUnload(long chunkPos) {
@@ -117,7 +117,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
boolean flag = this.storeChunkSections(chunkPos, (entityaccess) -> {
entityaccess.getPassengersAndSelf().forEach(this::unloadEntity);
}, true); // CraftBukkit - add boolean for event call
-@@ -294,6 +304,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -295,6 +305,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
private void processPendingLoads() {
@@ -125,7 +125,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
ChunkEntities<T> chunkentities; // CraftBukkit - decompile error
while ((chunkentities = (ChunkEntities) this.loadingInbox.poll()) != null) {
-@@ -310,6 +321,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -311,6 +322,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
public void tick() {
@@ -133,7 +133,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
this.processPendingLoads();
this.processUnloads();
}
-@@ -330,6 +342,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -331,6 +343,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
public void autoSave() {
@@ -141,7 +141,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
this.getAllChunksToSave().forEach((java.util.function.LongConsumer) (i) -> { // CraftBukkit - decompile error
boolean flag = this.chunkVisibility.get(i) == Visibility.HIDDEN;
-@@ -344,6 +357,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -345,6 +358,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
}
public void saveAll() {
@@ -149,7 +149,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
LongSet longset = this.getAllChunksToSave();
while (!longset.isEmpty()) {
-@@ -451,6 +465,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -452,6 +466,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
long i = SectionPos.asLong(blockposition);
if (i != this.currentSectionKey) {
@@ -157,7 +157,7 @@ index bbbf6dd8e566ecdca8794e3b03765fe7e426a2bd..66ab901956ca394c251c420338643d39
Visibility visibility = this.currentSection.getStatus();
if (!this.currentSection.remove(this.entity)) {
-@@ -505,6 +520,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
+@@ -506,6 +521,7 @@ public class PersistentEntitySectionManager<T extends EntityAccess> implements A
@Override
public void onRemove(Entity.RemovalReason reason) {
@@ -202,7 +202,7 @@ index ca68faef4232859e833adfd86a0ce13f7c2ad00e..df57157317fc6c84f69751fd8a120761
ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(Holder.direct(SoundEvent.createVariableRangeEvent(new ResourceLocation(sound))), net.minecraft.sounds.SoundSource.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index f288efe62c7280189359bba749a2dc3ec3f6ef49..60230ddeec41485e1e1b83614a6256d9ae2cb242 100644
+index e1092bb514e01e978a8d624bd5a7cba5b4b5fe81..1170cf9b3b61fae099ed8574888187cf4f20ffd1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -501,6 +501,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
diff --git a/patches/server/0655-Update-head-rotation-in-missing-places.patch b/patches/server/0655-Update-head-rotation-in-missing-places.patch
index 26bfd657fe..11b6d2810b 100644
--- a/patches/server/0655-Update-head-rotation-in-missing-places.patch
+++ b/patches/server/0655-Update-head-rotation-in-missing-places.patch
@@ -8,10 +8,10 @@ This is because bukkit uses a separate head rotation field for yaw.
This issue only applies to players.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index ac09bfed823524b3b11b8ad622198a62c70f7e69..3916da425bc0a2043070823f940c3a2bd6f3faf1 100644
+index 6cb7a7642a2b02a85d6a0da0fc6e66f81844016a..cd6546b853e147bea8fba789e241674cc400b81e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -1777,6 +1777,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1790,6 +1790,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.setXRot(Mth.clamp(pitch, -90.0F, 90.0F) % 360.0F);
this.yRotO = this.getYRot();
this.xRotO = this.getXRot();
@@ -19,7 +19,7 @@ index ac09bfed823524b3b11b8ad622198a62c70f7e69..3916da425bc0a2043070823f940c3a2b
}
public void absMoveTo(double x, double y, double z) {
-@@ -1815,6 +1816,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1828,6 +1829,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.setXRot(pitch);
this.setOldPosAndRot();
this.reapplyPosition();
diff --git a/patches/server/0662-don-t-attempt-to-teleport-dead-entities.patch b/patches/server/0662-don-t-attempt-to-teleport-dead-entities.patch
index a06cf03b5f..fe234b451f 100644
--- a/patches/server/0662-don-t-attempt-to-teleport-dead-entities.patch
+++ b/patches/server/0662-don-t-attempt-to-teleport-dead-entities.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] don't attempt to teleport dead entities
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 3916da425bc0a2043070823f940c3a2bd6f3faf1..9f3ae962b800021faad0ae9ce064b364002a2135 100644
+index cd6546b853e147bea8fba789e241674cc400b81e..c090a529eb6bfe3790f6b912ac3d296a43e52762 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -705,7 +705,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -718,7 +718,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// CraftBukkit start
public void postTick() {
// No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle
diff --git a/patches/server/0663-Prevent-excessive-velocity-through-repeated-crits.patch b/patches/server/0663-Prevent-excessive-velocity-through-repeated-crits.patch
index 0379cedd91..e77b1154c2 100644
--- a/patches/server/0663-Prevent-excessive-velocity-through-repeated-crits.patch
+++ b/patches/server/0663-Prevent-excessive-velocity-through-repeated-crits.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Prevent excessive velocity through repeated crits
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 16d8cc391f384bee57550f507484d60f344de76e..291cfb86f85eb617d1156f64ea72e6143b94a4b2 100644
+index 18804ea960f8423d172d9119c0739226a18d4d56..d4abce0b715d5eda99505fa0e29eeab20b538fd9 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2689,13 +2689,26 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2697,13 +2697,26 @@ public abstract class LivingEntity extends Entity implements Attackable {
return this.hasEffect(MobEffects.JUMP) ? 0.1F * ((float) this.getEffect(MobEffects.JUMP).getAmplifier() + 1.0F) : 0.0F;
}
diff --git a/patches/server/0666-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0666-Prevent-sending-oversized-item-data-in-equipment-and.patch
index 7cd3ceec2b..66da8d4997 100644
--- a/patches/server/0666-Prevent-sending-oversized-item-data-in-equipment-and.patch
+++ b/patches/server/0666-Prevent-sending-oversized-item-data-in-equipment-and.patch
@@ -34,10 +34,10 @@ index a83b4d9b61230ecf5f776269cab228cf49c5f546..86f6e5bad325dd3d817b643388b19612
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 291cfb86f85eb617d1156f64ea72e6143b94a4b2..fa11c0b3125ac74538848018fe6d8c88b78bfb2e 100644
+index d4abce0b715d5eda99505fa0e29eeab20b538fd9..ccbafac8e5930571928e87f1c83f9f481fcfe8c4 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3200,7 +3200,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3208,7 +3208,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
equipmentChanges.forEach((enumitemslot, itemstack) -> {
ItemStack itemstack1 = itemstack.copy();
@@ -49,7 +49,7 @@ index 291cfb86f85eb617d1156f64ea72e6143b94a4b2..fa11c0b3125ac74538848018fe6d8c88
switch (enumitemslot.getType()) {
case HAND:
this.setLastHandItem(enumitemslot, itemstack1);
-@@ -3213,6 +3216,34 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3221,6 +3224,34 @@ public abstract class LivingEntity extends Entity implements Attackable {
((ServerLevel) this.level()).getChunkSource().broadcast(this, new ClientboundSetEquipmentPacket(this.getId(), list));
}
diff --git a/patches/server/0667-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0667-Hide-unnecessary-itemmeta-from-clients.patch
index 487e99d1b8..6224365ef1 100644
--- a/patches/server/0667-Hide-unnecessary-itemmeta-from-clients.patch
+++ b/patches/server/0667-Hide-unnecessary-itemmeta-from-clients.patch
@@ -33,10 +33,10 @@ index ace2cab310aa7d89e1b76bf5fdc9fd64f56b6cc7..cf173a2315f3a97a89dc2aabe81be285
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index bd2449fd82a2415b9a0c1f588cd1815155a5d300..5c566576703a22bca9ab2cde7e201d893faece03 100644
+index ccbafac8e5930571928e87f1c83f9f481fcfe8c4..9af308ef5e55df9ce08b25e358e48d1c6f67d663 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3202,7 +3202,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3210,7 +3210,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Paper start - prevent oversized data
ItemStack toSend = sanitizeItemStack(itemstack1, true);
@@ -45,7 +45,7 @@ index bd2449fd82a2415b9a0c1f588cd1815155a5d300..5c566576703a22bca9ab2cde7e201d89
// Paper end - prevent oversized data
switch (enumitemslot.getType()) {
case HAND:
-@@ -3216,6 +3216,77 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3224,6 +3224,77 @@ public abstract class LivingEntity extends Entity implements Attackable {
((ServerLevel) this.level()).getChunkSource().broadcast(this, new ClientboundSetEquipmentPacket(this.getId(), list));
}
diff --git a/patches/server/0676-Forward-CraftEntity-in-teleport-command.patch b/patches/server/0676-Forward-CraftEntity-in-teleport-command.patch
index 2319e020df..b884d9e889 100644
--- a/patches/server/0676-Forward-CraftEntity-in-teleport-command.patch
+++ b/patches/server/0676-Forward-CraftEntity-in-teleport-command.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Forward CraftEntity in teleport command
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 885cef0698c7578bfd8bf7698c69a8e0006b0f8b..e4b9431f15de834b8616f4797fa1748bbd65b233 100644
+index c090a529eb6bfe3790f6b912ac3d296a43e52762..1ad6958526e79505cb9e7c3eeb5c421857fac43e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -3247,6 +3247,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3260,6 +3260,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void restoreFrom(Entity original) {
@@ -22,7 +22,7 @@ index 885cef0698c7578bfd8bf7698c69a8e0006b0f8b..e4b9431f15de834b8616f4797fa1748b
CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag());
nbttagcompound.remove("Dimension");
-@@ -3337,10 +3344,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3350,10 +3357,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
}
// CraftBukkit end
diff --git a/patches/server/0678-Entity-powdered-snow-API.patch b/patches/server/0678-Entity-powdered-snow-API.patch
index 817eaf068a..9976726fc5 100644
--- a/patches/server/0678-Entity-powdered-snow-API.patch
+++ b/patches/server/0678-Entity-powdered-snow-API.patch
@@ -7,10 +7,10 @@ Subject: [PATCH] Entity powdered snow API
public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 71845027ba1b755ead76cf75d011547d9910597a..47be73dbb0dd1b6cef0113042be6a80cb6209252 100644
+index 411e2eed16d5b774900fc12f5ad782ab229dde97..71f9b7bbbabae9291fdb9f902f3f69c13e715c0e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1086,5 +1086,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1087,5 +1087,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
this.entity.setRot(location.getYaw(), location.getPitch());
return !this.entity.valid && this.entity.level().addFreshEntity(this.entity, reason);
}
diff --git a/patches/server/0679-Add-API-for-item-entity-health.patch b/patches/server/0679-Add-API-for-item-entity-health.patch
index c7354d7143..cd2757b544 100644
--- a/patches/server/0679-Add-API-for-item-entity-health.patch
+++ b/patches/server/0679-Add-API-for-item-entity-health.patch
@@ -7,7 +7,7 @@ Subject: [PATCH] Add API for item entity health
public net.minecraft.world.entity.item.ItemEntity health
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
-index 4a15c3786edbfeae3367c0b20fb6aee11d62aea6..cbfd4cf1d7d32757cf124d1aaa4b83d8a155868f 100644
+index 4a15c3786edbfeae3367c0b20fb6aee11d62aea6..1a291dd8a287db30e71dcb315599fc4b038764c4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
@@ -98,6 +98,21 @@ public class CraftItem extends CraftEntity implements Item {
@@ -24,7 +24,7 @@ index 4a15c3786edbfeae3367c0b20fb6aee11d62aea6..cbfd4cf1d7d32757cf124d1aaa4b83d8
+ public void setHealth(int health) {
+ if (health <= 0) {
+ this.getHandle().getItem().onDestroyed(this.getHandle());
-+ this.getHandle().discard();
++ this.getHandle().discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.PLUGIN);
+ } else {
+ this.getHandle().health = health;
+ }
diff --git a/patches/server/0684-Fix-bees-aging-inside-hives.patch b/patches/server/0684-Fix-bees-aging-inside-hives.patch
index 528be5b54a..2c8d2209d5 100644
--- a/patches/server/0684-Fix-bees-aging-inside-hives.patch
+++ b/patches/server/0684-Fix-bees-aging-inside-hives.patch
@@ -7,10 +7,10 @@ Fixes bees incorrectly being aged up due to upstream's
resetting the ticks inside hive on a failed release
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
-index d36373cb1fda4d4f2b41dd181306ea697a2fe7a8..56b328c64bea0ffd51930d8ba15fb87a36e6d8a1 100644
+index a69a81ba6a2b65978b5cf00810ed12156a5f89e6..55b0e2bf98a285cdcd30e40d94192b7a1802efd8 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
-@@ -328,7 +328,7 @@ public class BeehiveBlockEntity extends BlockEntity {
+@@ -332,7 +332,7 @@ public class BeehiveBlockEntity extends BlockEntity {
for (Iterator iterator = bees.iterator(); iterator.hasNext(); ++tileentitybeehive_hivebee.ticksInHive) {
tileentitybeehive_hivebee = (BeehiveBlockEntity.BeeData) iterator.next();
@@ -19,7 +19,7 @@ index d36373cb1fda4d4f2b41dd181306ea697a2fe7a8..56b328c64bea0ffd51930d8ba15fb87a
BeehiveBlockEntity.BeeReleaseStatus tileentitybeehive_releasestatus = tileentitybeehive_hivebee.entityData.getBoolean("HasNectar") ? BeehiveBlockEntity.BeeReleaseStatus.HONEY_DELIVERED : BeehiveBlockEntity.BeeReleaseStatus.BEE_RELEASED;
if (BeehiveBlockEntity.releaseOccupant(world, pos, state, tileentitybeehive_hivebee, (List) null, tileentitybeehive_releasestatus, flowerPos)) {
-@@ -336,10 +336,11 @@ public class BeehiveBlockEntity extends BlockEntity {
+@@ -340,10 +340,11 @@ public class BeehiveBlockEntity extends BlockEntity {
iterator.remove();
// CraftBukkit start
} else {
@@ -32,7 +32,7 @@ index d36373cb1fda4d4f2b41dd181306ea697a2fe7a8..56b328c64bea0ffd51930d8ba15fb87a
}
if (flag) {
-@@ -428,12 +429,14 @@ public class BeehiveBlockEntity extends BlockEntity {
+@@ -432,12 +433,14 @@ public class BeehiveBlockEntity extends BlockEntity {
final CompoundTag entityData;
int ticksInHive;
diff --git a/patches/server/0686-Validate-usernames.patch b/patches/server/0686-Validate-usernames.patch
index 4ed9d0f86f..a4e02c238d 100644
--- a/patches/server/0686-Validate-usernames.patch
+++ b/patches/server/0686-Validate-usernames.patch
@@ -26,10 +26,10 @@ index a7da99ac31bbcb8b6f1814a2d5509c7067aafb08..fb582acfe9e5cb68314ee39e1d54a550
GameProfile gameprofile = this.server.getSingleplayerProfile();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 75e3d7f81e21caaffd79d095022c4196507a9059..584b1627cf18e6aee9338ade0f94d983e2dda412 100644
+index 7cd6d91fe154d29ec0b0fc0a5a50713bbc2c1c83..95ba9b3bf957e5f744e85b3834a50ee2eb925a70 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -677,7 +677,7 @@ public abstract class PlayerList {
+@@ -678,7 +678,7 @@ public abstract class PlayerList {
for (int i = 0; i < this.players.size(); ++i) {
entityplayer = (ServerPlayer) this.players.get(i);
@@ -39,10 +39,10 @@ index 75e3d7f81e21caaffd79d095022c4196507a9059..584b1627cf18e6aee9338ade0f94d983
}
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 1a2083e5887dc8ba0ad908cc961dd090cbc165f5..8ca4f45f1db35a08a335142aa888e98e63cec348 100644
+index e06cb31f9e3eda651a44dcede095ef7b38ef2ba7..7c0db708575ef26a1dd73709bf22653f21e0c863 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -2333,9 +2333,23 @@ public abstract class Player extends LivingEntity {
+@@ -2341,9 +2341,23 @@ public abstract class Player extends LivingEntity {
}
public static boolean isValidUsername(String name) {
diff --git a/patches/server/0693-Add-configurable-height-for-slime-spawn.patch b/patches/server/0693-Add-configurable-height-for-slime-spawn.patch
index 01507f355e..08dbacd3f1 100644
--- a/patches/server/0693-Add-configurable-height-for-slime-spawn.patch
+++ b/patches/server/0693-Add-configurable-height-for-slime-spawn.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add configurable height for slime spawn
diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java
-index 2977e5986958cbee987893dd9de1dfb3764b291d..2502cb476032c6a247132ce2e427721d6c9f8ce4 100644
+index 0b8bcf9fc13ec6645c9e11cf52047272cdfce68c..3d9107d2c19a09215445aa0e0aacc32f9f82a536 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Slime.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java
-@@ -336,7 +336,11 @@ public class Slime extends Mob implements Enemy {
+@@ -344,7 +344,11 @@ public class Slime extends Mob implements Enemy {
return checkMobSpawnRules(type, world, spawnReason, pos, random);
}
@@ -21,7 +21,7 @@ index 2977e5986958cbee987893dd9de1dfb3764b291d..2502cb476032c6a247132ce2e427721d
return checkMobSpawnRules(type, world, spawnReason, pos, random);
}
-@@ -347,7 +351,10 @@ public class Slime extends Mob implements Enemy {
+@@ -355,7 +359,10 @@ public class Slime extends Mob implements Enemy {
ChunkPos chunkcoordintpair = new ChunkPos(pos);
boolean flag = world.getMinecraftWorld().paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(chunkcoordintpair.x, chunkcoordintpair.z, ((WorldGenLevel) world).getSeed(), world.getMinecraftWorld().spigotConfig.slimeSeed).nextInt(10) == 0; // Spigot // Paper
diff --git a/patches/server/0697-Freeze-Tick-Lock-API.patch b/patches/server/0697-Freeze-Tick-Lock-API.patch
index 7baa8a0bcf..dcd6ed67bc 100644
--- a/patches/server/0697-Freeze-Tick-Lock-API.patch
+++ b/patches/server/0697-Freeze-Tick-Lock-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Freeze Tick Lock API
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index e4b9431f15de834b8616f4797fa1748bbd65b233..1a51c0ed22f892a233ce82fe53e72056685c9eba 100644
+index 1ad6958526e79505cb9e7c3eeb5c421857fac43e..bff3ff467c4bc20b214f89a3955805a4208463f1 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -404,6 +404,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -405,6 +405,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
private org.bukkit.util.Vector origin;
@javax.annotation.Nullable
private UUID originWorld;
@@ -16,7 +16,7 @@ index e4b9431f15de834b8616f4797fa1748bbd65b233..1a51c0ed22f892a233ce82fe53e72056
public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector();
-@@ -751,7 +752,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -764,7 +765,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.setRemainingFireTicks(this.remainingFireTicks - 1);
}
@@ -25,7 +25,7 @@ index e4b9431f15de834b8616f4797fa1748bbd65b233..1a51c0ed22f892a233ce82fe53e72056
this.setTicksFrozen(0);
this.level().levelEvent((Player) null, 1009, this.blockPosition, 1);
}
-@@ -2230,6 +2231,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2243,6 +2244,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (fromNetherPortal) {
nbttagcompound.putBoolean("Paper.FromNetherPortal", true);
}
@@ -35,7 +35,7 @@ index e4b9431f15de834b8616f4797fa1748bbd65b233..1a51c0ed22f892a233ce82fe53e72056
// Paper end
return nbttagcompound;
} catch (Throwable throwable) {
-@@ -2374,6 +2378,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2387,6 +2391,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (spawnReason == null) {
spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT;
}
@@ -46,10 +46,10 @@ index e4b9431f15de834b8616f4797fa1748bbd65b233..1a51c0ed22f892a233ce82fe53e72056
} catch (Throwable throwable) {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 4e781939e7c980d095a4b0fdd11736ec48b4ecfa..5adfa199835f8ee6b4db16c1bf262bb43324e654 100644
+index 9af308ef5e55df9ce08b25e358e48d1c6f67d663..511e8e789932df77999689659d1efbe311339e40 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3464,7 +3464,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3472,7 +3472,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.level().getProfiler().pop();
this.level().getProfiler().push("freezing");
@@ -59,10 +59,10 @@ index 4e781939e7c980d095a4b0fdd11736ec48b4ecfa..5adfa199835f8ee6b4db16c1bf262bb4
if (this.isInPowderSnow && this.canFreeze()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 47be73dbb0dd1b6cef0113042be6a80cb6209252..b7df71633527dce2e4f954caee249e3b31b82226 100644
+index 71f9b7bbbabae9291fdb9f902f3f69c13e715c0e..a5a9c34709d3bb716e2dc9bb6bd548992df74f46 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -320,6 +320,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -321,6 +321,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.getHandle().isFullyFrozen();
}
diff --git a/patches/server/0714-Force-close-world-loading-screen.patch b/patches/server/0714-Force-close-world-loading-screen.patch
index 848ad8fa5b..a62795f9be 100644
--- a/patches/server/0714-Force-close-world-loading-screen.patch
+++ b/patches/server/0714-Force-close-world-loading-screen.patch
@@ -10,10 +10,10 @@ so we do not need that. The client only needs the chunk it is currently in to
be loaded to close the loading screen, so we just send an empty one.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 584b1627cf18e6aee9338ade0f94d983e2dda412..0c77457e1b9360ef578b4a781bb2ec1fb7b582db 100644
+index 95ba9b3bf957e5f744e85b3834a50ee2eb925a70..8ba90d47d7015c0081d341915035ce65baa6b9a4 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -398,6 +398,16 @@ public abstract class PlayerList {
+@@ -399,6 +399,16 @@ public abstract class PlayerList {
// Paper start - Fire PlayerJoinEvent when Player is actually ready; move vehicle into method so it can be called above - short circuit around that code
onPlayerJoinFinish(player, worldserver1, s1);
diff --git a/patches/server/0717-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch b/patches/server/0717-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch
index 8e50aa42cd..d80acbf9d0 100644
--- a/patches/server/0717-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch
+++ b/patches/server/0717-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch
@@ -15,10 +15,10 @@ piercing arrows to avoid duplicate damage being applied.
protected net.minecraft.world.entity.projectile.Projectile hitCancelled
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-index 5f75e54cde19614461dd8375ded1d6b3c395f674..618de60680de015bc68bf95a68eda98db7bab3c5 100644
+index b3972c0aececb1d7170a47bbe8f1d6ce02d11331..c30f19162e33dbe8f018b7dc66210681b6027389 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-@@ -297,6 +297,19 @@ public abstract class AbstractArrow extends Projectile {
+@@ -298,6 +298,19 @@ public abstract class AbstractArrow extends Projectile {
}
}
diff --git a/patches/server/0718-More-Projectile-API.patch b/patches/server/0718-More-Projectile-API.patch
index 222fc0e15d..ef828fda14 100644
--- a/patches/server/0718-More-Projectile-API.patch
+++ b/patches/server/0718-More-Projectile-API.patch
@@ -20,10 +20,10 @@ public net.minecraft.world.entity.projectile.Projectile canHitEntity(Lnet/minecr
Co-authored-by: Nassim Jahnke <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
-index 77235314f4ccc28255b98f2bb52f553fe93313f3..5f316b09fb914ccb0782efe521ad85727f5dd02f 100644
+index 0204257ca0245830534592922e400a362c347715..252355d19e4f07406f78616e2366182758e0947b 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
-@@ -100,6 +100,11 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -101,6 +101,11 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
@Override
protected void onHit(HitResult hitResult) {
super.onHit(hitResult);
@@ -35,7 +35,7 @@ index 77235314f4ccc28255b98f2bb52f553fe93313f3..5f316b09fb914ccb0782efe521ad8572
if (!this.level().isClientSide) {
ItemStack itemstack = this.getItem();
Potion potionregistry = PotionUtils.getPotion(itemstack);
-@@ -113,7 +118,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -114,7 +119,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
if (this.isLingering()) {
showParticles = this.makeAreaOfEffectCloud(itemstack, potionregistry, hitResult); // CraftBukkit - Pass MovingObjectPosition // Paper
} else {
@@ -44,7 +44,7 @@ index 77235314f4ccc28255b98f2bb52f553fe93313f3..5f316b09fb914ccb0782efe521ad8572
}
}
-@@ -175,7 +180,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -176,7 +181,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
}
@@ -53,7 +53,7 @@ index 77235314f4ccc28255b98f2bb52f553fe93313f3..5f316b09fb914ccb0782efe521ad8572
AABB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D);
List<net.minecraft.world.entity.LivingEntity> list1 = this.level().getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb);
Map<LivingEntity, Double> affected = new HashMap<LivingEntity, Double>(); // CraftBukkit
-@@ -252,7 +257,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -253,7 +258,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
}
@@ -509,10 +509,10 @@ index 20f9735c7cb76024e15dbdca7684f5c560876175..8a6af0db8e0aa0cffbf19584be747076
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index cbac5fa3864e7b2298f75a44f6ef3f0000c9e765..a30626e25272769caf06caa69d32e2d3f9211710 100644
+index ef45cf53ee3e5bf9da11f631c6eeeb8df00e9920..d329f9fab83c30ded648763c6c0505d793daa506 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -831,19 +831,19 @@ public class CraftEventFactory {
+@@ -832,19 +832,19 @@ public class CraftEventFactory {
/**
* PotionSplashEvent
*/
@@ -535,7 +535,7 @@ index cbac5fa3864e7b2298f75a44f6ef3f0000c9e765..a30626e25272769caf06caa69d32e2d3
hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
}
-@@ -852,20 +852,20 @@ public class CraftEventFactory {
+@@ -853,20 +853,20 @@ public class CraftEventFactory {
return event;
}
diff --git a/patches/server/0727-Fix-new-block-data-for-EntityChangeBlockEvent.patch b/patches/server/0727-Fix-new-block-data-for-EntityChangeBlockEvent.patch
index ad1116447d..6d27ca622a 100644
--- a/patches/server/0727-Fix-new-block-data-for-EntityChangeBlockEvent.patch
+++ b/patches/server/0727-Fix-new-block-data-for-EntityChangeBlockEvent.patch
@@ -78,10 +78,10 @@ index 6e1c67ad757e466d122badd547ee3f8421eba9ba..cf4859814a60468f683e3afe285b4934
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-index 0a2c2b847dc516abf31870116056dbdbb22f31d9..45906d273e6d6ec20cf44b4d07efdac68752ee9b 100644
+index 25f611b35a5710c595574d2d6ed50c442ca55721..6c215470ad05d59f903cbeff15088a03b42c3f66 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-@@ -374,7 +374,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
+@@ -375,7 +375,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
if (WitherBoss.canDestroy(iblockdata)) {
// CraftBukkit start
@@ -117,10 +117,10 @@ index aac60e85cd6dba7d87f4a1663c2c62952521d112..151acc43c96b4545ce92d3d559d8e159
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
-index 6f452605e9dc9ebd9980eae9fdeea34417a37a88..2c60a3765d22909e73b660492410ab8456304b68 100644
+index 0e2725d92002c181f542e2335cdd6e6de69155e1..fcd5cc3ff8d4b38f4dea08f78723db3dac53ffde 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java
-@@ -181,7 +181,8 @@ public class Silverfish extends Monster {
+@@ -182,7 +182,8 @@ public class Silverfish extends Monster {
if (block instanceof InfestedBlock) {
// CraftBukkit start
@@ -131,10 +131,10 @@ index 6f452605e9dc9ebd9980eae9fdeea34417a37a88..2c60a3765d22909e73b660492410ab84
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
-index 5f316b09fb914ccb0782efe521ad85727f5dd02f..f191b0e303a97b5406133454374ff9448aee1a5a 100644
+index 252355d19e4f07406f78616e2366182758e0947b..2b05824f5826a2da2539f8a6d373a16c185aa80a 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
-@@ -306,7 +306,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -307,7 +307,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
if (iblockdata.is(BlockTags.FIRE)) {
// CraftBukkit start
@@ -196,10 +196,10 @@ index 61abbcfe97e3d3e3da5ee658672549d14594ad17..05e14322e519d1399e87beb532e1cc4a
}
// 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 a30626e25272769caf06caa69d32e2d3f9211710..489576ddb53766e8aa463772e9260ee996ce974a 100644
+index d329f9fab83c30ded648763c6c0505d793daa506..55a0a154f2b37c75e40d3b33c9baf245d5dcd9d7 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1359,11 +1359,11 @@ public class CraftEventFactory {
+@@ -1360,11 +1360,11 @@ public class CraftEventFactory {
return event;
}
diff --git a/patches/server/0729-Ensure-entity-passenger-world-matches-ridden-entity.patch b/patches/server/0729-Ensure-entity-passenger-world-matches-ridden-entity.patch
index 1996d367ed..7f6fcdbd3e 100644
--- a/patches/server/0729-Ensure-entity-passenger-world-matches-ridden-entity.patch
+++ b/patches/server/0729-Ensure-entity-passenger-world-matches-ridden-entity.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Ensure entity passenger world matches ridden entity
Bad plugins doing this would cause some obvious problems...
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 1a51c0ed22f892a233ce82fe53e72056685c9eba..c678e9b313bf1cb4a0849ca993fa006ebf182f3d 100644
+index bff3ff467c4bc20b214f89a3955805a4208463f1..a9bc659a89009f430105c8524688130a01baaecf 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2564,7 +2564,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2577,7 +2577,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public boolean startRiding(Entity entity, boolean force) {
diff --git a/patches/server/0731-Allow-changing-the-EnderDragon-podium.patch b/patches/server/0731-Allow-changing-the-EnderDragon-podium.patch
index 301eb8f9fe..fc8eed08e4 100644
--- a/patches/server/0731-Allow-changing-the-EnderDragon-podium.patch
+++ b/patches/server/0731-Allow-changing-the-EnderDragon-podium.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Allow changing the EnderDragon podium
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 623a4cc921442dbba4f80df3be06762b4b1289ae..d0de3ef6c78785a047ecdf2412df082d53fb985b 100644
+index 6d01175ea2092bc5f5ebb7aa066450bfec2443a1..61e4f8be9f5927b65ae03da98250d3cd4c1e8c13 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
-@@ -103,6 +103,10 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -104,6 +104,10 @@ public class EnderDragon extends Mob implements Enemy {
private final int[] nodeAdjacency;
private final BinaryHeap openSet;
private final Explosion explosionSource; // CraftBukkit - reusable source for CraftTNTPrimed.getSource()
@@ -19,7 +19,7 @@ index 623a4cc921442dbba4f80df3be06762b4b1289ae..d0de3ef6c78785a047ecdf2412df082d
public EnderDragon(EntityType<? extends EnderDragon> entitytypes, Level world) {
super(EntityType.ENDER_DRAGON, world);
-@@ -143,6 +147,19 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -144,6 +148,19 @@ public class EnderDragon extends Mob implements Enemy {
return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0D);
}
@@ -39,7 +39,7 @@ index 623a4cc921442dbba4f80df3be06762b4b1289ae..d0de3ef6c78785a047ecdf2412df082d
@Override
public boolean isFlapping() {
float f = Mth.cos(this.flapTime * 6.2831855F);
-@@ -994,7 +1011,7 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -995,7 +1012,7 @@ public class EnderDragon extends Mob implements Enemy {
d0 = segment2[1] - segment1[1];
}
} else {
@@ -48,7 +48,7 @@ index 623a4cc921442dbba4f80df3be06762b4b1289ae..d0de3ef6c78785a047ecdf2412df082d
double d1 = Math.max(Math.sqrt(blockposition.distToCenterSqr(this.position())) / 4.0D, 1.0D);
d0 = (double) segmentOffset / d1;
-@@ -1021,7 +1038,7 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -1022,7 +1039,7 @@ public class EnderDragon extends Mob implements Enemy {
vec3d = this.getViewVector(tickDelta);
}
} else {
diff --git a/patches/server/0734-Use-username-instead-of-display-name-in-PlayerList-g.patch b/patches/server/0734-Use-username-instead-of-display-name-in-PlayerList-g.patch
index a5282aa96a..ce925b89b7 100644
--- a/patches/server/0734-Use-username-instead-of-display-name-in-PlayerList-g.patch
+++ b/patches/server/0734-Use-username-instead-of-display-name-in-PlayerList-g.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Use username instead of display name in
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 0c77457e1b9360ef578b4a781bb2ec1fb7b582db..a8a57819993f3657d6525a98527ec47631174bed 100644
+index 8ba90d47d7015c0081d341915035ce65baa6b9a4..6fbcea8fd32a425cab936330d5d9545782e03346 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1434,7 +1434,7 @@ public abstract class PlayerList {
+@@ -1435,7 +1435,7 @@ public abstract class PlayerList {
// CraftBukkit start
public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) {
ServerStatsCounter serverstatisticmanager = entityhuman.getStats();
diff --git a/patches/server/0742-Add-PlayerStopUsingItemEvent.patch b/patches/server/0742-Add-PlayerStopUsingItemEvent.patch
index 93eab4e15b..fad59d6983 100644
--- a/patches/server/0742-Add-PlayerStopUsingItemEvent.patch
+++ b/patches/server/0742-Add-PlayerStopUsingItemEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerStopUsingItemEvent
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 5adfa199835f8ee6b4db16c1bf262bb43324e654..e3b19c6e51596b854b6d2acbc67f6fb109d62a92 100644
+index 511e8e789932df77999689659d1efbe311339e40..79fd521d5c4a8d6acd2b4f946dfdcc7b4e641b75 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -4037,6 +4037,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4045,6 +4045,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public void releaseUsingItem() {
if (!this.useItem.isEmpty()) {
diff --git a/patches/server/0744-Expand-FallingBlock-API.patch b/patches/server/0744-Expand-FallingBlock-API.patch
index b70e252822..d0d49233fa 100644
--- a/patches/server/0744-Expand-FallingBlock-API.patch
+++ b/patches/server/0744-Expand-FallingBlock-API.patch
@@ -13,10 +13,10 @@ public net.minecraft.world.entity.item.FallingBlockEntity blockState
Co-authored-by: Lukas Planz <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-index 67875e854d66b62c36fcca455f02f5abf3ebfdb3..05b77bf1af82397c542fde19b54ee545448ce12e 100644
+index 33cc2d1a4723ec07c4201eb6e0080d5e0281e1f0..0aef6a8d51cb1351daaea16022f5cbb27ceaff0d 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
-@@ -66,6 +66,7 @@ public class FallingBlockEntity extends Entity {
+@@ -67,6 +67,7 @@ public class FallingBlockEntity extends Entity {
@Nullable
public CompoundTag blockData;
protected static final EntityDataAccessor<BlockPos> DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS);
@@ -24,7 +24,7 @@ index 67875e854d66b62c36fcca455f02f5abf3ebfdb3..05b77bf1af82397c542fde19b54ee545
public FallingBlockEntity(EntityType<? extends FallingBlockEntity> type, Level world) {
super(type, world);
-@@ -178,7 +179,7 @@ public class FallingBlockEntity extends Entity {
+@@ -179,7 +180,7 @@ public class FallingBlockEntity extends Entity {
}
if (!this.onGround() && !flag1) {
@@ -33,7 +33,7 @@ index 67875e854d66b62c36fcca455f02f5abf3ebfdb3..05b77bf1af82397c542fde19b54ee545
if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
this.spawnAtLocation((ItemLike) block);
}
-@@ -324,6 +325,7 @@ public class FallingBlockEntity extends Entity {
+@@ -325,6 +326,7 @@ public class FallingBlockEntity extends Entity {
}
nbt.putBoolean("CancelDrop", this.cancelDrop);
@@ -41,7 +41,7 @@ index 67875e854d66b62c36fcca455f02f5abf3ebfdb3..05b77bf1af82397c542fde19b54ee545
}
@Override
-@@ -351,6 +353,11 @@ public class FallingBlockEntity extends Entity {
+@@ -352,6 +354,11 @@ public class FallingBlockEntity extends Entity {
this.blockState = Blocks.SAND.defaultBlockState();
}
diff --git a/patches/server/0751-Prevent-entity-loading-causing-async-lookups.patch b/patches/server/0751-Prevent-entity-loading-causing-async-lookups.patch
index 5a3cc46ff7..7de6a022b5 100644
--- a/patches/server/0751-Prevent-entity-loading-causing-async-lookups.patch
+++ b/patches/server/0751-Prevent-entity-loading-causing-async-lookups.patch
@@ -5,10 +5,10 @@ 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 5d70e5fe31d0f1f18351d63e060973adc9a49f46..291c65d9b1af48c677360a9da1bd10c1fedbb686 100644
+index a9bc659a89009f430105c8524688130a01baaecf..c02181318220d544aca15c030b54650404205519 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -714,6 +714,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -727,6 +727,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void baseTick() {
this.level().getProfiler().push("entityBaseTick");
diff --git a/patches/server/0763-Add-various-missing-EntityDropItemEvent-calls.patch b/patches/server/0763-Add-various-missing-EntityDropItemEvent-calls.patch
index 957be8bd05..251d6d5a19 100644
--- a/patches/server/0763-Add-various-missing-EntityDropItemEvent-calls.patch
+++ b/patches/server/0763-Add-various-missing-EntityDropItemEvent-calls.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 824c2f05791e793a1420f9baf743288a05d03cf1..ef1afa30b2fe56fc2f3d9c94c6d673d4c132ef92 100644
+index c02181318220d544aca15c030b54650404205519..d31c3bde9579eafc28a46eed6f1bfdaf5e591a9f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2475,6 +2475,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2488,6 +2488,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe
entityitem.setDefaultPickUpDelay();
@@ -24,10 +24,10 @@ index 824c2f05791e793a1420f9baf743288a05d03cf1..ef1afa30b2fe56fc2f3d9c94c6d673d4
EntityDropItemEvent event = new EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
Bukkit.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
-index fb5e200499a1a73fd40c8b7c81185f48381f49e4..178e1e75fcd0e60a1dd2729a894df08cf4129526 100644
+index 1a37be6015fb5c11301850d455a4f3807076c9be..45646c69ea73936a8916756fde37dd3f39db0d04 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java
-@@ -592,7 +592,7 @@ public class Dolphin extends WaterAnimal {
+@@ -593,7 +593,7 @@ public class Dolphin extends WaterAnimal {
float f2 = 0.02F * Dolphin.this.random.nextFloat();
entityitem.setDeltaMovement((double) (0.3F * -Mth.sin(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.cos(f1) * f2), (double) (0.3F * Mth.sin(Dolphin.this.getXRot() * 0.017453292F) * 1.5F), (double) (0.3F * Mth.cos(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.sin(f1) * f2));
@@ -37,10 +37,10 @@ index fb5e200499a1a73fd40c8b7c81185f48381f49e4..178e1e75fcd0e60a1dd2729a894df08c
}
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
-index 950e4b476a03fb5c26351a3b4d1578975a0b0ea8..fa0a7e18fed41653b1625cfb12a78d9ee502f2be 100644
+index 4ac32078cb074a78a2bb83307013b849f8d59f23..4c2e090a72dbd5bfb928e6ccbcedb1a25231d5b1 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
-@@ -509,14 +509,14 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
+@@ -513,14 +513,14 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
entityitem.setPickUpDelay(40);
entityitem.setThrower(this);
this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F);
diff --git a/patches/server/0766-More-Teleport-API.patch b/patches/server/0766-More-Teleport-API.patch
index 1474f1fb9e..aa88800118 100644
--- a/patches/server/0766-More-Teleport-API.patch
+++ b/patches/server/0766-More-Teleport-API.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] More Teleport API
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 2f566e05dc100cde49d36e3392a86c7e20b32473..7a3293e1a911de494ac32b946d8f709a52d98cbe 100644
+index 5775d071f714e7b9d959bfa94510b865f489e68e..27eb4bc4d1276ea36b97d0faeed2acee8b7a64cc 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1558,11 +1558,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@@ -29,10 +29,10 @@ index 2f566e05dc100cde49d36e3392a86c7e20b32473..7a3293e1a911de494ac32b946d8f709a
d0 = to.getX();
d1 = to.getY();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index b7df71633527dce2e4f954caee249e3b31b82226..ee1dc74b2f48bf8d684562de895ab631cf792a30 100644
+index a5a9c34709d3bb716e2dc9bb6bd548992df74f46..9ea189c26c6a5fae84bcc7ed098426d8c001cd5e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -218,15 +218,36 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -219,15 +219,36 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@Override
public boolean teleport(Location location, TeleportCause cause) {
@@ -72,7 +72,7 @@ index b7df71633527dce2e4f954caee249e3b31b82226..ee1dc74b2f48bf8d684562de895ab631
// Let the server handle cross world teleports
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 87b241a8b78b6fe0144e0d318e04da69a3101bc7..0e5076529693f1b9f971600909ae353e021f0671 100644
+index 11e144bf561cc3c4dc1d8b712f915cc167f4d4ed..f606250106f1bcf5870dff1167f2902f85f7784a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1195,13 +1195,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
diff --git a/patches/server/0767-Add-EntityPortalReadyEvent.patch b/patches/server/0767-Add-EntityPortalReadyEvent.patch
index 176fcf1940..59f69cf32a 100644
--- a/patches/server/0767-Add-EntityPortalReadyEvent.patch
+++ b/patches/server/0767-Add-EntityPortalReadyEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityPortalReadyEvent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index ef1afa30b2fe56fc2f3d9c94c6d673d4c132ef92..7d600e90ad8c7a020988a18e2926872180fb4a1e 100644
+index d31c3bde9579eafc28a46eed6f1bfdaf5e591a9f..d822ac014d93755cef20464bb758f8782799732c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2816,6 +2816,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2829,6 +2829,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit
this.level().getProfiler().push("portal");
this.portalTime = i;
@@ -22,7 +22,7 @@ index ef1afa30b2fe56fc2f3d9c94c6d673d4c132ef92..7d600e90ad8c7a020988a18e29268721
this.setPortalCooldown();
// CraftBukkit start
if (this instanceof ServerPlayer) {
-@@ -2823,6 +2830,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2836,6 +2843,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} else {
this.changeDimension(worldserver1);
}
diff --git a/patches/server/0768-Don-t-use-level-random-in-entity-constructors.patch b/patches/server/0768-Don-t-use-level-random-in-entity-constructors.patch
index b8da0480ac..ef3475e3a3 100644
--- a/patches/server/0768-Don-t-use-level-random-in-entity-constructors.patch
+++ b/patches/server/0768-Don-t-use-level-random-in-entity-constructors.patch
@@ -9,10 +9,10 @@ should be supported. Some entities (for whatever
reason) use the level's random in some places.
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index 459f793a6603d4f98c84df4e549f069298c54985..8aaca29b115a55bf48306e71432c4c20d2bd21dc 100644
+index 78acc580d66917e52d89632e3f0b7c1e979714d4..d0dac3dc89b9bb645a1d8498802fb8c6bff6a78e 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -66,7 +66,12 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -67,7 +67,12 @@ public class ItemEntity extends Entity implements TraceableEntity {
}
public ItemEntity(Level world, double x, double y, double z, ItemStack stack) {
@@ -27,10 +27,10 @@ index 459f793a6603d4f98c84df4e549f069298c54985..8aaca29b115a55bf48306e71432c4c20
public ItemEntity(Level world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ) {
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
-index 3408337b11f04337bb2f62de343e430d94d3a093..cd7b955754b809826048b80723e2e9055b373a4a 100644
+index 16f9d38687c0fdda18468b5bfb61b09b98254968..e712bd07ea2946167782473a536e0c72fab4bccd 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
-@@ -43,7 +43,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
+@@ -44,7 +44,7 @@ public class PrimedTnt extends Entity implements TraceableEntity {
public PrimedTnt(Level world, double x, double y, double z, @Nullable LivingEntity igniter) {
this(EntityType.TNT, world);
this.setPos(x, y, z);
diff --git a/patches/server/0773-Collision-API.patch b/patches/server/0773-Collision-API.patch
index 2ec1b80fcd..c4952054b5 100644
--- a/patches/server/0773-Collision-API.patch
+++ b/patches/server/0773-Collision-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Collision API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
-index 42def68f0c682afe7628ff0b9a537e74d77e558c..13afea4ecfefc7e3de26dc42b5316fe2c7554b5c 100644
+index fbcf1320ef9c1817b24aa8724cd6cf07319c20b9..5680e9772a2d90e997d2d0aacdda9eddb7edef56 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
-@@ -533,5 +533,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
+@@ -539,5 +539,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
return this.getHandle().clip(new net.minecraft.world.level.ClipContext(start, end, net.minecraft.world.level.ClipContext.Block.COLLIDER, net.minecraft.world.level.ClipContext.Fluid.NONE, net.minecraft.world.phys.shapes.CollisionContext.empty())).getType() == net.minecraft.world.phys.HitResult.Type.MISS;
}
@@ -22,10 +22,10 @@ index 42def68f0c682afe7628ff0b9a537e74d77e558c..13afea4ecfefc7e3de26dc42b5316fe2
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index ee1dc74b2f48bf8d684562de895ab631cf792a30..81ec5ffdd453714284a7860603a592495f917ec9 100644
+index 9ea189c26c6a5fae84bcc7ed098426d8c001cd5e..b7fceba1c7138a5c1d78bf058c9f2d32dbc1d292 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1124,4 +1124,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1125,4 +1125,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed.
}
// Paper end
diff --git a/patches/server/0779-Stop-large-look-changes-from-crashing-the-server.patch b/patches/server/0779-Stop-large-look-changes-from-crashing-the-server.patch
index 296ff2a092..92ac8e787a 100644
--- a/patches/server/0779-Stop-large-look-changes-from-crashing-the-server.patch
+++ b/patches/server/0779-Stop-large-look-changes-from-crashing-the-server.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Stop large look changes from crashing the server
Co-authored-by: Jaren Knodel <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index e3b19c6e51596b854b6d2acbc67f6fb109d62a92..a33c5870874674c29bf5e50ea58357965d24e54a 100644
+index 79fd521d5c4a8d6acd2b4f946dfdcc7b4e641b75..5fd17014c95e04d50d30e79d6e331a06b238b613 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3068,37 +3068,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3076,37 +3076,15 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.level().getProfiler().pop();
this.level().getProfiler().push("rangeChecks");
diff --git a/patches/server/0780-Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/0780-Fire-EntityChangeBlockEvent-in-more-places.patch
index b829dfe198..4c1d97360d 100644
--- a/patches/server/0780-Fire-EntityChangeBlockEvent-in-more-places.patch
+++ b/patches/server/0780-Fire-EntityChangeBlockEvent-in-more-places.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Fire EntityChangeBlockEvent in more places
Co-authored-by: ChristopheG <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java
-index 09c981e2573305bd7f5c3cbcc8f240fa8705a9f2..0db0d67f9ac15372becc1166c37f7f0aede4a4da 100644
+index a298f511c8a7eb208a0dd63b24ec050848a31476..41a3ca4edf4fa662f2af13efd7b78b56e24aa4a7 100644
--- a/src/main/java/net/minecraft/world/entity/LightningBolt.java
+++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java
-@@ -97,7 +97,7 @@ public class LightningBolt extends Entity {
+@@ -98,7 +98,7 @@ public class LightningBolt extends Entity {
}
this.powerLightningRod();
@@ -18,7 +18,7 @@ index 09c981e2573305bd7f5c3cbcc8f240fa8705a9f2..0db0d67f9ac15372becc1166c37f7f0a
this.gameEvent(GameEvent.LIGHTNING_STRIKE);
}
}
-@@ -191,7 +191,7 @@ public class LightningBolt extends Entity {
+@@ -192,7 +192,7 @@ public class LightningBolt extends Entity {
}
}
@@ -27,7 +27,7 @@ index 09c981e2573305bd7f5c3cbcc8f240fa8705a9f2..0db0d67f9ac15372becc1166c37f7f0a
BlockState iblockdata = world.getBlockState(pos);
BlockPos blockposition1;
BlockState iblockdata1;
-@@ -205,24 +205,29 @@ public class LightningBolt extends Entity {
+@@ -206,24 +206,29 @@ public class LightningBolt extends Entity {
}
if (iblockdata1.getBlock() instanceof WeatheringCopper) {
@@ -61,7 +61,7 @@ index 09c981e2573305bd7f5c3cbcc8f240fa8705a9f2..0db0d67f9ac15372becc1166c37f7f0a
if (optional.isEmpty()) {
break;
-@@ -233,7 +238,7 @@ public class LightningBolt extends Entity {
+@@ -234,7 +239,7 @@ public class LightningBolt extends Entity {
}
@@ -70,7 +70,7 @@ index 09c981e2573305bd7f5c3cbcc8f240fa8705a9f2..0db0d67f9ac15372becc1166c37f7f0a
Iterator iterator = BlockPos.randomInCube(world.random, 10, pos, 1).iterator();
BlockPos blockposition1;
-@@ -250,6 +255,7 @@ public class LightningBolt extends Entity {
+@@ -251,6 +256,7 @@ public class LightningBolt extends Entity {
BlockPos blockposition1Final = blockposition1; // CraftBukkit - decompile error
WeatheringCopper.getPrevious(iblockdata).ifPresent((iblockdata1) -> {
diff --git a/patches/server/0791-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0791-Fix-a-bunch-of-vanilla-bugs.patch
index abd36984a1..abd857f514 100644
--- a/patches/server/0791-Fix-a-bunch-of-vanilla-bugs.patch
+++ b/patches/server/0791-Fix-a-bunch-of-vanilla-bugs.patch
@@ -113,7 +113,7 @@ index 6cd6d69a20e95e344fc18ab67dc300824537a59b..2e2a7c2cf3081187da817479a9da3eb1
}
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 63e7f41eaed3f22c1bc0191790ff0ad313dc4ffd..7c5c9efe4d6037c4c5444d108d76af241144d6b5 100644
+index f2d3dc066b00b685715eb5104234945c41a15f92..43c8f6a0615f392cc560b2259b116cc9d5fba4e7 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1233,7 +1233,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -126,7 +126,7 @@ index 63e7f41eaed3f22c1bc0191790ff0ad313dc4ffd..7c5c9efe4d6037c4c5444d108d76af24
return this.anyPlayerCloseEnoughForSpawning(pos, false);
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index de822b99df2de08371f3a7a29bf8f3275650887c..62feb9e2f8e0072bb180c65b4946281494a7dc1d 100644
+index 57f54e3399f9d2d7fecdae62858d20e50caf7afd..b804941c76582871813ba813b9eef2422e7e71f0 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -770,7 +770,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -173,18 +173,18 @@ index f3389dc345d8b6e5389ae37848d9b268d4bbad83..5d1b8bae981dc538ee1fe4fb993e44f2
this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit
this.level.updateSleepingPlayerList();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index a8a57819993f3657d6525a98527ec47631174bed..598dce073d7887d44a6630820c7e5746ce1c6dcc 100644
+index 6fbcea8fd32a425cab936330d5d9545782e03346..1478def0ba4bc02c1c466d80cc2b90919612c18a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -709,8 +709,10 @@ public abstract class PlayerList {
+@@ -710,8 +710,10 @@ public abstract class PlayerList {
Player player = entity.getBukkitEntity();
PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress(), ((java.net.InetSocketAddress) loginlistener.connection.channel.remoteAddress()).getAddress());
-- if (this.getBans().isBanned(gameprofile) && !this.getBans().get(gameprofile).hasExpired()) {
+- if (this.bans.isBanned(gameprofile)) {
- UserBanListEntry gameprofilebanentry = (UserBanListEntry) this.bans.get(gameprofile);
+ // Paper start - Fix MC-158900
+ UserBanListEntry gameprofilebanentry;
-+ if (getBans().isBanned(gameprofile) && (gameprofilebanentry = getBans().get(gameprofile)) != null) {
++ if (this.bans.isBanned(gameprofile) && (gameprofilebanentry = this.bans.get(gameprofile)) != null) {
+ // Paper end - Fix MC-158900
ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned.reason", gameprofilebanentry.getReason());
diff --git a/patches/server/0793-Fix-custom-piglin-loved-items.patch b/patches/server/0793-Fix-custom-piglin-loved-items.patch
index 59a92c2464..6a9dc8a7d4 100644
--- a/patches/server/0793-Fix-custom-piglin-loved-items.patch
+++ b/patches/server/0793-Fix-custom-piglin-loved-items.patch
@@ -7,10 +7,10 @@ Upstream didn't modify the isLovedItem check in wantsToPickup
so piglins never actually tried to pickup interestItems
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
-index 9c979aee4d1e6e72f599d3c5751267e17aa3d32a..965cef329f1c0aa80ee95f932ab60c98ebd4d2ec 100644
+index 9d905ba5c306409ff846f93e3569d1e4c3c6bbf7..2a3bdf7cd8207732983d033c1301fa051df5b126 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
-@@ -402,7 +402,7 @@ public class PiglinAi {
+@@ -403,7 +403,7 @@ public class PiglinAi {
} else {
boolean flag = piglin.canAddToInventory(stack);
diff --git a/patches/server/0794-EntityPickupItemEvent-fixes.patch b/patches/server/0794-EntityPickupItemEvent-fixes.patch
index 91ccd6c8ad..b378f986f4 100644
--- a/patches/server/0794-EntityPickupItemEvent-fixes.patch
+++ b/patches/server/0794-EntityPickupItemEvent-fixes.patch
@@ -25,10 +25,10 @@ index ea0902b4ba68a89b1f51281b10c1dfd1bfb42833..a9813da7f2b248f98f22e0ad2e784291
}
diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
-index 965cef329f1c0aa80ee95f932ab60c98ebd4d2ec..fc93dc1c402c29dba7751c0f873a1e87d6abc358 100644
+index 2a3bdf7cd8207732983d033c1301fa051df5b126..4f4f557b7f4232ec3b90dda43c6bed30521318ba 100644
--- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java
-@@ -241,11 +241,16 @@ public class PiglinAi {
+@@ -242,11 +242,16 @@ public class PiglinAi {
ItemStack itemstack;
// CraftBukkit start
@@ -40,17 +40,17 @@ index 965cef329f1c0aa80ee95f932ab60c98ebd4d2ec..fc93dc1c402c29dba7751c0f873a1e87
+ // Paper end - EntityPickupItemEvent fixes
piglin.take(drop, drop.getItem().getCount());
itemstack = drop.getItem();
- drop.discard();
+ drop.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
} else if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(piglin, drop, drop.getItem().getCount() - 1, false).isCancelled()) {
+ piglin.onItemPickup(drop); // Paper - EntityPickupItemEvent fixes; moved from Piglin#pickUpItem - call prior to item entity modification
piglin.take(drop, 1);
itemstack = PiglinAi.removeOneItemFromItemEntity(drop);
} else {
diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java
-index 798a774c19361bfaf8583a602192e9e547fa85e8..226fb5c88dd43c8008c5237299ef80db9e847af7 100644
+index d783b4d561e252af8928e4b1ea13c4e61598f8bf..93bbf7556f9599e9dd90761085a57d78bd521867 100644
--- a/src/main/java/net/minecraft/world/entity/raid/Raider.java
+++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java
-@@ -245,6 +245,11 @@ public abstract class Raider extends PatrollingMonster {
+@@ -248,6 +248,11 @@ public abstract class Raider extends PatrollingMonster {
boolean flag = this.hasActiveRaid() && this.getCurrentRaid().getLeader(this.getWave()) != null;
if (this.hasActiveRaid() && !flag && ItemStack.matches(itemstack, Raid.getLeaderBannerInstance())) {
diff --git a/patches/server/0795-Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/0795-Correctly-handle-interactions-with-items-on-cooldown.patch
index ca32db1eca..acbf650a19 100644
--- a/patches/server/0795-Correctly-handle-interactions-with-items-on-cooldown.patch
+++ b/patches/server/0795-Correctly-handle-interactions-with-items-on-cooldown.patch
@@ -30,10 +30,10 @@ index 5d1b8bae981dc538ee1fe4fb993e44f227168233..3621770701c6fb1da75c69a412976844
this.interactResult = event.useItemInHand() == Event.Result.DENY;
this.interactPosition = blockposition.immutable();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 489576ddb53766e8aa463772e9260ee996ce974a..46445366327eb7868ff844bfa2299a3f261aef42 100644
+index 55a0a154f2b37c75e40d3b33c9baf245d5dcd9d7..1b8a98ebd3be8df907717b02ad82398807867ac8 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -544,6 +544,12 @@ public class CraftEventFactory {
+@@ -545,6 +545,12 @@ public class CraftEventFactory {
}
public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, InteractionHand hand, Vec3 targetPos) {
@@ -46,7 +46,7 @@ index 489576ddb53766e8aa463772e9260ee996ce974a..46445366327eb7868ff844bfa2299a3f
Player player = (who == null) ? null : (Player) who.getBukkitEntity();
CraftItemStack itemInHand = CraftItemStack.asCraftMirror(itemstack);
-@@ -578,6 +584,11 @@ public class CraftEventFactory {
+@@ -579,6 +585,11 @@ public class CraftEventFactory {
if (cancelledBlock) {
event.setUseInteractedBlock(Event.Result.DENY);
}
diff --git a/patches/server/0802-Add-EntityToggleSitEvent.patch b/patches/server/0802-Add-EntityToggleSitEvent.patch
index 49a9b74fe4..3db46de79b 100644
--- a/patches/server/0802-Add-EntityToggleSitEvent.patch
+++ b/patches/server/0802-Add-EntityToggleSitEvent.patch
@@ -31,10 +31,10 @@ index 4d893c445af2b6dc74d5ad731b69eb5a488817b4..e4550d3ac8d93e0dd9a54e41fbbbef2e
if (inSittingPose) {
this.entityData.set(DATA_FLAGS_ID, (byte)(b | 1));
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
-index fa0a7e18fed41653b1625cfb12a78d9ee502f2be..12b49510deb0494c4a70b63679f8818960f2af06 100644
+index 4c2e090a72dbd5bfb928e6ccbcedb1a25231d5b1..f7a7810fdc2f74b79fa14470493485e4b74539ab 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
-@@ -433,7 +433,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
+@@ -437,7 +437,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
this.setSleeping(nbt.getBoolean("Sleeping"));
this.setVariant(Fox.Type.byName(nbt.getString("Type")));
@@ -43,7 +43,7 @@ index fa0a7e18fed41653b1625cfb12a78d9ee502f2be..12b49510deb0494c4a70b63679f88189
this.setIsCrouching(nbt.getBoolean("Crouching"));
if (this.level() instanceof ServerLevel) {
this.setTargetGoals();
-@@ -446,6 +446,12 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
+@@ -450,6 +450,12 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
}
public void setSitting(boolean sitting) {
@@ -57,10 +57,10 @@ index fa0a7e18fed41653b1625cfb12a78d9ee502f2be..12b49510deb0494c4a70b63679f88189
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
-index 11694f103ebc522c2ad6eb6d494d39cc31ea3107..f783fe169141d33e8569ec7f5d71985b74bdbcb6 100644
+index 4abd26c7baf8f198f13dd41a3146f9ece13a4164..0297e234f17c6157cfff79420b9eeaf4e0e2c3ab 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
-@@ -138,6 +138,7 @@ public class Panda extends Animal {
+@@ -139,6 +139,7 @@ public class Panda extends Animal {
}
public void sit(boolean sitting) {
@@ -69,7 +69,7 @@ index 11694f103ebc522c2ad6eb6d494d39cc31ea3107..f783fe169141d33e8569ec7f5d71985b
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
-index 16a5e1247a160a7ae3eba2bab9fde42dff5d62c6..2382f4f044e346fbc0e25de8fb2be30f3630c722 100644
+index be8e056f82e348d7cd14bb22a873207cddfb3044..5f879ec74cadc8b27f3c1648890978dbdc27f9f0 100644
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
@@ -556,7 +556,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
diff --git a/patches/server/0808-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch b/patches/server/0808-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch
index 17e437d82c..44ee3c5b09 100644
--- a/patches/server/0808-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch
+++ b/patches/server/0808-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 7d600e90ad8c7a020988a18e2926872180fb4a1e..11e24044753be205af988474c59b4c8418a02f77 100644
+index d822ac014d93755cef20464bb758f8782799732c..dfbcadc1a1fb5ebe957ba45d764f0b982d6fe721 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -3095,6 +3095,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3108,6 +3108,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
pluginManager.callEvent(entityCombustEvent);
if (!entityCombustEvent.isCancelled()) {
this.setSecondsOnFire(entityCombustEvent.getDuration(), false);
diff --git a/patches/server/0809-Add-PrePlayerAttackEntityEvent.patch b/patches/server/0809-Add-PrePlayerAttackEntityEvent.patch
index 2ad09d3605..7541ba69cb 100644
--- a/patches/server/0809-Add-PrePlayerAttackEntityEvent.patch
+++ b/patches/server/0809-Add-PrePlayerAttackEntityEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add PrePlayerAttackEntityEvent
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 8ca4f45f1db35a08a335142aa888e98e63cec348..b3a91d7ad2095485006ef1ee7f07c474269ae455 100644
+index 7c0db708575ef26a1dd73709bf22653f21e0c863..262cefa51856cf6a58ae3b80b1ae93a5dd7bfaa7 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1233,8 +1233,17 @@ public abstract class Player extends LivingEntity {
+@@ -1234,8 +1234,17 @@ public abstract class Player extends LivingEntity {
}
public void attack(Entity target) {
diff --git a/patches/server/0813-More-vanilla-friendly-methods-to-update-trades.patch b/patches/server/0813-More-vanilla-friendly-methods-to-update-trades.patch
index 559443224d..d992c79d48 100644
--- a/patches/server/0813-More-vanilla-friendly-methods-to-update-trades.patch
+++ b/patches/server/0813-More-vanilla-friendly-methods-to-update-trades.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] More vanilla friendly methods to update trades
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-index 3653193effdecd969b5ac159b6d5ce633451d706..4a19e6b83147ae22ade70fdd445c5d7df3b07a0f 100644
+index a01e089ed7689485a7ac33ab29bc27c4b68bc1df..fa2569fecefb3e3af3264928a3c7a347710deedf 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-@@ -926,6 +926,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
+@@ -927,6 +927,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@Override
protected void updateTrades() {
@@ -21,7 +21,7 @@ index 3653193effdecd969b5ac159b6d5ce633451d706..4a19e6b83147ae22ade70fdd445c5d7d
VillagerData villagerdata = this.getVillagerData();
Int2ObjectMap int2objectmap;
-@@ -943,9 +949,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
+@@ -944,9 +950,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
if (avillagertrades_imerchantrecipeoption != null) {
MerchantOffers merchantrecipelist = this.getOffers();
diff --git a/patches/server/0815-check-global-player-list-where-appropriate.patch b/patches/server/0815-check-global-player-list-where-appropriate.patch
index 53e80e9c9e..9905886fc6 100644
--- a/patches/server/0815-check-global-player-list-where-appropriate.patch
+++ b/patches/server/0815-check-global-player-list-where-appropriate.patch
@@ -7,7 +7,7 @@ Makes certain entities check all players when searching for a player
instead of just checking players in their world.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index e7ed2d1160d412790b23550f9ae967179b7a61f4..711712f144d7b0e26d1248f53bf7ac3963c5df4a 100644
+index b5eda9931a82a667c25ca1a49980b01b042dc0cc..5f1a4a35d2179b7ff5a95390f82d65cacf4fd457 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2385,4 +2385,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -24,10 +24,10 @@ index e7ed2d1160d412790b23550f9ae967179b7a61f4..711712f144d7b0e26d1248f53bf7ac39
+ // Paper end - check global player list where appropriate
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index a33c5870874674c29bf5e50ea58357965d24e54a..38fdb9555edcaf9608c315e24382b4f94370e154 100644
+index 5fd17014c95e04d50d30e79d6e331a06b238b613..4959d8fd8f84f99f289b898fd604d8a9808d62a4 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3690,7 +3690,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3698,7 +3698,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public void onItemPickup(ItemEntity item) {
diff --git a/patches/server/0818-Friction-API.patch b/patches/server/0818-Friction-API.patch
index 0435b57554..cb41b035bb 100644
--- a/patches/server/0818-Friction-API.patch
+++ b/patches/server/0818-Friction-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Friction API
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 38fdb9555edcaf9608c315e24382b4f94370e154..bcaa8c21fc09bc4cc3fd4c9bb827ef0750c12aef 100644
+index 4959d8fd8f84f99f289b898fd604d8a9808d62a4..8e6cb47ce314d4c493047fa1804b2da8c9797fac 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -261,6 +261,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -262,6 +262,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public boolean bukkitPickUpLoot;
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event
@@ -16,7 +16,7 @@ index 38fdb9555edcaf9608c315e24382b4f94370e154..bcaa8c21fc09bc4cc3fd4c9bb827ef07
@Override
public float getBukkitYaw() {
-@@ -716,7 +717,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -717,7 +718,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public boolean shouldDiscardFriction() {
@@ -25,7 +25,7 @@ index 38fdb9555edcaf9608c315e24382b4f94370e154..bcaa8c21fc09bc4cc3fd4c9bb827ef07
}
public void setDiscardFriction(boolean noDrag) {
-@@ -760,6 +761,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -768,6 +769,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
@Override
public void addAdditionalSaveData(CompoundTag nbt) {
@@ -37,7 +37,7 @@ index 38fdb9555edcaf9608c315e24382b4f94370e154..bcaa8c21fc09bc4cc3fd4c9bb827ef07
nbt.putFloat("Health", this.getHealth());
nbt.putShort("HurtTime", (short) this.hurtTime);
nbt.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp);
-@@ -803,6 +809,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -811,6 +817,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.internalSetAbsorptionAmount(absorptionAmount);
// Paper end - Check for NaN
@@ -55,10 +55,10 @@ index 38fdb9555edcaf9608c315e24382b4f94370e154..bcaa8c21fc09bc4cc3fd4c9bb827ef07
this.getAttributes().load(nbt.getList("Attributes", 10));
}
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-index 8aaca29b115a55bf48306e71432c4c20d2bd21dc..eb0d6238588efa35fa868f26290547574a08eca2 100644
+index d0dac3dc89b9bb645a1d8498802fb8c6bff6a78e..c7f06c3cfb737bd17a706798bf9cf0e1af5f0cc0 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
-@@ -57,6 +57,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -58,6 +58,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
public boolean canMobPickup = true; // Paper - Item#canEntityPickup
private int despawnRate = -1; // Paper - Alternative item-despawn-rate
@@ -66,7 +66,7 @@ index 8aaca29b115a55bf48306e71432c4c20d2bd21dc..eb0d6238588efa35fa868f2629054757
public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
super(type, world);
-@@ -178,7 +179,11 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -179,7 +180,11 @@ public class ItemEntity extends Entity implements TraceableEntity {
this.move(MoverType.SELF, this.getDeltaMovement());
float f1 = 0.98F;
@@ -79,7 +79,7 @@ index 8aaca29b115a55bf48306e71432c4c20d2bd21dc..eb0d6238588efa35fa868f2629054757
f1 = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F;
}
-@@ -387,6 +392,11 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -388,6 +393,11 @@ public class ItemEntity extends Entity implements TraceableEntity {
@Override
public void addAdditionalSaveData(CompoundTag nbt) {
@@ -91,7 +91,7 @@ index 8aaca29b115a55bf48306e71432c4c20d2bd21dc..eb0d6238588efa35fa868f2629054757
nbt.putShort("Health", (short) this.health);
nbt.putShort("Age", (short) this.age);
nbt.putShort("PickupDelay", (short) this.pickupDelay);
-@@ -421,6 +431,17 @@ public class ItemEntity extends Entity implements TraceableEntity {
+@@ -422,6 +432,17 @@ public class ItemEntity extends Entity implements TraceableEntity {
this.cachedThrower = null;
}
@@ -110,7 +110,7 @@ index 8aaca29b115a55bf48306e71432c4c20d2bd21dc..eb0d6238588efa35fa868f2629054757
this.setItem(ItemStack.of(nbttagcompound1));
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
-index cbfd4cf1d7d32757cf124d1aaa4b83d8a155868f..832def3c518be8d6d81e71f6022566e6179e2d17 100644
+index 1a291dd8a287db30e71dcb315599fc4b038764c4..30d62ee4d5cd2ddacb8783b5bbbf475d592b3e02 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
@@ -99,6 +99,18 @@ public class CraftItem extends CraftEntity implements Item {
@@ -133,7 +133,7 @@ index cbfd4cf1d7d32757cf124d1aaa4b83d8a155868f..832def3c518be8d6d81e71f6022566e6
public int getHealth() {
return this.getHandle().health;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index 77b32e520f80289a44d75ed0cde0b8bc3b3cecc3..bee23867ae7fdc62ee93277ae1959d6a7df7f5b6 100644
+index 7ba726584ce4a58654b8a8b9604f0cca762b3f42..d7492b969750fddca8bf09fdf2e91b146db03dc4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1121,6 +1121,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
diff --git a/patches/server/0822-Player-Entity-Tracking-Events.patch b/patches/server/0822-Player-Entity-Tracking-Events.patch
index 1eae0e930b..25f31ee2c5 100644
--- a/patches/server/0822-Player-Entity-Tracking-Events.patch
+++ b/patches/server/0822-Player-Entity-Tracking-Events.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Player Entity Tracking Events
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 7c5c9efe4d6037c4c5444d108d76af241144d6b5..601693243c11b06fe0bae0040bf79d95696cdb21 100644
+index 43c8f6a0615f392cc560b2259b116cc9d5fba4e7..ca24463405f138deb882f319bf84696f52a1f606 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1749,7 +1749,11 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -21,10 +21,10 @@ index 7c5c9efe4d6037c4c5444d108d76af241144d6b5..601693243c11b06fe0bae0040bf79d95
} else if (this.seenBy.remove(player.connection)) {
this.serverEntity.removePairing(player);
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 11e24044753be205af988474c59b4c8418a02f77..425e53aaf09618f6e44b9d34ed3412a8f180ac39 100644
+index dfbcadc1a1fb5ebe957ba45d764f0b982d6fe721..e3434914cb7bf66e477830ad82159e0bde63e247 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -3821,7 +3821,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3834,7 +3834,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void startSeenByPlayer(ServerPlayer player) {}
diff --git a/patches/server/0824-Fixes-and-additions-to-the-SpawnReason-API.patch b/patches/server/0824-Fixes-and-additions-to-the-SpawnReason-API.patch
index 251043d71f..56f1ab09f3 100644
--- a/patches/server/0824-Fixes-and-additions-to-the-SpawnReason-API.patch
+++ b/patches/server/0824-Fixes-and-additions-to-the-SpawnReason-API.patch
@@ -21,17 +21,17 @@ index 035af9ccf679a562203a4a2c4f2b38098c57b492..557df259ae54defb43e475e10fc47328
@Nullable
diff --git a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
-index 61a36c4e97ee532e53eee4da00a9aa7e4b3438f5..d3b4420e664fedf86d107e819056d2e20f9c0722 100644
+index 58723ea75f7db9bf3889b99139669b14a284a3a1..6bf11d526b82403e9a5443ac77645cf2b4bc1ad8 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java
-@@ -54,7 +54,7 @@ public class DragonFireball extends AbstractHurtingProjectile {
+@@ -64,7 +64,7 @@ public class DragonFireball extends AbstractHurtingProjectile {
- if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) areaEffectCloud.getBukkitEntity()).callEvent()) { // Paper - EnderDragon Events
+ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) entityareaeffectcloud.getBukkitEntity()).callEvent()) { // Paper - EnderDragon Events
this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1);
-- this.level().addFreshEntity(areaEffectCloud);
-+ this.level().addFreshEntity(areaEffectCloud, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EXPLOSION); // Paper - use correct spawn reason
- } else areaEffectCloud.discard(); // Paper - EnderDragon Events
- this.discard();
+- this.level().addFreshEntity(entityareaeffectcloud);
++ this.level().addFreshEntity(entityareaeffectcloud, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EXPLOSION); // Paper - use correct spawn reason
+ } else entityareaeffectcloud.discard(null); // Paper - EnderDragon Events
+ this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
}
diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java
index 4a1f2d326c4ece9da717a50b802af86fd9338a0b..94618709e742ebe1a7893d418124e309eaab6c5f 100644
diff --git a/patches/server/0829-Add-Sneaking-API-for-Entities.patch b/patches/server/0829-Add-Sneaking-API-for-Entities.patch
index ec3c098b6e..675c2e6539 100644
--- a/patches/server/0829-Add-Sneaking-API-for-Entities.patch
+++ b/patches/server/0829-Add-Sneaking-API-for-Entities.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Sneaking API for Entities
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 81ec5ffdd453714284a7860603a592495f917ec9..55a9c4eb0fe1b912e5ff6c9bb81b46674f71868a 100644
+index b7fceba1c7138a5c1d78bf058c9f2d32dbc1d292..69dc7d9cc9ebd681d842099e2de521fd11ff5242 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -871,6 +871,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -872,6 +872,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return Pose.values()[this.getHandle().getPose().ordinal()];
}
diff --git a/patches/server/0831-Improve-PortalEvents.patch b/patches/server/0831-Improve-PortalEvents.patch
index 958eba1398..254727a896 100644
--- a/patches/server/0831-Improve-PortalEvents.patch
+++ b/patches/server/0831-Improve-PortalEvents.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Improve PortalEvents
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 425e53aaf09618f6e44b9d34ed3412a8f180ac39..61abb57036199e8d4580cc4e368cdacd9dba58fd 100644
+index e3434914cb7bf66e477830ad82159e0bde63e247..5c37fb16d57bdffc4973b42a15f79b480ba65e5f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -3479,7 +3479,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -3492,7 +3492,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
Location enter = bukkitEntity.getLocation();
Location exit = CraftLocation.toBukkit(exitPosition, exitWorldServer.getWorld());
diff --git a/patches/server/0835-Flying-Fall-Damage.patch b/patches/server/0835-Flying-Fall-Damage.patch
index 0637a31240..be35e97f74 100644
--- a/patches/server/0835-Flying-Fall-Damage.patch
+++ b/patches/server/0835-Flying-Fall-Damage.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Flying Fall Damage
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index b3a91d7ad2095485006ef1ee7f07c474269ae455..f32708ed934bbbf2416e32fdddc7bb4329958cf6 100644
+index 262cefa51856cf6a58ae3b80b1ae93a5dd7bfaa7..e92cb12a04827c2afc0662a26320458527aa2bd4 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -181,6 +181,7 @@ public abstract class Player extends LivingEntity {
+@@ -182,6 +182,7 @@ public abstract class Player extends LivingEntity {
public FishingHook fishing;
public float hurtDir; // Paper - protected -> public
public boolean affectsSpawning = true; // Paper - Affects Spawning API
@@ -16,7 +16,7 @@ index b3a91d7ad2095485006ef1ee7f07c474269ae455..f32708ed934bbbf2416e32fdddc7bb43
// CraftBukkit start
public boolean fauxSleeping;
-@@ -1672,7 +1673,7 @@ public abstract class Player extends LivingEntity {
+@@ -1680,7 +1681,7 @@ public abstract class Player extends LivingEntity {
@Override
public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) {
@@ -26,7 +26,7 @@ index b3a91d7ad2095485006ef1ee7f07c474269ae455..f32708ed934bbbf2416e32fdddc7bb43
} 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 fee318e42bac5f06825352c16f9f03168d8ce271..4f62bd701e2645ef37bcfda851723c6b51f5f3d5 100644
+index 1a0023472b9ba5bbc0ee1d16824219d94944bdf9..69917a56fc05f8c16a1302fe331993e8d49889b9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2498,6 +2498,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
diff --git a/patches/server/0836-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/server/0836-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
index 54ed63fa95..87f093c66c 100644
--- a/patches/server/0836-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
+++ b/patches/server/0836-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch
@@ -49,7 +49,7 @@ index 8c0653012192144cd11c802d1ad9bf7e42e94f59..a47473c9875c70c52b9a61e0156e5596
public DamageSource outOfBorder() {
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
-index e13450b3422309aad5ea50902d87c59816d0a105..27c0f5d623ecf7ea09f51105938a5f254983b6e1 100644
+index 2d1fe6af7923ad4a0143f2d3fd28abc85e6092c1..217018dbdd78af4b89d9d4e7154956593dfa8dae 100644
--- a/src/main/java/net/minecraft/world/level/Explosion.java
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
@@ -383,7 +383,7 @@ public class Explosion {
@@ -138,10 +138,10 @@ index f81c0d07a5efc92942d8ab5c50a8260db033307d..8afc396c162d928902a9d9beb9f039b0
// See BlockStateFactory#createBlockState(World, BlockPosition, IBlockData, TileEntity)
private static CraftBlockState getBlockState(World world, BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData, BlockEntity tileEntity) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 46445366327eb7868ff844bfa2299a3f261aef42..cf8cd6959ba406f7249aeda4f508fd702cfe478b 100644
+index 1b8a98ebd3be8df907717b02ad82398807867ac8..b04cf7cb05adcef205f84decf3564f85de0c8e2d 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1069,7 +1069,7 @@ public class CraftEventFactory {
+@@ -1070,7 +1070,7 @@ public class CraftEventFactory {
Entity damager = source.getCausingEntity();
if (source.is(DamageTypeTags.IS_EXPLOSION)) {
if (damager == null) {
@@ -150,7 +150,7 @@ index 46445366327eb7868ff844bfa2299a3f261aef42..cf8cd6959ba406f7249aeda4f508fd70
}
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
-@@ -1120,7 +1120,7 @@ public class CraftEventFactory {
+@@ -1121,7 +1121,7 @@ public class CraftEventFactory {
} else {
throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s", entity, source.getDirectBlock(), source.getMsgId()));
}
@@ -159,7 +159,7 @@ index 46445366327eb7868ff844bfa2299a3f261aef42..cf8cd6959ba406f7249aeda4f508fd70
}
DamageCause cause;
-@@ -1173,8 +1173,13 @@ public class CraftEventFactory {
+@@ -1174,8 +1174,13 @@ public class CraftEventFactory {
return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled);
}
diff --git a/patches/server/0837-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/server/0837-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch
index 3352d79d45..e880f7368d 100644
--- a/patches/server/0837-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch
+++ b/patches/server/0837-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Expose pre-collision moving velocity to
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 5b89426cdca61ecc99f53b64d1e088e043effcfd..576cef82f7ea57642430897de2e5212cae234701 100644
+index 5c37fb16d57bdffc4973b42a15f79b480ba65e5f..c394c60f4e6b216be332c3585fbfbc4f32f9db30 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -944,6 +944,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -957,6 +957,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void move(MoverType movementType, Vec3 movement) {
@@ -17,7 +17,7 @@ index 5b89426cdca61ecc99f53b64d1e088e043effcfd..576cef82f7ea57642430897de2e5212c
if (this.noPhysics) {
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
} else {
-@@ -1028,7 +1029,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1041,7 +1042,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
if (!bl.getType().isAir()) {
diff --git a/patches/server/0839-Use-single-player-info-update-packet-on-join.patch b/patches/server/0839-Use-single-player-info-update-packet-on-join.patch
index 0e982002e7..ff64d83371 100644
--- a/patches/server/0839-Use-single-player-info-update-packet-on-join.patch
+++ b/patches/server/0839-Use-single-player-info-update-packet-on-join.patch
@@ -18,10 +18,10 @@ index 994787f52ce9eb0b77889ed9bc8021183fa0cb7c..a1196f79968c950fd9d92123bb4018f8
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 598dce073d7887d44a6630820c7e5746ce1c6dcc..2eeb216002c1c91879780225335225552744524b 100644
+index 1478def0ba4bc02c1c466d80cc2b90919612c18a..0747b0042446271385371f1ca9c8fefdebd851b8 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -358,6 +358,7 @@ public abstract class PlayerList {
+@@ -359,6 +359,7 @@ public abstract class PlayerList {
// CraftBukkit start - sendAll above replaced with this loop
ClientboundPlayerInfoUpdatePacket packet = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player));
@@ -29,7 +29,7 @@ index 598dce073d7887d44a6630820c7e5746ce1c6dcc..2eeb216002c1c9187978022533522555
for (int i = 0; i < this.players.size(); ++i) {
ServerPlayer entityplayer1 = (ServerPlayer) this.players.get(i);
-@@ -365,12 +366,17 @@ public abstract class PlayerList {
+@@ -366,12 +367,17 @@ public abstract class PlayerList {
entityplayer1.connection.send(packet);
}
diff --git a/patches/server/0840-Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/0840-Correctly-shrink-items-during-EntityResurrectEvent.patch
index 984dd39b35..6aeabf242c 100644
--- a/patches/server/0840-Correctly-shrink-items-during-EntityResurrectEvent.patch
+++ b/patches/server/0840-Correctly-shrink-items-during-EntityResurrectEvent.patch
@@ -22,10 +22,10 @@ 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 bcaa8c21fc09bc4cc3fd4c9bb827ef0750c12aef..e0071236139ab70ba28794f3c7e44640f8d60a2a 100644
+index 8e6cb47ce314d4c493047fa1804b2da8c9797fac..d9f9a184e22bc02fbfd1ab029abf48af654c9935 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1610,7 +1610,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1618,7 +1618,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.level().getCraftServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
diff --git a/patches/server/0844-Add-Entity-Body-Yaw-API.patch b/patches/server/0844-Add-Entity-Body-Yaw-API.patch
index 9f3794076e..1131f49d45 100644
--- a/patches/server/0844-Add-Entity-Body-Yaw-API.patch
+++ b/patches/server/0844-Add-Entity-Body-Yaw-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add Entity Body Yaw API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 55a9c4eb0fe1b912e5ff6c9bb81b46674f71868a..e043a43ebda1df7b78c1368ce33a3648345bcb08 100644
+index 69dc7d9cc9ebd681d842099e2de521fd11ff5242..ba915f1b3cd00c8afe39ece9c9e68737673777f5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1135,6 +1135,31 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1136,6 +1136,31 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean isInPowderedSnow() {
return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed.
}
@@ -41,7 +41,7 @@ index 55a9c4eb0fe1b912e5ff6c9bb81b46674f71868a..e043a43ebda1df7b78c1368ce33a3648
// Paper start - Collision API
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
-index bee23867ae7fdc62ee93277ae1959d6a7df7f5b6..4abfe34ee595fef3e1253090410c6309d3459a84 100644
+index d7492b969750fddca8bf09fdf2e91b146db03dc4..3302d8e9b7c2c48b20dd257f4699b263d3bc52dc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1113,6 +1113,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
diff --git a/patches/server/0847-Add-EntityFertilizeEggEvent.patch b/patches/server/0847-Add-EntityFertilizeEggEvent.patch
index c076927ac1..f1e109f30c 100644
--- a/patches/server/0847-Add-EntityFertilizeEggEvent.patch
+++ b/patches/server/0847-Add-EntityFertilizeEggEvent.patch
@@ -69,10 +69,10 @@ index 0e85e3ab58d848b119212fa7d2eb4f92d3efe29b..0a5b953bd8c0c7f181da4090b950e9e6
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 ee717d1f4cc30e17d7449a52379d6f4a54ec738b..e1d19207ba70e1ecc85af2ca4cfd6ed8c4d4a9e7 100644
+index b04cf7cb05adcef205f84decf3564f85de0c8e2d..6c5908eecaaf2f2b41bc0074e183a2259fe4a9b2 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -2092,4 +2092,28 @@ public class CraftEventFactory {
+@@ -2108,4 +2108,28 @@ public class CraftEventFactory {
return event.callEvent();
}
// Paper end
diff --git a/patches/server/0851-Fix-advancement-triggers-for-entity-damage.patch b/patches/server/0851-Fix-advancement-triggers-for-entity-damage.patch
index 6407d2f947..60dd2d1db4 100644
--- a/patches/server/0851-Fix-advancement-triggers-for-entity-damage.patch
+++ b/patches/server/0851-Fix-advancement-triggers-for-entity-damage.patch
@@ -23,10 +23,10 @@ index f054d67a637b204de604fadc0d321f5c9816d808..fc5f1e1b445f0a55a35a31d58a90920a
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 e0071236139ab70ba28794f3c7e44640f8d60a2a..549bb5caa38e08196fddbd4e4255b499c784a9c2 100644
+index d9f9a184e22bc02fbfd1ab029abf48af654c9935..cc82b269d422f6cd720021ba009606cab1b90590 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -2314,7 +2314,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2322,7 +2322,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
// Duplicate triggers if blocking
if (event.getDamage(DamageModifier.BLOCKING) < 0) {
if (this instanceof ServerPlayer) {
@@ -35,7 +35,7 @@ index e0071236139ab70ba28794f3c7e44640f8d60a2a..549bb5caa38e08196fddbd4e4255b499
f2 = (float) -event.getDamage(DamageModifier.BLOCKING);
if (f2 > 0.0F && f2 < 3.4028235E37F) {
((ServerPlayer) this).awardStat(Stats.DAMAGE_BLOCKED_BY_SHIELD, Math.round(originalDamage * 10.0F));
-@@ -2322,7 +2322,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2330,7 +2330,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
if (damagesource.getEntity() instanceof ServerPlayer) {
diff --git a/patches/server/0869-Expand-PlayerItemMendEvent.patch b/patches/server/0869-Expand-PlayerItemMendEvent.patch
index e603155464..013c1be8fd 100644
--- a/patches/server/0869-Expand-PlayerItemMendEvent.patch
+++ b/patches/server/0869-Expand-PlayerItemMendEvent.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expand PlayerItemMendEvent
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-index 36d5d1736bf826f3abc756277de431c94cabb744..e814b2ef2577f032d6760de2f798d4fe18c67d0c 100644
+index a9c30fb4cfe4ff7bb27d498218373c572031fab8..36422fb394a158f36c84ba0ee03cc704956c91b2 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
-@@ -337,7 +337,7 @@ public class ExperienceOrb extends Entity {
+@@ -338,7 +338,7 @@ public class ExperienceOrb extends Entity {
ItemStack itemstack = (ItemStack) entry.getValue();
int j = Math.min(this.xpToDurability(amount), itemstack.getDamageValue());
// CraftBukkit start
@@ -17,7 +17,7 @@ index 36d5d1736bf826f3abc756277de431c94cabb744..e814b2ef2577f032d6760de2f798d4fe
j = event.getRepairAmount();
if (event.isCancelled()) {
return amount;
-@@ -345,8 +345,13 @@ public class ExperienceOrb extends Entity {
+@@ -346,8 +346,13 @@ public class ExperienceOrb extends Entity {
// CraftBukkit end
itemstack.setDamageValue(itemstack.getDamageValue() - j);
@@ -33,7 +33,7 @@ index 36d5d1736bf826f3abc756277de431c94cabb744..e814b2ef2577f032d6760de2f798d4fe
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 04e5be79348733f5a6a8b1968b6887379fa65027..c7e0aa94a8c1f821f723f323b69bacfd2d2d8aa3 100644
+index 4996776287c58039507ad2eda9d59e3fd13c08a8..e111017c3de7b374c702fed20a5e98557011ea06 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1757,11 +1757,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@@ -43,7 +43,7 @@ index 04e5be79348733f5a6a8b1968b6887379fa65027..c7e0aa94a8c1f821f723f323b69bacfd
- org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, stackEntry.getKey(), i);
+ org.bukkit.event.player.PlayerItemMendEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemMendEvent(handle, orb, itemstack, stackEntry.getKey(), i, orb::durabilityToXp); // Paper - Expand PlayerItemMendEvent
i = event.getRepairAmount();
- orb.discard();
+ orb.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN);
if (!event.isCancelled()) {
- amount -= orb.durabilityToXp(i);
+ amount -= event.getDurabilityToXpOperation().applyAsInt(i); // Paper - Expand PlayerItemMendEvent
@@ -51,10 +51,10 @@ index 04e5be79348733f5a6a8b1968b6887379fa65027..c7e0aa94a8c1f821f723f323b69bacfd
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index e1d19207ba70e1ecc85af2ca4cfd6ed8c4d4a9e7..7934eea4ede9db90ad2a45a2a5ac64b264b2f91a 100644
+index 6c5908eecaaf2f2b41bc0074e183a2259fe4a9b2..52c1d39f494ba441bc93382d895679bcd15fcbde 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1270,10 +1270,10 @@ public class CraftEventFactory {
+@@ -1271,10 +1271,10 @@ public class CraftEventFactory {
return event;
}
diff --git a/patches/server/0870-Refresh-ProjectileSource-for-projectiles.patch b/patches/server/0870-Refresh-ProjectileSource-for-projectiles.patch
index b8d815849b..d9ecc6ae32 100644
--- a/patches/server/0870-Refresh-ProjectileSource-for-projectiles.patch
+++ b/patches/server/0870-Refresh-ProjectileSource-for-projectiles.patch
@@ -14,10 +14,10 @@ clearing the owner.
Co-authored-by: Warrior <[email protected]>
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 576cef82f7ea57642430897de2e5212cae234701..0bc310f8edb886c84aa71a7502e297127647cbe5 100644
+index c394c60f4e6b216be332c3585fbfbc4f32f9db30..5b612466db7c063bf0efbdaa3fcc575eb202ab21 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -383,6 +383,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -384,6 +384,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public boolean inWorld = false;
public boolean generation;
public int maxAirTicks = this.getDefaultMaxAirSupply(); // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
diff --git a/patches/server/0880-Add-event-for-player-editing-sign.patch b/patches/server/0880-Add-event-for-player-editing-sign.patch
index 5e205901e5..321cccc3d6 100644
--- a/patches/server/0880-Add-event-for-player-editing-sign.patch
+++ b/patches/server/0880-Add-event-for-player-editing-sign.patch
@@ -72,10 +72,10 @@ index 57b79e7fa34755e68b06f5b3010e68745cabbb7e..27a1e8ffc43efe4e086e7fd88ee4d80c
entityhuman.openTextEdit(tileentitysign, flag);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
-index 94caa0915e1a9ec1c46c7a0380db840901cc8063..3ebfc8e5b5462e6e532f8e8901fd5f8f386bbf34 100644
+index d1b335d7342aa85478daeb7801a999ccd4be7136..1d0ef05cc694c5519dc233d24fd002c0699cd2ab 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
-@@ -139,9 +139,15 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
+@@ -162,9 +162,15 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
Preconditions.checkArgument(sign.isPlaced(), "Sign must be placed");
Preconditions.checkArgument(sign.getWorld() == player.getWorld(), "Sign must be in same world as Player");
diff --git a/patches/server/0884-Call-missing-BlockDispenseEvent.patch b/patches/server/0884-Call-missing-BlockDispenseEvent.patch
index d63492c387..dc2929f750 100644
--- a/patches/server/0884-Call-missing-BlockDispenseEvent.patch
+++ b/patches/server/0884-Call-missing-BlockDispenseEvent.patch
@@ -50,10 +50,10 @@ index b83af374a33a66a6ceeca119b961eea883bba41c..175b965c92b8b8be9c671e1ee478afa9
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 7934eea4ede9db90ad2a45a2a5ac64b264b2f91a..c2beeff8f84de23981624890c2a88cf510f4cbab 100644
+index 52c1d39f494ba441bc93382d895679bcd15fcbde..cd6ee371910328d4ab6f4a018fa0e4a48dbc7982 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -2093,6 +2093,32 @@ public class CraftEventFactory {
+@@ -2109,6 +2109,32 @@ public class CraftEventFactory {
}
// Paper end
diff --git a/patches/server/0885-Don-t-load-chunks-for-supporting-block-checks.patch b/patches/server/0885-Don-t-load-chunks-for-supporting-block-checks.patch
index d03e7a3c1e..f1dd778224 100644
--- a/patches/server/0885-Don-t-load-chunks-for-supporting-block-checks.patch
+++ b/patches/server/0885-Don-t-load-chunks-for-supporting-block-checks.patch
@@ -5,10 +5,10 @@ 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 0bc310f8edb886c84aa71a7502e297127647cbe5..4aeedd106ccf56e3088f7991f792dec7c4bd357a 100644
+index 5b612466db7c063bf0efbdaa3fcc575eb202ab21..957165e1fce7ddd4c7b7e53a4db8f65739c0ff7f 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -1187,7 +1187,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1200,7 +1200,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
protected BlockPos getOnPos(float offset) {
diff --git a/patches/server/0887-Add-Sign-getInteractableSideFor.patch b/patches/server/0887-Add-Sign-getInteractableSideFor.patch
index df4e37608b..c5009d0b42 100644
--- a/patches/server/0887-Add-Sign-getInteractableSideFor.patch
+++ b/patches/server/0887-Add-Sign-getInteractableSideFor.patch
@@ -30,10 +30,10 @@ index f3cea7a8de334419b4a2f6dc64ef0e20fd715e75..927c7ea03560be0c86884cec70ee8e40
float f1 = (float) (Mth.atan2(d1, d0) * 57.2957763671875D) - 90.0F;
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
-index 3ebfc8e5b5462e6e532f8e8901fd5f8f386bbf34..2725fd91596a69e12996e838267b6612f745a4bb 100644
+index 1d0ef05cc694c5519dc233d24fd002c0699cd2ab..ec96e8020c2042d939ab836464c547838447d708 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
-@@ -169,6 +169,14 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
+@@ -192,6 +192,14 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
}
// Paper end
diff --git a/patches/server/0893-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch b/patches/server/0893-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch
index 9214a4ff32..54c442e544 100644
--- a/patches/server/0893-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch
+++ b/patches/server/0893-Only-set-despawnTimer-for-Wandering-Traders-spawned-.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Only set despawnTimer for Wandering Traders spawned by
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
-index 594e82a09d21c39331c391f2aec5bc8d87649ea3..1c89f20debfad9807c90a21cc336d5790294ebce 100644
+index 9b0f54af3160c5756784e31cf1347eb97ca77e47..8d1cc1a644415be251f469ab1cb2ebc09fe5c3eb 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
-@@ -67,7 +67,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
+@@ -68,7 +68,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
public WanderingTrader(EntityType<? extends WanderingTrader> type, Level world) {
super(type, world);
diff --git a/patches/server/0894-ExperienceOrb-should-call-EntitySpawnEvent.patch b/patches/server/0894-ExperienceOrb-should-call-EntitySpawnEvent.patch
index 22d04086a3..cc8338c2f5 100644
--- a/patches/server/0894-ExperienceOrb-should-call-EntitySpawnEvent.patch
+++ b/patches/server/0894-ExperienceOrb-should-call-EntitySpawnEvent.patch
@@ -5,10 +5,10 @@ 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 c2beeff8f84de23981624890c2a88cf510f4cbab..62f1552d86dc38d709f9e53f643a6d8ab38bd2d2 100644
+index cd6ee371910328d4ab6f4a018fa0e4a48dbc7982..ebb39bd51dceab1d55eea81d33273af21acfc69b 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -734,7 +734,8 @@ public class CraftEventFactory {
+@@ -735,7 +735,8 @@ public class CraftEventFactory {
// Spigot start - SPIGOT-7523: Merge after spawn event and only merge if the event was not cancelled (gets checked above)
if (entity instanceof net.minecraft.world.entity.ExperienceOrb xp) {
double radius = world.spigotConfig.expMerge;
diff --git a/patches/server/0898-Folia-scheduler-and-owned-region-API.patch b/patches/server/0898-Folia-scheduler-and-owned-region-API.patch
index ef48c0c8df..3cc6808e00 100644
--- a/patches/server/0898-Folia-scheduler-and-owned-region-API.patch
+++ b/patches/server/0898-Folia-scheduler-and-owned-region-API.patch
@@ -1173,10 +1173,10 @@ index 97dbe5a44d2791c6dee830654c3935f4ac54aad4..48da5bdabcf38afbbd1509eca56d5c76
this.profiler.push("commandFunctions");
MinecraftTimings.commandFunctionsTimer.startTiming(); // Spigot // Paper
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 2eeb216002c1c91879780225335225552744524b..74b3f459c898dc9f5c4411a38c9018fb4866f0b1 100644
+index 0747b0042446271385371f1ca9c8fefdebd851b8..fade1e36037075aae968eb90bbfeac76bfed496a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -647,6 +647,7 @@ public abstract class PlayerList {
+@@ -648,6 +648,7 @@ public abstract class PlayerList {
entityplayer.unRide();
worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
@@ -1185,10 +1185,10 @@ index 2eeb216002c1c91879780225335225552744524b..74b3f459c898dc9f5c4411a38c9018fb
this.players.remove(entityplayer);
this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 11833b3c755e6ad6d802264ada02e80eb5545143..742ba42e60f9fdb0a78df681732af2be4ce5bdc3 100644
+index 957165e1fce7ddd4c7b7e53a4db8f65739c0ff7f..14855cd35ce7607e74192a55722bd10660f1126b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -246,11 +246,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -247,11 +247,23 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public @org.jetbrains.annotations.Nullable net.minecraft.server.level.ChunkMap.TrackedEntity tracker; // Paper
public CraftEntity getBukkitEntity() {
if (this.bukkitEntity == null) {
@@ -1213,20 +1213,20 @@ index 11833b3c755e6ad6d802264ada02e80eb5545143..742ba42e60f9fdb0a78df681732af2be
@Override
public CommandSender getBukkitSender(CommandSourceStack wrapper) {
return this.getBukkitEntity();
-@@ -4424,6 +4436,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
-
- @Override
- public final void setRemoved(Entity.RemovalReason reason) {
+@@ -4445,6 +4457,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+ public final void setRemoved(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
+ CraftEventFactory.callEntityRemoveEvent(this, cause);
+ // CraftBukkit end
+ final boolean alreadyRemoved = this.removalReason != null; // Paper - Folia schedulers
if (this.removalReason == null) {
- this.removalReason = reason;
+ this.removalReason = entity_removalreason;
}
-@@ -4434,12 +4447,28 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4455,12 +4468,28 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.getPassengers().forEach(Entity::stopRiding);
- this.levelCallback.onRemove(reason);
+ this.levelCallback.onRemove(entity_removalreason);
+ // Paper start - Folia schedulers
-+ if (!(this instanceof ServerPlayer) && reason != RemovalReason.CHANGED_DIMENSION && !alreadyRemoved) {
++ if (!(this instanceof ServerPlayer) && entity_removalreason != RemovalReason.CHANGED_DIMENSION && !alreadyRemoved) {
+ // Players need to be special cased, because they are regularly removed from the world
+ this.retireScheduler();
+ }
@@ -1332,10 +1332,10 @@ index 56a6b3921c74bdeb27f8736302503bee1f731065..b5140b37d2161d89c6c5d6465949e96f
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index e043a43ebda1df7b78c1368ce33a3648345bcb08..b86746be78e909b75a91751fbc4759db088d42a4 100644
+index ba915f1b3cd00c8afe39ece9c9e68737673777f5..282a1cebc0cdb6253d024dd399ef794335883662 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -67,6 +67,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -68,6 +68,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
private EntityDamageEvent lastDamageEvent;
private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
protected net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers
@@ -1351,7 +1351,7 @@ index e043a43ebda1df7b78c1368ce33a3648345bcb08..b86746be78e909b75a91751fbc4759db
public CraftEntity(final CraftServer server, final Entity entity) {
this.server = server;
-@@ -483,6 +492,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -484,6 +493,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return this.entity;
}
diff --git a/patches/server/0900-API-for-updating-recipes-on-clients.patch b/patches/server/0900-API-for-updating-recipes-on-clients.patch
index dd62659d86..7fbba42341 100644
--- a/patches/server/0900-API-for-updating-recipes-on-clients.patch
+++ b/patches/server/0900-API-for-updating-recipes-on-clients.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] API for updating recipes on clients
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 74b3f459c898dc9f5c4411a38c9018fb4866f0b1..090e76b7e13e1c7e4346188679e64cca3b665d48 100644
+index fade1e36037075aae968eb90bbfeac76bfed496a..bc0e9fb41fe22e0a603837fcbdd82134f51d21d9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -1530,6 +1530,13 @@ public abstract class PlayerList {
+@@ -1531,6 +1531,13 @@ public abstract class PlayerList {
}
public void reloadResources() {
@@ -22,7 +22,7 @@ index 74b3f459c898dc9f5c4411a38c9018fb4866f0b1..090e76b7e13e1c7e4346188679e64cca
// CraftBukkit start
/*Iterator iterator = this.advancements.values().iterator();
-@@ -1545,7 +1552,15 @@ public abstract class PlayerList {
+@@ -1546,7 +1553,15 @@ public abstract class PlayerList {
}
// CraftBukkit end
diff --git a/patches/server/0911-API-for-an-entity-s-scoreboard-name.patch b/patches/server/0911-API-for-an-entity-s-scoreboard-name.patch
index cda86cf476..1df4442214 100644
--- a/patches/server/0911-API-for-an-entity-s-scoreboard-name.patch
+++ b/patches/server/0911-API-for-an-entity-s-scoreboard-name.patch
@@ -7,10 +7,10 @@ Was obtainable through different methods, but you had to use different
methods depending on the implementation of Entity you were working with.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index b86746be78e909b75a91751fbc4759db088d42a4..5abf149210f2338a125994d653209eea68359b11 100644
+index 282a1cebc0cdb6253d024dd399ef794335883662..fec2f96cfc42559c44d5d2e907d0706c674dfda7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -1191,4 +1191,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1192,4 +1192,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return !this.getHandle().level().noCollision(this.getHandle(), aabb);
}
// Paper end - Collision API
diff --git a/patches/server/0915-Fire-entity-death-event-for-ender-dragon.patch b/patches/server/0915-Fire-entity-death-event-for-ender-dragon.patch
index f33d5fe7de..46c12c1b61 100644
--- a/patches/server/0915-Fire-entity-death-event-for-ender-dragon.patch
+++ b/patches/server/0915-Fire-entity-death-event-for-ender-dragon.patch
@@ -5,10 +5,10 @@ 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 d0de3ef6c78785a047ecdf2412df082d53fb985b..a86ae40b945b1ecdf42a69d753d0412f39ee3001 100644
+index 61e4f8be9f5927b65ae03da98250d3cd4c1e8c13..1df13af62af7d0bbd92c84d424a07da66bb8583f 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
-@@ -642,6 +642,15 @@ public class EnderDragon extends Mob implements Enemy {
+@@ -643,6 +643,15 @@ public class EnderDragon extends Mob implements Enemy {
@Override
public void kill() {
@@ -21,6 +21,6 @@ index d0de3ef6c78785a047ecdf2412df082d53fb985b..a86ae40b945b1ecdf42a69d753d0412f
+ }
+ // Paper end - Fire entity death event
+
- this.remove(Entity.RemovalReason.KILLED);
+ this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
this.gameEvent(GameEvent.ENTITY_DIE);
if (this.dragonFight != null) {
diff --git a/patches/server/0917-Add-Listing-API-for-Player.patch b/patches/server/0917-Add-Listing-API-for-Player.patch
index 93b847a66a..fa29159689 100644
--- a/patches/server/0917-Add-Listing-API-for-Player.patch
+++ b/patches/server/0917-Add-Listing-API-for-Player.patch
@@ -74,10 +74,10 @@ index d43106eb89b14667e85cd6e8fa047d64f2e8ec87..56eddd28429cf42c02d88b8bf79f8b61
static class EntryBuilder {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 090e76b7e13e1c7e4346188679e64cca3b665d48..16ef96f0b2f68556b89c9d732d0e1a407f083fdc 100644
+index bc0e9fb41fe22e0a603837fcbdd82134f51d21d9..d38fe02af4cc35ed5b22acec41bedb76151f8af5 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -356,14 +356,22 @@ public abstract class PlayerList {
+@@ -357,14 +357,22 @@ public abstract class PlayerList {
// CraftBukkit end
// CraftBukkit start - sendAll above replaced with this loop
@@ -101,7 +101,7 @@ index 090e76b7e13e1c7e4346188679e64cca3b665d48..16ef96f0b2f68556b89c9d732d0e1a40
}
if (entityplayer1 == player || !bukkitPlayer.canSee(entityplayer1.getBukkitEntity())) { // Paper - Use single player info update packet on join; Don't include joining player
-@@ -374,7 +382,7 @@ public abstract class PlayerList {
+@@ -375,7 +383,7 @@ public abstract class PlayerList {
}
// Paper start - Use single player info update packet on join
if (!onlinePlayers.isEmpty()) {
@@ -111,7 +111,7 @@ index 090e76b7e13e1c7e4346188679e64cca3b665d48..16ef96f0b2f68556b89c9d732d0e1a40
// 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 59dd4f06d33a0bb8e747857ee81f6465b7ed78b1..a8bdeb0c5045344983efe083aa3214be00c07cf1 100644
+index 15817a84ad5db54ec299f933387f4ad1e0e74b33..458c7039bddf63a0affbf14c24ba73d66cc13fac 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -188,6 +188,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
diff --git a/patches/server/0919-Add-BlockFace-to-BlockDamageEvent.patch b/patches/server/0919-Add-BlockFace-to-BlockDamageEvent.patch
index 81b837c30e..66bd2d2f29 100644
--- a/patches/server/0919-Add-BlockFace-to-BlockDamageEvent.patch
+++ b/patches/server/0919-Add-BlockFace-to-BlockDamageEvent.patch
@@ -18,10 +18,10 @@ index 4747b05619f37009a5a236678aceec6cfc1c0b79..d0ca98c3f9ea5c8cb1053da6b17e9a90
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 62f1552d86dc38d709f9e53f643a6d8ab38bd2d2..7d2d9b1069b1b76d0aa4cc6077b94350a331bb19 100644
+index ebb39bd51dceab1d55eea81d33273af21acfc69b..49aa24d64d69fdccfdbca930b149a4b9c80e2b78 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -649,13 +649,13 @@ public class CraftEventFactory {
+@@ -650,13 +650,13 @@ public class CraftEventFactory {
/**
* BlockDamageEvent
*/
diff --git a/patches/server/0921-Expand-Pose-API.patch b/patches/server/0921-Expand-Pose-API.patch
index 9adc4311d8..6667e21c82 100644
--- a/patches/server/0921-Expand-Pose-API.patch
+++ b/patches/server/0921-Expand-Pose-API.patch
@@ -5,10 +5,10 @@ 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 777448a112951e4772adde27d4066d392235e44c..effd39457989f34823e4fa7bc038c47d04714317 100644
+index 14855cd35ce7607e74192a55722bd10660f1126b..361bdbb940a0da6821bcaf6037ddfe6bf61b36ac 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -418,6 +418,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -419,6 +419,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@javax.annotation.Nullable
private UUID originWorld;
public boolean freezeLocked = false; // Paper - Freeze Tick Lock API
@@ -16,7 +16,7 @@ index 777448a112951e4772adde27d4066d392235e44c..effd39457989f34823e4fa7bc038c47d
public void setOrigin(@javax.annotation.Nonnull Location location) {
this.origin = location.toVector();
-@@ -618,6 +619,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -631,6 +632,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public void onClientRemoval() {}
public void setPose(net.minecraft.world.entity.Pose pose) {
@@ -25,10 +25,10 @@ index 777448a112951e4772adde27d4066d392235e44c..effd39457989f34823e4fa7bc038c47d
if (pose == this.getPose()) {
return;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 5abf149210f2338a125994d653209eea68359b11..1c035d1a9acc5f0a21169c66541d890a23bba033 100644
+index fec2f96cfc42559c44d5d2e907d0706c674dfda7..089eb25d532990773161063658f123f1e5bef2b3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -896,6 +896,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -897,6 +897,20 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
public boolean isSneaking() {
return this.getHandle().isShiftKeyDown();
}
diff --git a/patches/server/0925-Allow-trident-custom-damage.patch b/patches/server/0925-Allow-trident-custom-damage.patch
index 6e500d2b28..fb6397821e 100644
--- a/patches/server/0925-Allow-trident-custom-damage.patch
+++ b/patches/server/0925-Allow-trident-custom-damage.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Allow trident custom damage
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
-index cbe8593cecd84f1598649801bebcb46364044eef..51931e5cecf4c9ed8442136b18a94c7da89cf77d 100644
+index 870db6ab82ef2ecb989342bb6a66435f823a9263..8ae7d62b72fb72d893e68b02b645d48374595ae6 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java
-@@ -34,10 +34,12 @@ public class ThrownTrident extends AbstractArrow {
+@@ -37,10 +37,12 @@ public class ThrownTrident extends AbstractArrow {
public ThrownTrident(EntityType<? extends ThrownTrident> type, Level world) {
super(type, world, ThrownTrident.DEFAULT_ARROW_STACK);
@@ -21,7 +21,7 @@ index cbe8593cecd84f1598649801bebcb46364044eef..51931e5cecf4c9ed8442136b18a94c7d
this.entityData.set(ThrownTrident.ID_LOYALTY, (byte) EnchantmentHelper.getLoyalty(stack));
this.entityData.set(ThrownTrident.ID_FOIL, stack.hasFoil());
}
-@@ -121,7 +123,7 @@ public class ThrownTrident extends AbstractArrow {
+@@ -124,7 +126,7 @@ public class ThrownTrident extends AbstractArrow {
@Override
protected void onHitEntity(EntityHitResult entityHitResult) {
Entity entity = entityHitResult.getEntity();
diff --git a/patches/server/0930-Add-titleOverride-to-InventoryOpenEvent.patch b/patches/server/0930-Add-titleOverride-to-InventoryOpenEvent.patch
index 18021d7c5a..06ad83c295 100644
--- a/patches/server/0930-Add-titleOverride-to-InventoryOpenEvent.patch
+++ b/patches/server/0930-Add-titleOverride-to-InventoryOpenEvent.patch
@@ -79,10 +79,10 @@ index 94c2ea713e0614de570458f6b9c418a3d67d14b5..acbb64010cd59668aa1bcb52ff122078
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 7d2d9b1069b1b76d0aa4cc6077b94350a331bb19..0937d70b575b12bdfc0f643648088fa4cf13c230 100644
+index 49aa24d64d69fdccfdbca930b149a4b9c80e2b78..7f7ec71e352e403169603dcd95b4dd50d68d37f7 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1387,10 +1387,21 @@ public class CraftEventFactory {
+@@ -1388,10 +1388,21 @@ public class CraftEventFactory {
}
public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container) {
@@ -105,7 +105,7 @@ index 7d2d9b1069b1b76d0aa4cc6077b94350a331bb19..0937d70b575b12bdfc0f643648088fa4
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
}
-@@ -1405,10 +1416,10 @@ public class CraftEventFactory {
+@@ -1406,10 +1417,10 @@ public class CraftEventFactory {
if (event.isCancelled()) {
container.transferTo(player.containerMenu, craftPlayer);
diff --git a/patches/server/0937-Fix-silent-equipment-change-for-mobs.patch b/patches/server/0937-Fix-silent-equipment-change-for-mobs.patch
index 515b91f30c..f9d34b89ae 100644
--- a/patches/server/0937-Fix-silent-equipment-change-for-mobs.patch
+++ b/patches/server/0937-Fix-silent-equipment-change-for-mobs.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix silent equipment change for mobs
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 8b239769a3a7ce6f85d472ddb2ff7ea7de0ce5c0..1721504912c9e5744f09c17d059315ee357afeb4 100644
+index d1833dcc92b1570e62a1941bbea6d66ff0b2ee5f..4e8aee81cb9e9fe4a4e5df4e228c0314b3af486b 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -1046,13 +1046,20 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -1047,13 +1047,20 @@ public abstract class Mob extends LivingEntity implements Targeting {
@Override
public void setItemSlot(EquipmentSlot slot, ItemStack stack) {
diff --git a/patches/server/0958-Broadcast-take-item-packets-with-collector-as-source.patch b/patches/server/0958-Broadcast-take-item-packets-with-collector-as-source.patch
index bc32e3307d..ad908f281c 100644
--- a/patches/server/0958-Broadcast-take-item-packets-with-collector-as-source.patch
+++ b/patches/server/0958-Broadcast-take-item-packets-with-collector-as-source.patch
@@ -6,10 +6,10 @@ 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 549bb5caa38e08196fddbd4e4255b499c784a9c2..294c4950ebe63a5d0f74907692010c9c99cf82da 100644
+index cc82b269d422f6cd720021ba009606cab1b90590..d4fb052996d05668f1749d19b91e27044166f819 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3716,7 +3716,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3724,7 +3724,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
public void take(Entity item, int count) {
if (!item.isRemoved() && !this.level().isClientSide && (item instanceof ItemEntity || item instanceof AbstractArrow || item instanceof ExperienceOrb)) {
diff --git a/patches/server/0959-Expand-LingeringPotion-API.patch b/patches/server/0959-Expand-LingeringPotion-API.patch
index 59154f7803..abc4c72435 100644
--- a/patches/server/0959-Expand-LingeringPotion-API.patch
+++ b/patches/server/0959-Expand-LingeringPotion-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Expand LingeringPotion API
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
-index f191b0e303a97b5406133454374ff9448aee1a5a..0c5bac5d955b1e380103c9b51635010212c6526e 100644
+index 2b05824f5826a2da2539f8a6d373a16c185aa80a..19af5552e36964996082226b4f77561d7deb99f6 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java
-@@ -288,7 +288,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
+@@ -289,7 +289,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie
// CraftBukkit start
org.bukkit.event.entity.LingeringPotionSplashEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callLingeringPotionSplashEvent(this, position, entityareaeffectcloud);
@@ -16,4 +16,4 @@ index f191b0e303a97b5406133454374ff9448aee1a5a..0c5bac5d955b1e380103c9b516350102
+ if (!(event.isCancelled() || entityareaeffectcloud.isRemoved() || (!event.allowsEmptyCreation() && (noEffects && entityareaeffectcloud.effects.isEmpty() && entityareaeffectcloud.getPotion().getEffects().isEmpty())))) { // Paper - don't spawn area effect cloud if the effects were empty and not changed during the event handling
this.level().addFreshEntity(entityareaeffectcloud);
} else {
- entityareaeffectcloud.discard();
+ entityareaeffectcloud.discard(null); // CraftBukkit - add Bukkit remove cause
diff --git a/patches/server/0961-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch b/patches/server/0961-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch
index 4a02216b2f..69084fab3f 100644
--- a/patches/server/0961-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch
+++ b/patches/server/0961-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch
@@ -6,10 +6,10 @@ Subject: [PATCH] Fix strikeLightningEffect powers lightning rods and clears
diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java
-index 0db0d67f9ac15372becc1166c37f7f0aede4a4da..a9e70484b01fc082ea25d43d1d42833499b5e41d 100644
+index 41a3ca4edf4fa662f2af13efd7b78b56e24aa4a7..0a8a53710c693a220e9475f6f3112b91d8209c00 100644
--- a/src/main/java/net/minecraft/world/entity/LightningBolt.java
+++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java
-@@ -45,6 +45,7 @@ public class LightningBolt extends Entity {
+@@ -46,6 +46,7 @@ public class LightningBolt extends Entity {
private ServerPlayer cause;
private final Set<Entity> hitEntities = Sets.newHashSet();
private int blocksSetOnFire;
@@ -17,7 +17,7 @@ index 0db0d67f9ac15372becc1166c37f7f0aede4a4da..a9e70484b01fc082ea25d43d1d428334
public LightningBolt(EntityType<? extends LightningBolt> type, Level world) {
super(type, world);
-@@ -85,7 +86,7 @@ public class LightningBolt extends Entity {
+@@ -86,7 +87,7 @@ public class LightningBolt extends Entity {
@Override
public void tick() {
super.tick();
@@ -26,7 +26,7 @@ index 0db0d67f9ac15372becc1166c37f7f0aede4a4da..a9e70484b01fc082ea25d43d1d428334
if (this.level().isClientSide()) {
this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), SoundEvents.LIGHTNING_BOLT_THUNDER, SoundSource.WEATHER, 10000.0F, 0.8F + this.random.nextFloat() * 0.2F, false);
this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), SoundEvents.LIGHTNING_BOLT_IMPACT, SoundSource.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F, false);
-@@ -132,7 +133,7 @@ public class LightningBolt extends Entity {
+@@ -133,7 +134,7 @@ public class LightningBolt extends Entity {
}
}
@@ -35,7 +35,7 @@ index 0db0d67f9ac15372becc1166c37f7f0aede4a4da..a9e70484b01fc082ea25d43d1d428334
if (!(this.level() instanceof ServerLevel)) {
this.level().setSkyFlashTime(2);
} else if (!this.visualOnly) {
-@@ -161,7 +162,7 @@ public class LightningBolt extends Entity {
+@@ -162,7 +163,7 @@ public class LightningBolt extends Entity {
}
private void spawnFire(int spreadAttempts) {
diff --git a/patches/server/0962-Add-hand-to-fish-event-for-all-player-interactions.patch b/patches/server/0962-Add-hand-to-fish-event-for-all-player-interactions.patch
index 59919994a5..39764d836e 100644
--- a/patches/server/0962-Add-hand-to-fish-event-for-all-player-interactions.patch
+++ b/patches/server/0962-Add-hand-to-fish-event-for-all-player-interactions.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add hand to fish event for all player interactions
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-index b6ebae97dc863ba1748e9b32555f940077846be8..90a5f6bd729148f2adc745273536e48d704fcd1e 100644
+index a87fcd5b837e1c824cbd5587c3350986e2fd7acb..91497f5e6c07fcf1b05eca6846c51e1a15ed3bc0 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
-@@ -474,7 +474,15 @@ public class FishingHook extends Projectile {
+@@ -475,7 +475,15 @@ public class FishingHook extends Projectile {
@Override
public void readAdditionalSaveData(CompoundTag nbt) {}
@@ -24,7 +24,7 @@ index b6ebae97dc863ba1748e9b32555f940077846be8..90a5f6bd729148f2adc745273536e48d
net.minecraft.world.entity.player.Player entityhuman = this.getPlayerOwner();
if (!this.level().isClientSide && entityhuman != null && !this.shouldStopFishing(entityhuman)) {
-@@ -482,7 +490,7 @@ public class FishingHook extends Projectile {
+@@ -483,7 +491,7 @@ public class FishingHook extends Projectile {
if (this.hookedIn != null) {
// CraftBukkit start
@@ -33,7 +33,7 @@ index b6ebae97dc863ba1748e9b32555f940077846be8..90a5f6bd729148f2adc745273536e48d
this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent);
if (playerFishEvent.isCancelled()) {
-@@ -511,7 +519,7 @@ public class FishingHook extends Projectile {
+@@ -512,7 +520,7 @@ public class FishingHook extends Projectile {
}
// Paper end
// CraftBukkit start
@@ -42,7 +42,7 @@ index b6ebae97dc863ba1748e9b32555f940077846be8..90a5f6bd729148f2adc745273536e48d
playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1);
this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent);
-@@ -545,7 +553,7 @@ public class FishingHook extends Projectile {
+@@ -546,7 +554,7 @@ public class FishingHook extends Projectile {
if (this.onGround()) {
// CraftBukkit start
@@ -51,7 +51,7 @@ index b6ebae97dc863ba1748e9b32555f940077846be8..90a5f6bd729148f2adc745273536e48d
this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent);
if (playerFishEvent.isCancelled()) {
-@@ -556,7 +564,7 @@ public class FishingHook extends Projectile {
+@@ -557,7 +565,7 @@ public class FishingHook extends Projectile {
}
// CraftBukkit start
if (i == 0) {
diff --git a/patches/server/0963-Fix-several-issues-with-EntityBreedEvent.patch b/patches/server/0963-Fix-several-issues-with-EntityBreedEvent.patch
index eafe12a1bb..2ef92033bd 100644
--- a/patches/server/0963-Fix-several-issues-with-EntityBreedEvent.patch
+++ b/patches/server/0963-Fix-several-issues-with-EntityBreedEvent.patch
@@ -54,10 +54,10 @@ index 907ed82fea71254d6624eda878e2668cd26422a7..081d1e38b7b1f286e138b0981aaa760e
this.level().broadcastEntityEvent(this, (byte) 18);
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java
-index f783fe169141d33e8569ec7f5d71985b74bdbcb6..be554dbaa9900207753e4f67f0ba402333e21338 100644
+index 0297e234f17c6157cfff79420b9eeaf4e0e2c3ab..d683c49fdf2d1e5b0f2620641f9c241e82f96825 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Panda.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java
-@@ -649,8 +649,9 @@ public class Panda extends Animal {
+@@ -650,8 +650,9 @@ public class Panda extends Animal {
this.usePlayerItem(player, hand, itemstack);
this.ageUp((int) ((float) (-this.getAge() / 20) * 0.1F), true);
} else if (!this.level().isClientSide && this.getAge() == 0 && this.canFallInLove()) {
@@ -69,7 +69,7 @@ index f783fe169141d33e8569ec7f5d71985b74bdbcb6..be554dbaa9900207753e4f67f0ba4023
if (this.level().isClientSide || this.isSitting() || this.isInWater()) {
return InteractionResult.PASS;
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
-index 2382f4f044e346fbc0e25de8fb2be30f3630c722..cb48eb0a856338e6012dd66bff47692ee1dfd958 100644
+index 5f879ec74cadc8b27f3c1648890978dbdc27f9f0..1f09d47b0ffb07b49b4d8bd79a371dd61f1c2a92 100644
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
@@ -389,7 +389,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
diff --git a/patches/server/0965-Fix-missing-event-call-for-entity-teleport-API.patch b/patches/server/0965-Fix-missing-event-call-for-entity-teleport-API.patch
index 0fec63f418..1d122c2f15 100644
--- a/patches/server/0965-Fix-missing-event-call-for-entity-teleport-API.patch
+++ b/patches/server/0965-Fix-missing-event-call-for-entity-teleport-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Fix missing event call for entity teleport API
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 1c035d1a9acc5f0a21169c66541d890a23bba033..44dd60c1f31b578e7630673433f3850f392b7a0d 100644
+index 089eb25d532990773161063658f123f1e5bef2b3..9f657dc4075ce01c3a8f871c4a60e5ca5d8eb535 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -255,6 +255,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -256,6 +256,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return false;
}
diff --git a/patches/server/0967-Don-t-fire-sync-events-during-worldgen.patch b/patches/server/0967-Don-t-fire-sync-events-during-worldgen.patch
index fa62a6db65..6aecc48aeb 100644
--- a/patches/server/0967-Don-t-fire-sync-events-during-worldgen.patch
+++ b/patches/server/0967-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 0e7811ae2a8731ae7475aabd2322e56ab364bc32..b5d6a7eaa24d9968e159d77a4295be00332a5457 100644
+index 8235dace0f4a1090dfbd403db34231ccafe5f30e..9816913ad729fd39c173364b92e5db06a733bc55 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1220,6 +1220,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -31,10 +31,10 @@ index 0e7811ae2a8731ae7475aabd2322e56ab364bc32..b5d6a7eaa24d9968e159d77a4295be00
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 effd39457989f34823e4fa7bc038c47d04714317..c153912929e7b505ffebb91ccda2f9175347b089 100644
+index 361bdbb940a0da6821bcaf6037ddfe6bf61b36ac..d85151689d3cd7db078b8e068b8be1934c99600e 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -624,7 +624,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -637,7 +637,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
if (pose == this.getPose()) {
return;
}
@@ -68,10 +68,10 @@ index 656c68b37bc25d6b77f295f9efe0a81dd20b69c1..8ba573bb4099ee5b27b61f333e72d794
}, () -> {
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 294c4950ebe63a5d0f74907692010c9c99cf82da..fe95119a8d26887f4e9cd1b9cd1299515835e958 100644
+index d4fb052996d05668f1749d19b91e27044166f819..bdae6ea5528164995d9a256be6a2f9d0cb15d8ff 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1134,6 +1134,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1142,6 +1142,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
public boolean addEffect(MobEffectInstance mobeffect, @Nullable Entity entity, EntityPotionEffectEvent.Cause cause) {
@@ -83,7 +83,7 @@ index 294c4950ebe63a5d0f74907692010c9c99cf82da..fe95119a8d26887f4e9cd1b9cd129951
// org.spigotmc.AsyncCatcher.catchOp("effect add"); // Spigot // Paper - move to API
if (this.isTickingEffects) {
this.effectsToProcess.add(new ProcessableEffect(mobeffect, cause));
-@@ -1153,10 +1158,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1161,10 +1166,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
override = new MobEffectInstance(mobeffect1).update(mobeffect);
}
@@ -97,7 +97,7 @@ index 294c4950ebe63a5d0f74907692010c9c99cf82da..fe95119a8d26887f4e9cd1b9cd129951
// CraftBukkit end
if (mobeffect1 == null) {
-@@ -1164,7 +1172,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1172,7 +1180,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.onEffectAdded(mobeffect, entity);
flag = true;
// CraftBukkit start
diff --git a/patches/server/0970-Restore-vanilla-entity-drops-behavior.patch b/patches/server/0970-Restore-vanilla-entity-drops-behavior.patch
index 92b596f523..1149213f90 100644
--- a/patches/server/0970-Restore-vanilla-entity-drops-behavior.patch
+++ b/patches/server/0970-Restore-vanilla-entity-drops-behavior.patch
@@ -50,10 +50,10 @@ index 7272dc058c575efee5ac2643ce41b7d12e346e89..ae5a2136a0e266d4c35190f5d3355299
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 f49a1e0ff2c81e9a714458e8c4d3e7220522f813..8c42792ea5cb0fe5d1da7467875efda9be9040e1 100644
+index d85151689d3cd7db078b8e068b8be1934c99600e..fe6ae6c19b07e0b4b9bbe579a2266bb84092fe72 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -2480,6 +2480,25 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2493,6 +2493,25 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@Nullable
public ItemEntity spawnAtLocation(ItemStack stack, float yOffset) {
@@ -79,7 +79,7 @@ index f49a1e0ff2c81e9a714458e8c4d3e7220522f813..8c42792ea5cb0fe5d1da7467875efda9
if (stack.isEmpty()) {
return null;
} else if (this.level().isClientSide) {
-@@ -2487,14 +2506,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2500,14 +2519,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} else {
// CraftBukkit start - Capture drops for death event
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
@@ -104,10 +104,10 @@ index f49a1e0ff2c81e9a714458e8c4d3e7220522f813..8c42792ea5cb0fe5d1da7467875efda9
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 fe95119a8d26887f4e9cd1b9cd1299515835e958..728136663685882c6fd2d94900a27368c7c340f1 100644
+index bdae6ea5528164995d9a256be6a2f9d0cb15d8ff..211e9bb82e65bdd5811c3b4df7ac93741fc7cdc3 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -254,7 +254,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -255,7 +255,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
// CraftBukkit start
public int expToDrop;
public boolean forceDrops;
@@ -117,10 +117,10 @@ index fe95119a8d26887f4e9cd1b9cd1299515835e958..728136663685882c6fd2d94900a27368
public boolean collides = true;
public Set<UUID> collidableExemptions = new HashSet<>();
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-index 45906d273e6d6ec20cf44b4d07efdac68752ee9b..ac9eaeaf7df1e84ee588f371628c0a10784d50bc 100644
+index 6c215470ad05d59f903cbeff15088a03b42c3f66..12440ee2dccc0a697fb403765f2e1b987ccc0283 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
-@@ -534,10 +534,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
+@@ -535,10 +535,10 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
@Override
protected void dropCustomDeathLoot(DamageSource source, int lootingMultiplier, boolean allowDrops) {
super.dropCustomDeathLoot(source, lootingMultiplier, allowDrops);
@@ -134,10 +134,10 @@ index 45906d273e6d6ec20cf44b4d07efdac68752ee9b..ac9eaeaf7df1e84ee588f371628c0a10
}
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 e3412f9dd86dddd241bea8f6dcaeed77a7e67f08..6dfcc296ff7e59ecbebc5446973fabc9eff3cb43 100644
+index f62b5976e307a69ca40d51ae76126005c801df0c..bbe299afd361a107e3936c8ea1a62067fcac9b7e 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-@@ -610,7 +610,7 @@ public class ArmorStand extends LivingEntity {
+@@ -611,7 +611,7 @@ public class ArmorStand extends LivingEntity {
itemstack.setHoverName(this.getCustomName());
}
@@ -146,7 +146,7 @@ index e3412f9dd86dddd241bea8f6dcaeed77a7e67f08..6dfcc296ff7e59ecbebc5446973fabc9
return this.brokenByAnything(damageSource); // Paper
}
-@@ -624,7 +624,7 @@ public class ArmorStand extends LivingEntity {
+@@ -625,7 +625,7 @@ public class ArmorStand extends LivingEntity {
for (i = 0; i < this.handItems.size(); ++i) {
itemstack = (ItemStack) this.handItems.get(i);
if (!itemstack.isEmpty()) {
@@ -155,7 +155,7 @@ index e3412f9dd86dddd241bea8f6dcaeed77a7e67f08..6dfcc296ff7e59ecbebc5446973fabc9
this.handItems.set(i, ItemStack.EMPTY);
}
}
-@@ -632,7 +632,7 @@ public class ArmorStand extends LivingEntity {
+@@ -633,7 +633,7 @@ public class ArmorStand extends LivingEntity {
for (i = 0; i < this.armorItems.size(); ++i) {
itemstack = (ItemStack) this.armorItems.get(i);
if (!itemstack.isEmpty()) {
@@ -165,10 +165,10 @@ index e3412f9dd86dddd241bea8f6dcaeed77a7e67f08..6dfcc296ff7e59ecbebc5446973fabc9
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 0937d70b575b12bdfc0f643648088fa4cf13c230..1a7c002d1a84a52d91d4753ef4d78a8688f6d6ad 100644
+index 7f7ec71e352e403169603dcd95b4dd50d68d37f7..f2f58ae16101293a7df53c32be015111baba1504 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -963,17 +963,23 @@ public class CraftEventFactory {
+@@ -964,17 +964,23 @@ public class CraftEventFactory {
}
public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim) {
@@ -196,7 +196,7 @@ index 0937d70b575b12bdfc0f643648088fa4cf13c230..1a7c002d1a84a52d91d4753ef4d78a86
populateFields(victim, event); // Paper - make cancellable
CraftWorld world = (CraftWorld) entity.getWorld();
Bukkit.getServer().getPluginManager().callEvent(event);
-@@ -987,19 +993,23 @@ public class CraftEventFactory {
+@@ -988,19 +994,23 @@ public class CraftEventFactory {
victim.expToDrop = event.getDroppedExp();
lootCheck.run(); // Paper - advancement triggers before destroying items
@@ -224,7 +224,7 @@ index 0937d70b575b12bdfc0f643648088fa4cf13c230..1a7c002d1a84a52d91d4753ef4d78a86
event.setKeepInventory(keepInventory);
event.setKeepLevel(victim.keepLevel); // SPIGOT-2222: pre-set keepLevel
populateFields(victim, event); // Paper - make cancellable
-@@ -1018,10 +1028,14 @@ public class CraftEventFactory {
+@@ -1019,10 +1029,14 @@ public class CraftEventFactory {
victim.expToDrop = event.getDroppedExp();
victim.newExp = event.getNewExp();
diff --git a/patches/server/0974-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch b/patches/server/0974-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch
index bf344a8f6b..5ef39afe5c 100644
--- a/patches/server/0974-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch
+++ b/patches/server/0974-Fix-NPE-on-null-loc-for-EntityTeleportEvent.patch
@@ -26,10 +26,10 @@ index 3fec07b250a8f145e30c8c41888e47d2a3c902e1..2ddd033e1c3a2e5c8950b93c83849192
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 728136663685882c6fd2d94900a27368c7c340f1..4591011a142f33f0c0ff84a2765cededde0e0c57 100644
+index 211e9bb82e65bdd5811c3b4df7ac93741fc7cdc3..e2e5ec647725f1f16067003ec773530d72fc5fcf 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -4193,7 +4193,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4201,7 +4201,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!(this instanceof ServerPlayer)) {
EntityTeleportEvent teleport = new EntityTeleportEvent(this.getBukkitEntity(), new Location(this.level().getWorld(), d3, d4, d5), new Location(this.level().getWorld(), d0, d6, d2));
this.level().getCraftServer().getPluginManager().callEvent(teleport);
diff --git a/patches/server/0975-Add-experience-points-API.patch b/patches/server/0975-Add-experience-points-API.patch
index 5179a0626b..5256a6ae70 100644
--- a/patches/server/0975-Add-experience-points-API.patch
+++ b/patches/server/0975-Add-experience-points-API.patch
@@ -5,10 +5,10 @@ Subject: [PATCH] Add experience points API
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index f32708ed934bbbf2416e32fdddc7bb4329958cf6..2a280a54bdd7e4b7f26e0b2d2da0d9d3fd432583 100644
+index e92cb12a04827c2afc0662a26320458527aa2bd4..020b74065f7489a46b70ac52e5abbdb22132f8d8 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -1826,7 +1826,7 @@ public abstract class Player extends LivingEntity {
+@@ -1834,7 +1834,7 @@ public abstract class Player extends LivingEntity {
}
public int getXpNeededForNextLevel() {
@@ -18,7 +18,7 @@ index f32708ed934bbbf2416e32fdddc7bb4329958cf6..2a280a54bdd7e4b7f26e0b2d2da0d9d3
// 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 b88c71c4a1d4eb5c24d143a0d8ddff507df690f7..205dfed388db7d022e4fd8b3f89485735d3320a8 100644
+index 0b34a90d275534a84bea7d7d9cce08b41ea7a698..e874d76437fc4c86fd4ed2d03e416dd1ff528b76 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1824,6 +1824,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
diff --git a/patches/server/0976-Add-drops-to-shear-events.patch b/patches/server/0976-Add-drops-to-shear-events.patch
index 88b61dc3d0..57405a32c2 100644
--- a/patches/server/0976-Add-drops-to-shear-events.patch
+++ b/patches/server/0976-Add-drops-to-shear-events.patch
@@ -44,10 +44,10 @@ index 5e8cc5cfac8888628c6d513148f41be09ca65a2c..2ee48ac3b665db2b02bcb1a30ec972d4
+ // Paper end - custom shear drops
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
-index 6f70d3a5a561e88a8e03d2165c71766ed09fcd41..e1f174ff0f791b20be7d6ad8e4a172d1e0c81e33 100644
+index 7243e4b95e98fda68d9e6adef0e41bebe825961a..161c128d27f50f145f88142191f1a5c93649ea65 100644
--- a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
+++ b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
-@@ -122,11 +122,18 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder<Mushroo
+@@ -123,11 +123,18 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder<Mushroo
return InteractionResult.sidedSuccess(this.level().isClientSide);
} else if (itemstack.is(Items.SHEARS) && this.readyForShearing()) {
// CraftBukkit start
@@ -69,7 +69,7 @@ index 6f70d3a5a561e88a8e03d2165c71766ed09fcd41..e1f174ff0f791b20be7d6ad8e4a172d1
this.gameEvent(GameEvent.SHEAR, player);
if (!this.level().isClientSide) {
itemstack.hurtAndBreak(1, player, (entityhuman1) -> {
-@@ -167,6 +174,22 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder<Mushroo
+@@ -168,6 +175,22 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder<Mushroo
@Override
public void shear(SoundSource shearedSoundCategory) {
@@ -92,8 +92,8 @@ index 6f70d3a5a561e88a8e03d2165c71766ed09fcd41..e1f174ff0f791b20be7d6ad8e4a172d1
this.level().playSound((Player) null, (Entity) this, SoundEvents.MOOSHROOM_SHEAR, shearedSoundCategory, 1.0F, 1.0F);
if (!this.level().isClientSide()) {
Cow entitycow = (Cow) EntityType.COW.create(this.level());
-@@ -196,17 +219,12 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder<Mushroo
- this.discard(); // CraftBukkit - from above
+@@ -197,17 +220,12 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder<Mushroo
+ this.discard(EntityRemoveEvent.Cause.TRANSFORMATION); // CraftBukkit - from above and add Bukkit remove cause
// CraftBukkit end
- for (int i = 0; i < 5; ++i) {
@@ -233,10 +233,10 @@ index 54c01fdaf507a30196fb8f38888a570f9e393559..9eab1170cb123d3b60a0231470251670
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-index 1a7c002d1a84a52d91d4753ef4d78a8688f6d6ad..347bd2482c89e06716121bd7d05941203bab2a8b 100644
+index f2f58ae16101293a7df53c32be015111baba1504..4c2e8129481384a143384d327e14320023735b1a 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
-@@ -1667,20 +1667,20 @@ public class CraftEventFactory {
+@@ -1668,20 +1668,20 @@ public class CraftEventFactory {
return event;
}
diff --git a/patches/server/0977-Add-PlayerShieldDisableEvent.patch b/patches/server/0977-Add-PlayerShieldDisableEvent.patch
index 559e3c5bc7..a02011827d 100644
--- a/patches/server/0977-Add-PlayerShieldDisableEvent.patch
+++ b/patches/server/0977-Add-PlayerShieldDisableEvent.patch
@@ -16,10 +16,10 @@ sideeffects, meaning the disable event cannot share a handlerlist with
the cooldown event
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 1721504912c9e5744f09c17d059315ee357afeb4..9ecabac9e95bb0b550260770fcc713ad82070d0b 100644
+index 4e8aee81cb9e9fe4a4e5df4e228c0314b3af486b..544e22f569d7ddeb1ba46a9ef7f4d4d6ca37c431 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -1697,7 +1697,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -1698,7 +1698,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
float f = 0.25F + (float) EnchantmentHelper.getBlockEfficiency(this) * 0.05F;
if (this.random.nextFloat() < f) {
@@ -33,10 +33,10 @@ index 1721504912c9e5744f09c17d059315ee357afeb4..9ecabac9e95bb0b550260770fcc713ad
}
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index 2a280a54bdd7e4b7f26e0b2d2da0d9d3fd432583..ade64d3af069abdb5c94895fe699ac5eee603a6e 100644
+index 020b74065f7489a46b70ac52e5abbdb22132f8d8..3e9c6e7e356ac08ec41736eaabf38714a8841d18 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -972,7 +972,7 @@ public abstract class Player extends LivingEntity {
+@@ -973,7 +973,7 @@ public abstract class Player extends LivingEntity {
protected void blockUsingShield(LivingEntity attacker) {
super.blockUsingShield(attacker);
if (attacker.canDisableShield()) {
@@ -45,7 +45,7 @@ index 2a280a54bdd7e4b7f26e0b2d2da0d9d3fd432583..ade64d3af069abdb5c94895fe699ac5e
}
}
-@@ -1455,7 +1455,14 @@ public abstract class Player extends LivingEntity {
+@@ -1456,7 +1456,14 @@ public abstract class Player extends LivingEntity {
this.attack(target);
}
@@ -60,7 +60,7 @@ index 2a280a54bdd7e4b7f26e0b2d2da0d9d3fd432583..ade64d3af069abdb5c94895fe699ac5e
float f = 0.25F + (float) EnchantmentHelper.getBlockEfficiency(this) * 0.05F;
if (sprinting) {
-@@ -1463,7 +1470,16 @@ public abstract class Player extends LivingEntity {
+@@ -1464,7 +1471,16 @@ public abstract class Player extends LivingEntity {
}
if (this.random.nextFloat() < f) {
diff --git a/patches/server/0978-Validate-ResourceLocation-in-NBT-reading.patch b/patches/server/0978-Validate-ResourceLocation-in-NBT-reading.patch
index eab18ce886..74748ab8d8 100644
--- a/patches/server/0978-Validate-ResourceLocation-in-NBT-reading.patch
+++ b/patches/server/0978-Validate-ResourceLocation-in-NBT-reading.patch
@@ -53,10 +53,10 @@ index 8ba573bb4099ee5b27b61f333e72d794c48d5f29..69bdf3f2ee731e59e8d454816a9ca72c
@Nullable
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 6502dfa62fb0e5a0e3369c62c6ad97aecced4d2b..484056cf77334818aab98ad20e99685d1e240adc 100644
+index e2e5ec647725f1f16067003ec773530d72fc5fcf..761c7136147a5c65f700daadfc370cbd13b0b455 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -871,12 +871,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -879,12 +879,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (nbt.contains("SleepingX", 99) && nbt.contains("SleepingY", 99) && nbt.contains("SleepingZ", 99)) {
BlockPos blockposition = new BlockPos(nbt.getInt("SleepingX"), nbt.getInt("SleepingY"), nbt.getInt("SleepingZ"));
@@ -72,10 +72,10 @@ index 6502dfa62fb0e5a0e3369c62c6ad97aecced4d2b..484056cf77334818aab98ad20e99685d
if (nbt.contains("Brain", 10)) {
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index 9ecabac9e95bb0b550260770fcc713ad82070d0b..fd093e5bc79a44e02f57bacd8273dc87342f5709 100644
+index 544e22f569d7ddeb1ba46a9ef7f4d4d6ca37c431..d2f5d959d3b67f7c20d0c0de462a18d667f3a84b 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -607,7 +607,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -608,7 +608,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
this.setLeftHanded(nbt.getBoolean("LeftHanded"));
if (nbt.contains("DeathLootTable", 8)) {
@@ -85,10 +85,10 @@ index 9ecabac9e95bb0b550260770fcc713ad82070d0b..fd093e5bc79a44e02f57bacd8273dc87
}
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-index 618de60680de015bc68bf95a68eda98db7bab3c5..d14eab0d83d629a4522bf3f7d789d2853eb84f06 100644
+index c30f19162e33dbe8f018b7dc66210681b6027389..e8faca6e443239968f0111519f9e5cd018ed3297 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
-@@ -560,7 +560,7 @@ public abstract class AbstractArrow extends Projectile {
+@@ -561,7 +561,7 @@ public abstract class AbstractArrow extends Projectile {
this.setCritArrow(nbt.getBoolean("crit"));
this.setPierceLevel(nbt.getByte("PierceLevel"));
if (nbt.contains("SoundEvent", 8)) {
diff --git a/patches/server/0985-Rewrite-chunk-system.patch b/patches/server/0985-Rewrite-chunk-system.patch
index a14343ab34..b9ea237e96 100644
--- a/patches/server/0985-Rewrite-chunk-system.patch
+++ b/patches/server/0985-Rewrite-chunk-system.patch
@@ -14896,10 +14896,10 @@ index 73e83d56a340f0c7dcb8ff737d621003e72c6de4..bdaf062f9b66ceab303a0807eca30134
}
diff --git a/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
new file mode 100644
-index 0000000000000000000000000000000000000000..7e8dc9e8f381abfdcce2746edc93122d623622d1
+index 0000000000000000000000000000000000000000..c78cbec447032de9fe69748591bef6be300160ed
--- /dev/null
+++ b/src/main/java/io/papermc/paper/world/ChunkEntitySlices.java
-@@ -0,0 +1,606 @@
+@@ -0,0 +1,607 @@
+package io.papermc.paper.world;
+
+import com.destroystokyo.paper.util.maplist.EntityList;
@@ -14926,6 +14926,7 @@ index 0000000000000000000000000000000000000000..7e8dc9e8f381abfdcce2746edc93122d
+import java.util.Iterator;
+import java.util.List;
+import java.util.function.Predicate;
++import org.bukkit.event.entity.EntityRemoveEvent;
+
+public final class ChunkEntitySlices {
+
@@ -15021,12 +15022,12 @@ index 0000000000000000000000000000000000000000..7e8dc9e8f381abfdcce2746edc93122d
+ continue;
+ }
+ if (entity.shouldBeSaved()) {
-+ entity.setRemoved(Entity.RemovalReason.UNLOADED_TO_CHUNK);
++ entity.setRemoved(Entity.RemovalReason.UNLOADED_TO_CHUNK, EntityRemoveEvent.Cause.UNLOAD);
+ if (entity.isVehicle()) {
+ // we cannot assume that these entities are contained within this chunk, because entities can
+ // desync - so we need to remove them all
+ for (final Entity passenger : entity.getIndirectPassengers()) {
-+ passenger.setRemoved(Entity.RemovalReason.UNLOADED_TO_CHUNK);
++ passenger.setRemoved(Entity.RemovalReason.UNLOADED_TO_CHUNK, EntityRemoveEvent.Cause.UNLOAD);
+ }
+ }
+ }
@@ -16393,7 +16394,7 @@ index 807a6bb1026dac2c4cd0a50afe06fd62ce23558b..2b998bdbe49bf8211b755e0eb7c1bf13
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 3ae47b86b80f9156e71d1da83e492153f360d1b5..5c1accb75655eadd4858ee24cdcdf9b200fbbcb2 100644
+index ee16a8ef86705dc89b1cc300c06cf683431c7ef3..4549b32a3d848e4e84334e889dbc9c6b883fe621 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -119,10 +119,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -18265,7 +18266,7 @@ index 8a118a7b2878d3c99dadfa97e2ae58fda2b3f93b..9bb4223fbb665211df11dc89fcd13cb7
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index b5d6a7eaa24d9968e159d77a4295be00332a5457..dff2dfbe9cc04894d42181c6691e27ad061beb40 100644
+index 9816913ad729fd39c173364b92e5db06a733bc55..a3881964bad0cab8f480eda634216d73dfbf7bb0 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -195,7 +195,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -19223,10 +19224,10 @@ index 13209267c26f46492a92e820889a9be0bd2287a0..f3b96a921e7d085b51da62fa5493384a
this.desiredChunksPerTick = Double.isNaN((double)desiredBatchSize) ? 0.01F : Mth.clamp(desiredBatchSize, 0.01F, 64.0F);
if (this.unacknowledgedBatches == 0) {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 16ef96f0b2f68556b89c9d732d0e1a407f083fdc..d2e65c105c38c71a6b1739b95547772511a36345 100644
+index d38fe02af4cc35ed5b22acec41bedb76151f8af5..4a569bf782bfdd870f32fe0ab5c3b8b86a07f218 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -293,7 +293,7 @@ public abstract class PlayerList {
+@@ -294,7 +294,7 @@ public abstract class PlayerList {
boolean flag2 = gamerules.getBoolean(GameRules.RULE_LIMITED_CRAFTING);
// Spigot - view distance
@@ -19235,7 +19236,7 @@ index 16ef96f0b2f68556b89c9d732d0e1a407f083fdc..d2e65c105c38c71a6b1739b955477725
player.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
playerconnection.send(new ClientboundChangeDifficultyPacket(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
playerconnection.send(new ClientboundPlayerAbilitiesPacket(player.getAbilities()));
-@@ -943,8 +943,8 @@ public abstract class PlayerList {
+@@ -944,8 +944,8 @@ public abstract class PlayerList {
LevelData worlddata = worldserver2.getLevelData();
entityplayer1.connection.send(new ClientboundRespawnPacket(entityplayer1.createCommonSpawnInfo(worldserver2), (byte) i));
@@ -19246,7 +19247,7 @@ index 16ef96f0b2f68556b89c9d732d0e1a407f083fdc..d2e65c105c38c71a6b1739b955477725
entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver2.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot())); // CraftBukkit
entityplayer1.connection.send(new ClientboundSetDefaultSpawnPositionPacket(worldserver1.getSharedSpawnPos(), worldserver1.getSharedSpawnAngle()));
entityplayer1.connection.send(new ClientboundChangeDifficultyPacket(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
-@@ -1496,7 +1496,7 @@ public abstract class PlayerList {
+@@ -1497,7 +1497,7 @@ public abstract class PlayerList {
public void setViewDistance(int viewDistance) {
this.viewDistance = viewDistance;
@@ -19255,7 +19256,7 @@ index 16ef96f0b2f68556b89c9d732d0e1a407f083fdc..d2e65c105c38c71a6b1739b955477725
Iterator iterator = this.server.getAllLevels().iterator();
while (iterator.hasNext()) {
-@@ -1511,7 +1511,7 @@ public abstract class PlayerList {
+@@ -1512,7 +1512,7 @@ public abstract class PlayerList {
public void setSimulationDistance(int simulationDistance) {
this.simulationDistance = simulationDistance;
@@ -19374,10 +19375,10 @@ index 640db9f71608310a64e09f1e3e677c01e6ccd98a..f2a7cb6ebed7a4b4019a09af2a025f62
if (flag1) {
++this.converted;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 8c42792ea5cb0fe5d1da7467875efda9be9040e1..bfc3242952fd425ab4f7cd42b21228baa6f75c87 100644
+index fe6ae6c19b07e0b4b9bbe579a2266bb84092fe72..1a91bffc016312e02408766cd9419610aca74b92 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -479,6 +479,58 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -480,6 +480,58 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
// Paper end
@@ -19436,7 +19437,7 @@ index 8c42792ea5cb0fe5d1da7467875efda9be9040e1..bfc3242952fd425ab4f7cd42b21228ba
public Entity(EntityType<?> type, Level world) {
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
this.passengers = ImmutableList.of();
-@@ -2564,11 +2616,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2577,11 +2629,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return InteractionResult.PASS;
}
@@ -19450,7 +19451,7 @@ index 8c42792ea5cb0fe5d1da7467875efda9be9040e1..bfc3242952fd425ab4f7cd42b21228ba
return false;
}
-@@ -3993,6 +4045,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4006,6 +4058,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}).count();
}
@@ -19464,7 +19465,7 @@ index 8c42792ea5cb0fe5d1da7467875efda9be9040e1..bfc3242952fd425ab4f7cd42b21228ba
public boolean hasExactlyOnePlayerPassenger() {
if (this.passengers.isEmpty()) { return false; } // Paper - Optimize indirect passenger iteration
return this.countPlayerPassengers() == 1;
-@@ -4345,6 +4404,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4358,6 +4417,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return;
}
// Paper end - Block invalid positions and bounding box
@@ -19477,10 +19478,10 @@ index 8c42792ea5cb0fe5d1da7467875efda9be9040e1..bfc3242952fd425ab4f7cd42b21228ba
// Paper start - Fix MC-4
if (this instanceof ItemEntity) {
if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.fixEntityPositionDesync) {
-@@ -4468,6 +4533,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4487,6 +4552,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@Override
- public final void setRemoved(Entity.RemovalReason reason) {
+ public final void setRemoved(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
+ // Paper start - rewrite chunk system
+ io.papermc.paper.util.TickThread.ensureTickThread(this, "Cannot remove entity off-main");
+ if (!((ServerLevel)this.level).getEntityLookup().canRemoveEntity(this)) {
@@ -19488,19 +19489,19 @@ index 8c42792ea5cb0fe5d1da7467875efda9be9040e1..bfc3242952fd425ab4f7cd42b21228ba
+ return;
+ }
+ // Paper end - rewrite chunk system
+ CraftEventFactory.callEntityRemoveEvent(this, cause);
+ // CraftBukkit end
final boolean alreadyRemoved = this.removalReason != null; // Paper - Folia schedulers
- if (this.removalReason == null) {
- this.removalReason = reason;
-@@ -4477,7 +4549,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4498,7 +4570,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.stopRiding();
}
- this.getPassengers().forEach(Entity::stopRiding);
-+ if (reason != RemovalReason.UNLOADED_TO_CHUNK) this.getPassengers().forEach(Entity::stopRiding); // Paper - chunk system - don't adjust passenger state when unloading, it's just not safe (and messes with our logic in entity chunk unload)
- this.levelCallback.onRemove(reason);
++ if (entity_removalreason != RemovalReason.UNLOADED_TO_CHUNK) this.getPassengers().forEach(Entity::stopRiding); // Paper - chunk system - don't adjust passenger state when unloading, it's just not safe (and messes with our logic in entity chunk unload)
+ this.levelCallback.onRemove(entity_removalreason);
// Paper start - Folia schedulers
- if (!(this instanceof ServerPlayer) && reason != RemovalReason.CHANGED_DIMENSION && !alreadyRemoved) {
-@@ -4508,7 +4580,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+ if (!(this instanceof ServerPlayer) && entity_removalreason != RemovalReason.CHANGED_DIMENSION && !alreadyRemoved) {
+@@ -4529,7 +4601,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
@Override
public boolean shouldBeSaved() {
@@ -19784,7 +19785,7 @@ index 57d4d2014f33a2f069d6c5aaa8e87e36b63a7177..cc888bbcd6a50124fa553bc4a8ffd1e8
<T extends Entity> List<T> getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index d5290c97babfa9415bd52deb14610821f0fa2575..c9afe29bae7f339184f4f46d8f9828f5762d0a9c 100644
+index c0ae70e3490b56aaa464460e3c41175b27136f6b..0df6572c94854526899890fba7e9da681b729f47 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -545,6 +545,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -21521,7 +21522,7 @@ index 6379f26776e2e267b84fe8f8392b53d7d89eb5ad..726aa0461bbf380989a5b51dbfdfdda2
// Paper start - implement pointers
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
-index 205dfed388db7d022e4fd8b3f89485735d3320a8..206520f6f20b2e48b1eefdd4edb26510b88e4c92 100644
+index e874d76437fc4c86fd4ed2d03e416dd1ff528b76..616d2e479d91673695ade0db151a0099b568904f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -3400,31 +3400,31 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
diff --git a/patches/server/0986-incremental-chunk-and-player-saving.patch b/patches/server/0986-incremental-chunk-and-player-saving.patch
index 8fe25f56ce..c140932b29 100644
--- a/patches/server/0986-incremental-chunk-and-player-saving.patch
+++ b/patches/server/0986-incremental-chunk-and-player-saving.patch
@@ -76,7 +76,7 @@ index 9bb4223fbb665211df11dc89fcd13cb7a92cd5dd..20cdfd2bbd5dc71fd37ccedaf3a8d06b
public void close() throws IOException {
// CraftBukkit start
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index dff2dfbe9cc04894d42181c6691e27ad061beb40..09a9452705cc8d4133940c081583d6d38d226f71 100644
+index a3881964bad0cab8f480eda634216d73dfbf7bb0..b6407dd3e5b87782503988f898bbf054e3f4e611 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1290,6 +1290,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -130,10 +130,10 @@ index 5657f1ecbadda96a79978f918393c0c9a58dca83..910c5087406837033e580ec2a23f5d30
private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10;
private static final int FLY_STAT_RECORDING_SPEED = 25;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index d2e65c105c38c71a6b1739b95547772511a36345..23443444ae0c52392bd9cdd758057437d99e376a 100644
+index 4a569bf782bfdd870f32fe0ab5c3b8b86a07f218..8a5f245fc98514b66216dde234650bfc0adc24b4 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -576,6 +576,7 @@ public abstract class PlayerList {
+@@ -577,6 +577,7 @@ public abstract class PlayerList {
protected void save(ServerPlayer player) {
if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
@@ -141,7 +141,7 @@ index d2e65c105c38c71a6b1739b95547772511a36345..23443444ae0c52392bd9cdd758057437
this.playerIo.save(player);
ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
-@@ -1227,10 +1228,22 @@ public abstract class PlayerList {
+@@ -1228,10 +1229,22 @@ public abstract class PlayerList {
}
public void saveAll() {
diff --git a/patches/server/0988-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch b/patches/server/0988-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
index 4575405a7d..811439226f 100644
--- a/patches/server/0988-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
+++ b/patches/server/0988-Improve-Maps-in-item-frames-performance-and-bug-fixe.patch
@@ -13,7 +13,7 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
Additionally, numerous issues to player position tracking on maps has been fixed.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 09a9452705cc8d4133940c081583d6d38d226f71..5f3502b148588a76079c1d9f55e4203f6de56406 100644
+index b6407dd3e5b87782503988f898bbf054e3f4e611..bd8c96e914b156284bdbb960f168e63e1f122920 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2620,6 +2620,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -25,10 +25,10 @@ index 09a9452705cc8d4133940c081583d6d38d226f71..5f3502b148588a76079c1d9f55e4203f
}
}
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
-index ade64d3af069abdb5c94895fe699ac5eee603a6e..5ca1f834f311a87323ced2578535e66efa14e47f 100644
+index 3e9c6e7e356ac08ec41736eaabf38714a8841d18..567704f61034363e48ef2a5b5566ebdc91682297 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
-@@ -789,6 +789,14 @@ public abstract class Player extends LivingEntity {
+@@ -790,6 +790,14 @@ public abstract class Player extends LivingEntity {
return null;
}
// CraftBukkit end
diff --git a/patches/server/0989-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch b/patches/server/0989-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch
index 477ac26b8f..9aded39822 100644
--- a/patches/server/0989-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch
+++ b/patches/server/0989-Strip-raytracing-for-EntityLiving-hasLineOfSight.patch
@@ -26,10 +26,10 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index c0bfce7266bbdfe0c5a753367032eb333f56c182..b64d6cd9899ab91895faeb090c5afadbbc90f09e 100644
+index 761c7136147a5c65f700daadfc370cbd13b0b455..6b58292469b5507e0e000455146a7ee1852571c5 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3738,7 +3738,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3746,7 +3746,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
Vec3 vec3d1 = new Vec3(entity.getX(), entity.getEyeY(), entity.getZ());
// Paper - diff on change - used in CraftLivingEntity#hasLineOfSight(Location) and CraftWorld#lineOfSightExists
@@ -62,7 +62,7 @@ index bb8e962e63c7a2d931f9bd7f7c002aa35cfa5fd3..0fa131a6c98adb498fc8d534e0e39647
default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) {
// Paper start - Add predicate for blocks when raytracing
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 5f98f3e1bc76076278cbe63d5fbb8ec75b3bf04b..29b6494d17bc8b9926244c286e05c821a6297f7b 100644
+index 207dd58cbceb5ac5c073526b40196f42fee77168..a798e1692141bd23f8a1d4916c5cbac2a5447d1f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -329,10 +329,87 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
diff --git a/patches/server/0994-Entity-Activation-Range-2.0.patch b/patches/server/0994-Entity-Activation-Range-2.0.patch
index 0e1d181c8b..8dc0695bb6 100644
--- a/patches/server/0994-Entity-Activation-Range-2.0.patch
+++ b/patches/server/0994-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 5f3502b148588a76079c1d9f55e4203f6de56406..4357d45305cdf82659fcc0df9fa42b1ae1029cc1 100644
+index bd8c96e914b156284bdbb960f168e63e1f122920..abb4c32e8b35de332fa517523e8c598ea3275def 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;
@@ -111,10 +111,10 @@ index 5f3502b148588a76079c1d9f55e4203f6de56406..4357d45305cdf82659fcc0df9fa42b1a
} else {
passenger.stopRiding();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 8d30abbfd805eaffc28dba9c8cc50bc6087027be..fc5be14cade9f9b6bf67e4b66d33290eeb20ff59 100644
+index 1a91bffc016312e02408766cd9419610aca74b92..48c62366bd175665eb029f040ecfbab4eb7e45fd 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -411,6 +411,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -412,6 +412,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
// Spigot end
protected int numCollisions = 0; // Paper - Cap entity collisions
public boolean fromNetherPortal; // Paper - Add option to nerf pigmen from nether portals
@@ -123,7 +123,7 @@ index 8d30abbfd805eaffc28dba9c8cc50bc6087027be..fc5be14cade9f9b6bf67e4b66d33290e
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
// Paper start - Entity origin API
@javax.annotation.Nullable
-@@ -1021,6 +1023,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1034,6 +1036,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
} else {
this.wasOnFire = this.isOnFire();
if (movementType == MoverType.PISTON) {
@@ -132,7 +132,7 @@ index 8d30abbfd805eaffc28dba9c8cc50bc6087027be..fc5be14cade9f9b6bf67e4b66d33290e
movement = this.limitPistonMovement(movement);
if (movement.equals(Vec3.ZERO)) {
return;
-@@ -1033,6 +1037,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1046,6 +1050,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.stuckSpeedMultiplier = Vec3.ZERO;
this.setDeltaMovement(Vec3.ZERO);
}
@@ -147,10 +147,10 @@ index 8d30abbfd805eaffc28dba9c8cc50bc6087027be..fc5be14cade9f9b6bf67e4b66d33290e
movement = this.maybeBackOffFromEdge(movement, movementType);
Vec3 vec3d1 = this.collide(movement);
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
-index fd093e5bc79a44e02f57bacd8273dc87342f5709..fa0b78139fecc0245e168ebeb4172ea2531a3fec 100644
+index d2f5d959d3b67f7c20d0c0de462a18d667f3a84b..2439f8d48daca7329049436414f06a36b4b79029 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
-@@ -221,6 +221,19 @@ public abstract class Mob extends LivingEntity implements Targeting {
+@@ -222,6 +222,19 @@ public abstract class Mob extends LivingEntity implements Targeting {
return this.lookControl;
}
@@ -243,10 +243,10 @@ index 9fc374c17f6b3ee4ab3c582d05e96321b772f2d6..07519c817cc6de04a98198c43a0c2b02
}
}
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-index 4a19e6b83147ae22ade70fdd445c5d7df3b07a0f..1aae466e3e334d7f4bbb3ea9365a255afcc3dd3a 100644
+index fa2569fecefb3e3af3264928a3c7a347710deedf..24044795d8e0f1fb15a4f2f5401f44897092f2a3 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
-@@ -227,17 +227,34 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
+@@ -228,17 +228,34 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@Override
public void inactiveTick() {
// SPIGOT-3874, SPIGOT-3894, SPIGOT-3846, SPIGOT-5286 :(
@@ -284,7 +284,7 @@ index 4a19e6b83147ae22ade70fdd445c5d7df3b07a0f..1aae466e3e334d7f4bbb3ea9365a255a
this.level().getProfiler().pop();
if (this.assignProfessionWhenSpawned) {
this.assignProfessionWhenSpawned = false;
-@@ -261,7 +278,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
+@@ -262,7 +279,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
this.lastTradedPlayer = null;
}
@@ -293,7 +293,7 @@ index 4a19e6b83147ae22ade70fdd445c5d7df3b07a0f..1aae466e3e334d7f4bbb3ea9365a255a
Raid raid = ((ServerLevel) this.level()).getRaidAt(this.blockPosition());
if (raid != null && raid.isActive() && !raid.isOver()) {
-@@ -272,6 +289,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
+@@ -273,6 +290,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
if (this.getVillagerData().getProfession() == VillagerProfession.NONE && this.isTrading()) {
this.stopTrading();
}
@@ -339,7 +339,7 @@ index b149e8bcac034bb3fc118a9adcb0de45e18ed5e9..fc35cfc9d045f3e5b6a50af1d0ba83b6
+
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 29b6494d17bc8b9926244c286e05c821a6297f7b..6f2515d3476f7a5da898efb3c60e8f4aaad09b06 100644
+index a798e1692141bd23f8a1d4916c5cbac2a5447d1f..1ff8eed2aceb105a41ce7ecbba6a4efd104573bd 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -157,6 +157,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
diff --git a/patches/server/0996-Anti-Xray.patch b/patches/server/0996-Anti-Xray.patch
index c1bbc40a81..65f22d8479 100644
--- a/patches/server/0996-Anti-Xray.patch
+++ b/patches/server/0996-Anti-Xray.patch
@@ -1104,7 +1104,7 @@ index 26e46d751c8f8162c2bafe2fc109fc91dc4b7c0f..6412dff5ed0505f62dd5b71ab9606257
public ClientboundLevelChunkWithLightPacket(FriendlyByteBuf buf) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index 4357d45305cdf82659fcc0df9fa42b1ae1029cc1..811c9c7970dfef290acdf0bbd803b27ca81a4767 100644
+index abb4c32e8b35de332fa517523e8c598ea3275def..6f497b95fd870a32c56590c00b2b39f88c51ecb9 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -570,7 +570,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1155,10 +1155,10 @@ index f3b96a921e7d085b51da62fa5493384a7ded1f9d..12f2bf95d3ea3d29f6b4b9ec38a92f71
if (io.papermc.paper.event.packet.PlayerChunkLoadEvent.getHandlerList().getRegisteredListeners().length > 0) {
new io.papermc.paper.event.packet.PlayerChunkLoadEvent(new org.bukkit.craftbukkit.CraftChunk(chunk), handler.getPlayer().getBukkitEntity()).callEvent();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 23443444ae0c52392bd9cdd758057437d99e376a..10f2222c95362c41cab693410d0e7bb9746f3e4d 100644
+index 8a5f245fc98514b66216dde234650bfc0adc24b4..461c27292af06a5150de8ec263d0c8527e8c5278 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -418,7 +418,7 @@ public abstract class PlayerList {
+@@ -419,7 +419,7 @@ public abstract class PlayerList {
.getHolderOrThrow(net.minecraft.world.level.biome.Biomes.PLAINS);
player.connection.send(new net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket(
new net.minecraft.world.level.chunk.EmptyLevelChunk(worldserver1, player.chunkPosition(), plains),
@@ -1168,7 +1168,7 @@ index 23443444ae0c52392bd9cdd758057437d99e376a..10f2222c95362c41cab693410d0e7bb9
}
// Paper end - Send empty chunk
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 6f2515d3476f7a5da898efb3c60e8f4aaad09b06..927c7948e567764e8cf75c7ce486e1ea6c9a8d87 100644
+index 1ff8eed2aceb105a41ce7ecbba6a4efd104573bd..29368a97c6348e2d1d6241db3d57e84b9537231a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -172,6 +172,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
diff --git a/patches/server/0998-Optimize-Collision-to-not-load-chunks.patch b/patches/server/0998-Optimize-Collision-to-not-load-chunks.patch
index 3d403ed298..b4cb81ee27 100644
--- a/patches/server/0998-Optimize-Collision-to-not-load-chunks.patch
+++ b/patches/server/0998-Optimize-Collision-to-not-load-chunks.patch
@@ -14,10 +14,10 @@ movement will load only the chunk the player enters anyways and avoids loading
massive amounts of surrounding chunks due to large AABB lookups.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 10f2222c95362c41cab693410d0e7bb9746f3e4d..d5908d63b6dd23279951f0691d55c660b3a788a8 100644
+index 461c27292af06a5150de8ec263d0c8527e8c5278..37245ff682837e7e8c9647f4afe30f0dd87cb384 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -934,6 +934,7 @@ public abstract class PlayerList {
+@@ -935,6 +935,7 @@ public abstract class PlayerList {
entityplayer1.setShiftKeyDown(false);
entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
@@ -26,10 +26,10 @@ index 10f2222c95362c41cab693410d0e7bb9746f3e4d..d5908d63b6dd23279951f0691d55c660
// CraftBukkit end
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index fc5be14cade9f9b6bf67e4b66d33290eeb20ff59..79f6cb643ca97617e25b96c73695393aed8daa6e 100644
+index 48c62366bd175665eb029f040ecfbab4eb7e45fd..87ed38858f3cea1da7a60e39da8b095b27d3a59c 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -241,6 +241,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -242,6 +242,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason; // Paper - Entity#getEntitySpawnReason
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
diff --git a/patches/server/1002-Improved-Watchdog-Support.patch b/patches/server/1002-Improved-Watchdog-Support.patch
index 0f1593abce..3614cf6564 100644
--- a/patches/server/1002-Improved-Watchdog-Support.patch
+++ b/patches/server/1002-Improved-Watchdog-Support.patch
@@ -266,10 +266,10 @@ index 27546cdf3a4d6954e7b5639ec18fcf554be4d092..68d268b6fff126e8645b6deec3fb549e
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index d5908d63b6dd23279951f0691d55c660b3a788a8..cb81990877f918a5305478b5e8ac7dde6a78f238 100644
+index 37245ff682837e7e8c9647f4afe30f0dd87cb384..594cb6ce4bfa6c42212000a1ed983ea95ee2c4bf 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -612,7 +612,7 @@ public abstract class PlayerList {
+@@ -613,7 +613,7 @@ public abstract class PlayerList {
this.cserver.getPluginManager().callEvent(playerQuitEvent);
entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
@@ -291,7 +291,7 @@ index f5829ae484d93b547a5437b85a9621346384a11b..83701fbfaa56a232593ee8f11a3afb89
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 7694b7f299495a084ce71c5d04e5e690a75fe55b..9149ddd3d950d1616ec3c85d54c494bcc6501e83 100644
+index 23643b18e9352289ddad1eb1e04d1c3ada5570ad..8485ee703f9c18557818ff735001f02e2d119604 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -935,6 +935,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
diff --git a/patches/server/1006-Use-distance-map-to-optimise-entity-tracker.patch b/patches/server/1006-Use-distance-map-to-optimise-entity-tracker.patch
index 4ec227e737..16b412633c 100644
--- a/patches/server/1006-Use-distance-map-to-optimise-entity-tracker.patch
+++ b/patches/server/1006-Use-distance-map-to-optimise-entity-tracker.patch
@@ -6,7 +6,7 @@ Subject: [PATCH] Use distance map to optimise entity tracker
Use the distance map to find candidate players for tracking.
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
-index 9037ba5197eed9d8e616fb65369f6b1a5ea9562c..7e5a8789e06a5ea1d2657ea8ee5c0460da92aaeb 100644
+index ac1a4ff5f83e53fa2983ff6e834775e51fba715e..284f9548d62f9230c668bb1adb8cb8084b7cef7c 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -146,6 +146,23 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@@ -236,7 +236,7 @@ index 9037ba5197eed9d8e616fb65369f6b1a5ea9562c..7e5a8789e06a5ea1d2657ea8ee5c0460
return object instanceof ChunkMap.TrackedEntity ? ((ChunkMap.TrackedEntity) object).entity.getId() == this.entity.getId() : false;
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index 79f6cb643ca97617e25b96c73695393aed8daa6e..c259b21f0f84974bb9ef13fa459890717c950d0b 100644
+index 87ed38858f3cea1da7a60e39da8b095b27d3a59c..d5b92dbd98b62b0afd68543222858dca5981ecbd 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -56,6 +56,7 @@ import net.minecraft.network.syncher.EntityDataSerializers;
@@ -247,7 +247,7 @@ index 79f6cb643ca97617e25b96c73695393aed8daa6e..c259b21f0f84974bb9ef13fa45989071
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
-@@ -468,6 +469,38 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -469,6 +470,38 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.teleportTo(worldserver, null);
}
// Paper end - make end portalling safe
diff --git a/patches/server/1012-Improve-boat-collision-performance.patch b/patches/server/1012-Improve-boat-collision-performance.patch
index cf6af1a4d2..2754015b1c 100644
--- a/patches/server/1012-Improve-boat-collision-performance.patch
+++ b/patches/server/1012-Improve-boat-collision-performance.patch
@@ -17,10 +17,10 @@ index edf937591abf62416bd692e40b7b7a6badbe877d..b40864e41e1506884fdefefbf3cf4833
};
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index b64d6cd9899ab91895faeb090c5afadbbc90f09e..9f7cb7a2780836c4ce5a6971e9f6004a91509490 100644
+index 6b58292469b5507e0e000455146a7ee1852571c5..5cedbe57f15024e6b1c278de1b3cf3e1fd84de06 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -1438,7 +1438,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1446,7 +1446,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!source.is(DamageTypeTags.IS_PROJECTILE)) {
Entity entity = source.getDirectEntity();
@@ -29,7 +29,7 @@ index b64d6cd9899ab91895faeb090c5afadbbc90f09e..9f7cb7a2780836c4ce5a6971e9f6004a
LivingEntity entityliving = (LivingEntity) entity;
this.blockUsingShield(entityliving);
-@@ -1532,11 +1532,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -1540,11 +1540,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
if (entity1 != null && !source.is(DamageTypeTags.NO_KNOCKBACK)) {
@@ -44,7 +44,7 @@ index b64d6cd9899ab91895faeb090c5afadbbc90f09e..9f7cb7a2780836c4ce5a6971e9f6004a
d0 = (Math.random() - Math.random()) * 0.01D;
}
-@@ -2279,7 +2280,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -2287,7 +2288,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
Entity entity = damagesource.getDirectEntity();
diff --git a/patches/server/1019-Detail-more-information-in-watchdog-dumps.patch b/patches/server/1019-Detail-more-information-in-watchdog-dumps.patch
index a132619b90..15ae686d31 100644
--- a/patches/server/1019-Detail-more-information-in-watchdog-dumps.patch
+++ b/patches/server/1019-Detail-more-information-in-watchdog-dumps.patch
@@ -76,7 +76,7 @@ index 454d0187ff8370a0d99cca051ee0a8c50b39cfb7..3e2d5dcd62775b6ed7c0ce0ba51a71b6
});
throw RunningOnDifferentThreadException.RUNNING_ON_DIFFERENT_THREAD;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index bac2e7c8178696859ff2d38f1e095d86557fc306..5eaf8585df1f885f4a08fdd06ff4bb730961e400 100644
+index 9d18da228c6709e7665ba8babb6ee6d0b36b5dc5..af9f58328c09dddb2875f79128f906b8b276ab88 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1239,7 +1239,26 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -122,10 +122,10 @@ index bac2e7c8178696859ff2d38f1e095d86557fc306..5eaf8585df1f885f4a08fdd06ff4bb73
private void tickPassenger(Entity vehicle, Entity passenger) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index dea94b8987d77bcb4c2415ed2fa14b2847f11e09..ecf53d27a924cccb7d773cea3ce0f68a41ff52f5 100644
+index d5b92dbd98b62b0afd68543222858dca5981ecbd..fd643dc96dfa46db84b8337a2c69342e9489a702 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -1050,8 +1050,43 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1063,8 +1063,43 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
return this.onGround;
}
@@ -169,7 +169,7 @@ index dea94b8987d77bcb4c2415ed2fa14b2847f11e09..ecf53d27a924cccb7d773cea3ce0f68a
if (this.noPhysics) {
this.setPos(this.getX() + movement.x, this.getY() + movement.y, this.getZ() + movement.z);
} else {
-@@ -1221,6 +1256,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1234,6 +1269,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
this.level().getProfiler().pop();
}
}
@@ -183,7 +183,7 @@ index dea94b8987d77bcb4c2415ed2fa14b2847f11e09..ecf53d27a924cccb7d773cea3ce0f68a
}
private boolean isStateClimbable(BlockState state) {
-@@ -4363,7 +4405,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4376,7 +4418,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
public void setDeltaMovement(Vec3 velocity) {
@@ -193,7 +193,7 @@ index dea94b8987d77bcb4c2415ed2fa14b2847f11e09..ecf53d27a924cccb7d773cea3ce0f68a
}
public void addDeltaMovement(Vec3 velocity) {
-@@ -4466,7 +4510,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -4479,7 +4523,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
// Paper end - Fix MC-4
if (this.position.x != x || this.position.y != y || this.position.z != z) {
diff --git a/patches/server/1020-Collision-optimisations.patch b/patches/server/1020-Collision-optimisations.patch
index a849d42f7b..09c2404343 100644
--- a/patches/server/1020-Collision-optimisations.patch
+++ b/patches/server/1020-Collision-optimisations.patch
@@ -2201,10 +2201,10 @@ index acc9858e0cf10cb2aae0554037096411a208bd05..c99d2f2d64b73179e4e27b63030e26a0
}
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index cb81990877f918a5305478b5e8ac7dde6a78f238..4816897a82c569717bf7ea139a55ab3fd931a63e 100644
+index 594cb6ce4bfa6c42212000a1ed983ea95ee2c4bf..97b0119ac71284b3a223c089bec26d87a01d3b25 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -935,7 +935,7 @@ public abstract class PlayerList {
+@@ -936,7 +936,7 @@ public abstract class PlayerList {
entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
worldserver1.getChunkSource().addRegionTicket(net.minecraft.server.level.TicketType.POST_TELEPORT, new net.minecraft.world.level.ChunkPos(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper
@@ -2214,10 +2214,10 @@ index cb81990877f918a5305478b5e8ac7dde6a78f238..4816897a82c569717bf7ea139a55ab3f
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
-index ecf53d27a924cccb7d773cea3ce0f68a41ff52f5..906eded9a2ab61737a30cfe89292a71237ce4eb7 100644
+index fd643dc96dfa46db84b8337a2c69342e9489a702..aeae9693bf985263a62225eb73a44833e5a0ca16 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
-@@ -1237,9 +1237,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1250,9 +1250,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
float f = this.getBlockSpeedFactor();
this.setDeltaMovement(this.getDeltaMovement().multiply((double) f, 1.0D, (double) f));
@@ -2265,7 +2265,7 @@ index ecf53d27a924cccb7d773cea3ce0f68a41ff52f5..906eded9a2ab61737a30cfe89292a712
if (this.remainingFireTicks <= 0) {
this.setRemainingFireTicks(-this.getFireImmuneTicks());
}
-@@ -1419,32 +1454,82 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -1432,32 +1467,82 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
}
private Vec3 collide(Vec3 movement) {
@@ -2364,7 +2364,7 @@ index ecf53d27a924cccb7d773cea3ce0f68a41ff52f5..906eded9a2ab61737a30cfe89292a712
}
public static Vec3 collideBoundingBox(@Nullable Entity entity, Vec3 movement, AABB entityBoundingBox, Level world, List<VoxelShape> collisions) {
-@@ -2691,11 +2776,70 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
+@@ -2704,11 +2789,70 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
float f = this.dimensions.width * 0.8F;
AABB axisalignedbb = AABB.ofSize(this.getEyePosition(), (double) f, 1.0E-6D, (double) f);
@@ -2440,10 +2440,10 @@ index ecf53d27a924cccb7d773cea3ce0f68a41ff52f5..906eded9a2ab61737a30cfe89292a712
}
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 6dfcc296ff7e59ecbebc5446973fabc9eff3cb43..94a30a0c1266bf919d1dc4ca2b19489edd54a7fa 100644
+index bbe299afd361a107e3936c8ea1a62067fcac9b7e..eadcebd7845ee716e33c0ac0544502da1a6c5941 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
-@@ -353,7 +353,7 @@ public class ArmorStand extends LivingEntity {
+@@ -354,7 +354,7 @@ public class ArmorStand extends LivingEntity {
@Override
protected void pushEntities() {
if (!this.level().paperConfig().entities.armorStands.doCollisionEntityLookups) return; // Paper - Option to prevent armor stands from doing entity lookups
@@ -2613,7 +2613,7 @@ index cc888bbcd6a50124fa553bc4a8ffd1e8885d3856..f42dd9602805e9d538506ee4e3eac7e2
// Paper start - Affects Spawning API
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
-index 1712cf22d987a87c427f042a89a9fff90203b079..f21f1b3fcab47f18cbf26a9797b1b7b9a5dccfc9 100644
+index 7693163f73ea2dc9cf357893e1545b11b2049aec..3afb280e401f8f1b22bf91472b0b70c4716ac95b 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -294,6 +294,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
diff --git a/patches/server/1026-Properly-resend-entities.patch b/patches/server/1026-Properly-resend-entities.patch
index 2e9f2712a0..a00f094df7 100644
--- a/patches/server/1026-Properly-resend-entities.patch
+++ b/patches/server/1026-Properly-resend-entities.patch
@@ -137,10 +137,10 @@ index a5bee627cd01d42c01751fef79d90062cc0c1603..98496bcc7ab9adde3fdc8b2cd9eaecee
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
-index 4816897a82c569717bf7ea139a55ab3fd931a63e..91feb12732564c90656da487664dbc12e55397fc 100644
+index 97b0119ac71284b3a223c089bec26d87a01d3b25..1e5f709115007ff19901c0a6c3cf884d9e4d3a6c 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
-@@ -390,7 +390,7 @@ public abstract class PlayerList {
+@@ -391,7 +391,7 @@ public abstract class PlayerList {
((ServerLevel)player.level()).getChunkSource().chunkMap.addEntity(player); // Paper - Fire PlayerJoinEvent when Player is actually ready; track entity now
// CraftBukkit end
@@ -150,10 +150,10 @@ index 4816897a82c569717bf7ea139a55ab3fd931a63e..91feb12732564c90656da487664dbc12
this.sendLevelInfo(player, worldserver1);
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-index 39609270c5249754783c22526c02672cd4b3b61e..e4c019b88b5605b85f758c85636aa7e6063c6377 100644
+index 5cedbe57f15024e6b1c278de1b3cf3e1fd84de06..34e06b4f534215f7eead54a3b0467fd5e2d478db 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3836,6 +3836,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3844,6 +3844,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
return ((Byte) this.entityData.get(LivingEntity.DATA_LIVING_ENTITY_FLAGS) & 2) > 0 ? InteractionHand.OFF_HAND : InteractionHand.MAIN_HAND;
}
@@ -166,10 +166,10 @@ index 39609270c5249754783c22526c02672cd4b3b61e..e4c019b88b5605b85f758c85636aa7e6
if (this.isUsingItem()) {
if (ItemStack.isSameItem(this.getItemInHand(this.getUsedItemHand()), this.useItem)) {
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bucketable.java b/src/main/java/net/minecraft/world/entity/animal/Bucketable.java
-index 37596c7b65f280be00e8e59ae18bd1aceae21080..eca18540aeb0b0d4098477d73b14c78a7bf9f455 100644
+index a1bfd700cd4c39e4bb1b9c140b54b7c82cd8b32c..205b52e486123aa23a1469de896ab1ec2e70ca13 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Bucketable.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Bucketable.java
-@@ -109,8 +109,7 @@ public interface Bucketable {
+@@ -110,8 +110,7 @@ public interface Bucketable {
itemstack1 = CraftItemStack.asNMSCopy(playerBucketFishEvent.getEntityBucket());
if (playerBucketFishEvent.isCancelled()) {
((ServerPlayer) player).containerMenu.sendAllDataToRemote(); // We need to update inventory to resync client's bucket
@@ -180,10 +180,10 @@ index 37596c7b65f280be00e8e59ae18bd1aceae21080..eca18540aeb0b0d4098477d73b14c78a
}
entity.playSound(((Bucketable) entity).getPickupSound(), 1.0F, 1.0F);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-index 44dd60c1f31b578e7630673433f3850f392b7a0d..8698104e3eb98e2cc5da5de87a8f538860c1d91d 100644
+index 9f657dc4075ce01c3a8f871c4a60e5ca5d8eb535..0b5a31477e3b76833fb97a455842316193663c8e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
-@@ -999,7 +999,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
+@@ -1000,7 +1000,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
return;
}
diff --git a/patches/server/1027-Optimize-Hoppers.patch b/patches/server/1027-Optimize-Hoppers.patch
index 74069c3d7c..14afff5a29 100644
--- a/patches/server/1027-Optimize-Hoppers.patch
+++ b/patches/server/1027-Optimize-Hoppers.patch
@@ -105,10 +105,10 @@ index 20201430ee8f28245aa845acb172d0f5d80458ff..9ea74d37cd951e0dc76d20ed8234b587
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
-index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea11feebfb2 100644
+index 4dda44608320c2a872b23053a1c3de63b79741c2..757edf74751dc7183454656fda9cecc4eb601e4c 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java
-@@ -151,6 +151,43 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -152,6 +152,43 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
}
@@ -152,7 +152,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
private static boolean tryMoveItems(Level world, BlockPos pos, BlockState state, HopperBlockEntity blockEntity, BooleanSupplier booleansupplier) {
if (world.isClientSide) {
return false;
-@@ -158,11 +195,13 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -159,11 +196,13 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
if (!blockEntity.isOnCooldown() && (Boolean) state.getValue(HopperBlock.ENABLED)) {
boolean flag = false;
@@ -168,7 +168,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
flag |= booleansupplier.getAsBoolean();
}
-@@ -193,6 +232,202 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -194,6 +233,202 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
return false;
}
@@ -371,7 +371,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
private static boolean ejectItems(Level world, BlockPos blockposition, BlockState iblockdata, Container iinventory, HopperBlockEntity hopper) { // CraftBukkit
Container iinventory1 = HopperBlockEntity.getAttachedContainer(world, blockposition, iblockdata);
-@@ -204,46 +439,49 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -205,46 +440,49 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
if (HopperBlockEntity.isFullContainer(iinventory1, enumdirection)) {
return false;
} else {
@@ -457,7 +457,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
}
}
}
-@@ -253,17 +491,29 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -254,17 +492,29 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
}
private static boolean isFullContainer(Container inventory, Direction direction) {
@@ -495,7 +495,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
}
public static boolean suckInItems(Level world, Hopper hopper) {
-@@ -272,9 +522,33 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -273,9 +523,33 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
if (iinventory != null) {
Direction enumdirection = Direction.DOWN;
@@ -532,7 +532,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
} else {
Iterator iterator = HopperBlockEntity.getItemsAtAndAbove(world, hopper).iterator();
-@@ -292,48 +566,52 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -293,48 +567,52 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
}
}
@@ -624,7 +624,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
}
return false;
-@@ -342,12 +620,14 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -343,12 +621,14 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
public static boolean addItem(Container inventory, ItemEntity itemEntity) {
boolean flag = false;
// CraftBukkit start
@@ -640,7 +640,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
ItemStack itemstack = itemEntity.getItem().copy();
ItemStack itemstack1 = HopperBlockEntity.addItem((Container) null, inventory, itemstack, (Direction) null);
-@@ -443,7 +723,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -444,7 +724,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
stack = stack.split(to.getMaxStackSize());
}
// Spigot end
@@ -650,7 +650,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
stack = leftover; // Paper - Make hoppers respect inventory max stack size
flag = true;
} else if (HopperBlockEntity.canMergeItems(itemstack1, stack)) {
-@@ -517,19 +799,47 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -518,19 +800,47 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
// CraftBukkit end
}
@@ -702,7 +702,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
Object object = null;
BlockPos blockposition = BlockPos.containing(x, y, z);
if ( !world.spigotConfig.hopperCanLoadChunks && !world.hasChunkAt( blockposition ) ) return null; // Spigot
-@@ -549,8 +859,8 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -550,8 +860,8 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
}
}
@@ -713,7 +713,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
if (!list.isEmpty()) {
object = (Container) list.get(world.random.nextInt(list.size()));
-@@ -561,7 +871,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
+@@ -562,7 +872,7 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
}
private static boolean canMergeItems(ItemStack first, ItemStack second) {
@@ -723,7 +723,7 @@ index 321d30f1c0d3838b9c3d210eedb03aa59e0761d8..a61d7cd2b078fe511ff00344197b6ea1
@Override
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
-index 7cbd403f9e96e7ce35475c8102cd9f9c04819c27..a94300a457b25f0e33a8eeabba6dd5720ca9ab1e 100644
+index e4e827a57c2913c719282cc0d5da33586607677b..f52ccd4f3e062af3c7cc6eaea5b074a3bbd21690 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
@@ -93,12 +93,19 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
diff --git a/patches/server/1031-Lag-compensation-ticks.patch b/patches/server/1031-Lag-compensation-ticks.patch
index 80f5630720..abff0e0dc9 100644
--- a/patches/server/1031-Lag-compensation-ticks.patch
+++ b/patches/server/1031-Lag-compensation-ticks.patch
@@ -28,7 +28,7 @@ index f12bf36a247a47b8d831536a4fefd2a2ce424494..d06185566b447c432d4dc2e3ba04d121
this.profiler.push(() -> {
return worldserver + " " + worldserver.dimension().location();
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
-index ab2e84f85da7931e133ad5f0d2686cd1738f6ea1..5bbfb1af24e13a9e6a02ad8c36bb504a17f06398 100644
+index c9405cbea1202e5603dde42637cf2a78592b92e1..8a5abc320137d045acba0c87cef9f2912d78b6fb 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -565,6 +565,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -63,10 +63,10 @@ index ef3048a4748113538a0ee0af5b526b2cd51d5c29..a7b217ddbcbf92513bd38101fdfca207
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 578141c88eccaf1c8fd830d8166176f9dab8ed04..902c0e7f2a167845f46adef4578bc71ca8cabfe8 100644
+index 34e06b4f534215f7eead54a3b0467fd5e2d478db..23570a0b1227a840b9c1e6ae326827ea655bb5f7 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
-@@ -3841,6 +3841,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3849,6 +3849,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.getEntityData().resendPossiblyDesyncedDataValues(java.util.List.of(DATA_LIVING_ENTITY_FLAGS), serverPlayer);
}
// Paper end - Properly cancel usable items
@@ -77,7 +77,7 @@ index 578141c88eccaf1c8fd830d8166176f9dab8ed04..902c0e7f2a167845f46adef4578bc71c
private void updatingUsingItem() {
if (this.isUsingItem()) {
if (ItemStack.isSameItem(this.getItemInHand(this.getUsedItemHand()), this.useItem)) {
-@@ -3859,7 +3863,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3867,7 +3871,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.triggerItemUseEffects(stack, 5);
}
@@ -91,7 +91,7 @@ index 578141c88eccaf1c8fd830d8166176f9dab8ed04..902c0e7f2a167845f46adef4578bc71c
this.completeUsingItem();
}
-@@ -3907,7 +3916,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3915,7 +3924,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper - Prevent consuming the wrong itemstack
this.useItem = itemstack;
@@ -103,7 +103,7 @@ index 578141c88eccaf1c8fd830d8166176f9dab8ed04..902c0e7f2a167845f46adef4578bc71c
if (!this.level().isClientSide) {
this.setLivingEntityFlag(1, true);
this.setLivingEntityFlag(2, hand == InteractionHand.OFF_HAND);
-@@ -3932,7 +3944,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -3940,7 +3952,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
} else if (!this.isUsingItem() && !this.useItem.isEmpty()) {
this.useItem = ItemStack.EMPTY;
@@ -115,7 +115,7 @@ index 578141c88eccaf1c8fd830d8166176f9dab8ed04..902c0e7f2a167845f46adef4578bc71c
}
}
-@@ -4067,7 +4082,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
+@@ -4075,7 +4090,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
}
this.useItem = ItemStack.EMPTY;
diff --git a/patches/server/1039-Improve-tag-parser-handling.patch b/patches/server/1039-Improve-tag-parser-handling.patch
index e57cd51b7b..7be702c88c 100644
--- a/patches/server/1039-Improve-tag-parser-handling.patch
+++ b/patches/server/1039-Improve-tag-parser-handling.patch
@@ -122,6 +122,51 @@ index 5bec54239a2b185284c10d58854e5a13e33daae5..94cb73e7f60171aa57bd1dbe7e91ef4d
+ }
+ }
}
+diff --git a/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java b/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
+index d45e39bc009281c298f3dfae113dc87f2b3b1fbd..084ffde43447f6ff5e45e9fe3fc6a86bde65fd5a 100644
+--- a/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
++++ b/src/main/java/net/minecraft/network/chat/contents/TranslatableContents.java
+@@ -197,6 +197,15 @@ public class TranslatableContents implements ComponentContents {
+
+ @Override
+ public <T> Optional<T> visit(FormattedText.ContentConsumer<T> visitor) {
++ // Paper start
++ try {
++ return this.visit(new TranslatableContentConsumer<>(visitor));
++ } catch (IllegalArgumentException var5) {
++ return Optional.empty();
++ }
++ }
++ private <T> Optional<T> visit(TranslatableContentConsumer<T> visitor) {
++ // Paper end
+ this.decompose();
+
+ for(FormattedText formattedText : this.decomposedParts) {
+@@ -208,6 +217,24 @@ public class TranslatableContents implements ComponentContents {
+
+ return Optional.empty();
+ }
++ // Paper start
++ private static final class TranslatableContentConsumer<T> implements FormattedText.ContentConsumer<T> {
++ private final FormattedText.ContentConsumer<T> visitor;
++ private int visited;
++
++ private TranslatableContentConsumer(FormattedText.ContentConsumer<T> visitor) {
++ this.visitor = visitor;
++ }
++
++ @Override
++ public Optional<T> accept(final String asString) {
++ if (visited++ > 32) {
++ throw new IllegalArgumentException("Too long");
++ }
++ return this.visitor.accept(asString);
++ }
++ }
++ // Paper end
+
+ @Override
+ public MutableComponent resolve(@Nullable CommandSourceStack source, @Nullable Entity sender, int depth) throws CommandSyntaxException {
diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundCommandSuggestionPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundCommandSuggestionPacket.java
index a5e438a834826161c52ca9db57d234d9ff80a591..4766994cce060564370b0d24836a7da8b5e4a8a1 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ServerboundCommandSuggestionPacket.java
@@ -136,7 +181,7 @@ index a5e438a834826161c52ca9db57d234d9ff80a591..4766994cce060564370b0d24836a7da8
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
-index 2f9c62f2c4c4356a896f7004b77f12a595f9c6dc..ab5b259d8f72022c875cae73be25fe2da346c6b3 100644
+index 98496bcc7ab9adde3fdc8b2cd9eaeceee99e28b4..87e5ee042ab2c052d25ab4c2521a68cf2e2d67b6 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -777,6 +777,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
diff --git a/work/Bukkit b/work/Bukkit
-Subproject 58ce1b0f157c419bab3c256659a7e632f91aeb2
+Subproject 9a80d38c002509a4849c5e5f735dca9f9b5731e
diff --git a/work/CraftBukkit b/work/CraftBukkit
-Subproject 38fd4bd5034e9adcc0a3122e43eb8d0273d1bc5
+Subproject 98b6c1ac7d4698ded83d96217861b071e519b30
diff --git a/work/Spigot b/work/Spigot
-Subproject c198da22a814a0ba9c3128c3a9946286e0839b5
+Subproject e9ec54852f825ba470576cd1b5a33b0d76091fb