From c1f313b27332c946456271c618efea6c58873b6c Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 7 Jun 2023 22:41:26 +0200 Subject: [PATCH] More more more more more more more work --- .../0252-Mob-Pathfinding-API.patch} | 0 ...for-CanPlaceOn-and-CanDestroy-NBT-v.patch} | 0 ...nt-Mob-AI-Rules-from-Loading-Chunks.patch} | 2 +- ...ning-from-loading-generating-chunks.patch} | 0 ...t-furnace-cook-speed-multiplier-API.patch} | 2 +- .../0257-Honor-EntityAgeable.ageLock.patch} | 2 +- ...le-connection-throttle-kick-message.patch} | 2 +- .../0259-Hook-into-CB-plugin-rewrites.patch} | 0 .../0260-PreSpawnerSpawnEvent.patch} | 2 +- ...61-Add-LivingEntity-getTargetEntity.patch} | 6 ++-- .../0262-Add-sun-related-API.patch} | 4 +-- .../0263-Turtle-API.patch} | 6 ++-- ...ator-target-events-and-improve-impl.patch} | 8 ++--- ...her-worlds-for-shooter-of-projectil.patch} | 10 +++---- .../0266-Add-more-Witch-API.patch} | 23 ++++----------- ...wned-for-Villager-Aggression-Config.patch} | 2 +- ...vent-players-from-moving-into-unloa.patch} | 8 ++--- ...9-Reset-players-airTicks-on-respawn.patch} | 4 +-- ...after-profile-lookups-if-not-needed.patch} | 0 ...r-Thread-Pool-and-Thread-Priorities.patch} | 10 +++---- .../0272-Optimize-World-Time-Updates.patch} | 16 +++++----- ...tore-custom-InventoryHolder-support.patch} | 4 +-- .../0274-Use-Vanilla-Minecart-Speeds.patch} | 4 +-- ...0275-Fix-SpongeAbsortEvent-handling.patch} | 16 +++++----- ...-allow-digging-into-unloaded-chunks.patch} | 10 +++---- ...ult-permission-message-configurable.patch} | 8 ++--- ...revent-rayTrace-from-loading-chunks.patch} | 0 ...-Large-Packets-disconnecting-client.patch} | 4 +-- ...ntity-dismount-during-teleportation.patch} | 20 ++++++------- .../0281-Add-more-Zombie-API.patch} | 2 +- .../0282-Book-Size-Limits.patch} | 4 +-- ...0283-Add-PlayerConnectionCloseEvent.patch} | 4 +-- ...revent-Enderman-from-loading-chunks.patch} | 2 +- ...replace-OfflinePlayer-getLastPlayed.patch} | 14 ++++----- ...ehicle-tracking-issue-on-disconnect.patch} | 4 +-- ...remove-from-being-called-on-Players.patch} | 4 +-- .../0288-BlockDestroyEvent.patch} | 6 ++-- .../0289-Async-command-map-building.patch} | 10 +++---- ...0290-Implement-Brigadier-Mojang-API.patch} | 22 +++++++------- ...m-Shapeless-Custom-Crafting-Recipes.patch} | 2 +- .../0292-Limit-Client-Sign-length-more.patch} | 4 +-- ...ConvertSigns-boolean-every-sign-save.patch | 29 ------------------- 42 files changed, 118 insertions(+), 162 deletions(-) rename patches/{unapplied/server/0257-Mob-Pathfinding-API.patch => server/0252-Mob-Pathfinding-API.patch} (100%) rename patches/{unapplied/server/0258-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch => server/0253-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch} (100%) rename patches/{unapplied/server/0260-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch => server/0254-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch} (96%) rename patches/{unapplied/server/0261-Prevent-mob-spawning-from-loading-generating-chunks.patch => server/0255-Prevent-mob-spawning-from-loading-generating-chunks.patch} (100%) rename patches/{unapplied/server/0262-Implement-furnace-cook-speed-multiplier-API.patch => server/0256-Implement-furnace-cook-speed-multiplier-API.patch} (98%) rename patches/{unapplied/server/0264-Honor-EntityAgeable.ageLock.patch => server/0257-Honor-EntityAgeable.ageLock.patch} (94%) rename patches/{unapplied/server/0265-Configurable-connection-throttle-kick-message.patch => server/0258-Configurable-connection-throttle-kick-message.patch} (94%) rename patches/{unapplied/server/0266-Hook-into-CB-plugin-rewrites.patch => server/0259-Hook-into-CB-plugin-rewrites.patch} (100%) rename patches/{unapplied/server/0267-PreSpawnerSpawnEvent.patch => server/0260-PreSpawnerSpawnEvent.patch} (94%) rename patches/{unapplied/server/0268-Add-LivingEntity-getTargetEntity.patch => server/0261-Add-LivingEntity-getTargetEntity.patch} (95%) rename patches/{unapplied/server/0269-Add-sun-related-API.patch => server/0262-Add-sun-related-API.patch} (90%) rename patches/{unapplied/server/0270-Turtle-API.patch => server/0263-Turtle-API.patch} (96%) rename patches/{unapplied/server/0271-Call-player-spectator-target-events-and-improve-impl.patch => server/0264-Call-player-spectator-target-events-and-improve-impl.patch} (89%) rename patches/{unapplied/server/0272-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch => server/0265-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch} (76%) rename patches/{unapplied/server/0273-Add-more-Witch-API.patch => server/0266-Add-more-Witch-API.patch} (74%) rename patches/{unapplied/server/0274-Check-Drowned-for-Villager-Aggression-Config.patch => server/0267-Check-Drowned-for-Villager-Aggression-Config.patch} (94%) rename patches/{unapplied/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch => server/0268-Add-option-to-prevent-players-from-moving-into-unloa.patch} (93%) rename patches/{unapplied/server/0276-Reset-players-airTicks-on-respawn.patch => server/0269-Reset-players-airTicks-on-respawn.patch} (83%) rename patches/{unapplied/server/0277-Don-t-sleep-after-profile-lookups-if-not-needed.patch => server/0270-Don-t-sleep-after-profile-lookups-if-not-needed.patch} (100%) rename patches/{unapplied/server/0278-Improve-Server-Thread-Pool-and-Thread-Priorities.patch => server/0271-Improve-Server-Thread-Pool-and-Thread-Priorities.patch} (93%) rename patches/{unapplied/server/0279-Optimize-World-Time-Updates.patch => server/0272-Optimize-World-Time-Updates.patch} (76%) rename patches/{unapplied/server/0280-Restore-custom-InventoryHolder-support.patch => server/0273-Restore-custom-InventoryHolder-support.patch} (98%) rename patches/{unapplied/server/0281-Use-Vanilla-Minecart-Speeds.patch => server/0274-Use-Vanilla-Minecart-Speeds.patch} (87%) rename patches/{unapplied/server/0282-Fix-SpongeAbsortEvent-handling.patch => server/0275-Fix-SpongeAbsortEvent-handling.patch} (58%) rename patches/{unapplied/server/0283-Don-t-allow-digging-into-unloaded-chunks.patch => server/0276-Don-t-allow-digging-into-unloaded-chunks.patch} (91%) rename patches/{unapplied/server/0284-Make-the-default-permission-message-configurable.patch => server/0277-Make-the-default-permission-message-configurable.patch} (85%) rename patches/{unapplied/server/0285-Prevent-rayTrace-from-loading-chunks.patch => server/0278-Prevent-rayTrace-from-loading-chunks.patch} (100%) rename patches/{unapplied/server/0286-Handle-Large-Packets-disconnecting-client.patch => server/0279-Handle-Large-Packets-disconnecting-client.patch} (97%) rename patches/{unapplied/server/0287-force-entity-dismount-during-teleportation.patch => server/0280-force-entity-dismount-during-teleportation.patch} (87%) rename patches/{unapplied/server/0288-Add-more-Zombie-API.patch => server/0281-Add-more-Zombie-API.patch} (97%) rename patches/{unapplied/server/0289-Book-Size-Limits.patch => server/0282-Book-Size-Limits.patch} (94%) rename patches/{unapplied/server/0290-Add-PlayerConnectionCloseEvent.patch => server/0283-Add-PlayerConnectionCloseEvent.patch} (96%) rename patches/{unapplied/server/0291-Prevent-Enderman-from-loading-chunks.patch => server/0284-Prevent-Enderman-from-loading-chunks.patch} (95%) rename patches/{unapplied/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch => server/0285-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch} (92%) rename patches/{unapplied/server/0293-Workaround-for-vehicle-tracking-issue-on-disconnect.patch => server/0286-Workaround-for-vehicle-tracking-issue-on-disconnect.patch} (85%) rename patches/{unapplied/server/0294-Block-Entity-remove-from-being-called-on-Players.patch => server/0287-Block-Entity-remove-from-being-called-on-Players.patch} (90%) rename patches/{unapplied/server/0295-BlockDestroyEvent.patch => server/0288-BlockDestroyEvent.patch} (91%) rename patches/{unapplied/server/0296-Async-command-map-building.patch => server/0289-Async-command-map-building.patch} (90%) rename patches/{unapplied/server/0297-Implement-Brigadier-Mojang-API.patch => server/0290-Implement-Brigadier-Mojang-API.patch} (93%) rename patches/{unapplied/server/0298-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch => server/0291-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch} (96%) rename patches/{unapplied/server/0299-Limit-Client-Sign-length-more.patch => server/0292-Limit-Client-Sign-length-more.patch} (95%) delete mode 100644 patches/unapplied/server/0300-Don-t-check-ConvertSigns-boolean-every-sign-save.patch diff --git a/patches/unapplied/server/0257-Mob-Pathfinding-API.patch b/patches/server/0252-Mob-Pathfinding-API.patch similarity index 100% rename from patches/unapplied/server/0257-Mob-Pathfinding-API.patch rename to patches/server/0252-Mob-Pathfinding-API.patch diff --git a/patches/unapplied/server/0258-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch b/patches/server/0253-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch similarity index 100% rename from patches/unapplied/server/0258-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch rename to patches/server/0253-Implement-an-API-for-CanPlaceOn-and-CanDestroy-NBT-v.patch diff --git a/patches/unapplied/server/0260-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/patches/server/0254-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch similarity index 96% rename from patches/unapplied/server/0260-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch rename to patches/server/0254-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch index f3130fa3c3..630be390a8 100644 --- a/patches/unapplied/server/0260-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch +++ b/patches/server/0254-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java -index b26a6354eaf2a699ab10da71afafebc807b4b06d..d3e91faee8805e88d850740fb5de9e5c8288c48b 100644 +index 61afe72beb9f17a6c2b09d2aed9dd6aa4c36a816..0035461aff86fa3f44c860e7d77589b974446048 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java @@ -129,7 +129,9 @@ public class RemoveBlockGoal extends MoveToBlockGoal { diff --git a/patches/unapplied/server/0261-Prevent-mob-spawning-from-loading-generating-chunks.patch b/patches/server/0255-Prevent-mob-spawning-from-loading-generating-chunks.patch similarity index 100% rename from patches/unapplied/server/0261-Prevent-mob-spawning-from-loading-generating-chunks.patch rename to patches/server/0255-Prevent-mob-spawning-from-loading-generating-chunks.patch diff --git a/patches/unapplied/server/0262-Implement-furnace-cook-speed-multiplier-API.patch b/patches/server/0256-Implement-furnace-cook-speed-multiplier-API.patch similarity index 98% rename from patches/unapplied/server/0262-Implement-furnace-cook-speed-multiplier-API.patch rename to patches/server/0256-Implement-furnace-cook-speed-multiplier-API.patch index 781ffacd36..97b17392e3 100644 --- a/patches/unapplied/server/0262-Implement-furnace-cook-speed-multiplier-API.patch +++ b/patches/server/0256-Implement-furnace-cook-speed-multiplier-API.patch @@ -11,7 +11,7 @@ to the nearest Integer when updating its current cook time. Modified by: Eric Su diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index 4ed87cc5a46d9e10c755631a16f0e0cb388fb7f2..faa5beffb29e416f2a9af96ac66b5f88729e4705 100644 +index d56a64b058d8848e405e33d9884a61ea952a8f71..40dc29288a13ae9c1f8b0434922fdb5c7d02daa9 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java @@ -77,11 +77,13 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit diff --git a/patches/unapplied/server/0264-Honor-EntityAgeable.ageLock.patch b/patches/server/0257-Honor-EntityAgeable.ageLock.patch similarity index 94% rename from patches/unapplied/server/0264-Honor-EntityAgeable.ageLock.patch rename to patches/server/0257-Honor-EntityAgeable.ageLock.patch index c7c78c8f16..a1db73f438 100644 --- a/patches/unapplied/server/0264-Honor-EntityAgeable.ageLock.patch +++ b/patches/server/0257-Honor-EntityAgeable.ageLock.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Honor EntityAgeable.ageLock diff --git a/src/main/java/net/minecraft/world/entity/AgeableMob.java b/src/main/java/net/minecraft/world/entity/AgeableMob.java -index ea71049ebe3d135b4ff0a7b288221e2ceccd5035..63d5913c431e4cef733240a928465d90a542e6c7 100644 +index be5e603d505566feac61cc7e591d35ce483a92df..2061d7ae62c1335c87aa67fd0cc004c42e34e3a7 100644 --- a/src/main/java/net/minecraft/world/entity/AgeableMob.java +++ b/src/main/java/net/minecraft/world/entity/AgeableMob.java @@ -85,6 +85,7 @@ public abstract class AgeableMob extends PathfinderMob { diff --git a/patches/unapplied/server/0265-Configurable-connection-throttle-kick-message.patch b/patches/server/0258-Configurable-connection-throttle-kick-message.patch similarity index 94% rename from patches/unapplied/server/0265-Configurable-connection-throttle-kick-message.patch rename to patches/server/0258-Configurable-connection-throttle-kick-message.patch index 15deab12d8..534b0eb1cc 100644 --- a/patches/unapplied/server/0265-Configurable-connection-throttle-kick-message.patch +++ b/patches/server/0258-Configurable-connection-throttle-kick-message.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Configurable connection throttle kick message diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index cca08b8c6e1e15f13326a2a7e33e7f3225ad894b..50521cbd2af1c723d7caaf298fd052af905802b6 100644 +index a3b610cb1ed97a635677bc46ccdf0463c9918585..94b062874ef9d4935a7ad2c7b45b2e6b786eaa81 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java @@ -51,7 +51,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL diff --git a/patches/unapplied/server/0266-Hook-into-CB-plugin-rewrites.patch b/patches/server/0259-Hook-into-CB-plugin-rewrites.patch similarity index 100% rename from patches/unapplied/server/0266-Hook-into-CB-plugin-rewrites.patch rename to patches/server/0259-Hook-into-CB-plugin-rewrites.patch diff --git a/patches/unapplied/server/0267-PreSpawnerSpawnEvent.patch b/patches/server/0260-PreSpawnerSpawnEvent.patch similarity index 94% rename from patches/unapplied/server/0267-PreSpawnerSpawnEvent.patch rename to patches/server/0260-PreSpawnerSpawnEvent.patch index 82ed7cac3c..c1f27a722a 100644 --- a/patches/unapplied/server/0267-PreSpawnerSpawnEvent.patch +++ b/patches/server/0260-PreSpawnerSpawnEvent.patch @@ -9,7 +9,7 @@ SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for spawners. diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 4e1d28fbe67bc7a3d0741acd490be8db787480ae..405f36e9e115ad44bb91aad885785761786204ca 100644 +index 3294e5b5ed0288af08067c36ca34514d02d200d3..b5d605feff68181269f23d95d60a3ed555133d85 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java @@ -134,11 +134,11 @@ public abstract class BaseSpawner { diff --git a/patches/unapplied/server/0268-Add-LivingEntity-getTargetEntity.patch b/patches/server/0261-Add-LivingEntity-getTargetEntity.patch similarity index 95% rename from patches/unapplied/server/0268-Add-LivingEntity-getTargetEntity.patch rename to patches/server/0261-Add-LivingEntity-getTargetEntity.patch index 90098a5317..d47613a41c 100644 --- a/patches/unapplied/server/0268-Add-LivingEntity-getTargetEntity.patch +++ b/patches/server/0261-Add-LivingEntity-getTargetEntity.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add LivingEntity#getTargetEntity diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 73cefc7ec582cb0fbfcff32cb9311f34ec2f31f0..eb58b3230b46ade4403c31113d244b933b8a4a71 100644 +index e1780e5eec0171cc39b0bc27d48c0ce167ebec5d..6be24dea49918cb377cd21e55927c304e288ed2b 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -115,6 +115,7 @@ import net.minecraft.world.level.storage.loot.LootTable; +@@ -117,6 +117,7 @@ import net.minecraft.world.level.storage.loot.LootTable; import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.phys.AABB; @@ -16,7 +16,7 @@ index 73cefc7ec582cb0fbfcff32cb9311f34ec2f31f0..eb58b3230b46ade4403c31113d244b93 import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; import net.minecraft.world.scores.PlayerTeam; -@@ -3792,6 +3793,38 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3840,6 +3841,38 @@ public abstract class LivingEntity extends Entity implements Attackable { return level.clip(raytrace); } diff --git a/patches/unapplied/server/0269-Add-sun-related-API.patch b/patches/server/0262-Add-sun-related-API.patch similarity index 90% rename from patches/unapplied/server/0269-Add-sun-related-API.patch rename to patches/server/0262-Add-sun-related-API.patch index a8dcbc68cb..4135708efb 100644 --- a/patches/unapplied/server/0269-Add-sun-related-API.patch +++ b/patches/server/0262-Add-sun-related-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Add sun related API public net.minecraft.world.entity.Mob isSunBurnTick()Z diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ba4f1012c2046921c2c48583a5384fd7e4c05af7..4421392702304514c2cb26f32817ed150c9dc947 100644 +index d88464af8b98ad12e90c423abe5e483ab0455666..728f9046648411580b81773f59ac6cf95a3053e7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -687,6 +687,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -697,6 +697,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } diff --git a/patches/unapplied/server/0270-Turtle-API.patch b/patches/server/0263-Turtle-API.patch similarity index 96% rename from patches/unapplied/server/0270-Turtle-API.patch rename to patches/server/0263-Turtle-API.patch index cd1ffaa4f9..64fc5f610e 100644 --- a/patches/unapplied/server/0270-Turtle-API.patch +++ b/patches/server/0263-Turtle-API.patch @@ -12,7 +12,7 @@ public net.minecraft.world.entity.animal.Turtle isTravelling()Z public net.minecraft.world.entity.animal.Turtle setTravelling(Z)V diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java -index e3983370c09e3e3445c4557fcca50dd25f29cba0..6efba52c2e5d7811ee329ed22c1c76f75d7ddbe1 100644 +index 60e291abb3ebdf8676c13a2138d8eb436d033fa2..d27e5f9dac4703b839ab8444f6b54bf54d58af86 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/MoveToBlockGoal.java @@ -14,7 +14,7 @@ public abstract class MoveToBlockGoal extends Goal { @@ -25,7 +25,7 @@ index e3983370c09e3e3445c4557fcca50dd25f29cba0..6efba52c2e5d7811ee329ed22c1c76f7 private final int searchRange; private final int verticalSearchRange; diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -index fb5af59559bc18ce2850d95ef73e5545dcab5ebc..b03c919edc33f308409ceeea0dd1064d1c6d7906 100644 +index fcd760cb88f84ff79811631612956fde79905132..8ad2fc2e4c958f63712d9a66b1de18cf6c48d8e9 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java @@ -487,15 +487,18 @@ public class Turtle extends Animal { @@ -35,7 +35,7 @@ index fb5af59559bc18ce2850d95ef73e5545dcab5ebc..b03c919edc33f308409ceeea0dd1064d - this.turtle.setLayingEgg(true); + this.turtle.setLayingEgg(new com.destroystokyo.paper.event.entity.TurtleStartDiggingEvent((org.bukkit.entity.Turtle) this.turtle.getBukkitEntity(), io.papermc.paper.util.MCUtil.toLocation(this.turtle.level, this.getTargetPosition())).callEvent()); // Paper } else if (this.turtle.layEggCounter > this.adjustedTickDelay(200)) { - Level world = this.turtle.level; + Level world = this.turtle.level(); // CraftBukkit start - if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.turtle, this.blockPos.above(), (BlockState) Blocks.TURTLE_EGG.defaultBlockState().setValue(TurtleEggBlock.EGGS, this.turtle.random.nextInt(4) + 1)).isCancelled()) { diff --git a/patches/unapplied/server/0271-Call-player-spectator-target-events-and-improve-impl.patch b/patches/server/0264-Call-player-spectator-target-events-and-improve-impl.patch similarity index 89% rename from patches/unapplied/server/0271-Call-player-spectator-target-events-and-improve-impl.patch rename to patches/server/0264-Call-player-spectator-target-events-and-improve-impl.patch index ca425a8898..9358088943 100644 --- a/patches/unapplied/server/0271-Call-player-spectator-target-events-and-improve-impl.patch +++ b/patches/server/0264-Call-player-spectator-target-events-and-improve-impl.patch @@ -19,10 +19,10 @@ spectate the target entity. Co-authored-by: Spottedleaf diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 3f9ae61ac16a4ec13c6a571ab3d5188f37d205f2..9f6531a2d20583355587dab1503573024a12144d 100644 +index e41abf22992d9348cc3c63866b01a5dbf02d6a2c..a15eca1b3280495b71012b42d94f5ad0b53d9e24 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1933,6 +1933,19 @@ public class ServerPlayer extends Player { +@@ -1936,6 +1936,19 @@ public class ServerPlayer extends Player { this.camera = (Entity) (entity == null ? this : entity); if (entity1 != this.camera) { @@ -39,10 +39,10 @@ index 3f9ae61ac16a4ec13c6a571ab3d5188f37d205f2..9f6531a2d20583355587dab150357302 + } + } + // Paper end - Level world = this.camera.getLevel(); + Level world = this.camera.level(); if (world instanceof ServerLevel) { -@@ -1948,7 +1961,6 @@ public class ServerPlayer extends Player { +@@ -1951,7 +1964,6 @@ public class ServerPlayer extends Player { this.connection.send(new ClientboundSetCameraPacket(this.camera)); this.connection.resetPosition(); } diff --git a/patches/unapplied/server/0272-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch b/patches/server/0265-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch similarity index 76% rename from patches/unapplied/server/0272-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch rename to patches/server/0265-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch index 5c14400166..ea0eee4e26 100644 --- a/patches/unapplied/server/0272-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch +++ b/patches/server/0265-MC-50319-Check-other-worlds-for-shooter-of-projectil.patch @@ -11,17 +11,17 @@ If the projectile fails to find the shooter in the current world, check other worlds. 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 621ecd0f3cac52d3e4cecd003c67401ec7f0a6f7..a85175190c1ebb14b496a0bfe2f7136e06d0072c 100644 +index f49dd279ba9e8970f116f956466feb072c4f8420..e5da57b35cd82ee7b4e844cfe74289a71d38779a 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java @@ -60,6 +60,18 @@ public abstract class Projectile extends Entity implements TraceableEntity { return this.cachedOwner; - } else if (this.ownerUUID != null && this.level instanceof ServerLevel) { - this.cachedOwner = ((ServerLevel) this.level).getEntity(this.ownerUUID); + } else if (this.ownerUUID != null && this.level() instanceof ServerLevel) { + this.cachedOwner = ((ServerLevel) this.level()).getEntity(this.ownerUUID); + // Paper start - check all worlds + if (this.cachedOwner == null) { -+ for (final ServerLevel level : this.level.getServer().getAllLevels()) { -+ if (level == this.level) continue; ++ for (final ServerLevel level : this.level().getServer().getAllLevels()) { ++ if (level == this.level()) continue; + final Entity entity = level.getEntity(this.ownerUUID); + if (entity != null) { + this.cachedOwner = entity; diff --git a/patches/unapplied/server/0273-Add-more-Witch-API.patch b/patches/server/0266-Add-more-Witch-API.patch similarity index 74% rename from patches/unapplied/server/0273-Add-more-Witch-API.patch rename to patches/server/0266-Add-more-Witch-API.patch index a470414cc9..3e1ba61773 100644 --- a/patches/unapplied/server/0273-Add-more-Witch-API.patch +++ b/patches/server/0266-Add-more-Witch-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Add more Witch API public net.minecraft.world.entity.monster.Witch usingTime 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 abbb077281eb8fc7961cf97ff23bb9822f2727f0..096546d7a97f031060bda7545aa620d522766719 100644 +index df024c3108df807772fc487f5c59004a59938bf2..701f6bf1d558cf0ec4bc1abb9e1f66d96ea5a6c9 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Witch.java +++ b/src/main/java/net/minecraft/world/entity/monster/Witch.java -@@ -157,21 +157,24 @@ public class Witch extends Raider implements RangedAttackMob { +@@ -157,21 +157,11 @@ public class Witch extends Raider implements RangedAttackMob { } if (potionregistry != null) { @@ -20,24 +20,11 @@ index abbb077281eb8fc7961cf97ff23bb9822f2727f0..096546d7a97f031060bda7545aa620d5 - this.setItemSlot(EquipmentSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack)); + // Paper start - logic moved into setDrinkingPotion, copy exact impl into the method and then comment out + this.setDrinkingPotion(potion); -+// org.bukkit.inventory.ItemStack bukkitStack = com.destroystokyo.paper.event.entity.WitchReadyPotionEvent.process((org.bukkit.entity.Witch) this.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(potion)); -+// this.setSlot(EnumItemSlot.MAINHAND, org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(bukkitStack)); -+// // Paper end -+// this.bq = this.getItemInMainHand().k(); -+// this.v(true); -+// if (!this.isSilent()) { -+// this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); -+// } -+// -+// AttributeModifiable attributemodifiable = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED); -+// -+// attributemodifiable.removeModifier(EntityWitch.bo); -+// attributemodifiable.b(EntityWitch.bo); // Paper end - this.usingTime = this.getMainHandItem().getUseDuration(); - this.setUsingItem(true); - if (!this.isSilent()) { -- this.level.playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.WITCH_DRINK, this.getSoundSource(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); +- this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.WITCH_DRINK, this.getSoundSource(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); - } - - AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED); @@ -47,7 +34,7 @@ index abbb077281eb8fc7961cf97ff23bb9822f2727f0..096546d7a97f031060bda7545aa620d5 } } -@@ -183,6 +186,24 @@ public class Witch extends Raider implements RangedAttackMob { +@@ -183,6 +173,24 @@ public class Witch extends Raider implements RangedAttackMob { super.aiStep(); } @@ -59,7 +46,7 @@ index abbb077281eb8fc7961cf97ff23bb9822f2727f0..096546d7a97f031060bda7545aa620d5 + this.usingTime = this.getMainHandItem().getUseDuration(); + this.setUsingItem(true); + if (!this.isSilent()) { -+ this.level.playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.WITCH_DRINK, this.getSoundSource(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); ++ this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.WITCH_DRINK, this.getSoundSource(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F); + } + + AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED); diff --git a/patches/unapplied/server/0274-Check-Drowned-for-Villager-Aggression-Config.patch b/patches/server/0267-Check-Drowned-for-Villager-Aggression-Config.patch similarity index 94% rename from patches/unapplied/server/0274-Check-Drowned-for-Villager-Aggression-Config.patch rename to patches/server/0267-Check-Drowned-for-Villager-Aggression-Config.patch index bcd2061b77..97de85a403 100644 --- a/patches/unapplied/server/0274-Check-Drowned-for-Villager-Aggression-Config.patch +++ b/patches/server/0267-Check-Drowned-for-Villager-Aggression-Config.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Check Drowned for Villager Aggression Config diff --git a/src/main/java/net/minecraft/world/entity/monster/Drowned.java b/src/main/java/net/minecraft/world/entity/monster/Drowned.java -index 966eb1e2fc747965d15bb1cfc0d812d10afbf43f..f00773e05654bdeb5463f448293aac99d2208813 100644 +index 3e4fde2736feb03af2116cd218358845cd8f99d8..a1dec28207e4289c8cd5eb3d6c56358055ebecfb 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Drowned.java +++ b/src/main/java/net/minecraft/world/entity/monster/Drowned.java @@ -78,7 +78,7 @@ public class Drowned extends Zombie implements RangedAttackMob { diff --git a/patches/unapplied/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch b/patches/server/0268-Add-option-to-prevent-players-from-moving-into-unloa.patch similarity index 93% rename from patches/unapplied/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch rename to patches/server/0268-Add-option-to-prevent-players-from-moving-into-unloa.patch index 874f4effbe..95f1c7fc13 100644 --- a/patches/unapplied/server/0275-Add-option-to-prevent-players-from-moving-into-unloa.patch +++ b/patches/server/0268-Add-option-to-prevent-players-from-moving-into-unloa.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2c3b91cb401880353ca77ce6237214d7068a518e..dce8658b06b5c86aebd5df8aa9b40eb2d10290d1 100644 +index 1aec3ec3debe3adfd5fda424761b559614dfdc84..ad1fa44281b8ce907fd7434a13d29c3717296877 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -567,9 +567,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -39,7 +39,7 @@ index 2c3b91cb401880353ca77ce6237214d7068a518e..dce8658b06b5c86aebd5df8aa9b40eb2 if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isSingleplayerOwner()) { // CraftBukkit end ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8}); -@@ -1253,9 +1263,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1250,9 +1260,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.allowedPlayerTicks = 20; // CraftBukkit } else { this.awaitingTeleportTime = this.tickCount; @@ -52,7 +52,7 @@ index 2c3b91cb401880353ca77ce6237214d7068a518e..dce8658b06b5c86aebd5df8aa9b40eb2 float f = Mth.wrapDegrees(packet.getYRot(this.player.getYRot())); float f1 = Mth.wrapDegrees(packet.getXRot(this.player.getXRot())); -@@ -1311,6 +1321,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1307,6 +1317,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } else { speed = this.player.getAbilities().walkingSpeed * 10f; } @@ -63,5 +63,5 @@ index 2c3b91cb401880353ca77ce6237214d7068a518e..dce8658b06b5c86aebd5df8aa9b40eb2 + } + // Paper end - if (!this.player.isChangingDimension() && (!this.player.getLevel().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) { + if (!this.player.isChangingDimension() && (!this.player.level().getGameRules().getBoolean(GameRules.RULE_DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isFallFlying())) { float f2 = this.player.isFallFlying() ? 300.0F : 100.0F; diff --git a/patches/unapplied/server/0276-Reset-players-airTicks-on-respawn.patch b/patches/server/0269-Reset-players-airTicks-on-respawn.patch similarity index 83% rename from patches/unapplied/server/0276-Reset-players-airTicks-on-respawn.patch rename to patches/server/0269-Reset-players-airTicks-on-respawn.patch index e3296f5e4e..90be13e9de 100644 --- a/patches/unapplied/server/0276-Reset-players-airTicks-on-respawn.patch +++ b/patches/server/0269-Reset-players-airTicks-on-respawn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Reset players airTicks on respawn diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 9f6531a2d20583355587dab1503573024a12144d..fbd470bb9fccf1f923c55f3b7906bc65aa34c01e 100644 +index a15eca1b3280495b71012b42d94f5ad0b53d9e24..069aebb9297b4d77524481d891fa35fb71b8183c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -2369,6 +2369,7 @@ public class ServerPlayer extends Player { +@@ -2412,6 +2412,7 @@ public class ServerPlayer extends Player { this.setHealth(this.getMaxHealth()); this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset diff --git a/patches/unapplied/server/0277-Don-t-sleep-after-profile-lookups-if-not-needed.patch b/patches/server/0270-Don-t-sleep-after-profile-lookups-if-not-needed.patch similarity index 100% rename from patches/unapplied/server/0277-Don-t-sleep-after-profile-lookups-if-not-needed.patch rename to patches/server/0270-Don-t-sleep-after-profile-lookups-if-not-needed.patch diff --git a/patches/unapplied/server/0278-Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/patches/server/0271-Improve-Server-Thread-Pool-and-Thread-Priorities.patch similarity index 93% rename from patches/unapplied/server/0278-Improve-Server-Thread-Pool-and-Thread-Priorities.patch rename to patches/server/0271-Improve-Server-Thread-Pool-and-Thread-Priorities.patch index 3d6f0e7773..cd7b4187ec 100644 --- a/patches/unapplied/server/0278-Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/patches/server/0271-Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -35,10 +35,10 @@ index 0000000000000000000000000000000000000000..b60f59cf5cc8eb84a6055b7861857dec + } +} diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java -index 33ec55ed1f7d10a5235330ad082e7c7b54c42368..d5b37301d4e860c019105445001ed7a9a6f849bd 100644 +index 0f05d26248d8c999048a88796df227a6a1e3755f..7354711e194ab58b11b68f447c1fc795fe611a65 100644 --- a/src/main/java/net/minecraft/Util.java +++ b/src/main/java/net/minecraft/Util.java -@@ -80,7 +80,7 @@ public class Util { +@@ -81,7 +81,7 @@ public class Util { private static final int DEFAULT_MAX_THREADS = 255; private static final String MAX_THREADS_SYSTEM_PROPERTY = "max.bg.threads"; private static final AtomicInteger WORKER_COUNT = new AtomicInteger(1); @@ -47,7 +47,7 @@ index 33ec55ed1f7d10a5235330ad082e7c7b54c42368..d5b37301d4e860c019105445001ed7a9 // Paper start - don't submit BLOCKING PROFILE LOOKUPS to the world gen thread public static final ExecutorService PROFILE_EXECUTOR = Executors.newFixedThreadPool(2, new java.util.concurrent.ThreadFactory() { -@@ -143,14 +143,18 @@ public class Util { +@@ -144,14 +144,18 @@ public class Util { return FILENAME_DATE_TIME_FORMATTER.format(ZonedDateTime.now()); } @@ -70,7 +70,7 @@ index 33ec55ed1f7d10a5235330ad082e7c7b54c42368..d5b37301d4e860c019105445001ed7a9 @Override protected void onTermination(Throwable throwable) { if (throwable != null) { -@@ -166,6 +170,7 @@ public class Util { +@@ -167,6 +171,7 @@ public class Util { return forkJoinWorkerThread; }, Util::onThreadException, true); } @@ -79,7 +79,7 @@ index 33ec55ed1f7d10a5235330ad082e7c7b54c42368..d5b37301d4e860c019105445001ed7a9 return executorService; } diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 387c423dfe69a3310f8e7aa3dbb7faafc9501e50..852b148a37a8ef632a02a2c264f2b3a8fa4175ac 100644 +index a6d0d3b4f9d69391fb33c4d13388ad573939a36f..1bc5b64af1f6430ae5ac41efbd8cd9309f2ad44d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -321,6 +321,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop> 4, blockposition.getZ() >> 4) == null) { ++ if (this.player.level().getChunkIfLoadedImmediately(blockposition.getX() >> 4, blockposition.getZ() >> 4) == null) { + this.player.connection.ackBlockChangesUpTo(packet.getSequence()); + return; + } + // Paper end - Don't allow digging in unloaded chunks - this.player.gameMode.handleBlockBreakAction(blockposition, packetplayinblockdig_enumplayerdigtype, packet.getDirection(), this.player.level.getMaxBuildHeight(), packet.getSequence()); + this.player.gameMode.handleBlockBreakAction(blockposition, packetplayinblockdig_enumplayerdigtype, packet.getDirection(), this.player.level().getMaxBuildHeight(), packet.getSequence()); this.player.connection.ackBlockChangesUpTo(packet.getSequence()); return; diff --git a/patches/unapplied/server/0284-Make-the-default-permission-message-configurable.patch b/patches/server/0277-Make-the-default-permission-message-configurable.patch similarity index 85% rename from patches/unapplied/server/0284-Make-the-default-permission-message-configurable.patch rename to patches/server/0277-Make-the-default-permission-message-configurable.patch index 52d02eee56..7a385c67e0 100644 --- a/patches/unapplied/server/0284-Make-the-default-permission-message-configurable.patch +++ b/patches/server/0277-Make-the-default-permission-message-configurable.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Make the default permission message configurable diff --git a/src/main/java/io/papermc/paper/command/PaperCommand.java b/src/main/java/io/papermc/paper/command/PaperCommand.java -index e3467aaf6d0c8d486b84362e3c20b3fe631b50ff..8f16640fc2f1233c10392d7e32a54d784fd8e370 100644 +index a52e6e8be323863ece6624a8ae7f9455279bdc23..ae046aff4b9d2ced37ee3e8e908780a807b5c4dd 100644 --- a/src/main/java/io/papermc/paper/command/PaperCommand.java +++ b/src/main/java/io/papermc/paper/command/PaperCommand.java -@@ -76,7 +76,7 @@ public final class PaperCommand extends Command { +@@ -75,7 +75,7 @@ public final class PaperCommand extends Command { if (sender.hasPermission(BASE_PERM + permission) || sender.hasPermission("bukkit.command.paper")) { return true; } @@ -18,10 +18,10 @@ index e3467aaf6d0c8d486b84362e3c20b3fe631b50ff..8f16640fc2f1233c10392d7e32a54d78 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 195b3f20617f9ad1e1fa522d138be3b570aa49a4..03a175ce27f7d816ce1f157f41674cd4dbcc5fe2 100644 +index 56d090f5635a790bc856438edc16153b2e1f66f9..9020f6ab2391e67670333bb4bdf0125cd392f4ee 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2691,6 +2691,16 @@ public final class CraftServer implements Server { +@@ -2689,6 +2689,16 @@ public final class CraftServer implements Server { return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions; } diff --git a/patches/unapplied/server/0285-Prevent-rayTrace-from-loading-chunks.patch b/patches/server/0278-Prevent-rayTrace-from-loading-chunks.patch similarity index 100% rename from patches/unapplied/server/0285-Prevent-rayTrace-from-loading-chunks.patch rename to patches/server/0278-Prevent-rayTrace-from-loading-chunks.patch diff --git a/patches/unapplied/server/0286-Handle-Large-Packets-disconnecting-client.patch b/patches/server/0279-Handle-Large-Packets-disconnecting-client.patch similarity index 97% rename from patches/unapplied/server/0286-Handle-Large-Packets-disconnecting-client.patch rename to patches/server/0279-Handle-Large-Packets-disconnecting-client.patch index 4924f6eb7f..bf355fe4c4 100644 --- a/patches/unapplied/server/0286-Handle-Large-Packets-disconnecting-client.patch +++ b/patches/server/0279-Handle-Large-Packets-disconnecting-client.patch @@ -7,10 +7,10 @@ If a players inventory is too big to send in a single packet, split the inventory set into multiple packets instead. diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index b1a9c75081f7e61212ea9395b35375e067fd7fc6..6f903ad884db68f654a9f2501e336123699c11a3 100644 +index 0a4a875cd3d7f8f864d583d94b6f3869139db48e..53023ccc2ff3c512634b3413665318c3c3669f5b 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -152,6 +152,18 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -130,6 +130,18 @@ public class Connection extends SimpleChannelInboundHandler> { } public void exceptionCaught(ChannelHandlerContext channelhandlercontext, Throwable throwable) { diff --git a/patches/unapplied/server/0287-force-entity-dismount-during-teleportation.patch b/patches/server/0280-force-entity-dismount-during-teleportation.patch similarity index 87% rename from patches/unapplied/server/0287-force-entity-dismount-during-teleportation.patch rename to patches/server/0280-force-entity-dismount-during-teleportation.patch index 2f35adc633..acb2bd6d3f 100644 --- a/patches/unapplied/server/0287-force-entity-dismount-during-teleportation.patch +++ b/patches/server/0280-force-entity-dismount-during-teleportation.patch @@ -20,10 +20,10 @@ this is going to be the best soultion all around. Improvements/suggestions welcome! diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index bb926384659194501bfdbed01b1f66d0909a592a..55658cdb2b5aca0bfebefc7fcec36aefe5f42e7b 100644 +index b1697cf2501f75620bf82d3b9eb8ca81491baff0..53559c8cbf6df35255cb231b5eaa6cd4d940bd84 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2423,11 +2423,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2490,11 +2490,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } public void removeVehicle() { @@ -41,7 +41,7 @@ index bb926384659194501bfdbed01b1f66d0909a592a..55658cdb2b5aca0bfebefc7fcec36aef } } -@@ -2491,7 +2496,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2558,7 +2563,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { return true; // CraftBukkit } @@ -53,7 +53,7 @@ index bb926384659194501bfdbed01b1f66d0909a592a..55658cdb2b5aca0bfebefc7fcec36aef if (entity.getVehicle() == this) { throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); } else { -@@ -2501,7 +2509,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2568,7 +2576,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { VehicleExitEvent event = new VehicleExitEvent( (Vehicle) this.getBukkitEntity(), @@ -62,7 +62,7 @@ index bb926384659194501bfdbed01b1f66d0909a592a..55658cdb2b5aca0bfebefc7fcec36aef ); // Suppress during worldgen if (this.valid) { -@@ -2515,7 +2523,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2582,7 +2590,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } // CraftBukkit end // Spigot start @@ -72,10 +72,10 @@ index bb926384659194501bfdbed01b1f66d0909a592a..55658cdb2b5aca0bfebefc7fcec36aef if (this.valid) { Bukkit.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 30abef77152b77b563b3da0df8e5bf5731999e53..406d495a410c23d43cf72444e8f0c2dc8b3fa52c 100644 +index 6be24dea49918cb377cd21e55927c304e288ed2b..724e4a870d0bbe4c1895ea6a745972ebdd9f5c52 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3396,9 +3396,15 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3445,9 +3445,15 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override public void stopRiding() { @@ -89,14 +89,14 @@ index 30abef77152b77b563b3da0df8e5bf5731999e53..406d495a410c23d43cf72444e8f0c2dc - super.stopRiding(); + super.stopRiding(suppressCancellation); // Paper - suppress - if (entity != null && entity != this.getVehicle() && !this.level.isClientSide) { + if (entity != null && entity != this.getVehicle() && !this.level().isClientSide) { this.dismountVehicle(entity); } diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 9c12fc197c5367a35acda4155707c602f043e571..a7e0203cc4bf7d98b65230fdbc4d873eeabdf9da 100644 +index c7bcbc3f0542a74c30e29bded3bfc0e94daeab25..078986fb32eeecacc954ad6719e981ed8b3a2350 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1147,7 +1147,13 @@ public abstract class Player extends LivingEntity { +@@ -1148,7 +1148,13 @@ public abstract class Player extends LivingEntity { @Override public void removeVehicle() { diff --git a/patches/unapplied/server/0288-Add-more-Zombie-API.patch b/patches/server/0281-Add-more-Zombie-API.patch similarity index 97% rename from patches/unapplied/server/0288-Add-more-Zombie-API.patch rename to patches/server/0281-Add-more-Zombie-API.patch index 69b6cbc5e0..8510c2a389 100644 --- a/patches/unapplied/server/0288-Add-more-Zombie-API.patch +++ b/patches/server/0281-Add-more-Zombie-API.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Add more Zombie API public net.minecraft.world.entity.monster.Zombie isSunSensitive()Z diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java -index 8ecbb64f9db9346757c5597404489496a0945508..f0bad2264df3a4b4631d66dad46ec03470a206ee 100644 +index d07e321a3836a15058f11c88cc0deedb124bb407..69c54b68b364f58a3319154cd984069dd5b6c901 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java +++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java @@ -95,6 +95,7 @@ public class Zombie extends Monster { diff --git a/patches/unapplied/server/0289-Book-Size-Limits.patch b/patches/server/0282-Book-Size-Limits.patch similarity index 94% rename from patches/unapplied/server/0289-Book-Size-Limits.patch rename to patches/server/0282-Book-Size-Limits.patch index 61221c290b..c5c3d58aa2 100644 --- a/patches/unapplied/server/0289-Book-Size-Limits.patch +++ b/patches/server/0282-Book-Size-Limits.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits Puts some limits on the size of books. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a69f7ea461ccfd6d6f842a4b33672187f10264ec..3b5384e27436b93351fcf4b4d938bc13cca9fd58 100644 +index 294e12ac06a5292eda818aabbf3a019f35ca50e0..013341102d81cbd03f6da5f702acd90191560e94 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1120,6 +1120,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1117,6 +1117,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleEditBook(ServerboundEditBookPacket packet) { diff --git a/patches/unapplied/server/0290-Add-PlayerConnectionCloseEvent.patch b/patches/server/0283-Add-PlayerConnectionCloseEvent.patch similarity index 96% rename from patches/unapplied/server/0290-Add-PlayerConnectionCloseEvent.patch rename to patches/server/0283-Add-PlayerConnectionCloseEvent.patch index 763365915d..0409b4fe09 100644 --- a/patches/unapplied/server/0290-Add-PlayerConnectionCloseEvent.patch +++ b/patches/server/0283-Add-PlayerConnectionCloseEvent.patch @@ -39,10 +39,10 @@ public net.minecraft.server.network.ServerLoginPacketListenerImpl state public net.minecraft.server.network.ServerLoginPacketListenerImpl gameProfile diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 6f903ad884db68f654a9f2501e336123699c11a3..e1eea381a2ebcc32424d31c42a45287d2a1cb16a 100644 +index 53023ccc2ff3c512634b3413665318c3c3669f5b..7e11cf7d6871b6125ccccae2b765cd4dfcf38d3b 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -490,6 +490,26 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -464,6 +464,26 @@ public class Connection extends SimpleChannelInboundHandler> { this.getPacketListener().onDisconnect(Component.translatable("multiplayer.disconnect.generic")); } this.queue.clear(); // Free up packet queue. diff --git a/patches/unapplied/server/0291-Prevent-Enderman-from-loading-chunks.patch b/patches/server/0284-Prevent-Enderman-from-loading-chunks.patch similarity index 95% rename from patches/unapplied/server/0291-Prevent-Enderman-from-loading-chunks.patch rename to patches/server/0284-Prevent-Enderman-from-loading-chunks.patch index 7a44b0f525..9b632446b0 100644 --- a/patches/unapplied/server/0291-Prevent-Enderman-from-loading-chunks.patch +++ b/patches/server/0284-Prevent-Enderman-from-loading-chunks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Prevent Enderman from loading chunks 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 908ef284f17296c72009a5803dfefff13664fb1c..c8fe9126f0b6e973aae04d825613fcf67e0838d2 100644 +index acd41b474fadee12c571f390b937f455cbe393ad..fd608b1461ef28a5181ed3beb31f356272f8328f 100644 --- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java +++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java @@ -506,7 +506,8 @@ public class EnderMan extends Monster implements NeutralMob { diff --git a/patches/unapplied/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch b/patches/server/0285-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch similarity index 92% rename from patches/unapplied/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch rename to patches/server/0285-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch index 06800dabb4..0cbe205617 100644 --- a/patches/unapplied/server/0292-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch +++ b/patches/server/0285-Add-APIs-to-replace-OfflinePlayer-getLastPlayed.patch @@ -16,7 +16,7 @@ intent to remove) and replace it with two new methods, clearly named and documented as to their purpose. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index fbd470bb9fccf1f923c55f3b7906bc65aa34c01e..140fdbdcc20b53d7dc3e1d4d027878d9d2db4ef7 100644 +index 069aebb9297b4d77524481d891fa35fb71b8183c..561b02d0dfbf3d20bf8f318bdb883ab35c634b4f 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -243,6 +243,7 @@ public class ServerPlayer extends Player { @@ -28,7 +28,7 @@ index fbd470bb9fccf1f923c55f3b7906bc65aa34c01e..140fdbdcc20b53d7dc3e1d4d027878d9 public boolean queueHealthUpdatePacket = false; public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 952e0735bf1e66a812c90f283203c4f73e3905a5..06961cb5cf7c3e8898c93b4f4d0449e7c3edc4b4 100644 +index 2167303e425b5921240e35757dc634c561875e8b..2aaa8b4f89ce5c2d2e3d931e1c16b630e7863cc4 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -189,6 +189,7 @@ public abstract class PlayerList { @@ -38,7 +38,7 @@ index 952e0735bf1e66a812c90f283203c4f73e3905a5..06961cb5cf7c3e8898c93b4f4d0449e7 + player.loginTime = System.currentTimeMillis(); // Paper GameProfile gameprofile = player.getGameProfile(); GameProfileCache usercache = this.server.getProfileCache(); - Optional optional = usercache.get(gameprofile.getId()); + String s; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java index 69a1852905dd4724c30ac8ab88c14251eee2c371..17b3d5de58a9ef3acc67624c46cd6bbd96394f87 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java @@ -106,7 +106,7 @@ index 69a1852905dd4724c30ac8ab88c14251eee2c371..17b3d5de58a9ef3acc67624c46cd6bbd public Location getLastDeathLocation() { if (this.getData().contains("LastDeathLocation", 10)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f3d532ea98264c233cacde042d6af0957ca6f31d..a87007a67ee1188150abab643329fa7314f9e583 100644 +index a33262e0bcc98321cb7acef533973629de5278a6..52de6df905babf9e7546f1428fd39df988812fe4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -183,6 +183,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -117,7 +117,7 @@ index f3d532ea98264c233cacde042d6af0957ca6f31d..a87007a67ee1188150abab643329fa73 // Paper end public CraftPlayer(CraftServer server, ServerPlayer entity) { -@@ -1933,6 +1934,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1864,6 +1865,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.firstPlayed = firstPlayed; } @@ -136,7 +136,7 @@ index f3d532ea98264c233cacde042d6af0957ca6f31d..a87007a67ee1188150abab643329fa73 public void readExtraData(CompoundTag nbttagcompound) { this.hasPlayedBefore = true; if (nbttagcompound.contains("bukkit")) { -@@ -1955,6 +1968,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1886,6 +1899,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void setExtraData(CompoundTag nbttagcompound) { @@ -145,7 +145,7 @@ index f3d532ea98264c233cacde042d6af0957ca6f31d..a87007a67ee1188150abab643329fa73 if (!nbttagcompound.contains("bukkit")) { nbttagcompound.put("bukkit", new CompoundTag()); } -@@ -1969,6 +1984,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1900,6 +1915,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player { data.putLong("firstPlayed", this.getFirstPlayed()); data.putLong("lastPlayed", System.currentTimeMillis()); data.putString("lastKnownName", handle.getScoreboardName()); diff --git a/patches/unapplied/server/0293-Workaround-for-vehicle-tracking-issue-on-disconnect.patch b/patches/server/0286-Workaround-for-vehicle-tracking-issue-on-disconnect.patch similarity index 85% rename from patches/unapplied/server/0293-Workaround-for-vehicle-tracking-issue-on-disconnect.patch rename to patches/server/0286-Workaround-for-vehicle-tracking-issue-on-disconnect.patch index de3155219c..37d124f718 100644 --- a/patches/unapplied/server/0293-Workaround-for-vehicle-tracking-issue-on-disconnect.patch +++ b/patches/server/0286-Workaround-for-vehicle-tracking-issue-on-disconnect.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Workaround for vehicle tracking issue on disconnect diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 140fdbdcc20b53d7dc3e1d4d027878d9d2db4ef7..4a4c9bcfa24e116aa242de2cc4291cf4480331b1 100644 +index 561b02d0dfbf3d20bf8f318bdb883ab35c634b4f..04ce33975b8ed83c3d803cd319228bcadf94f1de 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1598,6 +1598,13 @@ public class ServerPlayer extends Player { +@@ -1602,6 +1602,13 @@ public class ServerPlayer extends Player { public void disconnect() { this.disconnected = true; this.ejectPassengers(); diff --git a/patches/unapplied/server/0294-Block-Entity-remove-from-being-called-on-Players.patch b/patches/server/0287-Block-Entity-remove-from-being-called-on-Players.patch similarity index 90% rename from patches/unapplied/server/0294-Block-Entity-remove-from-being-called-on-Players.patch rename to patches/server/0287-Block-Entity-remove-from-being-called-on-Players.patch index f8eface290..b580f5df57 100644 --- a/patches/unapplied/server/0294-Block-Entity-remove-from-being-called-on-Players.patch +++ b/patches/server/0287-Block-Entity-remove-from-being-called-on-Players.patch @@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to be unintentional in the few cases we've seen so far. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a87007a67ee1188150abab643329fa7314f9e583..fefe3dc1597d7449e0138be2f60918b06864108a 100644 +index 52de6df905babf9e7546f1428fd39df988812fe4..0ee73b66c47767f734dee86b0ba5fb9501ab811a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2848,6 +2848,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2779,6 +2779,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void resetCooldown() { getHandle().resetAttackStrengthTicker(); } diff --git a/patches/unapplied/server/0295-BlockDestroyEvent.patch b/patches/server/0288-BlockDestroyEvent.patch similarity index 91% rename from patches/unapplied/server/0295-BlockDestroyEvent.patch rename to patches/server/0288-BlockDestroyEvent.patch index bd1f7f6722..c8d93c8c2c 100644 --- a/patches/unapplied/server/0295-BlockDestroyEvent.patch +++ b/patches/server/0288-BlockDestroyEvent.patch @@ -11,7 +11,7 @@ floating in the air. This can replace many uses of BlockPhysicsEvent diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index e7e069ea6b5fc20225e6fabd98e0ffb6de497ce2..d0fe8a99163c924c44983a9a575bd76714865cab 100644 +index 9f64020550a721ae01f9ffbe870b75762bfbd423..1fa76e005c39698a48068baa430a9c1f48e1bb85 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -30,6 +30,7 @@ import net.minecraft.nbt.CompoundTag; @@ -20,9 +20,9 @@ index e7e069ea6b5fc20225e6fabd98e0ffb6de497ce2..d0fe8a99163c924c44983a9a575bd767 import net.minecraft.resources.ResourceLocation; +import io.papermc.paper.util.MCUtil; import net.minecraft.server.MinecraftServer; - import net.minecraft.server.level.ChunkHolder; + import net.minecraft.server.level.FullChunkStatus; import net.minecraft.server.level.ServerLevel; -@@ -589,8 +590,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -577,8 +578,21 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return false; } else { FluidState fluid = this.getFluidState(pos); diff --git a/patches/unapplied/server/0296-Async-command-map-building.patch b/patches/server/0289-Async-command-map-building.patch similarity index 90% rename from patches/unapplied/server/0296-Async-command-map-building.patch rename to patches/server/0289-Async-command-map-building.patch index 67324346eb..b053a4c965 100644 --- a/patches/unapplied/server/0296-Async-command-map-building.patch +++ b/patches/server/0289-Async-command-map-building.patch @@ -9,10 +9,10 @@ commands if the server is restarting. Using the default async pool caused issues due to the shutdown logic generally being much later. diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 7f561ab6e56cd1749da8eff950080d3ae3f5e028..286dab2ed3c6b962c9702b8b10105e1456b04f7b 100644 +index e3394864e29357fec036f9e616472aeab95d035e..b7f1569c662df13f278fc704cabec0400ba7c382 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -396,6 +396,24 @@ public class Commands { +@@ -398,6 +398,24 @@ public class Commands { if ( org.spigotmc.SpigotConfig.tabComplete < 0 ) return; // Spigot // CraftBukkit start // Register Vanilla commands into builtRoot as before @@ -37,7 +37,7 @@ index 7f561ab6e56cd1749da8eff950080d3ae3f5e028..286dab2ed3c6b962c9702b8b10105e14 Map, CommandNode> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues RootCommandNode vanillaRoot = new RootCommandNode(); -@@ -413,7 +431,14 @@ public class Commands { +@@ -415,7 +433,14 @@ public class Commands { for (CommandNode node : rootcommandnode.getChildren()) { bukkit.add(node.getName()); } @@ -53,10 +53,10 @@ index 7f561ab6e56cd1749da8eff950080d3ae3f5e028..286dab2ed3c6b962c9702b8b10105e14 event.getPlayer().getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index d95a618dfdb50a6c6a5fc086cb5e88e0b0a91b71..d11ba8d081861b852bf74662d5e963ac89c226ca 100644 +index 12c2fe5c64a5d6b93e405fa6c84b00f015a9f8eb..04b4173d33fc56e3ad3d958e7ffad967d4890bf0 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -900,6 +900,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { runSync(player, bukkit, rootcommandnode); }); -@@ -439,6 +440,7 @@ public class Commands { +@@ -441,6 +442,7 @@ public class Commands { private void runSync(ServerPlayer player, Collection bukkit, RootCommandNode rootcommandnode) { // Paper end - Async command map building @@ -118,7 +118,7 @@ index 286dab2ed3c6b962c9702b8b10105e1456b04f7b..7d47e15468f59ce7bc25f692e9963a29 PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit)); event.getPlayer().getServer().getPluginManager().callEvent(event); -@@ -457,6 +459,11 @@ public class Commands { +@@ -459,6 +461,11 @@ public class Commands { while (iterator.hasNext()) { CommandNode commandnode2 = (CommandNode) iterator.next(); @@ -131,10 +131,10 @@ index 286dab2ed3c6b962c9702b8b10105e1456b04f7b..7d47e15468f59ce7bc25f692e9963a29 if (commandnode2.canUse(source)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3b5384e27436b93351fcf4b4d938bc13cca9fd58..0b61a213eeae7d39b6478b732ebb8d9ecd8c994a 100644 +index 013341102d81cbd03f6da5f702acd90191560e94..7468c3b92f76bde9259f817370be5106ecb3887a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -832,8 +832,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -833,8 +833,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ParseResults parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack()); this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { @@ -149,7 +149,7 @@ index 3b5384e27436b93351fcf4b4d938bc13cca9fd58..0b61a213eeae7d39b6478b732ebb8d9e }); }); } -@@ -848,7 +852,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -849,7 +853,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic builder.suggest(completion.suggestion(), PaperAdventure.asVanilla(completion.tooltip())); } }); diff --git a/patches/unapplied/server/0298-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch b/patches/server/0291-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch similarity index 96% rename from patches/unapplied/server/0298-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch rename to patches/server/0291-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch index 210e7f09f5..4acb5d194b 100644 --- a/patches/unapplied/server/0298-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch +++ b/patches/server/0291-Fix-Custom-Shapeless-Custom-Crafting-Recipes.patch @@ -10,7 +10,7 @@ This made the Bukkit RecipeChoice API not work for Shapeless. This reimplements vanilla logic using the same test logic as Shaped diff --git a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java -index 95eb0d2c624f196e4c4d3d4367a47af881e946a8..f4f3f3a19d3cadaef1ae1a47daa68251a983dcf2 100644 +index 1023dcb80dfb978dd496ed0f96ca5832fadf0f87..7f174bb89bf4d700a5ae1b65d8abd4f5b1e7b5ed 100644 --- a/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java +++ b/src/main/java/net/minecraft/world/item/crafting/ShapelessRecipe.java @@ -85,16 +85,49 @@ public class ShapelessRecipe implements CraftingRecipe { diff --git a/patches/unapplied/server/0299-Limit-Client-Sign-length-more.patch b/patches/server/0292-Limit-Client-Sign-length-more.patch similarity index 95% rename from patches/unapplied/server/0299-Limit-Client-Sign-length-more.patch rename to patches/server/0292-Limit-Client-Sign-length-more.patch index 5e00371baf..7e9e72adb6 100644 --- a/patches/unapplied/server/0299-Limit-Client-Sign-length-more.patch +++ b/patches/server/0292-Limit-Client-Sign-length-more.patch @@ -22,7 +22,7 @@ it only impacts data sent from the client. Set -DPaper.maxSignLength=XX to change limit or -1 to disable diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b834142d8b7eae50b8b9a1b0edaa41f64b950f43..e9cbca84ad7c2c48445fbd0266c5792b12227cd7 100644 +index 7468c3b92f76bde9259f817370be5106ecb3887a..73af810aa0fe6c17244a23585a92e3cad97b7ab3 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -300,6 +300,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -33,7 +33,7 @@ index b834142d8b7eae50b8b9a1b0edaa41f64b950f43..e9cbca84ad7c2c48445fbd0266c5792b public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); -@@ -3199,7 +3200,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3191,7 +3192,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleSignUpdate(ServerboundSignUpdatePacket packet) { diff --git a/patches/unapplied/server/0300-Don-t-check-ConvertSigns-boolean-every-sign-save.patch b/patches/unapplied/server/0300-Don-t-check-ConvertSigns-boolean-every-sign-save.patch deleted file mode 100644 index 75d4b58525..0000000000 --- a/patches/unapplied/server/0300-Don-t-check-ConvertSigns-boolean-every-sign-save.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Sat, 2 Mar 2019 11:11:29 -0500 -Subject: [PATCH] Don't check ConvertSigns boolean every sign save - -property lookups arent super cheap. they synchronize, validate -and check security managers. - -diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -index 149728fa6371b4d8b0afaae769aacac27401ea03..aca2da47651a76f3e5593d71c500d749d92ccc3b 100644 ---- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java -@@ -26,6 +26,7 @@ import net.minecraft.world.phys.Vec2; - import net.minecraft.world.phys.Vec3; - - public class SignBlockEntity extends BlockEntity implements CommandSource { // CraftBukkit - implements -+ private static final boolean CONVERT_LEGACY_SIGNS = Boolean.getBoolean("convertLegacySigns"); // Paper - - public static final int LINES = 4; - private static final int MAX_TEXT_LINE_WIDTH = 90; -@@ -84,7 +85,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C - } - - // CraftBukkit start -- if (Boolean.getBoolean("convertLegacySigns")) { -+ if (CONVERT_LEGACY_SIGNS) { // Paper - nbt.putBoolean("Bukkit.isConverted", true); - } - // CraftBukkit end