From bab0b3a7c38edbd05cfdfe86c7289c352b5a6726 Mon Sep 17 00:00:00 2001 From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> Date: Thu, 8 Jun 2023 04:08:08 -0400 Subject: [PATCH] YOU get patches --- ...single-and-multi-AABB-VoxelShapes-an.patch | 11 +------- ...ward-CraftEntity-in-teleport-command.patch | 2 +- .../0743-Entity-powdered-snow-API.patch} | 2 +- ...0744-Add-API-for-item-entity-health.patch} | 0 ...-type-tags-suggestions-in-selectors.patch} | 16 ++++++------ ...ax-block-light-for-monster-spawning.patch} | 0 ...pistons-and-BlockPistonRetractEvent.patch} | 16 ++++++------ ...plifiers-greater-than-127-correctly.patch} | 0 ...-canSmelt-methods-to-FurnaceInvento.patch} | 0 .../0750-Fix-bees-aging-inside-hives.patch} | 0 .../0751-Bucketable-API.patch} | 0 .../0752-Validate-usernames.patch} | 4 +-- ...er-animal-spawn-height-configurable.patch} | 2 +- ...anilla-BiomeProvider-from-WorldInfo.patch} | 6 ++--- ...ion-for-worlds-affected-by-time-cmd.patch} | 6 ++--- ...load-to-PersistentDataContainer-has.patch} | 0 ...7-Multiple-Entries-with-Scoreboards.patch} | 0 ...758-Reset-placed-block-on-exception.patch} | 0 ...configurable-height-for-slime-spawn.patch} | 2 +- ...ostname-to-AsyncPlayerPreLoginEvent.patch} | 0 ...0761-Fix-xp-reward-for-baby-zombies.patch} | 2 +- .../0762-Kick-on-main-for-illegal-chat.patch} | 8 +++--- ...lti-Block-Change-API-Implementation.patch} | 10 +++---- .../0764-Fix-NotePlayEvent.patch} | 12 ++++----- .../0765-Freeze-Tick-Lock-API.patch} | 26 +++++++++---------- .../0766-Dolphin-API.patch} | 0 .../0767-More-PotionEffectType-API.patch} | 0 ...for-StructureTemplate.Pallete-cache.patch} | 4 +-- ...command-sender-which-forwards-feedb.patch} | 4 +-- ...-missing-structure-set-seed-configs.patch} | 0 .../0771-Implement-regenerateChunk.patch} | 2 +- ...lled-powdered-snow-bucket-placement.patch} | 6 ++--- ...ate-calls-to-CraftServer-getSpawnLi.patch} | 4 +-- .../0774-Add-GameEvent-tags.patch} | 6 ++--- ...ks-fairly-for-worlds-while-waiting-.patch} | 6 ++--- .../0776-Furnace-RecipesUsed-API.patch} | 0 ...gurable-sculk-sensor-listener-range.patch} | 16 ++++++------ ...d-missing-block-data-mins-and-maxes.patch} | 0 ...fault-CustomSpawners-in-custom-worl.patch} | 6 ++--- ...-worldlist-before-initing-the-world.patch} | 4 +-- .../0781-Fix-Entity-Position-Desync.patch} | 4 +-- .../0782-Custom-Potion-Mixes.patch} | 8 +++--- ...83-Force-close-world-loading-screen.patch} | 4 +-- ...784-Fix-falling-block-spawn-methods.patch} | 8 +++--- ...Expose-furnace-minecart-push-values.patch} | 0 ...ojectileHitEvent-for-piercing-arrow.patch} | 4 +-- .../0787-More-Projectile-API.patch} | 8 +++--- ...x-swamp-hut-cat-generation-deadlock.patch} | 2 +- ...le-movement-from-players-while-tele.patch} | 11 ++++---- ...0790-Implement-getComputedBiome-API.patch} | 4 +-- .../0791-Make-some-itemstacks-nonnull.patch} | 0 ...792-Implement-enchantWithLevels-API.patch} | 4 +-- .../0793-Fix-saving-in-unloadWorld.patch} | 2 +- .../0794-Buffer-OOB-setBlock-calls.patch} | 0 .../0795-Add-TameableDeathMessageEvent.patch} | 4 +-- ...ock-data-for-EntityChangeBlockEvent.patch} | 16 ++++++------ ...bles-running-when-mob-loot-gamerule.patch} | 4 +-- ...ssenger-world-matches-ridden-entity.patch} | 4 +-- ...rd-against-invalid-entity-positions.patch} | 4 +-- 59 files changed, 132 insertions(+), 142 deletions(-) rename patches/{unapplied/server/0764-Entity-powdered-snow-API.patch => server/0743-Entity-powdered-snow-API.patch} (94%) rename patches/{unapplied/server/0765-Add-API-for-item-entity-health.patch => server/0744-Add-API-for-item-entity-health.patch} (100%) rename patches/{unapplied/server/0766-Fix-entity-type-tags-suggestions-in-selectors.patch => server/0745-Fix-entity-type-tags-suggestions-in-selectors.patch} (94%) rename patches/{unapplied/server/0767-Configurable-max-block-light-for-monster-spawning.patch => server/0746-Configurable-max-block-light-for-monster-spawning.patch} (100%) rename patches/{unapplied/server/0768-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch => server/0747-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch} (85%) rename patches/{unapplied/server/0769-Load-effect-amplifiers-greater-than-127-correctly.patch => server/0748-Load-effect-amplifiers-greater-than-127-correctly.patch} (100%) rename patches/{unapplied/server/0770-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch => server/0749-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch} (100%) rename patches/{unapplied/server/0771-Fix-bees-aging-inside-hives.patch => server/0750-Fix-bees-aging-inside-hives.patch} (100%) rename patches/{unapplied/server/0772-Bucketable-API.patch => server/0751-Bucketable-API.patch} (100%) rename patches/{unapplied/server/0773-Validate-usernames.patch => server/0752-Validate-usernames.patch} (96%) rename patches/{unapplied/server/0774-Make-water-animal-spawn-height-configurable.patch => server/0753-Make-water-animal-spawn-height-configurable.patch} (92%) rename patches/{unapplied/server/0775-Expose-vanilla-BiomeProvider-from-WorldInfo.patch => server/0754-Expose-vanilla-BiomeProvider-from-WorldInfo.patch} (96%) rename patches/{unapplied/server/0776-Add-config-option-for-worlds-affected-by-time-cmd.patch => server/0755-Add-config-option-for-worlds-affected-by-time-cmd.patch} (91%) rename patches/{unapplied/server/0777-Add-new-overload-to-PersistentDataContainer-has.patch => server/0756-Add-new-overload-to-PersistentDataContainer-has.patch} (100%) rename patches/{unapplied/server/0778-Multiple-Entries-with-Scoreboards.patch => server/0757-Multiple-Entries-with-Scoreboards.patch} (100%) rename patches/{unapplied/server/0779-Reset-placed-block-on-exception.patch => server/0758-Reset-placed-block-on-exception.patch} (100%) rename patches/{unapplied/server/0780-Add-configurable-height-for-slime-spawn.patch => server/0759-Add-configurable-height-for-slime-spawn.patch} (96%) rename patches/{unapplied/server/0781-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch => server/0760-Added-getHostname-to-AsyncPlayerPreLoginEvent.patch} (100%) rename patches/{unapplied/server/0782-Fix-xp-reward-for-baby-zombies.patch => server/0761-Fix-xp-reward-for-baby-zombies.patch} (92%) rename patches/{unapplied/server/0783-Kick-on-main-for-illegal-chat.patch => server/0762-Kick-on-main-for-illegal-chat.patch} (90%) rename patches/{unapplied/server/0784-Multi-Block-Change-API-Implementation.patch => server/0763-Multi-Block-Change-API-Implementation.patch} (89%) rename patches/{unapplied/server/0785-Fix-NotePlayEvent.patch => server/0764-Fix-NotePlayEvent.patch} (86%) rename patches/{unapplied/server/0786-Freeze-Tick-Lock-API.patch => server/0765-Freeze-Tick-Lock-API.patch} (75%) rename patches/{unapplied/server/0787-Dolphin-API.patch => server/0766-Dolphin-API.patch} (100%) rename patches/{unapplied/server/0788-More-PotionEffectType-API.patch => server/0767-More-PotionEffectType-API.patch} (100%) rename patches/{unapplied/server/0789-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch => server/0768-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch} (88%) rename patches/{unapplied/server/0790-API-for-creating-command-sender-which-forwards-feedb.patch => server/0769-API-for-creating-command-sender-which-forwards-feedb.patch} (97%) rename patches/{unapplied/server/0791-Add-missing-structure-set-seed-configs.patch => server/0770-Add-missing-structure-set-seed-configs.patch} (100%) rename patches/{unapplied/server/0792-Implement-regenerateChunk.patch => server/0771-Implement-regenerateChunk.patch} (98%) rename patches/{unapplied/server/0793-Fix-cancelled-powdered-snow-bucket-placement.patch => server/0772-Fix-cancelled-powdered-snow-bucket-placement.patch} (93%) rename patches/{unapplied/server/0794-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch => server/0773-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch} (86%) rename patches/{unapplied/server/0795-Add-GameEvent-tags.patch => server/0774-Add-GameEvent-tags.patch} (95%) rename patches/{unapplied/server/0796-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch => server/0775-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch} (87%) rename patches/{unapplied/server/0797-Furnace-RecipesUsed-API.patch => server/0776-Furnace-RecipesUsed-API.patch} (100%) rename patches/{unapplied/server/0798-Configurable-sculk-sensor-listener-range.patch => server/0777-Configurable-sculk-sensor-listener-range.patch} (75%) rename patches/{unapplied/server/0799-Add-missing-block-data-mins-and-maxes.patch => server/0778-Add-missing-block-data-mins-and-maxes.patch} (100%) rename patches/{unapplied/server/0800-Option-to-have-default-CustomSpawners-in-custom-worl.patch => server/0779-Option-to-have-default-CustomSpawners-in-custom-worl.patch} (84%) rename patches/{unapplied/server/0801-Put-world-into-worldlist-before-initing-the-world.patch => server/0780-Put-world-into-worldlist-before-initing-the-world.patch} (91%) rename patches/{unapplied/server/0802-Fix-Entity-Position-Desync.patch => server/0781-Fix-Entity-Position-Desync.patch} (89%) rename patches/{unapplied/server/0803-Custom-Potion-Mixes.patch => server/0782-Custom-Potion-Mixes.patch} (97%) rename patches/{unapplied/server/0804-Force-close-world-loading-screen.patch => server/0783-Force-close-world-loading-screen.patch} (92%) rename patches/{unapplied/server/0805-Fix-falling-block-spawn-methods.patch => server/0784-Fix-falling-block-spawn-methods.patch} (91%) rename patches/{unapplied/server/0806-Expose-furnace-minecart-push-values.patch => server/0785-Expose-furnace-minecart-push-values.patch} (100%) rename patches/{unapplied/server/0807-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch => server/0786-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch} (88%) rename patches/{unapplied/server/0808-More-Projectile-API.patch => server/0787-More-Projectile-API.patch} (98%) rename patches/{unapplied/server/0809-Fix-swamp-hut-cat-generation-deadlock.patch => server/0788-Fix-swamp-hut-cat-generation-deadlock.patch} (97%) rename patches/{unapplied/server/0810-Don-t-allow-vehicle-movement-from-players-while-tele.patch => server/0789-Don-t-allow-vehicle-movement-from-players-while-tele.patch} (71%) rename patches/{unapplied/server/0811-Implement-getComputedBiome-API.patch => server/0790-Implement-getComputedBiome-API.patch} (94%) rename patches/{unapplied/server/0812-Make-some-itemstacks-nonnull.patch => server/0791-Make-some-itemstacks-nonnull.patch} (100%) rename patches/{unapplied/server/0813-Implement-enchantWithLevels-API.patch => server/0792-Implement-enchantWithLevels-API.patch} (92%) rename patches/{unapplied/server/0814-Fix-saving-in-unloadWorld.patch => server/0793-Fix-saving-in-unloadWorld.patch} (90%) rename patches/{unapplied/server/0815-Buffer-OOB-setBlock-calls.patch => server/0794-Buffer-OOB-setBlock-calls.patch} (100%) rename patches/{unapplied/server/0816-Add-TameableDeathMessageEvent.patch => server/0795-Add-TameableDeathMessageEvent.patch} (84%) rename patches/{unapplied/server/0817-Fix-new-block-data-for-EntityChangeBlockEvent.patch => server/0796-Fix-new-block-data-for-EntityChangeBlockEvent.patch} (88%) rename patches/{unapplied/server/0818-fix-player-loottables-running-when-mob-loot-gamerule.patch => server/0797-fix-player-loottables-running-when-mob-loot-gamerule.patch} (87%) rename patches/{unapplied/server/0819-Ensure-entity-passenger-world-matches-ridden-entity.patch => server/0798-Ensure-entity-passenger-world-matches-ridden-entity.patch} (88%) rename patches/{unapplied/server/0820-Guard-against-invalid-entity-positions.patch => server/0799-Guard-against-invalid-entity-positions.patch} (92%) diff --git a/patches/server/0735-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch b/patches/server/0735-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch index 19ca972a91..878bb4a16b 100644 --- a/patches/server/0735-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch +++ b/patches/server/0735-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch @@ -1215,7 +1215,7 @@ index 5f957a28e9d30144f724ebdc581d5f0b80bf6dc1..23ab7960120c1e2a76880f634787a089 } diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 19fe9bc6f4eafb18f8f215a24d8bcd52627cabf0..0309fb9418c8436953d536036895df532da0b9dd 100644 +index 19fe9bc6f4eafb18f8f215a24d8bcd52627cabf0..db2a24b668622f68730cc3cafff974272bebe133 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -1176,10 +1176,45 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @@ -1268,15 +1268,6 @@ index 19fe9bc6f4eafb18f8f215a24d8bcd52627cabf0..0309fb9418c8436953d536036895df53 if (this.remainingFireTicks <= 0) { this.setRemainingFireTicks(-this.getFireImmuneTicks()); } -@@ -1193,7 +1228,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { - this.setRemainingFireTicks(-this.getFireImmuneTicks()); - } - -- this.level().getProfiler().pop(); -+ this.level.getProfiler().pop(); - } - } - // Paper start - detailed watchdog information @@ -1359,32 +1394,78 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } diff --git a/patches/server/0741-Forward-CraftEntity-in-teleport-command.patch b/patches/server/0741-Forward-CraftEntity-in-teleport-command.patch index 53ca058cac..e0cb3cccfe 100644 --- a/patches/server/0741-Forward-CraftEntity-in-teleport-command.patch +++ b/patches/server/0741-Forward-CraftEntity-in-teleport-command.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Forward CraftEntity in teleport command diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 0309fb9418c8436953d536036895df532da0b9dd..67071108e3c454951382de6c9817fd4ce3f7d377 100644 +index db2a24b668622f68730cc3cafff974272bebe133..90f53767b3bedcfdb5fad41cc407464d2307cc65 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -3422,6 +3422,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { diff --git a/patches/unapplied/server/0764-Entity-powdered-snow-API.patch b/patches/server/0743-Entity-powdered-snow-API.patch similarity index 94% rename from patches/unapplied/server/0764-Entity-powdered-snow-API.patch rename to patches/server/0743-Entity-powdered-snow-API.patch index 67d0a8c82b..9a89f4836f 100644 --- a/patches/unapplied/server/0764-Entity-powdered-snow-API.patch +++ b/patches/server/0743-Entity-powdered-snow-API.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Entity powdered snow API public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 0c65652866de257d2a9019f910506a6f01757422..7ea5f911046fd05be8a997b07e6f66d69eaa9564 100644 +index 4628f436e054ab79daa11b3921f66acfc0faa325..50b40994fa4ad13941b1dfd16eec8edeeb0bf399 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1377,5 +1377,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/patches/unapplied/server/0765-Add-API-for-item-entity-health.patch b/patches/server/0744-Add-API-for-item-entity-health.patch similarity index 100% rename from patches/unapplied/server/0765-Add-API-for-item-entity-health.patch rename to patches/server/0744-Add-API-for-item-entity-health.patch diff --git a/patches/unapplied/server/0766-Fix-entity-type-tags-suggestions-in-selectors.patch b/patches/server/0745-Fix-entity-type-tags-suggestions-in-selectors.patch similarity index 94% rename from patches/unapplied/server/0766-Fix-entity-type-tags-suggestions-in-selectors.patch rename to patches/server/0745-Fix-entity-type-tags-suggestions-in-selectors.patch index d0e3e4efed..fb2a1b1a37 100644 --- a/patches/unapplied/server/0766-Fix-entity-type-tags-suggestions-in-selectors.patch +++ b/patches/server/0745-Fix-entity-type-tags-suggestions-in-selectors.patch @@ -10,10 +10,10 @@ when if this was fixed on the client, that wouldn't be needed. Mojira Issue: https://bugs.mojang.com/browse/MC-235045 diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java -index 24172c3b7b1d2faa13b18bedf89ad051267feb6c..7b6b51392b123d34382233adcf4c3d4867bdaa32 100644 +index 308b3a36f063c401a447f9b7f0364700eee5a54c..22884a2b148b9a5af8655bb754ebe73618218a83 100644 --- a/src/main/java/net/minecraft/commands/CommandSourceStack.java +++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java -@@ -421,4 +421,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy +@@ -441,4 +441,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy return this.source.getBukkitSender(this); } // CraftBukkit end @@ -35,10 +35,10 @@ index 24172c3b7b1d2faa13b18bedf89ad051267feb6c..7b6b51392b123d34382233adcf4c3d48 + // Paper end } diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 01ba9dfaaa07569e1ca4bf40497070f49eae36ce..933d6e67cbcc1bf121005f57b13dd976020985c3 100644 +index 7592b592a541912f729d6b99f455cd87ebcb34b8..f967e9039c87ec458da3f133743df834437b3e02 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -470,6 +470,7 @@ public class Commands { +@@ -472,6 +472,7 @@ public class Commands { private void fillUsableCommands(CommandNode tree, CommandNode result, CommandSourceStack source, Map, CommandNode> resultNodes) { Iterator iterator = tree.getChildren().iterator(); @@ -46,7 +46,7 @@ index 01ba9dfaaa07569e1ca4bf40497070f49eae36ce..933d6e67cbcc1bf121005f57b13dd976 while (iterator.hasNext()) { CommandNode commandnode2 = (CommandNode) iterator.next(); // Paper start -@@ -496,6 +497,12 @@ public class Commands { +@@ -498,6 +499,12 @@ public class Commands { if (requiredargumentbuilder.getSuggestionsProvider() != null) { requiredargumentbuilder.suggests(SuggestionProviders.safelySwap(requiredargumentbuilder.getSuggestionsProvider())); @@ -97,10 +97,10 @@ index cdc1319a7cb45a7c5ea30885958b8c3c54f0a241..4cc2ee22369aef22c9bf9d2b244c7278 this.level = MinMaxBounds.Ints.ANY; this.rotX = WrappedMinMaxBounds.ANY; diff --git a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java -index d34d70029ef30ea8c4f1598f676ad65557c066e1..b6abbf5775b8aa73d32494e6ac0e9afbeb534ae2 100644 +index 027906d533717fa97a523f4b03b31270fe3fa5fc..c51bcb3d89936cf558a5fe8aa6371617274a02a1 100644 --- a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java +++ b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java -@@ -66,6 +66,19 @@ public class EntitySelectorOptions { +@@ -68,6 +68,19 @@ public class EntitySelectorOptions { public static final DynamicCommandExceptionType ERROR_ENTITY_TYPE_INVALID = new DynamicCommandExceptionType((entity) -> { return Component.translatable("argument.entity.options.type.invalid", entity); }); @@ -120,7 +120,7 @@ index d34d70029ef30ea8c4f1598f676ad65557c066e1..b6abbf5775b8aa73d32494e6ac0e9afb private static void register(String id, EntitySelectorOptions.Modifier handler, Predicate condition, Component description) { OPTIONS.put(id, new EntitySelectorOptions.Option(handler, condition, description)); -@@ -313,6 +326,12 @@ public class EntitySelectorOptions { +@@ -315,6 +328,12 @@ public class EntitySelectorOptions { if (reader.isTag()) { TagKey> tagKey = TagKey.create(Registries.ENTITY_TYPE, ResourceLocation.read(reader.getReader())); diff --git a/patches/unapplied/server/0767-Configurable-max-block-light-for-monster-spawning.patch b/patches/server/0746-Configurable-max-block-light-for-monster-spawning.patch similarity index 100% rename from patches/unapplied/server/0767-Configurable-max-block-light-for-monster-spawning.patch rename to patches/server/0746-Configurable-max-block-light-for-monster-spawning.patch diff --git a/patches/unapplied/server/0768-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch b/patches/server/0747-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch similarity index 85% rename from patches/unapplied/server/0768-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch rename to patches/server/0747-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch index 698fbc2d5e..d4f3ab6d9f 100644 --- a/patches/unapplied/server/0768-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch +++ b/patches/server/0747-Fix-sticky-pistons-and-BlockPistonRetractEvent.patch @@ -27,7 +27,7 @@ Co-authored-by: Zach Brown Co-authored-by: Madeline Miller diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java -index 24a822ade17849a083161216c184f02c30b5cb1f..f456ad8a74464414f69b616a48ee9a2c1cee4d90 100644 +index 9b3d253c4224410719bf778a4688fce13c12069d..ee316f2474e43c1e644632772e9eb9cc181756c6 100644 --- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java @@ -146,15 +146,15 @@ public class PistonBaseBlock extends DirectionalBlock { @@ -55,9 +55,9 @@ index 24a822ade17849a083161216c184f02c30b5cb1f..f456ad8a74464414f69b616a48ee9a2c // PAIL: checkME - what happened to setTypeAndData? // CraftBukkit end world.blockEvent(pos, this, b0, enumdirection.get3DDataValue()); -@@ -236,6 +236,13 @@ public class PistonBaseBlock extends DirectionalBlock { +@@ -237,6 +237,13 @@ public class PistonBaseBlock extends DirectionalBlock { - BlockState iblockdata1 = (BlockState) ((BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(MovingPistonBlock.FACING, enumdirection)).setValue(MovingPistonBlock.TYPE, this.isSticky ? PistonType.STICKY : PistonType.DEFAULT); + BlockState iblockdata2 = (BlockState) ((BlockState) Blocks.MOVING_PISTON.defaultBlockState().setValue(MovingPistonBlock.FACING, enumdirection)).setValue(MovingPistonBlock.TYPE, this.isSticky ? PistonType.STICKY : PistonType.DEFAULT); + // Paper start - Move empty piston retract call to fix multiple event fires + if (!this.isSticky) { @@ -66,11 +66,11 @@ index 24a822ade17849a083161216c184f02c30b5cb1f..f456ad8a74464414f69b616a48ee9a2c + } + } + // Paper end - world.setBlock(pos, iblockdata1, 20); - world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(pos, iblockdata1, (BlockState) this.defaultBlockState().setValue(PistonBaseBlock.FACING, Direction.from3DDataValue(data & 7)), enumdirection, false, true)); // Paper - diff on change - world.blockUpdated(pos, iblockdata1.getBlock()); -@@ -262,6 +269,13 @@ public class PistonBaseBlock extends DirectionalBlock { - if (type == 1 && !iblockdata2.isAir() && PistonBaseBlock.isPushable(iblockdata2, world, blockposition1, enumdirection.getOpposite(), false, enumdirection) && (iblockdata2.getPistonPushReaction() == PushReaction.NORMAL || iblockdata2.is(Blocks.PISTON) || iblockdata2.is(Blocks.STICKY_PISTON))) { + world.setBlock(pos, iblockdata2, 20); + world.setBlockEntity(MovingPistonBlock.newMovingBlockEntity(pos, iblockdata2, (BlockState) this.defaultBlockState().setValue(PistonBaseBlock.FACING, Direction.from3DDataValue(data & 7)), enumdirection, false, true)); // Paper - diff on change + world.blockUpdated(pos, iblockdata2.getBlock()); +@@ -263,6 +270,13 @@ public class PistonBaseBlock extends DirectionalBlock { + if (type == 1 && !iblockdata3.isAir() && PistonBaseBlock.isPushable(iblockdata3, world, blockposition1, enumdirection.getOpposite(), false, enumdirection) && (iblockdata3.getPistonPushReaction() == PushReaction.NORMAL || iblockdata3.is(Blocks.PISTON) || iblockdata3.is(Blocks.STICKY_PISTON))) { this.moveBlocks(world, pos, enumdirection, false); } else { + // Paper start - fire BlockPistonRetractEvent for sticky pistons retracting nothing (air) diff --git a/patches/unapplied/server/0769-Load-effect-amplifiers-greater-than-127-correctly.patch b/patches/server/0748-Load-effect-amplifiers-greater-than-127-correctly.patch similarity index 100% rename from patches/unapplied/server/0769-Load-effect-amplifiers-greater-than-127-correctly.patch rename to patches/server/0748-Load-effect-amplifiers-greater-than-127-correctly.patch diff --git a/patches/unapplied/server/0770-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch b/patches/server/0749-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch similarity index 100% rename from patches/unapplied/server/0770-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch rename to patches/server/0749-Expose-isFuel-and-canSmelt-methods-to-FurnaceInvento.patch diff --git a/patches/unapplied/server/0771-Fix-bees-aging-inside-hives.patch b/patches/server/0750-Fix-bees-aging-inside-hives.patch similarity index 100% rename from patches/unapplied/server/0771-Fix-bees-aging-inside-hives.patch rename to patches/server/0750-Fix-bees-aging-inside-hives.patch diff --git a/patches/unapplied/server/0772-Bucketable-API.patch b/patches/server/0751-Bucketable-API.patch similarity index 100% rename from patches/unapplied/server/0772-Bucketable-API.patch rename to patches/server/0751-Bucketable-API.patch diff --git a/patches/unapplied/server/0773-Validate-usernames.patch b/patches/server/0752-Validate-usernames.patch similarity index 96% rename from patches/unapplied/server/0773-Validate-usernames.patch rename to patches/server/0752-Validate-usernames.patch index bc6a92f1f3..50da68e797 100644 --- a/patches/unapplied/server/0773-Validate-usernames.patch +++ b/patches/server/0752-Validate-usernames.patch @@ -56,10 +56,10 @@ index ed3af916dfa875dd0a5f1e730d20d11efd6419c6..cd4e76fe5b79c7d9e615b4886a568c74 if (gameprofile != null && packet.name().equalsIgnoreCase(gameprofile.getName())) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 6fa5d2552935e8e733cbbefb2db11239a26291dc..0996ae8318aab706892c6ef4caae369e62f54187 100644 +index 23ab7960120c1e2a76880f634787a089857ebff4..3ba9d736ac8f3029b57fbf5deccc28cc68b34a3e 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -666,7 +666,7 @@ public abstract class PlayerList { +@@ -673,7 +673,7 @@ public abstract class PlayerList { for (int i = 0; i < this.players.size(); ++i) { entityplayer = (ServerPlayer) this.players.get(i); diff --git a/patches/unapplied/server/0774-Make-water-animal-spawn-height-configurable.patch b/patches/server/0753-Make-water-animal-spawn-height-configurable.patch similarity index 92% rename from patches/unapplied/server/0774-Make-water-animal-spawn-height-configurable.patch rename to patches/server/0753-Make-water-animal-spawn-height-configurable.patch index 51e3451cbf..9e90672eb5 100644 --- a/patches/unapplied/server/0774-Make-water-animal-spawn-height-configurable.patch +++ b/patches/server/0753-Make-water-animal-spawn-height-configurable.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Make water animal spawn height configurable diff --git a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java -index b2b55e65dd5c38b8ee610fc1f3247690115831b2..35cfa366baf6747105faa93f1220bb9cc31a5bd5 100644 +index 36c4f9a8d3b56dd28f6291cc6958b00364f7a394..cd2ce5bcb8c30e4657cd0e340d80544c7e805905 100644 --- a/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java +++ b/src/main/java/net/minecraft/world/entity/animal/WaterAnimal.java @@ -78,6 +78,10 @@ public abstract class WaterAnimal extends PathfinderMob { diff --git a/patches/unapplied/server/0775-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0754-Expose-vanilla-BiomeProvider-from-WorldInfo.patch similarity index 96% rename from patches/unapplied/server/0775-Expose-vanilla-BiomeProvider-from-WorldInfo.patch rename to patches/server/0754-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index 3fa986851a..84d5dc8606 100644 --- a/patches/unapplied/server/0775-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0754-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 24c88555ea85dd2a0656e1f67a4828a5137157b8..cbbb0ff40488c430d15c2ed054d1b2880c9e92b7 100644 +index d8fa1cb0b340f97debceb7e5b90051d29448fc58..d55c798657bf8922f3d43d84620cfeed1effa054 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -564,7 +564,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop optional = this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages()); -@@ -2197,7 +2199,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2195,7 +2197,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) { @@ -30,7 +30,7 @@ index cde507aa4d342c323c3ce05014ad9b4c6b0a2d5e..3cbdc0c897c57e2db01ba78c83c0f2c0 } else { Optional optional = this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages()); -@@ -2283,7 +2287,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2281,7 +2285,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private Optional tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); diff --git a/patches/unapplied/server/0784-Multi-Block-Change-API-Implementation.patch b/patches/server/0763-Multi-Block-Change-API-Implementation.patch similarity index 89% rename from patches/unapplied/server/0784-Multi-Block-Change-API-Implementation.patch rename to patches/server/0763-Multi-Block-Change-API-Implementation.patch index 17526e4c9c..2258e57986 100644 --- a/patches/unapplied/server/0784-Multi-Block-Change-API-Implementation.patch +++ b/patches/server/0763-Multi-Block-Change-API-Implementation.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Multi Block Change API Implementation diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java -index c96e75456c2f8564d3bc75993cc6e03ba605597d..7c6a6693760638a07b7c7c330aaeffd9fa454845 100644 +index f96d61bdeb556665d6e6e5023f9d77fd82204e89..45bfc2af4942c029537805fce2f14e150d3440b1 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java -@@ -63,6 +63,15 @@ public class ClientboundSectionBlocksUpdatePacket implements Packet blocks, boolean suppressLightUpdates) { + public void sendBlockChanges(Collection blocks) { Preconditions.checkArgument(blocks != null, "blocks must not be null"); diff --git a/patches/unapplied/server/0785-Fix-NotePlayEvent.patch b/patches/server/0764-Fix-NotePlayEvent.patch similarity index 86% rename from patches/unapplied/server/0785-Fix-NotePlayEvent.patch rename to patches/server/0764-Fix-NotePlayEvent.patch index 6acea2e752..5104743fbe 100644 --- a/patches/unapplied/server/0785-Fix-NotePlayEvent.patch +++ b/patches/server/0764-Fix-NotePlayEvent.patch @@ -7,12 +7,12 @@ Subject: [PATCH] Fix NotePlayEvent public org.bukkit.craftbukkit.block.data.CraftBlockData toNMS(Ljava/lang/Enum;Ljava/lang/Class;)Ljava/lang/Enum; diff --git a/src/main/java/net/minecraft/world/level/block/NoteBlock.java b/src/main/java/net/minecraft/world/level/block/NoteBlock.java -index 1327eb8ff0f044340d6a1c7058dc6d8a191615dc..a9c2d254bda5686a35ad2393534b85030dd8b136 100644 +index 3dac47c3761b48700298e9bf078597a1823892bd..910864cfeac085648e6c671b0f9480417324d36e 100644 --- a/src/main/java/net/minecraft/world/level/block/NoteBlock.java +++ b/src/main/java/net/minecraft/world/level/block/NoteBlock.java -@@ -90,11 +90,12 @@ public class NoteBlock extends Block { +@@ -86,11 +86,12 @@ public class NoteBlock extends Block { private void playNote(@Nullable Entity entity, BlockState state, Level world, BlockPos pos) { - if (!((NoteBlockInstrument) state.getValue(NoteBlock.INSTRUMENT)).requiresAirAbove() || world.getBlockState(pos.above()).isAir()) { + if (((NoteBlockInstrument) state.getValue(NoteBlock.INSTRUMENT)).worksAboveNoteBlock() || world.getBlockState(pos.above()).isAir()) { // CraftBukkit start - org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, pos, state.getValue(NoteBlock.INSTRUMENT), state.getValue(NoteBlock.NOTE)); - if (event.isCancelled()) { @@ -27,7 +27,7 @@ index 1327eb8ff0f044340d6a1c7058dc6d8a191615dc..a9c2d254bda5686a35ad2393534b8503 world.blockEvent(pos, this, 0, 0); world.gameEvent(entity, GameEvent.NOTE_BLOCK_PLAY, pos); } -@@ -133,10 +134,14 @@ public class NoteBlock extends Block { +@@ -129,10 +130,14 @@ public class NoteBlock extends Block { @Override public boolean triggerEvent(BlockState state, Level world, BlockPos pos, int type, int data) { NoteBlockInstrument blockpropertyinstrument = (NoteBlockInstrument) state.getValue(NoteBlock.INSTRUMENT); @@ -41,9 +41,9 @@ index 1327eb8ff0f044340d6a1c7058dc6d8a191615dc..a9c2d254bda5686a35ad2393534b8503 - int k = (Integer) state.getValue(NoteBlock.NOTE); + int k = event.getNote().getId(); // Paper - f = (float) Math.pow(2.0D, (double) (k - 12) / 12.0D); + f = NoteBlock.getPitchFromNote(k); world.addParticle(ParticleTypes.NOTE, (double) pos.getX() + 0.5D, (double) pos.getY() + 1.2D, (double) pos.getZ() + 0.5D, (double) k / 24.0D, 0.0D, 0.0D); -@@ -155,7 +160,7 @@ public class NoteBlock extends Block { +@@ -151,7 +156,7 @@ public class NoteBlock extends Block { holder = Holder.direct(SoundEvent.createVariableRangeEvent(minecraftkey)); } else { diff --git a/patches/unapplied/server/0786-Freeze-Tick-Lock-API.patch b/patches/server/0765-Freeze-Tick-Lock-API.patch similarity index 75% rename from patches/unapplied/server/0786-Freeze-Tick-Lock-API.patch rename to patches/server/0765-Freeze-Tick-Lock-API.patch index 9d9f4ebc17..54a0b29df5 100644 --- a/patches/unapplied/server/0786-Freeze-Tick-Lock-API.patch +++ b/patches/server/0765-Freeze-Tick-Lock-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Freeze Tick Lock API diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 61f6e3196551b76d0300a60e3ad8e446b49dace3..570d6b5777ea21619db23ef01f3230249d9ab6e1 100644 +index 90f53767b3bedcfdb5fad41cc407464d2307cc65..e0245c5cef697d9cc304fbfc269fc4d1b735c333 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -398,6 +398,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -401,6 +401,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { private org.bukkit.util.Vector origin; @javax.annotation.Nullable private UUID originWorld; @@ -16,16 +16,16 @@ index 61f6e3196551b76d0300a60e3ad8e446b49dace3..570d6b5777ea21619db23ef01f323024 public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -827,7 +828,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -800,7 +801,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { this.setRemainingFireTicks(this.remainingFireTicks - 1); } - if (this.getTicksFrozen() > 0) { + if (this.getTicksFrozen() > 0 && !freezeLocked) { // Paper - Freeze Tick Lock API this.setTicksFrozen(0); - this.level.levelEvent((Player) null, 1009, this.blockPosition, 1); + this.level().levelEvent((Player) null, 1009, this.blockPosition, 1); } -@@ -2298,6 +2299,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2384,6 +2385,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (fromNetherPortal) { nbt.putBoolean("Paper.FromNetherPortal", true); } @@ -35,7 +35,7 @@ index 61f6e3196551b76d0300a60e3ad8e446b49dace3..570d6b5777ea21619db23ef01f323024 // Paper end return nbt; } catch (Throwable throwable) { -@@ -2463,6 +2467,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2549,6 +2553,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (spawnReason == null) { spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; } @@ -46,20 +46,20 @@ index 61f6e3196551b76d0300a60e3ad8e446b49dace3..570d6b5777ea21619db23ef01f323024 } catch (Throwable throwable) { diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index b167d83abee37d64f8ef5865b9407bf1d2237ea1..b30e52730a7dec78e425365975ba57aa4f371cfd 100644 +index 29a8b2bddf4257e74db27bf990c8aa1fd99c341b..c629e03d5281e566050ca22d2c3a16626f7a57cc 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3375,7 +3375,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3424,7 +3424,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - this.level.getProfiler().pop(); - this.level.getProfiler().push("freezing"); -- if (!this.level.isClientSide && !this.isDeadOrDying()) { -+ if (!this.level.isClientSide && !this.isDeadOrDying() && !freezeLocked) { // Paper - Freeze Tick Lock API + this.level().getProfiler().pop(); + this.level().getProfiler().push("freezing"); +- if (!this.level().isClientSide && !this.isDeadOrDying()) { ++ if (!this.level().isClientSide && !this.isDeadOrDying() && !freezeLocked) { // Paper - Freeze Tick Lock API int i = this.getTicksFrozen(); if (this.isInPowderSnow && this.canFreeze()) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 743c32c449a135b242f545239c987af42cce2205..6478faa20adea00349600620c2ab7d559e2fc3b7 100644 +index 50b40994fa4ad13941b1dfd16eec8edeeb0bf399..c6fc526db6943f6466d6504feff63715e35a0eb2 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -663,6 +663,17 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/patches/unapplied/server/0787-Dolphin-API.patch b/patches/server/0766-Dolphin-API.patch similarity index 100% rename from patches/unapplied/server/0787-Dolphin-API.patch rename to patches/server/0766-Dolphin-API.patch diff --git a/patches/unapplied/server/0788-More-PotionEffectType-API.patch b/patches/server/0767-More-PotionEffectType-API.patch similarity index 100% rename from patches/unapplied/server/0788-More-PotionEffectType-API.patch rename to patches/server/0767-More-PotionEffectType-API.patch diff --git a/patches/unapplied/server/0789-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch b/patches/server/0768-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch similarity index 88% rename from patches/unapplied/server/0789-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch rename to patches/server/0768-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch index d457ae29d4..839a5f95d4 100644 --- a/patches/unapplied/server/0789-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch +++ b/patches/server/0768-Use-a-CHM-for-StructureTemplate.Pallete-cache.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use a CHM for StructureTemplate.Pallete cache fixes a CME due to this collection being shared across threads diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -index 2ed4453c7744c1c99210d581af8d68bced4659c6..53ef0991be65d18c3f80030992726b462a7bd8a8 100644 +index 1ceeeebc759385d9f306822601b6057aa2aba0c2..020e436f77f9f2de631727c00ccd41e9293b1f47 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -@@ -836,7 +836,7 @@ public class StructureTemplate { +@@ -825,7 +825,7 @@ public class StructureTemplate { public static final class Palette { private final List blocks; diff --git a/patches/unapplied/server/0790-API-for-creating-command-sender-which-forwards-feedb.patch b/patches/server/0769-API-for-creating-command-sender-which-forwards-feedb.patch similarity index 97% rename from patches/unapplied/server/0790-API-for-creating-command-sender-which-forwards-feedb.patch rename to patches/server/0769-API-for-creating-command-sender-which-forwards-feedb.patch index 9a75c21bb9..3879e5603f 100644 --- a/patches/unapplied/server/0790-API-for-creating-command-sender-which-forwards-feedb.patch +++ b/patches/server/0769-API-for-creating-command-sender-which-forwards-feedb.patch @@ -122,10 +122,10 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 7bd966d497d15a118c36aa9316d6e71757044d75..f1c6983593fe60251ec8ac69f28e91184732f46b 100644 +index 98a0069562be1abf2ddc38ee6bc01c3118d84a1a..93eff6f651a0f55098f0f7d46b33066d8f88d6a6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2018,6 +2018,13 @@ public final class CraftServer implements Server { +@@ -2016,6 +2016,13 @@ public final class CraftServer implements Server { return console.console; } diff --git a/patches/unapplied/server/0791-Add-missing-structure-set-seed-configs.patch b/patches/server/0770-Add-missing-structure-set-seed-configs.patch similarity index 100% rename from patches/unapplied/server/0791-Add-missing-structure-set-seed-configs.patch rename to patches/server/0770-Add-missing-structure-set-seed-configs.patch diff --git a/patches/unapplied/server/0792-Implement-regenerateChunk.patch b/patches/server/0771-Implement-regenerateChunk.patch similarity index 98% rename from patches/unapplied/server/0792-Implement-regenerateChunk.patch rename to patches/server/0771-Implement-regenerateChunk.patch index 0c25cdefb0..b9821861b4 100644 --- a/patches/unapplied/server/0792-Implement-regenerateChunk.patch +++ b/patches/server/0771-Implement-regenerateChunk.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Implement regenerateChunk Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index fafcc9948778a80841975191014aa0435f1cad94..1d50e5ace7035873523ca16d683b196732176ea5 100644 +index 826d3b20a10158f1022de33627039fd16e7197fc..4a19f5b1bada47f91516312db12245e11bf88e7d 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -142,6 +142,7 @@ import org.jetbrains.annotations.NotNull; diff --git a/patches/unapplied/server/0793-Fix-cancelled-powdered-snow-bucket-placement.patch b/patches/server/0772-Fix-cancelled-powdered-snow-bucket-placement.patch similarity index 93% rename from patches/unapplied/server/0793-Fix-cancelled-powdered-snow-bucket-placement.patch rename to patches/server/0772-Fix-cancelled-powdered-snow-bucket-placement.patch index 5e05a64383..6847809a62 100644 --- a/patches/unapplied/server/0793-Fix-cancelled-powdered-snow-bucket-placement.patch +++ b/patches/server/0772-Fix-cancelled-powdered-snow-bucket-placement.patch @@ -20,10 +20,10 @@ index e581dc10f3c805f7f8b6e4c842092609e7e1a0f8..b0204af850ee182773ad458208cccd94 } return InteractionResult.FAIL; diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 8b7d4b0bdb18067213462492ce4b8af2477a111b..8778b35890b36ff4c13704968f73934e53d7bd6b 100644 +index 99be49b179b46ed1a9c3b3784dcd91f2fcc34ca9..3bd5338e66ee52d2ba5b89d050dd996dfc82ba7e 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -348,7 +348,7 @@ public final class ItemStack { +@@ -352,7 +352,7 @@ public final class ItemStack { int oldCount = this.getCount(); ServerLevel world = (ServerLevel) itemactioncontext.getLevel(); @@ -32,7 +32,7 @@ index 8b7d4b0bdb18067213462492ce4b8af2477a111b..8778b35890b36ff4c13704968f73934e world.captureBlockStates = true; // special case bonemeal if (this.getItem() == Items.BONE_MEAL) { -@@ -403,7 +403,7 @@ public final class ItemStack { +@@ -407,7 +407,7 @@ public final class ItemStack { world.capturedBlockStates.clear(); if (blocks.size() > 1) { placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ()); diff --git a/patches/unapplied/server/0794-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch b/patches/server/0773-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch similarity index 86% rename from patches/unapplied/server/0794-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch rename to patches/server/0773-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch index 5edfb7b4c0..908f20aec6 100644 --- a/patches/unapplied/server/0794-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch +++ b/patches/server/0773-Add-missing-Validate-calls-to-CraftServer-getSpawnLi.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing Validate calls to CraftServer#getSpawnLimit Copies appropriate checks from CraftWorld#getSpawnLimit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index f1c6983593fe60251ec8ac69f28e91184732f46b..c0b7a831d371a4a0eac884b08182290deb51ca02 100644 +index 93eff6f651a0f55098f0f7d46b33066d8f88d6a6..31219bb9958673d4f30daea338b0d2d798538758 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2192,6 +2192,8 @@ public final class CraftServer implements Server { +@@ -2190,6 +2190,8 @@ public final class CraftServer implements Server { @Override public int getSpawnLimit(SpawnCategory spawnCategory) { // Paper start diff --git a/patches/unapplied/server/0795-Add-GameEvent-tags.patch b/patches/server/0774-Add-GameEvent-tags.patch similarity index 95% rename from patches/unapplied/server/0795-Add-GameEvent-tags.patch rename to patches/server/0774-Add-GameEvent-tags.patch index b5bf6fa37e..a2586adb0b 100644 --- a/patches/unapplied/server/0795-Add-GameEvent-tags.patch +++ b/patches/server/0774-Add-GameEvent-tags.patch @@ -46,10 +46,10 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c0b7a831d371a4a0eac884b08182290deb51ca02..41994b287f7bb5eaacc14473be9e0e500ae88fdf 100644 +index 31219bb9958673d4f30daea338b0d2d798538758..d4fff6b8b40ba1644b9158e259e596f36d5206af 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2602,6 +2602,15 @@ public final class CraftServer implements Server { +@@ -2600,6 +2600,15 @@ public final class CraftServer implements Server { return (org.bukkit.Tag) new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey); } } @@ -65,7 +65,7 @@ index c0b7a831d371a4a0eac884b08182290deb51ca02..41994b287f7bb5eaacc14473be9e0e50 default -> throw new IllegalArgumentException(); } -@@ -2634,6 +2643,13 @@ public final class CraftServer implements Server { +@@ -2632,6 +2641,13 @@ public final class CraftServer implements Server { net.minecraft.core.Registry> entityTags = BuiltInRegistries.ENTITY_TYPE; return entityTags.getTags().map(pair -> (org.bukkit.Tag) new CraftEntityTag(entityTags, pair.getFirst())).collect(ImmutableList.toImmutableList()); } diff --git a/patches/unapplied/server/0796-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch b/patches/server/0775-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch similarity index 87% rename from patches/unapplied/server/0796-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch rename to patches/server/0775-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch index 8908089517..89d9aca043 100644 --- a/patches/unapplied/server/0796-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch +++ b/patches/server/0775-Execute-chunk-tasks-fairly-for-worlds-while-waiting-.patch @@ -9,10 +9,10 @@ This might result in chunks loading far slower in the nether, for example. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index cbbb0ff40488c430d15c2ed054d1b2880c9e92b7..c2ad62deea2a076aae53f17cbdacda1f5a92d2be 100644 +index d55c798657bf8922f3d43d84620cfeed1effa054..ccad086c4d3d78921606c92c4b48da2dae8a6224 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1309,6 +1309,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { +@@ -58,6 +60,7 @@ public class SculkSensorBlockEntity extends BlockEntity implements GameEventList + VibrationSystem.Data.CODEC.encodeStart(NbtOps.INSTANCE, this.vibrationData).resultOrPartial(LOGGER::error).ifPresent((listenerNbt) -> { nbt.put("listener", listenerNbt); }); + if (this.listener.listenerRange != ((SculkSensorBlock) net.minecraft.world.level.block.Blocks.SCULK_SENSOR).getListenerRange()) nbt.putInt(PAPER_LISTENER_RANGE_NBT_KEY, this.listener.listenerRange); // Paper - only save if it's different from the default } - public VibrationListener getListener() { + @Override diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java -index 2733154f569002e426690dfcf362ff20da8cba72..34362768f38fb3122abcbd5e63fee38a631b9ee3 100644 +index de804383467518ef0f063aea948514db568f59db..38ab3ec08c2f95a14ee6de762e29f91b4a4b4500 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java -@@ -21,4 +21,16 @@ public class CraftSculkSensor extends CraftBlockEntityState extends CraftBlo Preconditions.checkArgument(0 <= lastVibrationFrequency && lastVibrationFrequency <= 15, "Vibration frequency must be between 0-15"); getSnapshot().lastVibrationFrequency = lastVibrationFrequency; } diff --git a/patches/unapplied/server/0799-Add-missing-block-data-mins-and-maxes.patch b/patches/server/0778-Add-missing-block-data-mins-and-maxes.patch similarity index 100% rename from patches/unapplied/server/0799-Add-missing-block-data-mins-and-maxes.patch rename to patches/server/0778-Add-missing-block-data-mins-and-maxes.patch diff --git a/patches/unapplied/server/0800-Option-to-have-default-CustomSpawners-in-custom-worl.patch b/patches/server/0779-Option-to-have-default-CustomSpawners-in-custom-worl.patch similarity index 84% rename from patches/unapplied/server/0800-Option-to-have-default-CustomSpawners-in-custom-worl.patch rename to patches/server/0779-Option-to-have-default-CustomSpawners-in-custom-worl.patch index 2a1efb36be..3c95e17260 100644 --- a/patches/unapplied/server/0800-Option-to-have-default-CustomSpawners-in-custom-worl.patch +++ b/patches/server/0779-Option-to-have-default-CustomSpawners-in-custom-worl.patch @@ -10,14 +10,14 @@ just looking at the LevelStem key, look at the DimensionType key which is one level below that. Defaults to off to keep vanilla behavior. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c2ad62deea2a076aae53f17cbdacda1f5a92d2be..23fce58a5909c5b01a5f0ef6912f90858cd3302c 100644 +index ccad086c4d3d78921606c92c4b48da2dae8a6224..f2f5778bc44ed5f7cd9f935bf5df08d2c1cc6d23 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -591,7 +591,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop spawners; + if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.useDimensionTypeForCustomSpawners && this.registryAccess().registryOrThrow(Registries.DIMENSION_TYPE).getResourceKey(worlddimension.type().value()).orElseThrow() == net.minecraft.world.level.dimension.BuiltinDimensionTypes.OVERWORLD) { @@ -25,7 +25,7 @@ index c2ad62deea2a076aae53f17cbdacda1f5a92d2be..23fce58a5909c5b01a5f0ef6912f9085 + } else { + spawners = Collections.emptyList(); + } -+ world = new ServerLevel(this, this.executor, worldSession, iworlddataserver, worldKey, worlddimension, worldloadlistener, flag, j, spawners, true, org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider); ++ world = new ServerLevel(this, this.executor, worldSession, iworlddataserver, worldKey, worlddimension, worldloadlistener, flag, j, spawners, true, this.overworld().getRandomSequences(), org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider); + // Paper end } diff --git a/patches/unapplied/server/0801-Put-world-into-worldlist-before-initing-the-world.patch b/patches/server/0780-Put-world-into-worldlist-before-initing-the-world.patch similarity index 91% rename from patches/unapplied/server/0801-Put-world-into-worldlist-before-initing-the-world.patch rename to patches/server/0780-Put-world-into-worldlist-before-initing-the-world.patch index 4fa22f9134..d0fcfafb1c 100644 --- a/patches/unapplied/server/0801-Put-world-into-worldlist-before-initing-the-world.patch +++ b/patches/server/0780-Put-world-into-worldlist-before-initing-the-world.patch @@ -7,7 +7,7 @@ Some parts of legacy conversion will need the overworld to get the legacy structure data storage diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 23fce58a5909c5b01a5f0ef6912f90858cd3302c..a30c61e176501d1cbd2e330f85d5d258cc030180 100644 +index f2f5778bc44ed5f7cd9f935bf5df08d2c1cc6d23..1f4a3e170188ebde3d56ec59252bb69c9e3305f4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -603,9 +603,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index cc3a90a3337b7d59e4377a1e2448f17a23604e57..b69df51f2a1eec62792e193f64a1815ad6a87e1f 100644 +index c738fb984ffd120e5adccdb5828833f180e72e80..5c8e905bbf56dd2af5b30d34371793c3f98801ab 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java @@ -599,7 +599,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -24,10 +24,10 @@ index cc3a90a3337b7d59e4377a1e2448f17a23604e57..b69df51f2a1eec62792e193f64a1815a if (Snowball.class.isAssignableFrom(clazz)) { entity = new net.minecraft.world.entity.projectile.Snowball(world, x, y, z); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 1d50e5ace7035873523ca16d683b196732176ea5..9a0542c06ae30361ac6139bdf02d0464c8a53e7b 100644 +index 4a19f5b1bada47f91516312db12245e11bf88e7d..9cb7163a5a59c804de5ac4e9003f401ef058c86a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1392,7 +1392,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1387,7 +1387,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { Validate.notNull(material, "Material cannot be null"); Validate.isTrue(material.isBlock(), "Material must be a block"); @@ -41,7 +41,7 @@ index 1d50e5ace7035873523ca16d683b196732176ea5..9a0542c06ae30361ac6139bdf02d0464 return (FallingBlock) entity.getBukkitEntity(); } -@@ -1401,7 +1406,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1396,7 +1401,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { Validate.notNull(location, "Location cannot be null"); Validate.notNull(data, "BlockData cannot be null"); diff --git a/patches/unapplied/server/0806-Expose-furnace-minecart-push-values.patch b/patches/server/0785-Expose-furnace-minecart-push-values.patch similarity index 100% rename from patches/unapplied/server/0806-Expose-furnace-minecart-push-values.patch rename to patches/server/0785-Expose-furnace-minecart-push-values.patch diff --git a/patches/unapplied/server/0807-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch b/patches/server/0786-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch similarity index 88% rename from patches/unapplied/server/0807-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch rename to patches/server/0786-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch index 290836ad0e..2d848b1041 100644 --- a/patches/unapplied/server/0807-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch +++ b/patches/server/0786-Fix-cancelling-ProjectileHitEvent-for-piercing-arrow.patch @@ -15,7 +15,7 @@ piercing arrows to avoid duplicate damage being applied. protected net.minecraft.world.entity.projectile.Projectile hitCancelled diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 8257563afc3fe04c9e821da363b1f3f66de63ad7..5d6d26cfe8f0ab68a3145214b3fc126ca7a71a66 100644 +index 372b9ec0c8eddf4a01b4b8203a88401db22affbf..7226be19248a1ffb8ff2c89b55882529d33a6c0c 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java @@ -290,6 +290,19 @@ public abstract class AbstractArrow extends Projectile { @@ -36,5 +36,5 @@ index 8257563afc3fe04c9e821da363b1f3f66de63ad7..5d6d26cfe8f0ab68a3145214b3fc126c + // Paper end + private boolean shouldFall() { - return this.inGround && this.level.noCollision((new AABB(this.position(), this.position())).inflate(0.06D)); + return this.inGround && this.level().noCollision((new AABB(this.position(), this.position())).inflate(0.06D)); } diff --git a/patches/unapplied/server/0808-More-Projectile-API.patch b/patches/server/0787-More-Projectile-API.patch similarity index 98% rename from patches/unapplied/server/0808-More-Projectile-API.patch rename to patches/server/0787-More-Projectile-API.patch index f8b0db1cea..b6b34f5775 100644 --- a/patches/unapplied/server/0808-More-Projectile-API.patch +++ b/patches/server/0787-More-Projectile-API.patch @@ -20,7 +20,7 @@ public net.minecraft.world.entity.projectile.Projectile canHitEntity(Lnet/minecr Co-authored-by: Nassim Jahnke diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java -index 5f7be427bfc4d954dece4792764004cf0b7757a1..8d448ea844309af8d90e285919bfc76774a53904 100644 +index bc8cc9ced3fd32ff916c42e8ae95a95414dd1f25..6b3153de653a72720537795ff96f0c64fb6932d0 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownPotion.java @@ -99,6 +99,11 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie @@ -32,7 +32,7 @@ index 5f7be427bfc4d954dece4792764004cf0b7757a1..8d448ea844309af8d90e285919bfc767 + } + public void splash(@org.jetbrains.annotations.Nullable HitResult hitResult) { + // Paper end - More projectile API - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { ItemStack itemstack = this.getItem(); Potion potionregistry = PotionUtils.getPotion(itemstack); @@ -112,7 +117,7 @@ public class ThrownPotion extends ThrowableItemProjectile implements ItemSupplie @@ -303,7 +303,7 @@ index c242f654c88ca1773429348939d3bb2ffae3768c..d1c7ab67cba881d96b7a5e9220130d86 + // Paper end - Expose firework item directly + manually setting flight } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java -index 56beff81ca40fd452744bd1c3942ccc503f223d0..7e34d6a986a98f0b9d5c2a66000ea94e2d1f46b0 100644 +index 424e53d904e722548a9897fdc6138693679b2a5d..4d12c33b9a360129ffaefb551010b354bba0c69f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java @@ -203,4 +203,15 @@ public class CraftFishHook extends CraftProjectile implements FishHook { @@ -492,7 +492,7 @@ index 832981b07ef5c633ef00a382f56798ee87eec0df..faf071201b7c1414225a33fe9641eac9 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 16dd2e9951cf34af0c5bd4891d013423b9fad8b9..8147b45892015be602fe14adafd84f84c9685516 100644 +index 5388a07fd8b5c8a4ea604996fb41e526e0d7c16c..8683bb08c2d9a7514ee6b16690b61240fb807d15 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -278,12 +278,20 @@ public final class CraftItemStack extends ItemStack { diff --git a/patches/unapplied/server/0809-Fix-swamp-hut-cat-generation-deadlock.patch b/patches/server/0788-Fix-swamp-hut-cat-generation-deadlock.patch similarity index 97% rename from patches/unapplied/server/0809-Fix-swamp-hut-cat-generation-deadlock.patch rename to patches/server/0788-Fix-swamp-hut-cat-generation-deadlock.patch index 45799b401c..018b928494 100644 --- a/patches/unapplied/server/0809-Fix-swamp-hut-cat-generation-deadlock.patch +++ b/patches/server/0788-Fix-swamp-hut-cat-generation-deadlock.patch @@ -10,7 +10,7 @@ indefinitely. Instead of using the world state, we use the already supplied ServerLevelAccessor which will always have the chunk available. diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java -index 913edb066f82b2e3abd2f98ae40144594740f920..9bcc1f4b60eebe77ffc2afaabd46629cb37cc8a0 100644 +index 1bc8334691147a0f52ad0e97236c9e007b95ba34..770b15f5413eb38890587aa6af2a56f15bf5934f 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cat.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java @@ -363,7 +363,7 @@ public class Cat extends TamableAnimal implements VariantHolder { diff --git a/patches/unapplied/server/0810-Don-t-allow-vehicle-movement-from-players-while-tele.patch b/patches/server/0789-Don-t-allow-vehicle-movement-from-players-while-tele.patch similarity index 71% rename from patches/unapplied/server/0810-Don-t-allow-vehicle-movement-from-players-while-tele.patch rename to patches/server/0789-Don-t-allow-vehicle-movement-from-players-while-tele.patch index 2694286a5a..7ab4298aa7 100644 --- a/patches/unapplied/server/0810-Don-t-allow-vehicle-movement-from-players-while-tele.patch +++ b/patches/server/0789-Don-t-allow-vehicle-movement-from-players-while-tele.patch @@ -7,19 +7,18 @@ Bring the vehicle move packet behavior in line with the regular player move packet. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1d0ef70f50810682cedf50754b1933e85f295e08..b10ead22bf26bab708ba46ef996c24836a2ed300 100644 +index 37a7d0189ccceb114b1f0f82d2ccb420e0b251cc..912c831ca4c52810ff16d4c8f4659d71347ddfa5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -577,6 +577,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -576,6 +576,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + this.disconnect(Component.translatable("multiplayer.disconnect.invalid_vehicle_movement"), org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_VEHICLE_MOVEMENT); // Paper - kick event cause } else { Entity entity = this.player.getRootVehicle(); - + // Paper start + if (this.awaitingPositionFromClient != null || this.player.isImmobile() || entity.isRemoved()) { + return; + } + // Paper end -+ + if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) { - ServerLevel worldserver = this.player.getLevel(); - double d0 = entity.getX();final double fromX = d0; // Paper - OBFHELPER + ServerLevel worldserver = this.player.serverLevel(); diff --git a/patches/unapplied/server/0811-Implement-getComputedBiome-API.patch b/patches/server/0790-Implement-getComputedBiome-API.patch similarity index 94% rename from patches/unapplied/server/0811-Implement-getComputedBiome-API.patch rename to patches/server/0790-Implement-getComputedBiome-API.patch index 0c09a29719..9ef37127d4 100644 --- a/patches/unapplied/server/0811-Implement-getComputedBiome-API.patch +++ b/patches/server/0790-Implement-getComputedBiome-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Implement getComputedBiome API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index b69df51f2a1eec62792e193f64a1815ad6a87e1f..f4f1150e6be2bff0b8561451594691977a5f1d56 100644 +index 5c8e905bbf56dd2af5b30d34371793c3f98801ab..5bab5c75a2ce945b43434d2240c9d1124a20aee2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java @@ -220,6 +220,13 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -23,7 +23,7 @@ index b69df51f2a1eec62792e193f64a1815ad6a87e1f..f4f1150e6be2bff0b856145159469197 public void setBiome(Location location, Biome biome) { this.setBiome(location.getBlockX(), location.getBlockY(), location.getBlockZ(), biome); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index d0102a0e7cf3a52b5a2a89f2dc0994fa463eb8c8..e4f2e1371e481201e4d8b471a8f6f87ba0604028 100644 +index 8131c1db3d7963121a24348575ea8a98a80a974c..84d1351c423965acf79c1413d00eff9eaa3927a2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -345,6 +345,13 @@ public class CraftBlock implements Block { diff --git a/patches/unapplied/server/0812-Make-some-itemstacks-nonnull.patch b/patches/server/0791-Make-some-itemstacks-nonnull.patch similarity index 100% rename from patches/unapplied/server/0812-Make-some-itemstacks-nonnull.patch rename to patches/server/0791-Make-some-itemstacks-nonnull.patch diff --git a/patches/unapplied/server/0813-Implement-enchantWithLevels-API.patch b/patches/server/0792-Implement-enchantWithLevels-API.patch similarity index 92% rename from patches/unapplied/server/0813-Implement-enchantWithLevels-API.patch rename to patches/server/0792-Implement-enchantWithLevels-API.patch index f1679a729c..f4b2f43353 100644 --- a/patches/unapplied/server/0813-Implement-enchantWithLevels-API.patch +++ b/patches/server/0792-Implement-enchantWithLevels-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement enchantWithLevels API diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 8c1bf102fea9e5441a685530155a3170becd7f9c..9a87b32a4bf0a912b8de267d71e56c8505db0e9f 100644 +index b32c06b1f03751c164da7049976c473dff20e4ef..b88a29623c280fcf2e3dd6d16646c23ca809efe1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -442,6 +442,21 @@ public final class CraftItemFactory implements ItemFactory { +@@ -444,6 +444,21 @@ public final class CraftItemFactory implements ItemFactory { } // Paper start diff --git a/patches/unapplied/server/0814-Fix-saving-in-unloadWorld.patch b/patches/server/0793-Fix-saving-in-unloadWorld.patch similarity index 90% rename from patches/unapplied/server/0814-Fix-saving-in-unloadWorld.patch rename to patches/server/0793-Fix-saving-in-unloadWorld.patch index 75a57df848..20eba0723a 100644 --- a/patches/unapplied/server/0814-Fix-saving-in-unloadWorld.patch +++ b/patches/server/0793-Fix-saving-in-unloadWorld.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix saving in unloadWorld Change savingDisabled to false to ensure ServerLevel's saving logic gets called when unloadWorld is called with save = true diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 3901a6d9670e3a9b619e54c43af6c1b07a982c97..2af02829a4b0096c2ef8b7b54a5dd9c37ad0f9a2 100644 +index 3ed58a87e08ab22a39d4c3b3fbe0b2ea9e3747f8..c020acc1bcfe3471728c143862625463d7c82dd8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1313,7 +1313,7 @@ public final class CraftServer implements Server { diff --git a/patches/unapplied/server/0815-Buffer-OOB-setBlock-calls.patch b/patches/server/0794-Buffer-OOB-setBlock-calls.patch similarity index 100% rename from patches/unapplied/server/0815-Buffer-OOB-setBlock-calls.patch rename to patches/server/0794-Buffer-OOB-setBlock-calls.patch diff --git a/patches/unapplied/server/0816-Add-TameableDeathMessageEvent.patch b/patches/server/0795-Add-TameableDeathMessageEvent.patch similarity index 84% rename from patches/unapplied/server/0816-Add-TameableDeathMessageEvent.patch rename to patches/server/0795-Add-TameableDeathMessageEvent.patch index 1e8b7b1fb6..b08801fd3d 100644 --- a/patches/unapplied/server/0816-Add-TameableDeathMessageEvent.patch +++ b/patches/server/0795-Add-TameableDeathMessageEvent.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Add TameableDeathMessageEvent diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java -index c2aa34571c66fa5e26590e1835238692e76571ce..dcb4a886a1ade6dfabd9e5fc20d9db433438b959 100644 +index d33716ddab40185ff77625c20a8a107c18d1f76d..9fb11df7131f400e6e631146c32efccea83adf56 100644 --- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java +++ b/src/main/java/net/minecraft/world/entity/TamableAnimal.java @@ -197,7 +197,12 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { @Override public void die(DamageSource damageSource) { - if (!this.level.isClientSide && this.level.getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) { + if (!this.level().isClientSide && this.level().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES) && this.getOwner() instanceof ServerPlayer) { - this.getOwner().sendSystemMessage(this.getCombatTracker().getDeathMessage()); + // Paper start - TameableDeathMessageEvent + io.papermc.paper.event.entity.TameableDeathMessageEvent event = new io.papermc.paper.event.entity.TameableDeathMessageEvent((org.bukkit.entity.Tameable) getBukkitEntity(), io.papermc.paper.adventure.PaperAdventure.asAdventure(this.getCombatTracker().getDeathMessage())); diff --git a/patches/unapplied/server/0817-Fix-new-block-data-for-EntityChangeBlockEvent.patch b/patches/server/0796-Fix-new-block-data-for-EntityChangeBlockEvent.patch similarity index 88% rename from patches/unapplied/server/0817-Fix-new-block-data-for-EntityChangeBlockEvent.patch rename to patches/server/0796-Fix-new-block-data-for-EntityChangeBlockEvent.patch index d8923fa41d..48e4b2d0b0 100644 --- a/patches/unapplied/server/0817-Fix-new-block-data-for-EntityChangeBlockEvent.patch +++ b/patches/server/0796-Fix-new-block-data-for-EntityChangeBlockEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix new block data for EntityChangeBlockEvent Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java -index cc44e975aef8e9dabfbc740dd5a0db3a55c5831e..80aa539f7c6a6ee44338de084cdcdf5fb4ef996a 100644 +index 06b7ff21a6e3817e92bc135a573b2419e8900c5f..abf796c3369da6b73c8587dfc05f56d0b8933fde 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/EatBlockGoal.java @@ -79,7 +79,7 @@ public class EatBlockGoal extends Goal { @@ -19,7 +19,7 @@ index cc44e975aef8e9dabfbc740dd5a0db3a55c5831e..80aa539f7c6a6ee44338de084cdcdf5f this.level.setBlock(blockposition1, Blocks.DIRT.defaultBlockState(), 2); } diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -index 148b351624bd201592332751adc9adf95da02376..e81e8f050bd9df34b6a64c741428503b434f03a3 100644 +index 3d3567e09ddf0982dfa6b2279019168a6f4abaaa..3525a3cee14651a5f6516b0a56062309f46d3e19 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java @@ -373,7 +373,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -32,20 +32,20 @@ index 148b351624bd201592332751adc9adf95da02376..e81e8f050bd9df34b6a64c741428503b } // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/entity/monster/Ravager.java b/src/main/java/net/minecraft/world/entity/monster/Ravager.java -index 74bc42623f16042c2a72993f842614a013bfb4d0..9258d0f7c5c27b6d3d8f99db947169d6800d8ea9 100644 +index aad1fb5cf231b400dc8c192871aa4429536d53ee..75d661c23cde1ba09ea0b673860c9659c32ef77e 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Ravager.java +++ b/src/main/java/net/minecraft/world/entity/monster/Ravager.java @@ -170,7 +170,7 @@ public class Ravager extends Raider { - BlockState iblockdata = this.level.getBlockState(blockposition); + BlockState iblockdata = this.level().getBlockState(blockposition); Block block = iblockdata.getBlock(); - if (block instanceof LeavesBlock && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState()).isCancelled()) { // CraftBukkit + if (block instanceof LeavesBlock && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, iblockdata.getFluidState().createLegacyBlock()).isCancelled()) { // CraftBukkit // Paper - flag = this.level.destroyBlock(blockposition, true, this) || flag; + flag = this.level().destroyBlock(blockposition, true, this) || flag; } } diff --git a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java -index 23ded94c7c7e4f96951e281efff499f1c61ec5c0..cd1098acc2bec9db2f242738a04f9fae3a66c1bf 100644 +index d99923c355e50bfa4682dd147d83dd1cf58553f1..9d3f0f413120e825a44f3eea6b9089761840ff1f 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Silverfish.java +++ b/src/main/java/net/minecraft/world/entity/monster/Silverfish.java @@ -176,7 +176,11 @@ public class Silverfish extends Monster { @@ -62,10 +62,10 @@ index 23ded94c7c7e4f96951e281efff499f1c61ec5c0..cd1098acc2bec9db2f242738a04f9fae } // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java -index 42f0d22e5f64515b8f508d228f0f2c36391e2122..16444949ae03332de75dd1e3c0746cf8d54eca6e 100644 +index 918dd360a8cac3fe2b7d73f3f7d2b5c687400683..58a966e3aefad6c812cc64f65780e7b4953191eb 100644 --- a/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java +++ b/src/main/java/net/minecraft/world/level/block/PointedDripstoneBlock.java -@@ -131,7 +131,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate +@@ -129,7 +129,7 @@ public class PointedDripstoneBlock extends Block implements Fallable, SimpleWate if (!world.isClientSide && projectile.mayInteract(world, blockposition) && projectile instanceof ThrownTrident && projectile.getDeltaMovement().length() > 0.6D) { // CraftBukkit start diff --git a/patches/unapplied/server/0818-fix-player-loottables-running-when-mob-loot-gamerule.patch b/patches/server/0797-fix-player-loottables-running-when-mob-loot-gamerule.patch similarity index 87% rename from patches/unapplied/server/0818-fix-player-loottables-running-when-mob-loot-gamerule.patch rename to patches/server/0797-fix-player-loottables-running-when-mob-loot-gamerule.patch index feb9503767..cc357f30fd 100644 --- a/patches/unapplied/server/0818-fix-player-loottables-running-when-mob-loot-gamerule.patch +++ b/patches/server/0797-fix-player-loottables-running-when-mob-loot-gamerule.patch @@ -5,10 +5,10 @@ Subject: [PATCH] fix player loottables running when mob loot gamerule is false diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 88d5866b67fd4617eabf1333b22843e9d64fdb39..212d61f1c0b9d7039595ec098b7e7d99a898bc4e 100644 +index fd93a4bda08882c098b10cb4abeb254a11814957..72da912363681685809aa04cf35f1e5a8f8b93a8 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -875,12 +875,14 @@ public class ServerPlayer extends Player { +@@ -916,12 +916,14 @@ public class ServerPlayer extends Player { } } } diff --git a/patches/unapplied/server/0819-Ensure-entity-passenger-world-matches-ridden-entity.patch b/patches/server/0798-Ensure-entity-passenger-world-matches-ridden-entity.patch similarity index 88% rename from patches/unapplied/server/0819-Ensure-entity-passenger-world-matches-ridden-entity.patch rename to patches/server/0798-Ensure-entity-passenger-world-matches-ridden-entity.patch index 2a67e2f4e2..8701a8c76c 100644 --- a/patches/unapplied/server/0819-Ensure-entity-passenger-world-matches-ridden-entity.patch +++ b/patches/server/0798-Ensure-entity-passenger-world-matches-ridden-entity.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Ensure entity passenger world matches ridden entity Bad plugins doing this would cause some obvious problems... diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 570d6b5777ea21619db23ef01f3230249d9ab6e1..c37c1615a47c31c96c048386c8ff25ba4804a5c4 100644 +index e0245c5cef697d9cc304fbfc269fc4d1b735c333..a4134d1c6e6ab73c00842bf1c22fd2a2756499e9 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2724,6 +2724,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2811,6 +2811,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } protected boolean addPassenger(Entity entity) { // CraftBukkit diff --git a/patches/unapplied/server/0820-Guard-against-invalid-entity-positions.patch b/patches/server/0799-Guard-against-invalid-entity-positions.patch similarity index 92% rename from patches/unapplied/server/0820-Guard-against-invalid-entity-positions.patch rename to patches/server/0799-Guard-against-invalid-entity-positions.patch index de373cdc9c..9fd4b205c6 100644 --- a/patches/unapplied/server/0820-Guard-against-invalid-entity-positions.patch +++ b/patches/server/0799-Guard-against-invalid-entity-positions.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Guard against invalid entity positions Anything not finite should be blocked and logged diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c37c1615a47c31c96c048386c8ff25ba4804a5c4..507db20f8622d8f26063150ded79e767e61be553 100644 +index a4134d1c6e6ab73c00842bf1c22fd2a2756499e9..4deb28538dafced0241c3f8031668b5cc6f24c8d 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -4327,11 +4327,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -4427,11 +4427,33 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale); }