diff --git a/build-data/dev-imports.txt b/build-data/dev-imports.txt index 286aeeaaa9..bed1af5647 100644 --- a/build-data/dev-imports.txt +++ b/build-data/dev-imports.txt @@ -9,3 +9,4 @@ # minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter # minecraft net/minecraft/world/level/entity/LevelEntityGetter.java + diff --git a/patches/unapplied/api/0093-Add-method-to-open-already-placed-sign.patch b/patches/api/0093-Add-method-to-open-already-placed-sign.patch similarity index 100% rename from patches/unapplied/api/0093-Add-method-to-open-already-placed-sign.patch rename to patches/api/0093-Add-method-to-open-already-placed-sign.patch diff --git a/patches/unapplied/api/0094-Add-Ban-Methods-to-Player-Objects.patch b/patches/api/0094-Add-Ban-Methods-to-Player-Objects.patch similarity index 98% rename from patches/unapplied/api/0094-Add-Ban-Methods-to-Player-Objects.patch rename to patches/api/0094-Add-Ban-Methods-to-Player-Objects.patch index 3e729be1ac..3df77467f4 100644 --- a/patches/unapplied/api/0094-Add-Ban-Methods-to-Player-Objects.patch +++ b/patches/api/0094-Add-Ban-Methods-to-Player-Objects.patch @@ -74,7 +74,7 @@ index 58313929f81509030216a0e5e3869da63e11108e..6cf05fed701c67a2c797a4e0839c7958 /** * Checks if this player is whitelisted or not diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java -index b2fdf015b8a86ca96eb5c92aa85d7e36ee21aaad..83bd47744d3e056264e6bf024b45cc86fcd5ea42 100644 +index 0dabd6f69e85b21f7ec6e6a2ac46d7fc58af24f6..ac529faeb4e4be2e62228cc931a793f2ff0a28af 100644 --- a/src/main/java/org/bukkit/entity/Player.java +++ b/src/main/java/org/bukkit/entity/Player.java @@ -5,6 +5,10 @@ import java.util.UUID; diff --git a/patches/unapplied/api/0095-EndermanEscapeEvent.patch b/patches/api/0095-EndermanEscapeEvent.patch similarity index 100% rename from patches/unapplied/api/0095-EndermanEscapeEvent.patch rename to patches/api/0095-EndermanEscapeEvent.patch diff --git a/patches/unapplied/api/0096-Enderman.teleportRandomly.patch b/patches/api/0096-Enderman.teleportRandomly.patch similarity index 100% rename from patches/unapplied/api/0096-Enderman.teleportRandomly.patch rename to patches/api/0096-Enderman.teleportRandomly.patch diff --git a/patches/unapplied/api/0097-Additional-world.getNearbyEntities-API-s.patch b/patches/api/0097-Additional-world.getNearbyEntities-API-s.patch similarity index 99% rename from patches/unapplied/api/0097-Additional-world.getNearbyEntities-API-s.patch rename to patches/api/0097-Additional-world.getNearbyEntities-API-s.patch index eb246ae5da..fb76008797 100644 --- a/patches/unapplied/api/0097-Additional-world.getNearbyEntities-API-s.patch +++ b/patches/api/0097-Additional-world.getNearbyEntities-API-s.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Additional world.getNearbyEntities API's Provides more methods to get nearby entities, and filter by types and predicates diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 98c74a6b4f126f2a3e65f95e55561f652c10c4b9..8e434b7048cd650245c6b522807e2f8a6dc497e9 100644 +index cec39714294127478b6e73452354ba7ccab78b25..e8b94ae777cad907dbb31c9ea5a3c1690b178777 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1,6 +1,9 @@ diff --git a/patches/unapplied/api/0098-Location.isChunkLoaded-API.patch b/patches/api/0098-Location.isChunkLoaded-API.patch similarity index 100% rename from patches/unapplied/api/0098-Location.isChunkLoaded-API.patch rename to patches/api/0098-Location.isChunkLoaded-API.patch diff --git a/patches/unapplied/api/0099-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/api/0099-Expand-World.spawnParticle-API-and-add-Builder.patch similarity index 99% rename from patches/unapplied/api/0099-Expand-World.spawnParticle-API-and-add-Builder.patch rename to patches/api/0099-Expand-World.spawnParticle-API-and-add-Builder.patch index 86fa493562..19ec3dbdc4 100644 --- a/patches/unapplied/api/0099-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/api/0099-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -522,7 +522,7 @@ index dc5142460a711ee79aed30276382b92c82cbef00..40a3a54fc82252692fc8710cabb243d0 * Options which can be applied to redstone dust particles - a particle * color and size. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index fbf8eb17630dfc43be8cf7ba92193e3da8aad1a4..73d0e05c7f8dbab81cdaacb8111fc4681a631ad3 100644 +index e8b94ae777cad907dbb31c9ea5a3c1690b178777..6156fb9827400cb6c1c0a96e0b6fed180a12d610 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -2637,7 +2637,57 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient diff --git a/patches/unapplied/api/0100-EndermanAttackPlayerEvent.patch b/patches/api/0100-EndermanAttackPlayerEvent.patch similarity index 100% rename from patches/unapplied/api/0100-EndermanAttackPlayerEvent.patch rename to patches/api/0100-EndermanAttackPlayerEvent.patch diff --git a/patches/unapplied/api/0101-Close-Plugin-Class-Loaders-on-Disable.patch b/patches/api/0101-Close-Plugin-Class-Loaders-on-Disable.patch similarity index 100% rename from patches/unapplied/api/0101-Close-Plugin-Class-Loaders-on-Disable.patch rename to patches/api/0101-Close-Plugin-Class-Loaders-on-Disable.patch diff --git a/patches/unapplied/api/0102-WitchConsumePotionEvent.patch b/patches/api/0102-WitchConsumePotionEvent.patch similarity index 100% rename from patches/unapplied/api/0102-WitchConsumePotionEvent.patch rename to patches/api/0102-WitchConsumePotionEvent.patch diff --git a/patches/unapplied/api/0103-WitchThrowPotionEvent.patch b/patches/api/0103-WitchThrowPotionEvent.patch similarity index 100% rename from patches/unapplied/api/0103-WitchThrowPotionEvent.patch rename to patches/api/0103-WitchThrowPotionEvent.patch diff --git a/patches/unapplied/api/0104-Location.toBlockLocation-toCenterLocation.patch b/patches/api/0104-Location.toBlockLocation-toCenterLocation.patch similarity index 100% rename from patches/unapplied/api/0104-Location.toBlockLocation-toCenterLocation.patch rename to patches/api/0104-Location.toBlockLocation-toCenterLocation.patch diff --git a/patches/unapplied/api/0105-PotionEffect-clone-methods.patch b/patches/api/0105-PotionEffect-clone-methods.patch similarity index 100% rename from patches/unapplied/api/0105-PotionEffect-clone-methods.patch rename to patches/api/0105-PotionEffect-clone-methods.patch diff --git a/patches/unapplied/api/0106-WitchReadyPotionEvent.patch b/patches/api/0106-WitchReadyPotionEvent.patch similarity index 100% rename from patches/unapplied/api/0106-WitchReadyPotionEvent.patch rename to patches/api/0106-WitchReadyPotionEvent.patch diff --git a/patches/unapplied/api/0107-ItemStack-getMaxItemUseDuration.patch b/patches/api/0107-ItemStack-getMaxItemUseDuration.patch similarity index 100% rename from patches/unapplied/api/0107-ItemStack-getMaxItemUseDuration.patch rename to patches/api/0107-ItemStack-getMaxItemUseDuration.patch diff --git a/patches/unapplied/api/0108-Add-EntityTeleportEndGatewayEvent.patch b/patches/api/0108-Add-EntityTeleportEndGatewayEvent.patch similarity index 100% rename from patches/unapplied/api/0108-Add-EntityTeleportEndGatewayEvent.patch rename to patches/api/0108-Add-EntityTeleportEndGatewayEvent.patch diff --git a/patches/unapplied/api/0109-Make-shield-blocking-delay-configurable.patch b/patches/api/0109-Make-shield-blocking-delay-configurable.patch similarity index 100% rename from patches/unapplied/api/0109-Make-shield-blocking-delay-configurable.patch rename to patches/api/0109-Make-shield-blocking-delay-configurable.patch diff --git a/patches/unapplied/api/0110-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch b/patches/api/0110-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch similarity index 100% rename from patches/unapplied/api/0110-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch rename to patches/api/0110-EntityShootBowEvent-consumeArrow-and-getArrowItem-AP.patch diff --git a/patches/unapplied/api/0111-Add-getNearbyXXX-methods-to-Location.patch b/patches/api/0111-Add-getNearbyXXX-methods-to-Location.patch similarity index 100% rename from patches/unapplied/api/0111-Add-getNearbyXXX-methods-to-Location.patch rename to patches/api/0111-Add-getNearbyXXX-methods-to-Location.patch diff --git a/patches/unapplied/api/0112-PlayerReadyArrowEvent.patch b/patches/api/0112-PlayerReadyArrowEvent.patch similarity index 100% rename from patches/unapplied/api/0112-PlayerReadyArrowEvent.patch rename to patches/api/0112-PlayerReadyArrowEvent.patch diff --git a/patches/unapplied/api/0113-Add-EntityKnockbackByEntityEvent.patch b/patches/api/0113-Add-EntityKnockbackByEntityEvent.patch similarity index 100% rename from patches/unapplied/api/0113-Add-EntityKnockbackByEntityEvent.patch rename to patches/api/0113-Add-EntityKnockbackByEntityEvent.patch diff --git a/patches/unapplied/api/0114-Expand-Explosions-API.patch b/patches/api/0114-Expand-Explosions-API.patch similarity index 98% rename from patches/unapplied/api/0114-Expand-Explosions-API.patch rename to patches/api/0114-Expand-Explosions-API.patch index 0895fe036e..84037c50b3 100644 --- a/patches/unapplied/api/0114-Expand-Explosions-API.patch +++ b/patches/api/0114-Expand-Explosions-API.patch @@ -106,7 +106,7 @@ index bbc636baef2e2b0586c7d517be428438ca26ab66..a8d4f7972d07ddde171b4a1ec470a4c6 * Returns a list of entities within a bounding box centered around a Location. * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 8ed7fadf1375b80b338e2493405a41957b104b8e..2bc0d5d6c81c21fd2c9318e968c3807f3e5474e0 100644 +index 6156fb9827400cb6c1c0a96e0b6fed180a12d610..1e29c0e69973a1f7422852a04f97a6e7c19a3e54 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1419,6 +1419,88 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient diff --git a/patches/unapplied/api/0115-ItemStack-API-additions-for-quantity-flags-lore.patch b/patches/api/0115-ItemStack-API-additions-for-quantity-flags-lore.patch similarity index 100% rename from patches/unapplied/api/0115-ItemStack-API-additions-for-quantity-flags-lore.patch rename to patches/api/0115-ItemStack-API-additions-for-quantity-flags-lore.patch diff --git a/patches/unapplied/api/0116-LivingEntity-Hand-Raised-Item-Use-API.patch b/patches/api/0116-LivingEntity-Hand-Raised-Item-Use-API.patch similarity index 100% rename from patches/unapplied/api/0116-LivingEntity-Hand-Raised-Item-Use-API.patch rename to patches/api/0116-LivingEntity-Hand-Raised-Item-Use-API.patch diff --git a/patches/unapplied/api/0117-RangedEntity-API.patch b/patches/api/0117-RangedEntity-API.patch similarity index 100% rename from patches/unapplied/api/0117-RangedEntity-API.patch rename to patches/api/0117-RangedEntity-API.patch diff --git a/patches/unapplied/api/0118-Add-World.getEntity-UUID-API.patch b/patches/api/0118-Add-World.getEntity-UUID-API.patch similarity index 91% rename from patches/unapplied/api/0118-Add-World.getEntity-UUID-API.patch rename to patches/api/0118-Add-World.getEntity-UUID-API.patch index 92a50173ce..3b72619681 100644 --- a/patches/unapplied/api/0118-Add-World.getEntity-UUID-API.patch +++ b/patches/api/0118-Add-World.getEntity-UUID-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index 2bc0d5d6c81c21fd2c9318e968c3807f3e5474e0..e0c2ce5ad528ee1dd6293d0ed5ac3d6474c6d106 100644 +index 1e29c0e69973a1f7422852a04f97a6e7c19a3e54..91755d27b84abad516d891d4b0b7869124cb263e 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -939,6 +939,17 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient diff --git a/patches/unapplied/api/0119-InventoryCloseEvent-Reason-API.patch b/patches/api/0119-InventoryCloseEvent-Reason-API.patch similarity index 100% rename from patches/unapplied/api/0119-InventoryCloseEvent-Reason-API.patch rename to patches/api/0119-InventoryCloseEvent-Reason-API.patch diff --git a/patches/unapplied/api/0120-Allow-setting-the-vex-s-summoner.patch b/patches/api/0120-Allow-setting-the-vex-s-summoner.patch similarity index 100% rename from patches/unapplied/api/0120-Allow-setting-the-vex-s-summoner.patch rename to patches/api/0120-Allow-setting-the-vex-s-summoner.patch diff --git a/patches/unapplied/api/0121-Entity-getChunk-API.patch b/patches/api/0121-Entity-getChunk-API.patch similarity index 92% rename from patches/unapplied/api/0121-Entity-getChunk-API.patch rename to patches/api/0121-Entity-getChunk-API.patch index 87ce3a6577..673e8353a4 100644 --- a/patches/unapplied/api/0121-Entity-getChunk-API.patch +++ b/patches/api/0121-Entity-getChunk-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Entity#getChunk API Get the chunk the entity is currently registered to diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java -index d794ed97bd14c67584af9190bad7d0cd07001b05..0f1e456c8b278d0fb45871e6f57baf2c6234ed51 100644 +index 71f519b8f03d2a52f2c5a9283a18c74c1ca52328..c0d6dc1b584c34c541bf9a2549016b4e29818d45 100644 --- a/src/main/java/org/bukkit/entity/Entity.java +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -3,6 +3,7 @@ package org.bukkit.entity; diff --git a/patches/unapplied/api/0122-Add-an-asterisk-to-legacy-API-plugins.patch b/patches/api/0122-Add-an-asterisk-to-legacy-API-plugins.patch similarity index 97% rename from patches/unapplied/api/0122-Add-an-asterisk-to-legacy-API-plugins.patch rename to patches/api/0122-Add-an-asterisk-to-legacy-API-plugins.patch index d768a18607..8a902c9104 100644 --- a/patches/unapplied/api/0122-Add-an-asterisk-to-legacy-API-plugins.patch +++ b/patches/api/0122-Add-an-asterisk-to-legacy-API-plugins.patch @@ -45,7 +45,7 @@ index 4de959bbd1270d7d6ea8e5e69521bcca6abe2138..1aa58c59e1e8738bbdc77752885ff3b1 if (plugin.getDescription().getProvides().size() > 0) { pluginList.append(" (").append(String.join(", ", plugin.getDescription().getProvides())).append(")"); diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 816c2b1797447ab315ceb6eda89d25f27d2bce98..f26303315c9c93356f0b04440136855dd54d32b7 100644 +index 7483ceff298cafa244bd99316a0338aa075267d4..4e8e828e70a9dde41d274440bef9d7c72f5891b3 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -306,7 +306,14 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/patches/unapplied/api/0123-EnderDragon-Events.patch b/patches/api/0123-EnderDragon-Events.patch similarity index 100% rename from patches/unapplied/api/0123-EnderDragon-Events.patch rename to patches/api/0123-EnderDragon-Events.patch diff --git a/patches/unapplied/api/0124-PlayerElytraBoostEvent.patch b/patches/api/0124-PlayerElytraBoostEvent.patch similarity index 100% rename from patches/unapplied/api/0124-PlayerElytraBoostEvent.patch rename to patches/api/0124-PlayerElytraBoostEvent.patch diff --git a/patches/unapplied/api/0125-PlayerLaunchProjectileEvent.patch b/patches/api/0125-PlayerLaunchProjectileEvent.patch similarity index 100% rename from patches/unapplied/api/0125-PlayerLaunchProjectileEvent.patch rename to patches/api/0125-PlayerLaunchProjectileEvent.patch diff --git a/patches/unapplied/api/0126-EntityTransformedEvent.patch b/patches/api/0126-EntityTransformedEvent.patch similarity index 100% rename from patches/unapplied/api/0126-EntityTransformedEvent.patch rename to patches/api/0126-EntityTransformedEvent.patch diff --git a/patches/unapplied/api/0127-Allow-disabling-armour-stand-ticking.patch b/patches/api/0127-Allow-disabling-armour-stand-ticking.patch similarity index 100% rename from patches/unapplied/api/0127-Allow-disabling-armour-stand-ticking.patch rename to patches/api/0127-Allow-disabling-armour-stand-ticking.patch diff --git a/patches/unapplied/api/0128-SkeletonHorse-Additions.patch b/patches/api/0128-SkeletonHorse-Additions.patch similarity index 100% rename from patches/unapplied/api/0128-SkeletonHorse-Additions.patch rename to patches/api/0128-SkeletonHorse-Additions.patch diff --git a/patches/unapplied/api/0129-Expand-Location-Manipulation-API.patch b/patches/api/0129-Expand-Location-Manipulation-API.patch similarity index 100% rename from patches/unapplied/api/0129-Expand-Location-Manipulation-API.patch rename to patches/api/0129-Expand-Location-Manipulation-API.patch diff --git a/patches/unapplied/api/0130-Expand-ArmorStand-API.patch b/patches/api/0130-Expand-ArmorStand-API.patch similarity index 100% rename from patches/unapplied/api/0130-Expand-ArmorStand-API.patch rename to patches/api/0130-Expand-ArmorStand-API.patch diff --git a/patches/unapplied/api/0131-AnvilDamageEvent.patch b/patches/api/0131-AnvilDamageEvent.patch similarity index 100% rename from patches/unapplied/api/0131-AnvilDamageEvent.patch rename to patches/api/0131-AnvilDamageEvent.patch diff --git a/patches/unapplied/api/0132-Remove-deadlock-risk-in-firing-async-events.patch b/patches/api/0132-Remove-deadlock-risk-in-firing-async-events.patch similarity index 100% rename from patches/unapplied/api/0132-Remove-deadlock-risk-in-firing-async-events.patch rename to patches/api/0132-Remove-deadlock-risk-in-firing-async-events.patch diff --git a/patches/unapplied/api/0133-Add-hand-to-bucket-events.patch b/patches/api/0133-Add-hand-to-bucket-events.patch similarity index 100% rename from patches/unapplied/api/0133-Add-hand-to-bucket-events.patch rename to patches/api/0133-Add-hand-to-bucket-events.patch diff --git a/patches/unapplied/api/0134-Add-TNTPrimeEvent.patch b/patches/api/0134-Add-TNTPrimeEvent.patch similarity index 100% rename from patches/unapplied/api/0134-Add-TNTPrimeEvent.patch rename to patches/api/0134-Add-TNTPrimeEvent.patch diff --git a/patches/unapplied/api/0135-Provide-Chunk-Coordinates-as-a-Long-API.patch b/patches/api/0135-Provide-Chunk-Coordinates-as-a-Long-API.patch similarity index 96% rename from patches/unapplied/api/0135-Provide-Chunk-Coordinates-as-a-Long-API.patch rename to patches/api/0135-Provide-Chunk-Coordinates-as-a-Long-API.patch index 735997749a..5fe8a00b91 100644 --- a/patches/unapplied/api/0135-Provide-Chunk-Coordinates-as-a-Long-API.patch +++ b/patches/api/0135-Provide-Chunk-Coordinates-as-a-Long-API.patch @@ -44,7 +44,7 @@ index 5fd6030b2693d793951ed632ad4870e1a6f909aa..40ddeb7abd49eeece531a8e90b4508f3 * Gets the world containing this chunk * diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java -index e0c2ce5ad528ee1dd6293d0ed5ac3d6474c6d106..33558b6acc861f8b9986122c7c553f9dde22a45d 100644 +index 91755d27b84abad516d891d4b0b7869124cb263e..d3d0e4448135f6c0440c15e0dd3fc15c2616263a 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -207,6 +207,22 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient diff --git a/patches/unapplied/api/0136-Make-EnderDragon-extend-Mob.patch b/patches/api/0136-Make-EnderDragon-extend-Mob.patch similarity index 100% rename from patches/unapplied/api/0136-Make-EnderDragon-extend-Mob.patch rename to patches/api/0136-Make-EnderDragon-extend-Mob.patch diff --git a/patches/unapplied/api/0137-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/patches/api/0137-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch similarity index 100% rename from patches/unapplied/api/0137-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch rename to patches/api/0137-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch diff --git a/patches/unapplied/server/0184-Improved-Async-Task-Scheduler.patch b/patches/server/0184-Improved-Async-Task-Scheduler.patch similarity index 100% rename from patches/unapplied/server/0184-Improved-Async-Task-Scheduler.patch rename to patches/server/0184-Improved-Async-Task-Scheduler.patch diff --git a/patches/unapplied/server/0188-Upstream-config-migrations.patch b/patches/server/0185-Upstream-config-migrations.patch similarity index 100% rename from patches/unapplied/server/0188-Upstream-config-migrations.patch rename to patches/server/0185-Upstream-config-migrations.patch diff --git a/patches/unapplied/server/0189-Make-legacy-ping-handler-more-reliable.patch b/patches/server/0186-Make-legacy-ping-handler-more-reliable.patch similarity index 100% rename from patches/unapplied/server/0189-Make-legacy-ping-handler-more-reliable.patch rename to patches/server/0186-Make-legacy-ping-handler-more-reliable.patch diff --git a/patches/unapplied/server/0190-Call-PaperServerListPingEvent-for-legacy-pings.patch b/patches/server/0187-Call-PaperServerListPingEvent-for-legacy-pings.patch similarity index 100% rename from patches/unapplied/server/0190-Call-PaperServerListPingEvent-for-legacy-pings.patch rename to patches/server/0187-Call-PaperServerListPingEvent-for-legacy-pings.patch diff --git a/patches/unapplied/server/0191-Flag-to-disable-the-channel-limit.patch b/patches/server/0188-Flag-to-disable-the-channel-limit.patch similarity index 88% rename from patches/unapplied/server/0191-Flag-to-disable-the-channel-limit.patch rename to patches/server/0188-Flag-to-disable-the-channel-limit.patch index a6d5244d2d..56256e9e23 100644 --- a/patches/unapplied/server/0191-Flag-to-disable-the-channel-limit.patch +++ b/patches/server/0188-Flag-to-disable-the-channel-limit.patch @@ -9,10 +9,10 @@ e.g. servers which allow and support the usage of mod packs. provide an optional flag to disable this check, at your own risk. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 95a1d83fb7cb9947beb56b951b0081e4db2de6c9..c07916e07e09f1491c9bad7d13b127960dd167a6 100644 +index a9bd48e4670aa44a964891c25cd147c006081b60..5d4499a79fe6bd6a2c9f6896a40491ecadfd4f6c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -150,6 +150,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -153,6 +153,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Paper start private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus; private String resourcePackHash; @@ -20,7 +20,7 @@ index 95a1d83fb7cb9947beb56b951b0081e4db2de6c9..c07916e07e09f1491c9bad7d13b12796 // Paper end public CraftPlayer(CraftServer server, ServerPlayer entity) { -@@ -1616,7 +1617,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1620,7 +1621,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void addChannel(String channel) { diff --git a/patches/unapplied/server/0192-Add-method-to-open-already-placed-sign.patch b/patches/server/0189-Add-method-to-open-already-placed-sign.patch similarity index 93% rename from patches/unapplied/server/0192-Add-method-to-open-already-placed-sign.patch rename to patches/server/0189-Add-method-to-open-already-placed-sign.patch index 94e5533d2d..4be08c668f 100644 --- a/patches/unapplied/server/0192-Add-method-to-open-already-placed-sign.patch +++ b/patches/server/0189-Add-method-to-open-already-placed-sign.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add method to open already placed sign diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 54947f02f29dd3dc546ee0d0f4600630242f003d..f1b1d1881d0598503a7ec1022ef5e00f848fb247 100644 +index cc1caa32ea430f69d0dcfb76e1a08fb78650877d..87bc05f2eef1555ad3346d1d1bda72d4feb0fa1b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -610,6 +610,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/patches/unapplied/server/0193-Configurable-sprint-interruption-on-attack.patch b/patches/server/0190-Configurable-sprint-interruption-on-attack.patch similarity index 74% rename from patches/unapplied/server/0193-Configurable-sprint-interruption-on-attack.patch rename to patches/server/0190-Configurable-sprint-interruption-on-attack.patch index a701f0e7ec..831511c0c6 100644 --- a/patches/unapplied/server/0193-Configurable-sprint-interruption-on-attack.patch +++ b/patches/server/0190-Configurable-sprint-interruption-on-attack.patch @@ -6,24 +6,29 @@ 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/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index 0e08f6e566d1c93cc89a179583d0b0939127de8b..4e0f61179e3b2ae91811746d32b24998173a922c 100644 +index 9d7d9c800710fff5cf41c973463b9c2d72a3e32a..4e0f61179e3b2ae91811746d32b24998173a922c 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -393,4 +393,9 @@ public class PaperWorldConfig { - private void squidMaxSpawnHeight() { - squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); +@@ -388,4 +388,14 @@ public class PaperWorldConfig { + disableCreeperLingeringEffect = getBoolean("disable-creeper-lingering-effect", false); + log("Creeper lingering effect: " + disableCreeperLingeringEffect); } + ++ public double squidMaxSpawnHeight; ++ private void squidMaxSpawnHeight() { ++ squidMaxSpawnHeight = getDouble("squid-spawn-height.maximum", 0.0D); ++ } ++ + public boolean disableSprintInterruptionOnAttack; + private void disableSprintInterruptionOnAttack() { + disableSprintInterruptionOnAttack = getBoolean("game-mechanics.disable-sprint-interruption-on-attack", 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 0ef9c95d40cd0cdff0d150121511e6f9efd65f4d..f7ee9ce075720ed59cf761463bae997a141a7be8 100644 +index 85b50297d92c45872942effb770d0e85d864681e..74ef6bdcb193081ca5e46841200857b6491aeeff 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1238,7 +1238,11 @@ public abstract class Player extends LivingEntity { +@@ -1236,7 +1236,11 @@ public abstract class Player extends LivingEntity { } this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D)); diff --git a/patches/unapplied/server/0194-Fix-exploit-that-allowed-colored-signs-to-be-created.patch b/patches/server/0191-Fix-exploit-that-allowed-colored-signs-to-be-created.patch similarity index 89% rename from patches/unapplied/server/0194-Fix-exploit-that-allowed-colored-signs-to-be-created.patch rename to patches/server/0191-Fix-exploit-that-allowed-colored-signs-to-be-created.patch index ae082f810d..bac92c3dc3 100644 --- a/patches/unapplied/server/0194-Fix-exploit-that-allowed-colored-signs-to-be-created.patch +++ b/patches/server/0191-Fix-exploit-that-allowed-colored-signs-to-be-created.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 25ea7a94407dfdb613ee15de4eb2a9c3252c6b27..e83232f18871a04fadbc053b1e1e7f94d2492159 100644 +index f97125ad82bc1ec850af9bdd92973942fc470bc1..77323b363573e770bbb4ae98911d5a922ad315c2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2777,9 +2777,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -2782,9 +2782,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser TextFilter.FilteredText currentLine = signText.get(i); if (this.player.isTextFilteringEnabled()) { diff --git a/patches/unapplied/server/0195-EndermanEscapeEvent.patch b/patches/server/0192-EndermanEscapeEvent.patch similarity index 77% rename from patches/unapplied/server/0195-EndermanEscapeEvent.patch rename to patches/server/0192-EndermanEscapeEvent.patch index 37bc0c9d94..24dfe4ef18 100644 --- a/patches/unapplied/server/0195-EndermanEscapeEvent.patch +++ b/patches/server/0192-EndermanEscapeEvent.patch @@ -8,11 +8,11 @@ Fires an event anytime an enderman intends to teleport away from the player You may cancel this, enabling ranged attacks to damage the enderman for example. diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -index 568c3a43a41c6bde521580b3890aa21d28e03036..d2c64a3909e77ed3f9d5fb5d4c47a756eab82eee 100644 +index 186054f529cb743e1407fca027792ddb06645d79..18dbf2ad08b835c6e2be9062c0833b440e872e46 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -@@ -109,6 +109,12 @@ public class EnderMan extends Monster implements NeutralMob { - this.setGoalTarget(target, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true); +@@ -114,6 +114,12 @@ public class EnderMan extends Monster implements NeutralMob { + this.setTarget(target, org.bukkit.event.entity.EntityTargetEvent.TargetReason.UNKNOWN, true); } + // Paper start @@ -22,9 +22,9 @@ index 568c3a43a41c6bde521580b3890aa21d28e03036..d2c64a3909e77ed3f9d5fb5d4c47a756 + // Paper end + @Override - public boolean setGoalTarget(LivingEntity entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) { - if (!super.setGoalTarget(entityliving, reason, fireEvent)) { -@@ -262,7 +268,7 @@ public class EnderMan extends Monster implements NeutralMob { + public boolean setTarget(LivingEntity entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) { + if (!super.setTarget(entityliving, reason, fireEvent)) { +@@ -268,7 +274,7 @@ public class EnderMan extends Monster implements NeutralMob { if (this.level.isDay() && this.tickCount >= this.targetChangeTime + 600) { float f = this.getBrightness(); @@ -33,10 +33,10 @@ index 568c3a43a41c6bde521580b3890aa21d28e03036..d2c64a3909e77ed3f9d5fb5d4c47a756 this.setTarget((LivingEntity) null); this.teleport(); } -@@ -360,17 +366,19 @@ public class EnderMan extends Monster implements NeutralMob { - if (this.isInvulnerableTo(source)) { - return false; - } else if (source instanceof IndirectEntityDamageSource) { +@@ -375,17 +381,19 @@ public class EnderMan extends Monster implements NeutralMob { + flag = false; + } + + if (this.tryEscape(com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper start for (int i = 0; i < 64; ++i) { if (this.teleport()) { @@ -45,16 +45,16 @@ index 568c3a43a41c6bde521580b3890aa21d28e03036..d2c64a3909e77ed3f9d5fb5d4c47a756 } + } // Paper end - return false; + return flag; } else { - boolean flag = super.hurt(source, amount); + boolean flag1 = super.hurt(source, amount); - if (!this.level.isClientSide() && !(source.getEntity() instanceof LivingEntity) && this.random.nextInt(10) != 0) { + if (!this.level.isClientSide() && !(source.getEntity() instanceof LivingEntity) && this.random.nextInt(10) != 0 && this.tryEscape(source == DamageSource.DROWN ? com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.DROWN : com.destroystokyo.paper.event.entity.EndermanEscapeEvent.Reason.INDIRECT)) { // Paper - use to be critical hits as else, but mojang removed critical hits in 1.16.2 due to MC-185684 this.teleport(); } -@@ -579,7 +587,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -605,7 +613,7 @@ public class EnderMan extends Monster implements NeutralMob { } else { if (this.target != null && !this.enderman.isPassenger()) { if (this.enderman.isLookingAtMe((Player) this.target)) { diff --git a/patches/unapplied/server/0196-Enderman.teleportRandomly.patch b/patches/server/0193-Enderman.teleportRandomly.patch similarity index 91% rename from patches/unapplied/server/0196-Enderman.teleportRandomly.patch rename to patches/server/0193-Enderman.teleportRandomly.patch index b2f1516786..5ea410652c 100644 --- a/patches/unapplied/server/0196-Enderman.teleportRandomly.patch +++ b/patches/server/0193-Enderman.teleportRandomly.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Enderman.teleportRandomly() Ability to trigger the vanilla "teleport randomly" mechanic of an enderman. diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -index d2c64a3909e77ed3f9d5fb5d4c47a756eab82eee..02f691a2217bea2df23b7b412eba90ee99c3b8c9 100644 +index 18dbf2ad08b835c6e2be9062c0833b440e872e46..d427276e3556f1c8580ea15095424f76e07f0a99 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -@@ -277,7 +277,7 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -283,7 +283,7 @@ public class EnderMan extends Monster implements NeutralMob { super.customServerAiStep(); } diff --git a/patches/unapplied/server/0197-Block-Enderpearl-Travel-Exploit.patch b/patches/server/0194-Block-Enderpearl-Travel-Exploit.patch similarity index 94% rename from patches/unapplied/server/0197-Block-Enderpearl-Travel-Exploit.patch rename to patches/server/0194-Block-Enderpearl-Travel-Exploit.patch index 527e4cefc6..aaf3ffe12a 100644 --- a/patches/unapplied/server/0197-Block-Enderpearl-Travel-Exploit.patch +++ b/patches/server/0194-Block-Enderpearl-Travel-Exploit.patch @@ -27,7 +27,7 @@ index 4e0f61179e3b2ae91811746d32b24998173a922c..a0937dd52e4a2aa1bfadcbd1ac0dc2cb + } } diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 4306db7db2c5b4eb1529dc3e9f0659ead2688fa5..8af1571c614a39c9673e0dc90e3aa9a89a367e34 100644 +index d4aa7e6dd54ed896187db96d19490ae9d55355f1..3b2322e359ea0fa8cf6c256054c4d0dcd3f43d73 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java @@ -88,6 +88,7 @@ public abstract class Projectile extends Entity { @@ -39,7 +39,7 @@ index 4306db7db2c5b4eb1529dc3e9f0659ead2688fa5..8af1571c614a39c9673e0dc90e3aa9a8 this.leftOwner = nbt.getBoolean("LeftOwner"); diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java -index 541ca82405d0b4d1457dcd63b58dc61eb67482d6..1b2ada3663cc0739782ac591f2ee1f6d0fb94841 100644 +index 23f77dfc6df93ef6a70e14a7e410263d39fae2cb..834ba402decb556a5f77809b37fa00578b67432e 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownEnderpearl.java @@ -108,6 +108,16 @@ public class ThrownEnderpearl extends ThrowableItemProjectile { diff --git a/patches/unapplied/server/0198-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/0195-Expand-World.spawnParticle-API-and-add-Builder.patch similarity index 93% rename from patches/unapplied/server/0198-Expand-World.spawnParticle-API-and-add-Builder.patch rename to patches/server/0195-Expand-World.spawnParticle-API-and-add-Builder.patch index a7cd52b852..6d5c0980fb 100644 --- a/patches/unapplied/server/0198-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/server/0195-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle. This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 26c25b103f08a2e66179d1ed8f450778aa2e539a..86a5a4456be65b94b0c27a0355c3844cbd296a20 100644 +index 94a64e0e7a0ea147ae008f91a0787c8840566f4f..a734416fd80f0b367300c179e90fb51e206ca36c 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1333,12 +1333,17 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1361,12 +1361,17 @@ public class ServerLevel extends Level implements WorldGenLevel { } public int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) { @@ -34,7 +34,7 @@ index 26c25b103f08a2e66179d1ed8f450778aa2e539a..86a5a4456be65b94b0c27a0355c3844c if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 1f4880cd6abc68731abd5943619a9bf7e7ddb02f..7fbd068cbf96332b6ea45411f45e9e0910693c57 100644 +index 8579696f971824688500c8837f9451d23f84dae2..90fe854921dfea883c6420c765d13518a42080d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1748,11 +1748,17 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0199-Prevent-Frosted-Ice-from-loading-holding-chunks.patch b/patches/server/0196-Prevent-Frosted-Ice-from-loading-holding-chunks.patch similarity index 84% rename from patches/unapplied/server/0199-Prevent-Frosted-Ice-from-loading-holding-chunks.patch rename to patches/server/0196-Prevent-Frosted-Ice-from-loading-holding-chunks.patch index 4b233954b2..6a626a603b 100644 --- a/patches/unapplied/server/0199-Prevent-Frosted-Ice-from-loading-holding-chunks.patch +++ b/patches/server/0196-Prevent-Frosted-Ice-from-loading-holding-chunks.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks 1.17: Shouldn't be needed as blocks no longer tick without at least 1 radius chunk loaded. diff --git a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java -index 54eb7ba0265bb155dd1c753661242fa9d299ff80..5b5d606a794c885267b6f5e2bbfe9b0a318ad767 100644 +index 48776edab1479b5e861eca8146da04ebee01c46a..e0903ecf7a478d0a341d6ad6d94f06aef9836cc9 100644 --- a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java @@ -38,7 +38,8 @@ public class FrostedIceBlock extends IceBlock { @@ -17,7 +17,7 @@ index 54eb7ba0265bb155dd1c753661242fa9d299ff80..5b5d606a794c885267b6f5e2bbfe9b0a + BlockState blockState = world.getTypeIfLoaded(mutableBlockPos); // Paper + if (blockState == null) { continue; } // Paper if (blockState.is(this) && !this.slightlyMelt(blockState, world, mutableBlockPos)) { - world.getBlockTicks().scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay + world.scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay } @@ -75,7 +76,10 @@ public class FrostedIceBlock extends IceBlock { diff --git a/patches/unapplied/server/0200-EndermanAttackPlayerEvent.patch b/patches/server/0197-EndermanAttackPlayerEvent.patch similarity index 89% rename from patches/unapplied/server/0200-EndermanAttackPlayerEvent.patch rename to patches/server/0197-EndermanAttackPlayerEvent.patch index ca135c6695..e94d28a7dd 100644 --- a/patches/unapplied/server/0200-EndermanAttackPlayerEvent.patch +++ b/patches/server/0197-EndermanAttackPlayerEvent.patch @@ -8,10 +8,10 @@ Allow control over whether or not an enderman aggros a player. This allows you to override/extend the pumpkin/stare logic. diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -index 02f691a2217bea2df23b7b412eba90ee99c3b8c9..de167655a556a700bdc7d92fa54b802924b2a61a 100644 +index d427276e3556f1c8580ea15095424f76e07f0a99..c7714824d8e85087397047cf9bcb0528968b1f93 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java -@@ -220,7 +220,15 @@ public class EnderMan extends Monster implements NeutralMob { +@@ -226,7 +226,15 @@ public class EnderMan extends Monster implements NeutralMob { this.readPersistentAngerSaveData(this.level, nbt); } diff --git a/patches/unapplied/server/0201-WitchConsumePotionEvent.patch b/patches/server/0198-WitchConsumePotionEvent.patch similarity index 89% rename from patches/unapplied/server/0201-WitchConsumePotionEvent.patch rename to patches/server/0198-WitchConsumePotionEvent.patch index e1effd06b4..ce2524108d 100644 --- a/patches/unapplied/server/0201-WitchConsumePotionEvent.patch +++ b/patches/server/0198-WitchConsumePotionEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] WitchConsumePotionEvent Fires when a witch consumes the potion in their hand diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java -index d3cb46250d3f72a3d0f0e42eddee3ea30e8cabcc..fcfa4d3b0cb257804500864847f35650f4cb7602 100644 +index 2ea39decbd22c57952cded4c368ab475e6a37230..cf6f38b8d76e319c299bbcc960b860eb404a13ab 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Witch.java +++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java -@@ -124,7 +124,11 @@ public class Witch extends Raider implements RangedAttackMob { +@@ -123,7 +123,11 @@ public class Witch extends Raider implements RangedAttackMob { this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY); if (itemstack.is(Items.POTION)) { diff --git a/patches/unapplied/server/0202-WitchThrowPotionEvent.patch b/patches/server/0199-WitchThrowPotionEvent.patch similarity index 91% rename from patches/unapplied/server/0202-WitchThrowPotionEvent.patch rename to patches/server/0199-WitchThrowPotionEvent.patch index 3c46661a47..e856c38cf5 100644 --- a/patches/unapplied/server/0202-WitchThrowPotionEvent.patch +++ b/patches/server/0199-WitchThrowPotionEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] WitchThrowPotionEvent Fired when a witch throws a potion at a player diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java -index fcfa4d3b0cb257804500864847f35650f4cb7602..4bb000af5964adec59741de56eb3bbd7b38ad237 100644 +index cf6f38b8d76e319c299bbcc960b860eb404a13ab..bab4988c3170429f5b050d0c7aa96a70002680c5 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Witch.java +++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java -@@ -236,9 +236,16 @@ public class Witch extends Raider implements RangedAttackMob { +@@ -235,9 +235,16 @@ public class Witch extends Raider implements RangedAttackMob { potionregistry = Potions.WEAKNESS; } diff --git a/patches/unapplied/server/0203-Allow-spawning-Item-entities-with-World.spawnEntity.patch b/patches/server/0200-Allow-spawning-Item-entities-with-World.spawnEntity.patch similarity index 89% rename from patches/unapplied/server/0203-Allow-spawning-Item-entities-with-World.spawnEntity.patch rename to patches/server/0200-Allow-spawning-Item-entities-with-World.spawnEntity.patch index 84db4c2d46..957d44acbc 100644 --- a/patches/unapplied/server/0203-Allow-spawning-Item-entities-with-World.spawnEntity.patch +++ b/patches/server/0200-Allow-spawning-Item-entities-with-World.spawnEntity.patch @@ -8,10 +8,10 @@ This API has more capabilities than .dropItem with the Consumer function Item can be set inside of the Consumer pre spawn function. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index d0873200aa8f66648e23fc2954a27a83289e748c..0d1421555a98b97c30dbb4d95491308e433a81a3 100644 +index 7c00bae9082d02f712c6e80f5ed69a55eb01d8da..60c3d17f35a044d30be587df98fce329752b2ba2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -530,6 +530,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { +@@ -531,6 +531,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { if (Boat.class.isAssignableFrom(clazz)) { entity = new net.minecraft.world.entity.vehicle.Boat(world, x, y, z); entity.moveTo(x, y, z, yaw, pitch); diff --git a/patches/unapplied/server/0204-WitchReadyPotionEvent.patch b/patches/server/0201-WitchReadyPotionEvent.patch similarity index 89% rename from patches/unapplied/server/0204-WitchReadyPotionEvent.patch rename to patches/server/0201-WitchReadyPotionEvent.patch index 03f3251f9d..3ca0af95ee 100644 --- a/patches/unapplied/server/0204-WitchReadyPotionEvent.patch +++ b/patches/server/0201-WitchReadyPotionEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] WitchReadyPotionEvent diff --git a/src/main/java/net/minecraft/world/entity/monster/Witch.java b/src/main/java/net/minecraft/world/entity/monster/Witch.java -index 4bb000af5964adec59741de56eb3bbd7b38ad237..94bd20db7ffea00579225e6887b8c78a3da3ff1a 100644 +index bab4988c3170429f5b050d0c7aa96a70002680c5..75c863c2cf365c321e401e05f564518be3a7b949 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Witch.java +++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java -@@ -157,7 +157,11 @@ public class Witch extends Raider implements RangedAttackMob { +@@ -156,7 +156,11 @@ public class Witch extends Raider implements RangedAttackMob { } if (potionregistry != null) { diff --git a/patches/unapplied/server/0205-ItemStack-getMaxItemUseDuration.patch b/patches/server/0202-ItemStack-getMaxItemUseDuration.patch similarity index 91% rename from patches/unapplied/server/0205-ItemStack-getMaxItemUseDuration.patch rename to patches/server/0202-ItemStack-getMaxItemUseDuration.patch index 87e1f660fd..a54b637d4c 100644 --- a/patches/unapplied/server/0205-ItemStack-getMaxItemUseDuration.patch +++ b/patches/server/0202-ItemStack-getMaxItemUseDuration.patch @@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration Allows you to determine how long it takes to use a usable/consumable item diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 84f11780a22b3369519fc8f80d6c274360045df7..4b43e6a1b628e2060d1095dab892efd9d1dfc485 100644 +index ba70ac49222c517a38e20e86cee1fd38aecb6318..967555b6a3ef833ca75215391b20744ab6f04359 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -173,6 +173,13 @@ public final class CraftItemStack extends ItemStack { diff --git a/patches/unapplied/server/0206-Implement-EntityTeleportEndGatewayEvent.patch b/patches/server/0203-Implement-EntityTeleportEndGatewayEvent.patch similarity index 92% rename from patches/unapplied/server/0206-Implement-EntityTeleportEndGatewayEvent.patch rename to patches/server/0203-Implement-EntityTeleportEndGatewayEvent.patch index 799a6a0d3e..309201c9c1 100644 --- a/patches/unapplied/server/0206-Implement-EntityTeleportEndGatewayEvent.patch +++ b/patches/server/0203-Implement-EntityTeleportEndGatewayEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement EntityTeleportEndGatewayEvent diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java -index d6f67a87c46c95bd4c2dfad4c1c13cbfd263ef30..f41dfe8bff59d17000f3eb17670c524102adb276 100644 +index 8af71dd1b916be666ee163904118db46fd3c9850..1d8af8475d0aac71a4ed8a2fed9861dd89d8319b 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 -@@ -225,9 +225,20 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { +@@ -223,9 +223,20 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { } // CraftBukkit end diff --git a/patches/unapplied/server/0207-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch b/patches/server/0204-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch similarity index 89% rename from patches/unapplied/server/0207-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch rename to patches/server/0204-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch index bfe771aea0..b254cbac71 100644 --- a/patches/unapplied/server/0207-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch +++ b/patches/server/0204-Unset-Ignited-flag-on-cancel-of-Explosion-Event.patch @@ -6,7 +6,7 @@ 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 aa16a81ee447e8bae274668f2240627d060398ba..dc7ad6f2a1ae71c411fb39460b52cd1129c928c4 100644 +index 638b80006138ca7be44abfa69f31eccb2035ffac..bf7ddca34c8d9834a5b923fab30a605afa5f337a 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java @@ -272,6 +272,7 @@ public class Creeper extends Monster implements PowerableMob { diff --git a/patches/unapplied/server/0208-Fix-CraftEntity-hashCode.patch b/patches/server/0205-Fix-CraftEntity-hashCode.patch similarity index 94% rename from patches/unapplied/server/0208-Fix-CraftEntity-hashCode.patch rename to patches/server/0205-Fix-CraftEntity-hashCode.patch index c6c09ac16b..9b88bfc3be 100644 --- a/patches/unapplied/server/0208-Fix-CraftEntity-hashCode.patch +++ b/patches/server/0205-Fix-CraftEntity-hashCode.patch @@ -21,7 +21,7 @@ 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 21edae1b8d91341621155897d4da36bc06d2b2e5..473dc5e5ee3458e605ecf5e2b2dadb3573fd685b 100644 +index a83d15178f71b1c4c6d8d49f7621eddd66577251..ec11cf974222a2719aeea86ab425fdddb38928a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -792,14 +792,15 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/patches/unapplied/server/0209-Configurable-Alternative-LootPool-Luck-Formula.patch b/patches/server/0206-Configurable-Alternative-LootPool-Luck-Formula.patch similarity index 100% rename from patches/unapplied/server/0209-Configurable-Alternative-LootPool-Luck-Formula.patch rename to patches/server/0206-Configurable-Alternative-LootPool-Luck-Formula.patch diff --git a/patches/unapplied/server/0210-Print-Error-details-when-failing-to-save-player-data.patch b/patches/server/0207-Print-Error-details-when-failing-to-save-player-data.patch similarity index 100% rename from patches/unapplied/server/0210-Print-Error-details-when-failing-to-save-player-data.patch rename to patches/server/0207-Print-Error-details-when-failing-to-save-player-data.patch diff --git a/patches/unapplied/server/0211-Make-shield-blocking-delay-configurable.patch b/patches/server/0208-Make-shield-blocking-delay-configurable.patch similarity index 92% rename from patches/unapplied/server/0211-Make-shield-blocking-delay-configurable.patch rename to patches/server/0208-Make-shield-blocking-delay-configurable.patch index eafea99093..17982e4aa2 100644 --- a/patches/unapplied/server/0211-Make-shield-blocking-delay-configurable.patch +++ b/patches/server/0208-Make-shield-blocking-delay-configurable.patch @@ -19,10 +19,10 @@ index a0937dd52e4a2aa1bfadcbd1ac0dc2cb26d59cf0..4dce401da0e0fdf985ecb90f37b92e16 + } } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 669e621fdb0d05ee61dea5f212eb228f8be008ae..d1d3c11e105b65a4b7d300ef3c08d4f4f5b3dbfc 100644 +index 5c9f9b6a1bd66d33fd194ad1d78a907b005a101c..4ca6feea7910d613ffcf4339d809f98f34e17ffb 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3669,12 +3669,24 @@ public abstract class LivingEntity extends Entity { +@@ -3668,12 +3668,24 @@ public abstract class LivingEntity extends Entity { if (this.isUsingItem() && !this.useItem.isEmpty()) { Item item = this.useItem.getItem(); @@ -49,7 +49,7 @@ index 669e621fdb0d05ee61dea5f212eb228f8be008ae..d1d3c11e105b65a4b7d300ef3c08d4f4 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 3977069ccc96114ddae8d2f8f6578f74d8854127..a6e1edad4acd20b25f5e27afbbf580482efe29af 100644 +index 6455a81fea0de79173419587171b5ed025c30592..bbb7d6bcdc280236a583056cf9ccfc7b8de37706 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -739,5 +739,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0212-Improve-EntityShootBowEvent.patch b/patches/server/0209-Improve-EntityShootBowEvent.patch similarity index 91% rename from patches/unapplied/server/0212-Improve-EntityShootBowEvent.patch rename to patches/server/0209-Improve-EntityShootBowEvent.patch index 802e7d64a7..d2b406c4ad 100644 --- a/patches/unapplied/server/0212-Improve-EntityShootBowEvent.patch +++ b/patches/server/0209-Improve-EntityShootBowEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Improve EntityShootBowEvent Adds missing call to Illagers and also adds Arrow ItemStack to skeltons diff --git a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -index d7bca8fa71e325ba1967537d4102ccb207c4d717..3d8f3e22223e4effeaf52cb18c14c60276d4689c 100644 +index 8829af99f0b4d7307e92cc1d91a01265dba17568..609380af4de4118a543b6ec94feb176e6f6870ed 100644 --- a/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java +++ b/src/main/java/net/minecraft/world/entity/monster/AbstractSkeleton.java -@@ -196,7 +196,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo +@@ -195,7 +195,7 @@ public abstract class AbstractSkeleton extends Monster implements RangedAttackMo entityarrow.shoot(d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - this.level.getDifficulty().getId() * 4)); // CraftBukkit start @@ -19,7 +19,7 @@ index d7bca8fa71e325ba1967537d4102ccb207c4d717..3d8f3e22223e4effeaf52cb18c14c602 event.getProjectile().remove(); return; diff --git a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java -index 73dbf08002e6b90e6dfc01369de7c53531dae43b..e1b8d9c0acfc248b9a24efc21aefc88e3caeb605 100644 +index 7b3a931353e2ead4e5caade8fb12d70f290b67e4..86f7fdd42461db151221d2c0d5cff6953392fa80 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Illusioner.java +++ b/src/main/java/net/minecraft/world/entity/monster/Illusioner.java @@ -196,8 +196,18 @@ public class Illusioner extends SpellcasterIllager implements RangedAttackMob { diff --git a/patches/unapplied/server/0213-PlayerReadyArrowEvent.patch b/patches/server/0210-PlayerReadyArrowEvent.patch similarity index 88% rename from patches/unapplied/server/0213-PlayerReadyArrowEvent.patch rename to patches/server/0210-PlayerReadyArrowEvent.patch index 97529695c3..7ce05cd6ef 100644 --- a/patches/unapplied/server/0213-PlayerReadyArrowEvent.patch +++ b/patches/server/0210-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 f7ee9ce075720ed59cf761463bae997a141a7be8..ea4e8680fc85d6c88078667b96e4412503713a37 100644 +index 74ef6bdcb193081ca5e46841200857b6491aeeff..2909db2666c653a940830f29435b82480dc6825e 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -2184,6 +2184,17 @@ public abstract class Player extends LivingEntity { +@@ -2182,6 +2182,17 @@ public abstract class Player extends LivingEntity { return ImmutableList.of(Pose.STANDING, Pose.CROUCHING, Pose.SWIMMING); } @@ -28,7 +28,7 @@ index f7ee9ce075720ed59cf761463bae997a141a7be8..ea4e8680fc85d6c88078667b96e44125 @Override public ItemStack getProjectile(ItemStack stack) { if (!(stack.getItem() instanceof ProjectileWeaponItem)) { -@@ -2200,7 +2211,7 @@ public abstract class Player extends LivingEntity { +@@ -2198,7 +2209,7 @@ public abstract class Player extends LivingEntity { for (int i = 0; i < this.inventory.getContainerSize(); ++i) { ItemStack itemstack2 = this.inventory.getItem(i); diff --git a/patches/unapplied/server/0214-Implement-EntityKnockbackByEntityEvent.patch b/patches/server/0211-Implement-EntityKnockbackByEntityEvent.patch similarity index 87% rename from patches/unapplied/server/0214-Implement-EntityKnockbackByEntityEvent.patch rename to patches/server/0211-Implement-EntityKnockbackByEntityEvent.patch index a7c93e58ec..6995720886 100644 --- a/patches/unapplied/server/0214-Implement-EntityKnockbackByEntityEvent.patch +++ b/patches/server/0211-Implement-EntityKnockbackByEntityEvent.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Implement EntityKnockbackByEntityEvent This event is called when an entity receives knockback by another entity. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a7f6127aae3c35d3570cba31cbf7a9be34e303b2..85aae87d03219a53e5aec2b9983dac2831aff82e 100644 +index 4ca6feea7910d613ffcf4339d809f98f34e17ffb..a1de99f07f47e4b378b0c36ea158ce0693ee2686 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1437,7 +1437,7 @@ public abstract class LivingEntity extends Entity { +@@ -1432,7 +1432,7 @@ public abstract class LivingEntity extends Entity { } this.hurtDir = (float) (Mth.atan2(d1, d0) * 57.2957763671875D - (double) this.getYRot()); @@ -18,7 +18,7 @@ index a7f6127aae3c35d3570cba31cbf7a9be34e303b2..85aae87d03219a53e5aec2b9983dac28 } else { this.hurtDir = (float) ((int) (Math.random() * 2.0D) * 180); } -@@ -1485,7 +1485,7 @@ public abstract class LivingEntity extends Entity { +@@ -1480,7 +1480,7 @@ public abstract class LivingEntity extends Entity { } protected void blockedByShield(LivingEntity target) { @@ -27,7 +27,7 @@ index a7f6127aae3c35d3570cba31cbf7a9be34e303b2..85aae87d03219a53e5aec2b9983dac28 } private boolean checkTotemDeathProtection(DamageSource source) { -@@ -1738,6 +1738,11 @@ public abstract class LivingEntity extends Entity { +@@ -1733,6 +1733,11 @@ public abstract class LivingEntity extends Entity { } public void knockback(double strength, double x, double z) { @@ -39,7 +39,7 @@ index a7f6127aae3c35d3570cba31cbf7a9be34e303b2..85aae87d03219a53e5aec2b9983dac28 strength *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE); if (strength > 0.0D) { this.hasImpulse = true; -@@ -1745,6 +1750,15 @@ public abstract class LivingEntity extends Entity { +@@ -1740,6 +1745,15 @@ public abstract class LivingEntity extends Entity { Vec3 vec3d1 = (new Vec3(x, 0.0D, z)).normalize().scale(strength); this.setDeltaMovement(vec3d.x / 2.0D - vec3d1.x, this.onGround ? Math.min(0.4D, vec3d.y / 2.0D + strength) : vec3d.y, vec3d.z / 2.0D - vec3d1.z); @@ -56,10 +56,10 @@ index a7f6127aae3c35d3570cba31cbf7a9be34e303b2..85aae87d03219a53e5aec2b9983dac28 } diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java -index 4f3613e8232df3b4d9e10970b9faf9fbdd3b34a2..6e5682fed08a41c7e573e6611fca93bf85019b9f 100644 +index 3eda6821d12bf616037f6c00815602428afbcdaf..ad2ef9460d85b2182f6af35733daadcedbd15e4c 100644 --- a/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java -@@ -1537,7 +1537,7 @@ public abstract class Mob extends LivingEntity { +@@ -1552,7 +1552,7 @@ public abstract class Mob extends LivingEntity { if (flag) { if (f1 > 0.0F && target instanceof LivingEntity) { @@ -82,10 +82,10 @@ index f6fd39823f04f8071c616d40a838b01e7159c5a1..e1cdf3ce38404d3f40be59e4cd3ad2b9 serverLevel.playSound((Player)null, pathfinderMob, this.getImpactSound.apply(pathfinderMob), SoundSource.HOSTILE, 1.0F, 1.0F); } else { 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 ea4e8680fc85d6c88078667b96e4412503713a37..7d09d12fe4d8a01ae5849f967afcef1dcc773a04 100644 +index 2909db2666c653a940830f29435b82480dc6825e..ca87d9e2543f7bca8d1c2b0c455cf55b82c9b4c0 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1232,7 +1232,7 @@ public abstract class Player extends LivingEntity { +@@ -1230,7 +1230,7 @@ public abstract class Player extends LivingEntity { if (flag5) { if (i > 0) { if (target instanceof LivingEntity) { @@ -94,8 +94,8 @@ index ea4e8680fc85d6c88078667b96e4412503713a37..7d09d12fe4d8a01ae5849f967afcef1d } else { target.push((double) (-Mth.sin(this.getYRot() * 0.017453292F) * (float) i * 0.5F), 0.1D, (double) (Mth.cos(this.getYRot() * 0.017453292F) * (float) i * 0.5F)); } -@@ -1256,7 +1256,7 @@ public abstract class Player extends LivingEntity { - if (entityliving != this && entityliving != target && !this.isAlliedTo(entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) { +@@ -1254,7 +1254,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 if (entityliving.hurt(DamageSource.playerAttack(this).sweep(), f4)) { - entityliving.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F))); diff --git a/patches/unapplied/server/0215-Expand-Explosions-API.patch b/patches/server/0212-Expand-Explosions-API.patch similarity index 93% rename from patches/unapplied/server/0215-Expand-Explosions-API.patch rename to patches/server/0212-Expand-Explosions-API.patch index 50f7d179c1..0670e14189 100644 --- a/patches/unapplied/server/0215-Expand-Explosions-API.patch +++ b/patches/server/0212-Expand-Explosions-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Expand Explosions API Add Entity as a Source capability, and add more API choices, and on Location. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 7fbd068cbf96332b6ea45411f45e9e0910693c57..4f9487ac3535b2609ad57f7c1d9504801e8aa2a6 100644 +index 90fe854921dfea883c6420c765d13518a42080d2..478a1864079c72c670480a0dbb0a78eae2165dca 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -688,6 +688,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0216-LivingEntity-Hand-Raised-Item-Use-API.patch b/patches/server/0213-LivingEntity-Hand-Raised-Item-Use-API.patch similarity index 94% rename from patches/unapplied/server/0216-LivingEntity-Hand-Raised-Item-Use-API.patch rename to patches/server/0213-LivingEntity-Hand-Raised-Item-Use-API.patch index a188095b1c..b8c1582431 100644 --- a/patches/unapplied/server/0216-LivingEntity-Hand-Raised-Item-Use-API.patch +++ b/patches/server/0213-LivingEntity-Hand-Raised-Item-Use-API.patch @@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API How long an entity has raised hands to charge an attack or use an item diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index a6e1edad4acd20b25f5e27afbbf580482efe29af..db3123b4a6582ad1667b24b9ff03caf671287857 100644 +index bbb7d6bcdc280236a583056cf9ccfc7b8de37706..5c517025576461b426b4a73eea4369f00aeeee41 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -749,5 +749,30 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0217-RangedEntity-API.patch b/patches/server/0214-RangedEntity-API.patch similarity index 100% rename from patches/unapplied/server/0217-RangedEntity-API.patch rename to patches/server/0214-RangedEntity-API.patch diff --git a/patches/unapplied/server/0218-Add-config-to-disable-ender-dragon-legacy-check.patch b/patches/server/0215-Add-config-to-disable-ender-dragon-legacy-check.patch similarity index 92% rename from patches/unapplied/server/0218-Add-config-to-disable-ender-dragon-legacy-check.patch rename to patches/server/0215-Add-config-to-disable-ender-dragon-legacy-check.patch index a4a727ed19..de725de8b7 100644 --- a/patches/unapplied/server/0218-Add-config-to-disable-ender-dragon-legacy-check.patch +++ b/patches/server/0215-Add-config-to-disable-ender-dragon-legacy-check.patch @@ -19,10 +19,10 @@ index 4dce401da0e0fdf985ecb90f37b92e16cf210d25..35c6978eaf25ed505f99e42a58d388c6 + } } 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 758af2c2d66073aeaee766adb672c465d2993eab..711be01abe9d47bdc9bfe8b09a2719d666b986fb 100644 +index 2b7ffbc125d01db093a31ed6147fc1d736a01e80..9a6b2c75b8622b0f9eda85011ef6f2f1dca574c9 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 -@@ -84,6 +84,10 @@ public class EndDragonFight { +@@ -88,6 +88,10 @@ public class EndDragonFight { private List respawnCrystals; public EndDragonFight(ServerLevel world, long gatewaysSeed, CompoundTag nbt) { diff --git a/patches/unapplied/server/0219-Implement-World.getEntity-UUID-API.patch b/patches/server/0216-Implement-World.getEntity-UUID-API.patch similarity index 91% rename from patches/unapplied/server/0219-Implement-World.getEntity-UUID-API.patch rename to patches/server/0216-Implement-World.getEntity-UUID-API.patch index 4468c3bd83..a5b36a1761 100644 --- a/patches/unapplied/server/0219-Implement-World.getEntity-UUID-API.patch +++ b/patches/server/0216-Implement-World.getEntity-UUID-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4f9487ac3535b2609ad57f7c1d9504801e8aa2a6..375c3adac2dc80f15d06e8acb11c8c451ec579e5 100644 +index 478a1864079c72c670480a0dbb0a78eae2165dca..d72bfc263798797ca83e529c26bd2a1733c65eb4 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1022,6 +1022,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/unapplied/server/0220-InventoryCloseEvent-Reason-API.patch b/patches/server/0217-InventoryCloseEvent-Reason-API.patch similarity index 89% rename from patches/unapplied/server/0220-InventoryCloseEvent-Reason-API.patch rename to patches/server/0217-InventoryCloseEvent-Reason-API.patch index 6349f18945..7d0d8cd05d 100644 --- a/patches/unapplied/server/0220-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0217-InventoryCloseEvent-Reason-API.patch @@ -7,10 +7,10 @@ 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 d09556a6559a6984a7aec341eb5678222ed67da3..b524db142fdc9596e9a10bf0208877c556c5ecbe 100644 +index a734416fd80f0b367300c179e90fb51e206ca36c..5d63b8843beaeb6f6d42d1c122c89ea57ed44e36 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1107,7 +1107,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1128,7 +1128,7 @@ public class ServerLevel extends Level implements WorldGenLevel { for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) { if (tileentity instanceof net.minecraft.world.Container) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) { @@ -19,7 +19,7 @@ index d09556a6559a6984a7aec341eb5678222ed67da3..b524db142fdc9596e9a10bf0208877c5 } } } -@@ -1993,7 +1993,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2027,7 +2027,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // Spigot Start if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder) { for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) { @@ -29,10 +29,10 @@ index d09556a6559a6984a7aec341eb5678222ed67da3..b524db142fdc9596e9a10bf0208877c5 } // Spigot End diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 3bcb8ae7391f405c11cf1c117848eeb9aae7bcaa..3d5db5ce2e60ca72ad202caebe49f3fc80d1af37 100644 +index 90bff0dd400a67bcb84f8576bd8326793420919a..fd1937f49312204d38510996a5be43b731f38bde 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -597,7 +597,7 @@ public class ServerPlayer extends Player { +@@ -601,7 +601,7 @@ public class ServerPlayer extends Player { } // Paper end if (!this.level.isClientSide && !this.containerMenu.stillValid(this)) { @@ -41,7 +41,7 @@ index 3bcb8ae7391f405c11cf1c117848eeb9aae7bcaa..3d5db5ce2e60ca72ad202caebe49f3fc this.containerMenu = this.inventoryMenu; } -@@ -751,7 +751,7 @@ public class ServerPlayer extends Player { +@@ -789,7 +789,7 @@ public class ServerPlayer extends Player { // SPIGOT-943 - only call if they have an inventory open if (this.containerMenu != this.inventoryMenu) { @@ -50,7 +50,7 @@ index 3bcb8ae7391f405c11cf1c117848eeb9aae7bcaa..3d5db5ce2e60ca72ad202caebe49f3fc } net.kyori.adventure.text.Component deathMessage = event.deathMessage() != null ? event.deathMessage() : net.kyori.adventure.text.Component.empty(); // Paper - Adventure -@@ -1402,7 +1402,7 @@ public class ServerPlayer extends Player { +@@ -1429,7 +1429,7 @@ public class ServerPlayer extends Player { } // CraftBukkit end if (this.containerMenu != this.inventoryMenu) { @@ -59,7 +59,7 @@ index 3bcb8ae7391f405c11cf1c117848eeb9aae7bcaa..3d5db5ce2e60ca72ad202caebe49f3fc } // this.nextContainerCounter(); // CraftBukkit - moved up -@@ -1431,7 +1431,13 @@ public class ServerPlayer extends Player { +@@ -1457,7 +1457,13 @@ public class ServerPlayer extends Player { @Override public void closeContainer() { @@ -75,10 +75,10 @@ index 3bcb8ae7391f405c11cf1c117848eeb9aae7bcaa..3d5db5ce2e60ca72ad202caebe49f3fc this.doCloseContainer(); } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 23bd778a4b784c93115924afdd97852ca27cbdd5..e1123f0523fbf1e07cdc44d029c7837ada31194b 100644 +index 77323b363573e770bbb4ae98911d5a922ad315c2..930f71861b1ee2fe210bd0e987a6b304b25f19dc 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -187,6 +187,7 @@ import org.bukkit.event.inventory.ClickType; +@@ -186,6 +186,7 @@ import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.CraftItemEvent; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; @@ -86,7 +86,7 @@ index 23bd778a4b784c93115924afdd97852ca27cbdd5..e1123f0523fbf1e07cdc44d029c7837a import org.bukkit.event.inventory.InventoryCreativeEvent; import org.bukkit.event.inventory.InventoryType.SlotType; import org.bukkit.event.inventory.SmithItemEvent; -@@ -2320,10 +2321,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -2330,10 +2331,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @Override public void handleContainerClose(ServerboundContainerClosePacket packet) { @@ -105,7 +105,7 @@ index 23bd778a4b784c93115924afdd97852ca27cbdd5..e1123f0523fbf1e07cdc44d029c7837a 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 17f56157d60d33695c4eac0e4fc94120a2101214..c4940b2538e8adfe5f19cb5f1a5373319a1cb89b 100644 +index 4f56bb45b9bdaf3de02c5f331760339f4397eafc..04cf38bbb62b6b9b46ba32ae0d4e66423cdfbea0 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -502,7 +502,7 @@ public abstract class PlayerList { @@ -118,10 +118,10 @@ index 17f56157d60d33695c4eac0e4fc94120a2101214..c4940b2538e8adfe5f19cb5f1a537331 PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, com.destroystokyo.paper.PaperConfig.useDisplayNameInQuit ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName()))); 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 7d09d12fe4d8a01ae5849f967afcef1dcc773a04..f5bc151aae4f8335994507c89a094177347dfce1 100644 +index ca87d9e2543f7bca8d1c2b0c455cf55b82c9b4c0..37b65c7a12b4dc8ff4e9017015abbb86890dbf5e 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 { +@@ -262,7 +262,7 @@ public abstract class Player extends LivingEntity { this.updateIsUnderwater(); super.tick(); if (!this.level.isClientSide && this.containerMenu != null && !this.containerMenu.stillValid(this)) { @@ -130,7 +130,7 @@ index 7d09d12fe4d8a01ae5849f967afcef1dcc773a04..f5bc151aae4f8335994507c89a094177 this.containerMenu = this.inventoryMenu; } -@@ -487,6 +487,13 @@ public abstract class Player extends LivingEntity { +@@ -485,6 +485,13 @@ public abstract class Player extends LivingEntity { } @@ -145,7 +145,7 @@ index 7d09d12fe4d8a01ae5849f967afcef1dcc773a04..f5bc151aae4f8335994507c89a094177 this.containerMenu = this.inventoryMenu; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index f1b1d1881d0598503a7ec1022ef5e00f848fb247..460828d29583ee21a7c5b716f9687a8243911a7e 100644 +index 87bc05f2eef1555ad3346d1d1bda72d4feb0fa1b..76a08aaf5106a5e8d0a24e9d966817574ec26068 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -373,7 +373,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -174,10 +174,10 @@ index f1b1d1881d0598503a7ec1022ef5e00f848fb247..460828d29583ee21a7c5b716f9687a82 @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 c07916e07e09f1491c9bad7d13b127960dd167a6..7d87be1eb79045226cad3b7e62ff5d265160b866 100644 +index 5d4499a79fe6bd6a2c9f6896a40491ecadfd4f6c..b415f0760bd1027dcc9cd987d06421cbc50fbfaa 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -935,7 +935,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -939,7 +939,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Close any foreign inventory if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) { diff --git a/patches/unapplied/server/0221-Vex-get-setSummoner-API.patch b/patches/server/0218-Vex-get-setSummoner-API.patch similarity index 100% rename from patches/unapplied/server/0221-Vex-get-setSummoner-API.patch rename to patches/server/0218-Vex-get-setSummoner-API.patch diff --git a/patches/unapplied/server/0222-Refresh-player-inventory-when-cancelling-PlayerInter.patch b/patches/server/0219-Refresh-player-inventory-when-cancelling-PlayerInter.patch similarity index 90% rename from patches/unapplied/server/0222-Refresh-player-inventory-when-cancelling-PlayerInter.patch rename to patches/server/0219-Refresh-player-inventory-when-cancelling-PlayerInter.patch index 4bad4fa0b6..8b74258342 100644 --- a/patches/unapplied/server/0222-Refresh-player-inventory-when-cancelling-PlayerInter.patch +++ b/patches/server/0219-Refresh-player-inventory-when-cancelling-PlayerInter.patch @@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is cancelled to avoid this problem. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 897a950a5a0b669aff05387efb9c403764a0e8ea..857fa3a4f2d5afd27df7ce943359705b3ea131d3 100644 +index 930f71861b1ee2fe210bd0e987a6b304b25f19dc..843e0c6bf53ccbb92efe14a3d32fed3013a6a53e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2205,6 +2205,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -2215,6 +2215,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser } if (event.isCancelled()) { diff --git a/patches/unapplied/server/0223-Avoid-item-merge-if-stack-size-above-max-stack-size.patch b/patches/server/0220-Avoid-item-merge-if-stack-size-above-max-stack-size.patch similarity index 86% rename from patches/unapplied/server/0223-Avoid-item-merge-if-stack-size-above-max-stack-size.patch rename to patches/server/0220-Avoid-item-merge-if-stack-size-above-max-stack-size.patch index ef92cd2b92..c8fc08e944 100644 --- a/patches/unapplied/server/0223-Avoid-item-merge-if-stack-size-above-max-stack-size.patch +++ b/patches/server/0220-Avoid-item-merge-if-stack-size-above-max-stack-size.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Avoid item merge if stack size above max stack size 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 54025e401eb02fceb47afb182f0ede620ca23a8d..0741dcbd06395b4696eb6083128a5d9b679cb3fb 100644 +index db42d22f58df5daefc41720206405dda4f7ad633..2716fb59e83e2e2bca845bd1b58c5aefb7aa89a0 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -223,6 +223,10 @@ public class ItemEntity extends Entity { +@@ -222,6 +222,10 @@ public class ItemEntity extends Entity { private void mergeWithNeighbours() { if (this.isMergable()) { diff --git a/patches/unapplied/server/0224-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch b/patches/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch similarity index 86% rename from patches/unapplied/server/0224-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch rename to patches/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch index b3cd47759e..67107b1a89 100644 --- a/patches/unapplied/server/0224-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch +++ b/patches/server/0221-Use-AsyncAppender-to-keep-logging-IO-off-main-thread.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Use AsyncAppender to keep logging IO off main thread diff --git a/build.gradle.kts b/build.gradle.kts -index fc8ffeea3e808eb1381f85972adffc614937ef6d..c981944f4a5d40ec14ade9aaa22041887a317e1f 100644 +index ef5af1965d54e9ba9ff84d4f22ae77e4ccfa461c..80849d9b582916be238ba8c8e79de5832eff3c9a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts -@@ -37,6 +37,7 @@ dependencies { +@@ -36,6 +36,7 @@ dependencies { } - runtimeOnly("org.xerial:sqlite-jdbc:3.34.0") - runtimeOnly("mysql:mysql-connector-java:8.0.23") // Paper + runtimeOnly("org.xerial:sqlite-jdbc:3.36.0.3") + runtimeOnly("mysql:mysql-connector-java:8.0.27") + runtimeOnly("com.lmax:disruptor:3.4.4") // Paper runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.1") diff --git a/patches/unapplied/server/0225-add-more-information-to-Entity.toString.patch b/patches/server/0222-add-more-information-to-Entity.toString.patch similarity index 87% rename from patches/unapplied/server/0225-add-more-information-to-Entity.toString.patch rename to patches/server/0222-add-more-information-to-Entity.toString.patch index 31553ec0f3..1ea48c0f04 100644 --- a/patches/unapplied/server/0225-add-more-information-to-Entity.toString.patch +++ b/patches/server/0222-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 3b2334e9ba44205a4e0ec12045eab4fad91bb15a..2a6954e3c9ff82d68647bf8f4c4803184fab0bbe 100644 +index 31c502705ed3daef86df6e81215c0c7f9e8d22f8..9cf4f75f61179229e652ae56108626ba8c968121 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2815,7 +2815,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -2852,7 +2852,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i } public String toString() { diff --git a/patches/unapplied/server/0226-Add-CraftMagicNumbers.isSupportedApiVersion.patch b/patches/server/0223-Add-CraftMagicNumbers.isSupportedApiVersion.patch similarity index 90% rename from patches/unapplied/server/0226-Add-CraftMagicNumbers.isSupportedApiVersion.patch rename to patches/server/0223-Add-CraftMagicNumbers.isSupportedApiVersion.patch index 67ebf3e194..3b4c9b5a8c 100644 --- a/patches/unapplied/server/0226-Add-CraftMagicNumbers.isSupportedApiVersion.patch +++ b/patches/server/0223-Add-CraftMagicNumbers.isSupportedApiVersion.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add CraftMagicNumbers.isSupportedApiVersion() diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 2b54c6980166cb7378e3db42d3a68005ebf451a1..f8cb210390958ddba9f9685f2ec1f8bb91690162 100644 +index c7a5c9102b0cadeeefdd0dbd0de609f921460485..db33d1eb9bee8178072cc3b430b88b044a66cd92 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -373,6 +373,11 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0227-EnderDragon-Events.patch b/patches/server/0224-EnderDragon-Events.patch similarity index 91% rename from patches/unapplied/server/0227-EnderDragon-Events.patch rename to patches/server/0224-EnderDragon-Events.patch index f59ce271f5..a5f0467043 100644 --- a/patches/unapplied/server/0227-EnderDragon-Events.patch +++ b/patches/server/0224-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 df44bfce8cc492cd901dfa86331b9be7f1e13837..7490674d59d152a70e24a790bdbc717998ed2c52 100644 +index 68e27569f44efd7fa234c19c7fd51da709a06a43..f18830d9d0f821e5603992846c335bba04ab640f 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 -@@ -81,7 +81,13 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase { +@@ -83,7 +83,13 @@ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase { this.flame.setDuration(200); this.flame.setParticle(ParticleTypes.DRAGON_BREATH); this.flame.addEffect(new MobEffectInstance(MobEffects.HARM)); @@ -23,10 +23,10 @@ index df44bfce8cc492cd901dfa86331b9be7f1e13837..7490674d59d152a70e24a790bdbc7179 } 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 974895ef23e9d2b8c520abd262a2e80d28be5860..318a288a9170254b682955d96a150e99ca89b345 100644 +index f4a219f8e9f0fe698185e8ba9a4489c681d82c9e..075c27924a137adbb110f5751569c3ebd89e3fc0 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 -@@ -71,7 +71,9 @@ public class DragonStrafePlayerPhase extends AbstractDragonPhaseInstance { +@@ -74,7 +74,9 @@ public class DragonStrafePlayerPhase extends AbstractDragonPhaseInstance { DragonFireball dragonFireball = new DragonFireball(this.dragon.level, this.dragon, r, s, t); dragonFireball.moveTo(o, p, q, 0.0F, 0.0F); diff --git a/patches/unapplied/server/0228-PlayerElytraBoostEvent.patch b/patches/server/0225-PlayerElytraBoostEvent.patch similarity index 100% rename from patches/unapplied/server/0228-PlayerElytraBoostEvent.patch rename to patches/server/0225-PlayerElytraBoostEvent.patch diff --git a/patches/unapplied/server/0229-PlayerLaunchProjectileEvent.patch b/patches/server/0226-PlayerLaunchProjectileEvent.patch similarity index 98% rename from patches/unapplied/server/0229-PlayerLaunchProjectileEvent.patch rename to patches/server/0226-PlayerLaunchProjectileEvent.patch index 7b5f4c3d40..c01b74cbc8 100644 --- a/patches/unapplied/server/0229-PlayerLaunchProjectileEvent.patch +++ b/patches/server/0226-PlayerLaunchProjectileEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerLaunchProjectileEvent diff --git a/src/main/java/net/minecraft/world/item/EggItem.java b/src/main/java/net/minecraft/world/item/EggItem.java -index c33210c18445a93ca6445812471aaf1e55bcc44d..98b353f5cc05da5ee5a6c6110a08e43e819fe6d2 100644 +index 32b63407b943fb00d765dbf4e0eefb4b06f801b6..58cb992c5defec2f092755cbde661ff10f38bf9d 100644 --- a/src/main/java/net/minecraft/world/item/EggItem.java +++ b/src/main/java/net/minecraft/world/item/EggItem.java @@ -25,21 +25,33 @@ public class EggItem extends Item { @@ -177,7 +177,7 @@ index db0492f6337de562210ef062f46e98992c908200..f2d1b4e3fc08f6a06beb391bc6e60f62 } } diff --git a/src/main/java/net/minecraft/world/item/SnowballItem.java b/src/main/java/net/minecraft/world/item/SnowballItem.java -index 516afa893035539a879a71eb327eed0596c31d48..717f90a2ca41734f7ee09401f21474820fa1cf48 100644 +index d60e57e84f7d66e1858ab50ac33777feedf1c54d..ef3f90a5bcdd7b9815a4053cff166f9d2552f55d 100644 --- a/src/main/java/net/minecraft/world/item/SnowballItem.java +++ b/src/main/java/net/minecraft/world/item/SnowballItem.java @@ -26,18 +26,26 @@ public class SnowballItem extends Item { @@ -212,7 +212,7 @@ index 516afa893035539a879a71eb327eed0596c31d48..717f90a2ca41734f7ee09401f2147482 // CraftBukkit start - moved up /* @@ -45,6 +53,7 @@ public class SnowballItem extends Item { - itemstack.subtract(1); + itemstack.shrink(1); } */ + // Paper end diff --git a/patches/unapplied/server/0230-Improve-BlockPosition-inlining.patch b/patches/server/0227-Improve-BlockPosition-inlining.patch similarity index 88% rename from patches/unapplied/server/0230-Improve-BlockPosition-inlining.patch rename to patches/server/0227-Improve-BlockPosition-inlining.patch index ac4eb44c6a..23ad8f5a6f 100644 --- a/patches/unapplied/server/0230-Improve-BlockPosition-inlining.patch +++ b/patches/server/0227-Improve-BlockPosition-inlining.patch @@ -21,10 +21,10 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt They had 'callq' (invoke) instead of 'mov' (get from memory) instructions. diff --git a/src/main/java/net/minecraft/core/Vec3i.java b/src/main/java/net/minecraft/core/Vec3i.java -index f924f2b20800dfde93eeafea3614203661d35389..dc7598a011c2b290a42df35593de0b6689c99c57 100644 +index c33bac27edfdab4c3ee618c9ed39c629b1513f09..6de2ea6641433206027015695a0d10c80fe0e2f5 100644 --- a/src/main/java/net/minecraft/core/Vec3i.java +++ b/src/main/java/net/minecraft/core/Vec3i.java -@@ -41,7 +41,7 @@ public class Vec3i implements Comparable { +@@ -53,7 +53,7 @@ public class Vec3i implements Comparable { } @Override @@ -33,7 +33,7 @@ index f924f2b20800dfde93eeafea3614203661d35389..dc7598a011c2b290a42df35593de0b66 if (this == object) { return true; } else if (!(object instanceof Vec3i)) { -@@ -59,7 +59,7 @@ public class Vec3i implements Comparable { +@@ -71,7 +71,7 @@ public class Vec3i implements Comparable { } @Override @@ -42,7 +42,7 @@ index f924f2b20800dfde93eeafea3614203661d35389..dc7598a011c2b290a42df35593de0b66 return (this.getY() + this.getZ() * 31) * 31 + this.getX(); } -@@ -72,15 +72,15 @@ public class Vec3i implements Comparable { +@@ -84,15 +84,15 @@ public class Vec3i implements Comparable { } } diff --git a/patches/unapplied/server/0231-Optimize-IntIdentityHashBiMiap-nextId.patch b/patches/server/0228-Optimize-IntIdentityHashBiMiap-nextId.patch similarity index 68% rename from patches/unapplied/server/0231-Optimize-IntIdentityHashBiMiap-nextId.patch rename to patches/server/0228-Optimize-IntIdentityHashBiMiap-nextId.patch index 9eeaac8ad2..df3c55eec0 100644 --- a/patches/unapplied/server/0231-Optimize-IntIdentityHashBiMiap-nextId.patch +++ b/patches/server/0228-Optimize-IntIdentityHashBiMiap-nextId.patch @@ -8,25 +8,24 @@ Optimizes CrudeIncrementalIntIdentityHashBiMap#nextId() This is a frequent hotspot for world loading/saving. diff --git a/src/main/java/net/minecraft/util/CrudeIncrementalIntIdentityHashBiMap.java b/src/main/java/net/minecraft/util/CrudeIncrementalIntIdentityHashBiMap.java -index feaa9572a450b88a26659d850a269d09465259ee..62440dbb35263cddc90ba594c3d5777d7643e527 100644 +index dc7528b41aa9a55807a2b3e33d5668e1be681e79..a002218caed08bf4a4072d934e1094c22ee35534 100644 --- a/src/main/java/net/minecraft/util/CrudeIncrementalIntIdentityHashBiMap.java +++ b/src/main/java/net/minecraft/util/CrudeIncrementalIntIdentityHashBiMap.java -@@ -16,12 +16,14 @@ public class CrudeIncrementalIntIdentityHashBiMap implements IdMap { +@@ -16,11 +16,13 @@ public class CrudeIncrementalIntIdentityHashBiMap implements IdMap { private K[] byId; private int nextId; private int size; + private java.util.BitSet usedIds; // Paper - public CrudeIncrementalIntIdentityHashBiMap(int size) { - size = (int)((float)size / 0.8F); + private CrudeIncrementalIntIdentityHashBiMap(int size) { this.keys = (K[])(new Object[size]); this.values = new int[size]; this.byId = (K[])(new Object[size]); + this.usedIds = new java.util.BitSet(); // Paper } - @Override -@@ -54,9 +56,13 @@ public class CrudeIncrementalIntIdentityHashBiMap implements IdMap { + public static CrudeIncrementalIntIdentityHashBiMap create(int expectedSize) { +@@ -57,9 +59,13 @@ public class CrudeIncrementalIntIdentityHashBiMap implements IdMap { } private int nextId() { @@ -40,15 +39,15 @@ index feaa9572a450b88a26659d850a269d09465259ee..62440dbb35263cddc90ba594c3d5777d return this.nextId; } -@@ -69,6 +75,7 @@ public class CrudeIncrementalIntIdentityHashBiMap implements IdMap { - this.byId = (K[])(new Object[newSize]); - this.nextId = 0; - this.size = 0; +@@ -80,6 +86,7 @@ public class CrudeIncrementalIntIdentityHashBiMap implements IdMap { + this.byId = crudeIncrementalIntIdentityHashBiMap.byId; + this.nextId = crudeIncrementalIntIdentityHashBiMap.nextId; + this.size = crudeIncrementalIntIdentityHashBiMap.size; + this.usedIds.clear(); // Paper + } - for(int i = 0; i < objects.length; ++i) { - if (objects[i] != null) { -@@ -92,6 +99,7 @@ public class CrudeIncrementalIntIdentityHashBiMap implements IdMap { + public void addMapping(K value, int id) { +@@ -96,6 +103,7 @@ public class CrudeIncrementalIntIdentityHashBiMap implements IdMap { this.keys[k] = value; this.values[k] = id; this.byId[id] = value; @@ -56,11 +55,11 @@ index feaa9572a450b88a26659d850a269d09465259ee..62440dbb35263cddc90ba594c3d5777d ++this.size; if (id == this.nextId) { ++this.nextId; -@@ -153,6 +161,7 @@ public class CrudeIncrementalIntIdentityHashBiMap implements IdMap { +@@ -157,6 +165,7 @@ public class CrudeIncrementalIntIdentityHashBiMap implements IdMap { Arrays.fill(this.byId, (Object)null); this.nextId = 0; this.size = 0; + this.usedIds.clear(); // Paper } - public int size() { + @Override diff --git a/patches/unapplied/server/0232-Option-to-prevent-armor-stands-from-doing-entity-loo.patch b/patches/server/0229-Option-to-prevent-armor-stands-from-doing-entity-loo.patch similarity index 75% rename from patches/unapplied/server/0232-Option-to-prevent-armor-stands-from-doing-entity-loo.patch rename to patches/server/0229-Option-to-prevent-armor-stands-from-doing-entity-loo.patch index 3b7dbf2c46..8894a2d883 100644 --- a/patches/unapplied/server/0232-Option-to-prevent-armor-stands-from-doing-entity-loo.patch +++ b/patches/server/0229-Option-to-prevent-armor-stands-from-doing-entity-loo.patch @@ -19,22 +19,22 @@ index 35c6978eaf25ed505f99e42a58d388c62fde8319..0fd29d5854d9d6155ea590f86d4492d8 + } } 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 04ee36326b16e2aa070fd3318bd4a30bce67e49a..9a63260b20903eb4600f098c81ae660029f7c345 100644 +index 138422903dcb3056cd011a72e0625a1a225b4280..b92c2d5f9ad3936f619b51c79379983e3231e700 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -339,6 +339,7 @@ public class ArmorStand extends LivingEntity { +@@ -338,6 +338,7 @@ public class ArmorStand extends LivingEntity { @Override protected void pushEntities() { + if (!level.paperConfig.armorStandEntityLookups) return; // Paper - List list = this.level.getEntities(this, this.getBoundingBox(), ArmorStand.RIDABLE_MINECARTS); + List list = this.level.getEntities((Entity) this, this.getBoundingBox(), ArmorStand.RIDABLE_MINECARTS); for (int i = 0; i < list.size(); ++i) { diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 233a8fcfae4ac568ad1f73cc61d8ae5b66a01ac2..e8d1a17b8e65e1af03ad36afd98b3e6ebab2592a 100644 +index 21491224a8383cef2d41b0da2e7de9362fe1d27f..0e71e1cb15640d397b4da9a8cfef4fdf0a61ec51 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -774,6 +774,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -775,6 +775,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Paper end } } @@ -46,5 +46,5 @@ index 233a8fcfae4ac568ad1f73cc61d8ae5b66a01ac2..e8d1a17b8e65e1af03ad36afd98b3e6e + } + // Paper end - public Explosion explode(@Nullable Entity entity, double x, double y, double z, float power, Explosion.BlockInteraction destructionType) { - return this.explode(entity, (DamageSource) null, (ExplosionDamageCalculator) null, x, y, z, power, false, destructionType); + public boolean shouldTickDeath(Entity entity) { + return true; diff --git a/patches/unapplied/server/0233-Vanished-players-don-t-have-rights.patch b/patches/server/0230-Vanished-players-don-t-have-rights.patch similarity index 92% rename from patches/unapplied/server/0233-Vanished-players-don-t-have-rights.patch rename to patches/server/0230-Vanished-players-don-t-have-rights.patch index 827af70ffa..469aa182ba 100644 --- a/patches/unapplied/server/0233-Vanished-players-don-t-have-rights.patch +++ b/patches/server/0230-Vanished-players-don-t-have-rights.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Vanished players don't have rights diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 8af1571c614a39c9673e0dc90e3aa9a89a367e34..daa55eed9cf385c7e2cdd0a5dceaf0a719652213 100644 +index 3b2322e359ea0fa8cf6c256054c4d0dcd3f43d73..1382a16d21133b368158914509eb9ef3e0694ffd 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java @@ -209,7 +209,14 @@ public abstract class Projectile extends Entity { @@ -24,12 +24,12 @@ index 8af1571c614a39c9673e0dc90e3aa9a89a367e34..daa55eed9cf385c7e2cdd0a5dceaf0a7 return false; } diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java -index 8cf2dc21bcc2547b5af5501e60be39ca18a0e9f2..d36e73cfab79960bf4d778ea01a684b9b6af39d7 100644 +index 5eb5dde9c2a6c7e54f91f66eb40c3ad9821c96cb..0269c264f6137ade22c9e3f89fc780f6a9632087 100644 --- a/src/main/java/net/minecraft/world/item/BlockItem.java +++ b/src/main/java/net/minecraft/world/item/BlockItem.java -@@ -195,7 +195,8 @@ public class BlockItem extends Item { +@@ -194,7 +194,8 @@ public class BlockItem extends Item { Player entityhuman = context.getPlayer(); - CollisionContext voxelshapecollision = entityhuman == null ? CollisionContext.empty() : CollisionContext.of((Entity) entityhuman); + CollisionContext voxelshapecollision = entityhuman == null ? CollisionContext.empty() : CollisionContext.of(entityhuman); // CraftBukkit start - store default return - boolean defaultReturn = (!this.mustSurvive() || state.canSurvive(context.getLevel(), context.getClickedPos())) && context.getLevel().isUnobstructed(state, context.getClickedPos(), voxelshapecollision); + Level world = context.getLevel(); // Paper @@ -38,10 +38,10 @@ index 8cf2dc21bcc2547b5af5501e60be39ca18a0e9f2..d36e73cfab79960bf4d778ea01a684b9 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 e8d1a17b8e65e1af03ad36afd98b3e6ebab2592a..b5aa61cecf15e38105cf4bef92b6859aaa450dbd 100644 +index 0e71e1cb15640d397b4da9a8cfef4fdf0a61ec51..44251a6aaaeb508e8b9ed50b6b51b3b78c67d833 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -71,6 +71,10 @@ import net.minecraft.world.level.saveddata.maps.MapItemSavedData; +@@ -72,6 +72,10 @@ import net.minecraft.world.level.saveddata.maps.MapItemSavedData; import net.minecraft.world.level.storage.LevelData; import net.minecraft.world.level.storage.WritableLevelData; import net.minecraft.world.phys.AABB; @@ -52,7 +52,7 @@ index e8d1a17b8e65e1af03ad36afd98b3e6ebab2592a..b5aa61cecf15e38105cf4bef92b6859a import net.minecraft.world.scores.Scoreboard; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -@@ -251,6 +255,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -252,6 +256,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable { this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime); } diff --git a/patches/unapplied/server/0234-Allow-disabling-armour-stand-ticking.patch b/patches/server/0231-Allow-disabling-armour-stand-ticking.patch similarity index 92% rename from patches/unapplied/server/0234-Allow-disabling-armour-stand-ticking.patch rename to patches/server/0231-Allow-disabling-armour-stand-ticking.patch index 0c5a3b814a..20c255187e 100644 --- a/patches/unapplied/server/0234-Allow-disabling-armour-stand-ticking.patch +++ b/patches/server/0231-Allow-disabling-armour-stand-ticking.patch @@ -20,10 +20,10 @@ index 0fd29d5854d9d6155ea590f86d4492d86afab433..ff6cf94dec708c6d3cac837ca03be2fe + } } 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 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467e6e70672 100644 +index b92c2d5f9ad3936f619b51c79379983e3231e700..91cf7728aee475cb36f2c02bbfb7e3d2e0d00576 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 { +@@ -92,9 +92,16 @@ public class ArmorStand extends LivingEntity { public Rotations leftLegPose; public Rotations rightLegPose; public boolean canMove = true; // Paper @@ -40,7 +40,7 @@ index 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467 this.handItems = NonNullList.withSize(2, ItemStack.EMPTY); this.armorItems = NonNullList.withSize(4, ItemStack.EMPTY); this.headPose = ArmorStand.DEFAULT_HEAD_POSE; -@@ -192,6 +199,7 @@ public class ArmorStand extends LivingEntity { +@@ -191,6 +198,7 @@ public class ArmorStand extends LivingEntity { this.armorItems.set(enumitemslot.getIndex(), itemstack); } @@ -48,7 +48,7 @@ index 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467 } @Override -@@ -242,6 +250,7 @@ public class ArmorStand extends LivingEntity { +@@ -241,6 +249,7 @@ public class ArmorStand extends LivingEntity { } nbt.put("Pose", this.writePose()); @@ -56,7 +56,7 @@ index 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467 } @Override -@@ -273,6 +282,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(); @@ -69,7 +69,7 @@ index 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467 CompoundTag nbttagcompound1 = nbt.getCompound("Pose"); this.readPose(nbttagcompound1); -@@ -654,7 +669,29 @@ public class ArmorStand extends LivingEntity { +@@ -653,7 +668,29 @@ public class ArmorStand extends LivingEntity { @Override public void tick() { @@ -99,7 +99,7 @@ index 9a63260b20903eb4600f098c81ae660029f7c345..f9375dbbeda6fdc92406fe5d93df0467 Rotations vector3f = (Rotations) this.entityData.get(ArmorStand.DATA_HEAD_POSE); if (!this.headPose.equals(vector3f)) { -@@ -777,31 +814,37 @@ public class ArmorStand extends LivingEntity { +@@ -776,31 +813,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/unapplied/server/0235-SkeletonHorse-Additions.patch b/patches/server/0232-SkeletonHorse-Additions.patch similarity index 92% rename from patches/unapplied/server/0235-SkeletonHorse-Additions.patch rename to patches/server/0232-SkeletonHorse-Additions.patch index 764fb5eb4c..32b85d739b 100644 --- a/patches/unapplied/server/0235-SkeletonHorse-Additions.patch +++ b/patches/server/0232-SkeletonHorse-Additions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] SkeletonHorse Additions diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java -index 67afaab789041f49407233ca8a856a3b0131fcf6..1b874f8a72f5b1ac64dd66621b039295f5dc1f18 100644 +index cad754d6b75c3c16db4fd847fdf6cb8c0ec82dde..5c70fdefeb940837950e8a9692b1ac3a72e7c623 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java -@@ -18,6 +18,7 @@ import net.minecraft.world.level.Level; +@@ -17,6 +17,7 @@ import net.minecraft.world.item.enchantment.EnchantmentHelper; public class SkeletonTrapGoal extends Goal { private final SkeletonHorse horse; @@ -16,7 +16,7 @@ index 67afaab789041f49407233ca8a856a3b0131fcf6..1b874f8a72f5b1ac64dd66621b039295 public SkeletonTrapGoal(SkeletonHorse skeletonHorse) { this.horse = skeletonHorse; -@@ -25,12 +26,13 @@ public class SkeletonTrapGoal extends Goal { +@@ -24,12 +25,13 @@ public class SkeletonTrapGoal extends Goal { @Override public boolean canUse() { @@ -32,7 +32,7 @@ index 67afaab789041f49407233ca8a856a3b0131fcf6..1b874f8a72f5b1ac64dd66621b039295 this.horse.setTrap(false); diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java -index 849616d9ad140285f7aa4d2ffafd6371f3904bd5..325e244c46ec208a2e7e18d71ccbbfcc25fc1bce 100644 +index 0dc46471f7247e5d36c3896a0c87473072362fe6..bc3bfe8d3c2f87e2e9f167b9ff34d9ca8a696391 100644 --- a/src/main/java/net/minecraft/world/level/EntityGetter.java +++ b/src/main/java/net/minecraft/world/level/EntityGetter.java @@ -89,6 +89,28 @@ public interface EntityGetter { diff --git a/patches/unapplied/server/0236-Don-t-call-getItemMeta-on-hasItemMeta.patch b/patches/server/0233-Don-t-call-getItemMeta-on-hasItemMeta.patch similarity index 100% rename from patches/unapplied/server/0236-Don-t-call-getItemMeta-on-hasItemMeta.patch rename to patches/server/0233-Don-t-call-getItemMeta-on-hasItemMeta.patch diff --git a/patches/unapplied/server/0237-Implement-Expanded-ArmorStand-API.patch b/patches/server/0234-Implement-Expanded-ArmorStand-API.patch similarity index 100% rename from patches/unapplied/server/0237-Implement-Expanded-ArmorStand-API.patch rename to patches/server/0234-Implement-Expanded-ArmorStand-API.patch diff --git a/patches/unapplied/server/0238-AnvilDamageEvent.patch b/patches/server/0235-AnvilDamageEvent.patch similarity index 91% rename from patches/unapplied/server/0238-AnvilDamageEvent.patch rename to patches/server/0235-AnvilDamageEvent.patch index f180555c22..c6a2d47491 100644 --- a/patches/unapplied/server/0238-AnvilDamageEvent.patch +++ b/patches/server/0235-AnvilDamageEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] AnvilDamageEvent diff --git a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -index 6acd18521bde95183bf3910328559a2a5829c03d..2ed4930648411ccd52fc970b069e57eba9bceef8 100644 +index 57c2806543e8a183033170bfb7746cfa8f14b448..6b9c39b85e3a21fc0073fc15c8a76c92f75d2487 100644 --- a/src/main/java/net/minecraft/world/inventory/AnvilMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AnvilMenu.java -@@ -90,6 +90,16 @@ public class AnvilMenu extends ItemCombinerMenu { +@@ -89,6 +89,16 @@ public class AnvilMenu extends ItemCombinerMenu { if (!player.getAbilities().instabuild && iblockdata.is((Tag) BlockTags.ANVIL) && player.getRandom().nextFloat() < 0.12F) { BlockState iblockdata1 = AnvilBlock.damage(iblockdata); diff --git a/patches/unapplied/server/0239-Add-hand-to-bucket-events.patch b/patches/server/0236-Add-hand-to-bucket-events.patch similarity index 87% rename from patches/unapplied/server/0239-Add-hand-to-bucket-events.patch rename to patches/server/0236-Add-hand-to-bucket-events.patch index f3723fe1e8..c7b623e3a0 100644 --- a/patches/unapplied/server/0239-Add-hand-to-bucket-events.patch +++ b/patches/server/0236-Add-hand-to-bucket-events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add hand to bucket events diff --git a/src/main/java/net/minecraft/world/entity/animal/Cow.java b/src/main/java/net/minecraft/world/entity/animal/Cow.java -index 0cf990f220fad6e945bda590263b78ea2e5a3b03..a43349c47292154dfc56c72c58ba9f29f6765d83 100644 +index 0f601ad4629bda75ec90612ad27fdec9ce62f83d..425c6da0de40983b0870c9fd1b53f16b6a11c34c 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cow.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cow.java @@ -87,7 +87,7 @@ public class Cow extends Animal { @@ -18,10 +18,10 @@ index 0cf990f220fad6e945bda590263b78ea2e5a3b03..a43349c47292154dfc56c72c58ba9f29 if (event.isCancelled()) { return InteractionResult.PASS; diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -index 68b116697d6cf3dbb1fa25d6e9ca9bbb10f346a3..32d0387b6c66462ca965add78a562dec3c4b95a9 100644 +index dc1ef737267aa826d1d2fb10f923fe294a67be83..d3c4f93ee2aa1902eeca197c72eb17199fc41fb2 100644 --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -@@ -180,7 +180,7 @@ public class Goat extends Animal { +@@ -182,7 +182,7 @@ public class Goat extends Animal { if (itemstack.is(Items.BUCKET) && !this.isBaby()) { // CraftBukkit start - Got milk? @@ -31,10 +31,10 @@ index 68b116697d6cf3dbb1fa25d6e9ca9bbb10f346a3..32d0387b6c66462ca965add78a562dec if (event.isCancelled()) { return InteractionResult.PASS; diff --git a/src/main/java/net/minecraft/world/item/BucketItem.java b/src/main/java/net/minecraft/world/item/BucketItem.java -index 5870023250ed2dba16b2fa5c6a8be6f36cebc640..650b59b69eb12112bc71e5ff164767e3118e1c2a 100644 +index 25f1567660682a122fcb63318f51ec45ffdf0d3b..5406acd65d4e1146f3bd7340ff9a1954a5c39ddb 100644 --- a/src/main/java/net/minecraft/world/item/BucketItem.java +++ b/src/main/java/net/minecraft/world/item/BucketItem.java -@@ -72,7 +72,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { +@@ -70,7 +70,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { // CraftBukkit start ItemStack dummyFluid = ifluidsource.pickupBlock(DummyGeneratorAccess.INSTANCE, blockposition, iblockdata); if (dummyFluid.isEmpty()) return InteractionResultHolder.fail(itemstack); // Don't fire event if the bucket won't be filled. @@ -43,31 +43,31 @@ index 5870023250ed2dba16b2fa5c6a8be6f36cebc640..650b59b69eb12112bc71e5ff164767e3 if (event.isCancelled()) { ((ServerPlayer) user).connection.send(new ClientboundBlockUpdatePacket(world, blockposition)); // SPIGOT-5163 (see PlayerInteractManager) -@@ -103,7 +103,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { +@@ -101,7 +101,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { iblockdata = world.getBlockState(blockposition); BlockPos blockposition2 = iblockdata.getBlock() instanceof LiquidBlockContainer && this.content == Fluids.WATER ? blockposition : blockposition1; -- if (this.a(user, world, blockposition2, movingobjectpositionblock, movingobjectpositionblock.getDirection(), blockposition, itemstack)) { // CraftBukkit +- if (this.emptyContents(user, world, blockposition2, movingobjectpositionblock, movingobjectpositionblock.getDirection(), blockposition, itemstack)) { // CraftBukkit + if (this.emptyContents(user, world, blockposition2, movingobjectpositionblock, movingobjectpositionblock.getDirection(), blockposition, itemstack, hand)) { // CraftBukkit // Paper - add enumhand this.checkExtraContent(user, world, itemstack, blockposition2); if (user instanceof ServerPlayer) { CriteriaTriggers.PLACED_BLOCK.trigger((ServerPlayer) user, blockposition2, itemstack); -@@ -130,10 +130,12 @@ public class BucketItem extends Item implements DispensibleContainerItem { +@@ -128,10 +128,12 @@ public class BucketItem extends Item implements DispensibleContainerItem { @Override public boolean emptyContents(@Nullable Player player, Level world, BlockPos pos, @Nullable BlockHitResult hitResult) { -- return this.a(player, world, pos, hitResult, null, null, null); +- return this.emptyContents(player, world, pos, hitResult, null, null, null); + // Paper start - add enumHand + return emptyContents(player, world, pos, hitResult, null, null, null, null); } -- public boolean a(Player entityhuman, Level world, BlockPos blockposition, @Nullable BlockHitResult movingobjectpositionblock, Direction enumdirection, BlockPos clicked, ItemStack itemstack) { +- public boolean emptyContents(Player entityhuman, Level world, BlockPos blockposition, @Nullable BlockHitResult movingobjectpositionblock, Direction enumdirection, BlockPos clicked, ItemStack itemstack) { + public boolean emptyContents(Player entityhuman, Level world, BlockPos blockposition, @Nullable BlockHitResult movingobjectpositionblock, Direction enumdirection, BlockPos clicked, ItemStack itemstack, InteractionHand enumhand) { + // Paper end // CraftBukkit end if (!(this.content instanceof FlowingFluid)) { return false; -@@ -146,7 +148,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { +@@ -144,7 +146,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { // CraftBukkit start if (flag1 && entityhuman != null) { @@ -76,13 +76,13 @@ index 5870023250ed2dba16b2fa5c6a8be6f36cebc640..650b59b69eb12112bc71e5ff164767e3 if (event.isCancelled()) { ((ServerPlayer) entityhuman).connection.send(new ClientboundBlockUpdatePacket(world, blockposition)); // SPIGOT-4238: needed when looking through entity ((ServerPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541 -@@ -155,7 +157,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { +@@ -153,7 +155,7 @@ public class BucketItem extends Item implements DispensibleContainerItem { } // CraftBukkit end if (!flag1) { -- return movingobjectpositionblock != null && this.a(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (BlockHitResult) null, enumdirection, clicked, itemstack); // CraftBukkit -+ return movingobjectpositionblock != null && this.emptyContents(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (BlockHitResult) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit // Paper - add enumhand - } else if (world.dimensionType().ultraWarm() && this.content.is((Tag) FluidTags.WATER)) { +- return movingobjectpositionblock != null && this.emptyContents(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (BlockHitResult) null, enumdirection, clicked, itemstack); // CraftBukkit ++ return movingobjectpositionblock != null && this.emptyContents(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (BlockHitResult) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit // Paper + } else if (world.dimensionType().ultraWarm() && this.content.is(FluidTags.WATER)) { int i = blockposition.getX(); int j = blockposition.getY(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/patches/unapplied/server/0240-Add-TNTPrimeEvent.patch b/patches/server/0237-Add-TNTPrimeEvent.patch similarity index 93% rename from patches/unapplied/server/0240-Add-TNTPrimeEvent.patch rename to patches/server/0237-Add-TNTPrimeEvent.patch index 44e01554cf..4c2f58822c 100644 --- a/patches/unapplied/server/0240-Add-TNTPrimeEvent.patch +++ b/patches/server/0237-Add-TNTPrimeEvent.patch @@ -5,7 +5,7 @@ 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 3a01ffffcc37a93866b8b6774874959dfcabba26..29aa428e019681af8d6b0020c12b18660ff6af6c 100644 +index 19e594757fca90c64c4dc59233ff956e7c316da9..e17a3afa41fd628d2c4a3637ae19418e258a99b8 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 @@ -536,6 +536,11 @@ public class EnderDragon extends Mob implements Enemy { @@ -21,10 +21,10 @@ index 3a01ffffcc37a93866b8b6774874959dfcabba26..29aa428e019681af8d6b0020c12b1866 this.level.removeBlock(blockposition, false); diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index 2703afdd101092c92da2eb619757271c2a5f9305..8ce3dea66a1f45bb3f416bca1765c563394ad8ed 100644 +index 55e35c210c21e8ff1222859fafe4d5d58aea0bc7..33752432af861a708e0dbb1afafcd5968d795931 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java -@@ -291,7 +291,7 @@ public class FireBlock extends BaseFireBlock { +@@ -290,7 +290,7 @@ public class FireBlock extends BaseFireBlock { world.setBlock(blockposition, this.getStateWithAge(world, blockposition, l), 3); } else { @@ -33,7 +33,7 @@ index 2703afdd101092c92da2eb619757271c2a5f9305..8ce3dea66a1f45bb3f416bca1765c563 } Block block = iblockdata.getBlock(); -@@ -299,6 +299,13 @@ public class FireBlock extends BaseFireBlock { +@@ -298,6 +298,13 @@ public class FireBlock extends BaseFireBlock { if (block instanceof TntBlock) { TntBlock blocktnt = (TntBlock) block; @@ -48,7 +48,7 @@ index 2703afdd101092c92da2eb619757271c2a5f9305..8ce3dea66a1f45bb3f416bca1765c563 } } diff --git a/src/main/java/net/minecraft/world/level/block/TntBlock.java b/src/main/java/net/minecraft/world/level/block/TntBlock.java -index 390dfe9d2a148468b9ed3e3fb39fc944e7aa4d5c..151d412df2fce6e51d0297dc1c070056c31ec196 100644 +index b7bdeb40ec988b41ba602cea695fc14b7146bc4d..96cf2a42c9836a86541029f9d674ee5478d47b0c 100644 --- a/src/main/java/net/minecraft/world/level/block/TntBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TntBlock.java @@ -38,6 +38,11 @@ public class TntBlock extends Block { @@ -97,7 +97,7 @@ index 390dfe9d2a148468b9ed3e3fb39fc944e7aa4d5c..151d412df2fce6e51d0297dc1c070056 + if(!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.ITEM, player.getBukkitEntity()).callEvent()) + return InteractionResult.FAIL; + // Paper end - TntBlock.explode(world, pos, (LivingEntity) player); + TntBlock.explode(world, pos, player); world.setBlock(pos, Blocks.AIR.defaultBlockState(), 11); Item item = itemstack.getItem(); @@ -126,6 +147,12 @@ public class TntBlock extends Block { diff --git a/patches/unapplied/server/0241-Break-up-and-make-tab-spam-limits-configurable.patch b/patches/server/0238-Break-up-and-make-tab-spam-limits-configurable.patch similarity index 92% rename from patches/unapplied/server/0241-Break-up-and-make-tab-spam-limits-configurable.patch rename to patches/server/0238-Break-up-and-make-tab-spam-limits-configurable.patch index 1eda770e77..9272ed1d11 100644 --- a/patches/unapplied/server/0241-Break-up-and-make-tab-spam-limits-configurable.patch +++ b/patches/server/0238-Break-up-and-make-tab-spam-limits-configurable.patch @@ -45,18 +45,18 @@ index 8ecd1e851cc2168c538947623e1c328e463b52d9..1508afe593a1b62e3a33455707e25524 + } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 857fa3a4f2d5afd27df7ce943359705b3ea131d3..265d147de39e306fac27913b2dc3899e82c63796 100644 +index 843e0c6bf53ccbb92efe14a3d32fed3013a6a53e..c8a5cd52689b2cd81a2206f0f71623d784c379ce 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -227,6 +227,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -226,6 +226,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser private long keepAliveChallenge; // CraftBukkit start - multithreaded fields - private AtomicInteger chatSpamTickCount = new AtomicInteger(); + private final AtomicInteger chatSpamTickCount = new AtomicInteger(); + private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits // CraftBukkit end private int dropSpamTickCount; private double firstGoodX; -@@ -359,6 +360,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -358,6 +359,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser this.server.getProfiler().pop(); // CraftBukkit start for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ; @@ -64,7 +64,7 @@ index 857fa3a4f2d5afd27df7ce943359705b3ea131d3..265d147de39e306fac27913b2dc3899e /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -705,7 +707,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -704,7 +706,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) { // PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async // CraftBukkit start diff --git a/patches/unapplied/server/0242-MC-135506-Experience-should-save-as-Integers.patch b/patches/server/0239-MC-135506-Experience-should-save-as-Integers.patch similarity index 93% rename from patches/unapplied/server/0242-MC-135506-Experience-should-save-as-Integers.patch rename to patches/server/0239-MC-135506-Experience-should-save-as-Integers.patch index f21e8609c8..8398582047 100644 --- a/patches/unapplied/server/0242-MC-135506-Experience-should-save-as-Integers.patch +++ b/patches/server/0239-MC-135506-Experience-should-save-as-Integers.patch @@ -5,7 +5,7 @@ Subject: [PATCH] MC-135506: Experience should save as Integers diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index 1fdfeaa7758497e93fc13b44996e11d74a812546..ec7d011fa5df0b4775bedc01632ba549d3803693 100644 +index 8a3f2d2c9087b1a5f4dbde8e58af825e334f2432..8be7a3527018f9f6ecb91576c928c255b3089342 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java @@ -283,7 +283,7 @@ public class ExperienceOrb extends Entity { diff --git a/patches/unapplied/server/0243-Fix-client-rendering-skulls-from-same-user.patch b/patches/server/0240-Fix-client-rendering-skulls-from-same-user.patch similarity index 78% rename from patches/unapplied/server/0243-Fix-client-rendering-skulls-from-same-user.patch rename to patches/server/0240-Fix-client-rendering-skulls-from-same-user.patch index ac7687061a..4e0e6f3b86 100644 --- a/patches/unapplied/server/0243-Fix-client-rendering-skulls-from-same-user.patch +++ b/patches/server/0240-Fix-client-rendering-skulls-from-same-user.patch @@ -12,10 +12,10 @@ This allows the client to render multiple skull textures from the same user, for when different skins were used when skull was made. diff --git a/src/main/java/net/minecraft/network/FriendlyByteBuf.java b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -index b10cf0c5800397520f57c0bbc88a52e52db6a4c8..e3b80334164ba48e83cca0b9a7f3a8ddf05dd598 100644 +index 303b877bc467de7c046cc221d061fac841c1d9f3..896a4237f871d46cf39b0721e909c2cc3b5fc728 100644 --- a/src/main/java/net/minecraft/network/FriendlyByteBuf.java +++ b/src/main/java/net/minecraft/network/FriendlyByteBuf.java -@@ -497,9 +497,18 @@ public class FriendlyByteBuf extends ByteBuf { +@@ -496,9 +496,18 @@ public class FriendlyByteBuf extends ByteBuf { if (item.canBeDepleted() || item.shouldOverrideMultiplayerNbt()) { // Spigot start - filter stack = stack.copy(); @@ -35,7 +35,7 @@ index b10cf0c5800397520f57c0bbc88a52e52db6a4c8..e3b80334164ba48e83cca0b9a7f3a8dd } this.writeNbt(nbttagcompound); -@@ -519,7 +528,16 @@ public class FriendlyByteBuf extends ByteBuf { +@@ -518,7 +527,16 @@ public class FriendlyByteBuf extends ByteBuf { itemstack.setTag(this.readNbt()); // CraftBukkit start if (itemstack.getTag() != null) { @@ -53,20 +53,20 @@ index b10cf0c5800397520f57c0bbc88a52e52db6a4c8..e3b80334164ba48e83cca0b9a7f3a8dd } // CraftBukkit end return itemstack; -diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java -index 3bdb09ab00ec05ed532a0c26b9fd321e1f05c1a0..1451a98d69b185dd15a2d1d7681bcecb6a4f99c1 100644 ---- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java -+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacket.java -@@ -48,6 +48,7 @@ public class ClientboundLevelChunkPacket implements Packet entry2 : chunk.getBlockEntities().entrySet()) { - BlockEntity blockEntity = entry2.getValue(); +diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java +index 069c12ec0b90d07f45b58b960ed41bad0480b5ab..108c5d7fedc125108ca97ce125520b64a083ccd4 100644 +--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java ++++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java +@@ -152,6 +152,7 @@ public class ClientboundLevelChunkPacketData { + static ClientboundLevelChunkPacketData.BlockEntityInfo create(BlockEntity blockEntity) { CompoundTag compoundTag = blockEntity.getUpdateTag(); + BlockPos blockPos = blockEntity.getBlockPos(); + if (blockEntity instanceof net.minecraft.world.level.block.entity.SkullBlockEntity) { net.minecraft.world.level.block.entity.SkullBlockEntity.sanitizeTileEntityUUID(compoundTag); } // Paper - this.blockEntitiesTags.add(compoundTag); + int i = SectionPos.sectionRelative(blockPos.getX()) << 4 | SectionPos.sectionRelative(blockPos.getZ()); + return new ClientboundLevelChunkPacketData.BlockEntityInfo(i, blockPos.getY(), blockEntity.getType(), compoundTag.isEmpty() ? null : compoundTag); } - diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java -index 836c52bfc170788553b639e9a8a82f3f21be670b..6381544b0038de9a09c01238638e4e127e4eddc6 100644 +index 2a49aa1d387949e33708f5f13261e5257ea4aa2f..e3efea8623c7d34915069a6b9b7da9f2b1694c28 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java @@ -11,6 +11,7 @@ import javax.annotation.Nullable; @@ -77,12 +77,12 @@ index 836c52bfc170788553b639e9a8a82f3f21be670b..6381544b0038de9a09c01238638e4e12 import net.minecraft.nbt.NbtUtils; import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; import net.minecraft.server.players.GameProfileCache; -@@ -95,9 +96,37 @@ public class SkullBlockEntity extends BlockEntity { - @Nullable +@@ -93,9 +94,37 @@ public class SkullBlockEntity extends BlockEntity { + @Override public ClientboundBlockEntityDataPacket getUpdatePacket() { -- return new ClientboundBlockEntityDataPacket(this.worldPosition, 4, this.getUpdateTag()); -+ return new ClientboundBlockEntityDataPacket(this.worldPosition, 4, sanitizeTileEntityUUID(this.getUpdateTag())); // Paper +- return ClientboundBlockEntityDataPacket.create(this); ++ return ClientboundBlockEntityDataPacket.create(this, e -> sanitizeTileEntityUUID(e.getUpdateTag())); // Paper } + // Paper start @@ -115,4 +115,4 @@ index 836c52bfc170788553b639e9a8a82f3f21be670b..6381544b0038de9a09c01238638e4e12 + @Override public CompoundTag getUpdateTag() { - return this.save(new CompoundTag()); + return this.saveWithoutMetadata(); diff --git a/patches/unapplied/server/0244-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch b/patches/server/0241-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch similarity index 88% rename from patches/unapplied/server/0244-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch rename to patches/server/0241-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch index 32c918a5c3..fd6870d0eb 100644 --- a/patches/unapplied/server/0244-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch +++ b/patches/server/0241-Add-Debug-Entities-option-to-debug-dupe-uuid-issues.patch @@ -8,10 +8,10 @@ Add -Ddebug.entities=true to your JVM flags to gain more information 1.17: Needs to be reworked for new entity storage system diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 5e53ef4b71969737f900063ab631f4a1ce74cb90..a85f96c5cb661082962cd768eaf41affb8e2fe15 100644 +index 1a62a21d40c583f9cbf2b8fbb63b691fffb71ae0..6af70073e1ee0290ec30392153c2c18dfeffa0e8 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1206,6 +1206,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1319,6 +1319,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } else { ChunkMap.TrackedEntity playerchunkmap_entitytracker = new ChunkMap.TrackedEntity(entity, i, j, entitytypes.trackDeltas()); @@ -19,7 +19,7 @@ index 5e53ef4b71969737f900063ab631f4a1ce74cb90..a85f96c5cb661082962cd768eaf41aff this.entityMap.put(entity.getId(), playerchunkmap_entitytracker); playerchunkmap_entitytracker.updatePlayers(this.level.players()); if (entity instanceof ServerPlayer) { -@@ -1248,7 +1249,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1361,7 +1362,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider if (playerchunkmap_entitytracker1 != null) { playerchunkmap_entitytracker1.broadcastRemoved(); } @@ -29,10 +29,10 @@ index 5e53ef4b71969737f900063ab631f4a1ce74cb90..a85f96c5cb661082962cd768eaf41aff 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 dd2710f2a093fcca9f80edf41866459d63bac94c..1d95dae881fd89056e2ad86a8f33aecf90cf8a3b 100644 +index 5d63b8843beaeb6f6d42d1c122c89ea57ed44e36..29b2ddee252759c7ad17df8fe19ea08a36eb2673 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -199,6 +199,9 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -206,6 +206,9 @@ public class ServerLevel extends Level implements WorldGenLevel { public final LevelStorageSource.LevelStorageAccess convertable; public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper @@ -42,9 +42,9 @@ index dd2710f2a093fcca9f80edf41866459d63bac94c..1d95dae881fd89056e2ad86a8f33aecf @Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI return this.chunkSource.getChunk(x, z, false); -@@ -1070,7 +1073,28 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1091,7 +1094,28 @@ public class ServerLevel extends Level implements WorldGenLevel { // CraftBukkit start - private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { + private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) { org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot + // Paper start + if (entity.valid) { @@ -68,14 +68,14 @@ index dd2710f2a093fcca9f80edf41866459d63bac94c..1d95dae881fd89056e2ad86a8f33aecf + getAddToWorldStackTrace(entity).printStackTrace(); + } + // Paper end - // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit + // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit return false; } else { diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 2a6954e3c9ff82d68647bf8f4c4803184fab0bbe..b4f2b969ad30be38c0a9e3f8efd2a57c3e0f7df0 100644 +index 9cf4f75f61179229e652ae56108626ba8c968121..752e4593bed746e663f018f85ae1ac43cd7b0795 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -171,6 +171,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n +@@ -171,6 +171,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper private CraftEntity bukkitEntity; @@ -85,10 +85,10 @@ index 2a6954e3c9ff82d68647bf8f4c4803184fab0bbe..b4f2b969ad30be38c0a9e3f8efd2a57c if (this.bukkitEntity == null) { this.bukkitEntity = CraftEntity.getEntity(this.level.getCraftServer(), this); diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 2647b88ffffa393e744d9e003032468acc92668a..76cb42b147e05595e64c4ff6f13881780a1a9be4 100644 +index 44251a6aaaeb508e8b9ed50b6b51b3b78c67d833..0663aa74688104c551e8ef52b01947dacf95bb22 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -141,6 +141,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -142,6 +142,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean pvpMode; public boolean keepSpawnInMemory = true; public org.bukkit.generator.ChunkGenerator generator; diff --git a/patches/unapplied/server/0245-Add-Early-Warning-Feature-to-WatchDog.patch b/patches/server/0242-Add-Early-Warning-Feature-to-WatchDog.patch similarity index 96% rename from patches/unapplied/server/0245-Add-Early-Warning-Feature-to-WatchDog.patch rename to patches/server/0242-Add-Early-Warning-Feature-to-WatchDog.patch index 89e9f34909..0c4d6c616f 100644 --- a/patches/unapplied/server/0245-Add-Early-Warning-Feature-to-WatchDog.patch +++ b/patches/server/0242-Add-Early-Warning-Feature-to-WatchDog.patch @@ -36,10 +36,10 @@ index 1508afe593a1b62e3a33455707e2552468786614..73b49d24cd428e2328d56f5f42333a25 public static int tabSpamLimit = 500; private static void tabSpamLimiters() { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d9fab29a066367a5cf4a3486989fa7f35451801e..13f94e196ffd9f37e8049a4a76bc83389ff58d84 100644 +index e9333b85100d7670b2be7df6e847dfca3084ff55..44f32023db3edaae107f48fd9b96baf5432417d9 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1101,6 +1101,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop consoleInput = Collections.synchronizedList(Lists.newArrayList()); -+ private final java.util.Queue serverCommandQueue = new java.util.concurrent.ConcurrentLinkedQueue<>(); // Paper - use a proper queue ++ private final java.util.Queue serverCommandQueue = new java.util.concurrent.ConcurrentLinkedQueue<>(); // Paper - use a proper queuemmands + @Nullable private QueryThreadGs4 queryThreadGs4; public final RconConsoleSource rconConsoleSource; - private RconThread rconThread; -@@ -475,13 +475,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface +@@ -453,13 +453,15 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface } public void handleConsoleInput(String command, CommandSourceStack commandSource) { diff --git a/patches/unapplied/server/0249-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch b/patches/server/0246-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch similarity index 87% rename from patches/unapplied/server/0249-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch rename to patches/server/0246-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch index 8490b9fa93..771018ee28 100644 --- a/patches/unapplied/server/0249-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch +++ b/patches/server/0246-Ability-to-get-Tile-Entities-from-a-chunk-without-sn.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -index f26bea2f0b5e9629087b50c855694a79d926a485..7467de2da7cbe79df49d9bd95df1891810a1431b 100644 +index 92a33a23764e8ca1e2e6b2b0feb6caca2a5dfc56..7bc1219523eeb0880493e6fb42692f1fdb30c110 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java -@@ -3,8 +3,10 @@ package org.bukkit.craftbukkit; - import com.google.common.base.Preconditions; +@@ -4,8 +4,10 @@ import com.google.common.base.Preconditions; import com.google.common.base.Predicates; + import com.mojang.serialization.Codec; import java.lang.ref.WeakReference; +import java.util.ArrayList; import java.util.Arrays; @@ -19,7 +19,7 @@ index f26bea2f0b5e9629087b50c855694a79d926a485..7467de2da7cbe79df49d9bd95df18918 import java.util.Objects; import java.util.concurrent.locks.LockSupport; import java.util.function.BooleanSupplier; -@@ -174,6 +176,13 @@ public class CraftChunk implements Chunk { +@@ -175,6 +177,13 @@ public class CraftChunk implements Chunk { @Override public BlockState[] getTileEntities() { @@ -33,7 +33,7 @@ index f26bea2f0b5e9629087b50c855694a79d926a485..7467de2da7cbe79df49d9bd95df18918 if (!this.isLoaded()) { this.getWorld().getChunkAt(x, z); // Transient load for this tick } -@@ -188,7 +197,29 @@ public class CraftChunk implements Chunk { +@@ -189,7 +198,29 @@ public class CraftChunk implements Chunk { } BlockPos position = (BlockPos) obj; diff --git a/patches/unapplied/0170-Make-max-squid-spawn-height-configurable.patch b/patches/unapplied/0170-Make-max-squid-spawn-height-configurable.patch index 7e1eaf5a89..7dd91ec111 100644 --- a/patches/unapplied/0170-Make-max-squid-spawn-height-configurable.patch +++ b/patches/unapplied/0170-Make-max-squid-spawn-height-configurable.patch @@ -22,15 +22,16 @@ index e2894138d3efb32161087ad2a1093b8c15c56a65..5892823425055efb92bf635b035d6298 + } } diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java -index 370513fbc39f178f903ce140ced1a97029dd39db..b195617c39c4b382a196a709c318904cd0598e0e 100644 +index 3ffc1ee8a9ae63c8678c12736fab5d6ba0a21a5b..4da560f6e4da0750bda78b900b2d916d58adfccb 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Squid.java +++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java -@@ -206,7 +206,7 @@ public class Squid extends WaterAnimal { - public void travel(Vec3 movementInput) { - this.move(MoverType.SELF, this.getDeltaMovement()); +@@ -211,7 +211,8 @@ public class Squid extends WaterAnimal { } -- -+// AAA + + public static boolean checkSquidSpawnRules(EntityType type, LevelAccessor world, MobSpawnType spawnReason, BlockPos pos, Random random) { +- return pos.getY() > world.getMinecraftWorld().spigotConfig.squidSpawnRangeMin && pos.getY() < world.getSeaLevel(); // Spigot ++ final double maxHeight = world.getMinecraftWorld().paperConfig.squidMaxSpawnHeight > 0 ? world.getMinecraftWorld().paperConfig.squidMaxSpawnHeight : world.getSeaLevel(); // Paper ++ return pos.getY() > world.getMinecraftWorld().spigotConfig.squidSpawnRangeMin && pos.getY() < maxHeight; // Spigot // Paper + } + @Override - public void handleEntityEvent(byte status) { - if (status == 19) {