From aac58bb77248a4f4272f2b97d2c761c53ca89e2b Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Tue, 7 Jun 2022 22:45:38 +0200 Subject: [PATCH] More more more more patches --- .../1.19}/0169-PreCreatureSpawnEvent.patch | 0 .../server/0155-Add-PlayerJumpEvent.patch | 4 +-- ...6-handle-PacketPlayInKeepAlive-async.patch | 6 ++-- ...nt-protocol-version-and-virtual-host.patch | 10 +++---- ...rt-serverside-behavior-of-keepalives.patch | 30 ++++++++----------- ...dEffects-only-to-players-who-can-see.patch | 18 +++++------ .../0160-Add-PlayerArmorChangeEvent.patch | 4 +-- ...rom-being-processed-when-the-player-.patch | 4 +-- ...62-Fix-MC-117075-TE-Unload-Lag-Spike.patch | 10 +++---- ...e-implementations-for-captured-block.patch | 10 +++---- ...-get-a-BlockState-without-a-snapshot.patch | 4 +-- .../server/0165-AsyncTabCompleteEvent.patch | 14 ++++----- .../0166-PlayerPickupExperienceEvent.patch | 0 ...7-Ability-to-apply-mending-to-XP-API.patch | 4 +-- ...8-PlayerNaturallySpawnCreaturesEvent.patch | 14 ++++----- ...Add-setPlayerProfile-API-for-Skulls.patch} | 0 .../0170-Fill-Profile-Property-Events.patch} | 0 ...layerAdvancementCriterionGrantEvent.patch} | 4 +-- .../0172-Add-ArmorStand-Item-Meta.patch} | 2 +- ...Extend-Player-Interact-cancellation.patch} | 6 ++-- .../0174-Tameable-getOwnerUniqueId-API.patch} | 0 ...-crits-helps-mitigate-hacked-client.patch} | 4 +-- ...e-Explicit-Network-Manager-Flushing.patch} | 2 +- ...t-extended-PaperServerListPingEvent.patch} | 10 +++---- ...-PlayerProfile-in-AsyncPreLoginEven.patch} | 4 +-- .../0179-Player.setPlayerProfile-API.patch} | 18 +++++------ .../0180-getPlayerUniqueId-API.patch} | 4 +-- .../0181-Improved-Async-Task-Scheduler.patch} | 0 .../0182-Upstream-config-migrations.patch} | 0 ...e-legacy-ping-handler-more-reliable.patch} | 0 ...erverListPingEvent-for-legacy-pings.patch} | 0 ...5-Flag-to-disable-the-channel-limit.patch} | 6 ++-- ...-Add-openSign-method-to-HumanEntity.patch} | 4 +-- ...rable-sprint-interruption-on-attack.patch} | 4 +-- ...allowed-colored-signs-to-be-created.patch} | 14 ++++----- .../0189-EndermanEscapeEvent.patch} | 8 ++--- .../0190-Enderman.teleportRandomly.patch} | 2 +- ...191-Block-Enderpearl-Travel-Exploit.patch} | 6 ++-- ...d.spawnParticle-API-and-add-Builder.patch} | 8 ++--- ...ted-Ice-from-loading-holding-chunks.patch} | 2 +- .../0194-EndermanAttackPlayerEvent.patch} | 2 +- .../0195-WitchConsumePotionEvent.patch} | 0 42 files changed, 119 insertions(+), 123 deletions(-) rename patches/{unapplied/server => removed/1.19}/0169-PreCreatureSpawnEvent.patch (100%) rename patches/{unapplied => }/server/0155-Add-PlayerJumpEvent.patch (94%) rename patches/{unapplied => }/server/0156-handle-PacketPlayInKeepAlive-async.patch (89%) rename patches/{unapplied => }/server/0157-Expose-client-protocol-version-and-virtual-host.patch (91%) rename patches/{unapplied => }/server/0158-revert-serverside-behavior-of-keepalives.patch (68%) rename patches/{unapplied => }/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch (89%) rename patches/{unapplied => }/server/0160-Add-PlayerArmorChangeEvent.patch (90%) rename patches/{unapplied => }/server/0161-Prevent-logins-from-being-processed-when-the-player-.patch (88%) rename patches/{unapplied => }/server/0162-Fix-MC-117075-TE-Unload-Lag-Spike.patch (84%) rename patches/{unapplied => }/server/0163-use-CB-BlockState-implementations-for-captured-block.patch (91%) rename patches/{unapplied => }/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch (98%) rename patches/{unapplied => }/server/0165-AsyncTabCompleteEvent.patch (92%) rename patches/{unapplied => }/server/0166-PlayerPickupExperienceEvent.patch (100%) rename patches/{unapplied => }/server/0167-Ability-to-apply-mending-to-XP-API.patch (94%) rename patches/{unapplied => }/server/0168-PlayerNaturallySpawnCreaturesEvent.patch (88%) rename patches/{unapplied/server/0170-Add-setPlayerProfile-API-for-Skulls.patch => server/0169-Add-setPlayerProfile-API-for-Skulls.patch} (100%) rename patches/{unapplied/server/0171-Fill-Profile-Property-Events.patch => server/0170-Fill-Profile-Property-Events.patch} (100%) rename patches/{unapplied/server/0172-PlayerAdvancementCriterionGrantEvent.patch => server/0171-PlayerAdvancementCriterionGrantEvent.patch} (87%) rename patches/{unapplied/server/0173-Add-ArmorStand-Item-Meta.patch => server/0172-Add-ArmorStand-Item-Meta.patch} (99%) rename patches/{unapplied/server/0174-Extend-Player-Interact-cancellation.patch => server/0173-Extend-Player-Interact-cancellation.patch} (93%) rename patches/{unapplied/server/0175-Tameable-getOwnerUniqueId-API.patch => server/0174-Tameable-getOwnerUniqueId-API.patch} (100%) rename patches/{unapplied/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch => server/0175-Toggleable-player-crits-helps-mitigate-hacked-client.patch} (91%) rename patches/{unapplied/server/0177-Disable-Explicit-Network-Manager-Flushing.patch => server/0176-Disable-Explicit-Network-Manager-Flushing.patch} (94%) rename patches/{unapplied/server/0178-Implement-extended-PaperServerListPingEvent.patch => server/0177-Implement-extended-PaperServerListPingEvent.patch} (96%) rename patches/{unapplied/server/0179-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch => server/0178-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch} (92%) rename patches/{unapplied/server/0180-Player.setPlayerProfile-API.patch => server/0179-Player.setPlayerProfile-API.patch} (91%) rename patches/{unapplied/server/0181-getPlayerUniqueId-API.patch => server/0180-getPlayerUniqueId-API.patch} (90%) rename patches/{unapplied/server/0182-Improved-Async-Task-Scheduler.patch => server/0181-Improved-Async-Task-Scheduler.patch} (100%) rename patches/{unapplied/server/0183-Upstream-config-migrations.patch => server/0182-Upstream-config-migrations.patch} (100%) rename patches/{unapplied/server/0184-Make-legacy-ping-handler-more-reliable.patch => server/0183-Make-legacy-ping-handler-more-reliable.patch} (100%) rename patches/{unapplied/server/0185-Call-PaperServerListPingEvent-for-legacy-pings.patch => server/0184-Call-PaperServerListPingEvent-for-legacy-pings.patch} (100%) rename patches/{unapplied/server/0186-Flag-to-disable-the-channel-limit.patch => server/0185-Flag-to-disable-the-channel-limit.patch} (88%) rename patches/{unapplied/server/0187-Add-openSign-method-to-HumanEntity.patch => server/0186-Add-openSign-method-to-HumanEntity.patch} (93%) rename patches/{unapplied/server/0188-Configurable-sprint-interruption-on-attack.patch => server/0187-Configurable-sprint-interruption-on-attack.patch} (92%) rename patches/{unapplied/server/0189-Fix-exploit-that-allowed-colored-signs-to-be-created.patch => server/0188-Fix-exploit-that-allowed-colored-signs-to-be-created.patch} (63%) rename patches/{unapplied/server/0190-EndermanEscapeEvent.patch => server/0189-EndermanEscapeEvent.patch} (92%) rename patches/{unapplied/server/0191-Enderman.teleportRandomly.patch => server/0190-Enderman.teleportRandomly.patch} (94%) rename patches/{unapplied/server/0192-Block-Enderpearl-Travel-Exploit.patch => server/0191-Block-Enderpearl-Travel-Exploit.patch} (92%) rename patches/{unapplied/server/0193-Expand-World.spawnParticle-API-and-add-Builder.patch => server/0192-Expand-World.spawnParticle-API-and-add-Builder.patch} (92%) rename patches/{unapplied/server/0194-Prevent-Frosted-Ice-from-loading-holding-chunks.patch => server/0193-Prevent-Frosted-Ice-from-loading-holding-chunks.patch} (95%) rename patches/{unapplied/server/0195-EndermanAttackPlayerEvent.patch => server/0194-EndermanAttackPlayerEvent.patch} (93%) rename patches/{unapplied/server/0196-WitchConsumePotionEvent.patch => server/0195-WitchConsumePotionEvent.patch} (100%) diff --git a/patches/unapplied/server/0169-PreCreatureSpawnEvent.patch b/patches/removed/1.19/0169-PreCreatureSpawnEvent.patch similarity index 100% rename from patches/unapplied/server/0169-PreCreatureSpawnEvent.patch rename to patches/removed/1.19/0169-PreCreatureSpawnEvent.patch diff --git a/patches/unapplied/server/0155-Add-PlayerJumpEvent.patch b/patches/server/0155-Add-PlayerJumpEvent.patch similarity index 94% rename from patches/unapplied/server/0155-Add-PlayerJumpEvent.patch rename to patches/server/0155-Add-PlayerJumpEvent.patch index 1207afe38..f7358f8c5 100644 --- a/patches/unapplied/server/0155-Add-PlayerJumpEvent.patch +++ b/patches/server/0155-Add-PlayerJumpEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerJumpEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 72395ede1fe2570fb5bd463ddff191fc50b98191..b339a9b20f2d81a5f93bf2266d9896aae3886c3d 100644 +index b50ca694f827b60ab6ae4b91772774b6fef55734..03ddcbaedc8282cc8964014692dd90c87912e46f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1186,7 +1186,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -1216,7 +1216,34 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser boolean flag = d8 > 0.0D; if (this.player.isOnGround() && !packet.isOnGround() && flag) { diff --git a/patches/unapplied/server/0156-handle-PacketPlayInKeepAlive-async.patch b/patches/server/0156-handle-PacketPlayInKeepAlive-async.patch similarity index 89% rename from patches/unapplied/server/0156-handle-PacketPlayInKeepAlive-async.patch rename to patches/server/0156-handle-PacketPlayInKeepAlive-async.patch index 1a19c6cea..94dc5a55e 100644 --- a/patches/unapplied/server/0156-handle-PacketPlayInKeepAlive-async.patch +++ b/patches/server/0156-handle-PacketPlayInKeepAlive-async.patch @@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing random disconnections for clients. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b339a9b20f2d81a5f93bf2266d9896aae3886c3d..a74b0cda6451e4368744e6d191bc5cf50eac3109 100644 +index 03ddcbaedc8282cc8964014692dd90c87912e46f..8665bbd6e81d55711f82419c3e3edc9357a839f9 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2805,14 +2805,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -2995,14 +2995,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @Override public void handleKeepAlive(ServerboundKeepAlivePacket packet) { @@ -32,7 +32,7 @@ index b339a9b20f2d81a5f93bf2266d9896aae3886c3d..a74b0cda6451e4368744e6d191bc5cf5 } else if (!this.isSingleplayerOwner()) { + // Paper start - This needs to be handled on the main thread for plugins + server.submit(() -> { - this.disconnect(new TranslatableComponent("disconnect.timeout")); + this.disconnect(Component.translatable("disconnect.timeout")); + }); + // Paper end } diff --git a/patches/unapplied/server/0157-Expose-client-protocol-version-and-virtual-host.patch b/patches/server/0157-Expose-client-protocol-version-and-virtual-host.patch similarity index 91% rename from patches/unapplied/server/0157-Expose-client-protocol-version-and-virtual-host.patch rename to patches/server/0157-Expose-client-protocol-version-and-virtual-host.patch index da01e9809..443789bb4 100644 --- a/patches/unapplied/server/0157-Expose-client-protocol-version-and-virtual-host.patch +++ b/patches/server/0157-Expose-client-protocol-version-and-virtual-host.patch @@ -60,7 +60,7 @@ index 0000000000000000000000000000000000000000..a5a7624f1f372a26b982836cd31cff15 + +} diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index dac5ab91fca602cdc2dbc308b24e15ce411659a2..1a2184e23f1e1b8e39141689ebc5f1d13d364038 100644 +index 0badcf02feafafc9932420ffee5062f7b99a9eb9..0e338ebdea3a02d56e9149a6904bfdc8889167f1 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java @@ -93,6 +93,10 @@ public class Connection extends SimpleChannelInboundHandler> { @@ -75,10 +75,10 @@ index dac5ab91fca602cdc2dbc308b24e15ce411659a2..1a2184e23f1e1b8e39141689ebc5f1d1 public Connection(PacketFlow side) { this.receiving = side; diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -index 63cc89c7769bfcc9d663a1827ad525e3ddd82fe5..a95b2ee0e80832f786bdb8f3d0bc00cbfae26fd4 100644 +index 9016aced079108aeae09f030a672467a953ef93f..4170bda451df3db43e7d57d87d1abb81934d7dad 100644 --- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java -@@ -155,6 +155,10 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL +@@ -154,6 +154,10 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL throw new UnsupportedOperationException("Invalid intention " + packet.getIntention()); } @@ -90,10 +90,10 @@ index 63cc89c7769bfcc9d663a1827ad525e3ddd82fe5..a95b2ee0e80832f786bdb8f3d0bc00cb @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index cebdc80d286a5daf1fdc9329dcff4f888890f91b..bb75dd9d6280f36f4ce03236558606c75026059e 100644 +index cc4b9c69e7ccbf202c8ead328eb273e549bd21b3..58af2e8e2c0ede727f976e7a26eda75da0b48039 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -221,6 +221,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -219,6 +219,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } } diff --git a/patches/unapplied/server/0158-revert-serverside-behavior-of-keepalives.patch b/patches/server/0158-revert-serverside-behavior-of-keepalives.patch similarity index 68% rename from patches/unapplied/server/0158-revert-serverside-behavior-of-keepalives.patch rename to patches/server/0158-revert-serverside-behavior-of-keepalives.patch index d04e4c465..26d8634cb 100644 --- a/patches/unapplied/server/0158-revert-serverside-behavior-of-keepalives.patch +++ b/patches/server/0158-revert-serverside-behavior-of-keepalives.patch @@ -17,31 +17,27 @@ from networking or during connections flood of chunk packets on slower clients, at the cost of dead connections being kept open for longer. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a74b0cda6451e4368744e6d191bc5cf50eac3109..e7f39bebc1ac4cbc5a0a7109c21d16d8126fd3cc 100644 +index 8665bbd6e81d55711f82419c3e3edc9357a839f9..fb681f9607f2b17a5edafc60c40342532e33021c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -221,9 +221,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - private final MinecraftServer server; +@@ -239,7 +239,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser public ServerPlayer player; private int tickCount; -- private long keepAliveTime; @Deprecated private void setLastPing(long lastPing) { this.keepAliveTime = lastPing;}; @Deprecated private long getLastPing() { return this.keepAliveTime;}; // Paper - OBFHELPER -- private boolean keepAlivePending; @Deprecated private void setPendingPing(boolean isPending) { this.keepAlivePending = isPending;}; @Deprecated private boolean isPendingPing() { return this.keepAlivePending;}; // Paper - OBFHELPER -- private long keepAliveChallenge; @Deprecated private void setKeepAliveID(long keepAliveID) { this.keepAliveChallenge = keepAliveID;}; @Deprecated private long getKeepAliveID() {return this.keepAliveChallenge; }; // Paper - OBFHELPER + private int ackBlockChangesUpTo = -1; +- private long keepAliveTime; + private long keepAliveTime = Util.getMillis(); -+ private boolean keepAlivePending; -+ private long keepAliveChallenge; + private boolean keepAlivePending; + private long keepAliveChallenge; // CraftBukkit start - multithreaded fields - private final AtomicInteger chatSpamTickCount = new AtomicInteger(); - // CraftBukkit end -@@ -252,6 +252,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser - private int aboveGroundVehicleTickCount; - private int receivedMovePacketCount; +@@ -272,6 +272,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser private int knownMovePacketCount; + private final ChatPreviewThrottler chatPreviewThrottler = new ChatPreviewThrottler(); + private final AtomicReference lastChatTimeStamp; + private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { - this.server = server; -@@ -333,18 +334,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser + this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); +@@ -359,18 +360,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser } this.server.getProfiler().push("keepAlive"); @@ -49,7 +45,7 @@ index a74b0cda6451e4368744e6d191bc5cf50eac3109..e7f39bebc1ac4cbc5a0a7109c21d16d8 - - if (i - this.keepAliveTime >= 25000L) { // CraftBukkit - if (this.keepAlivePending) { -- this.disconnect(new TranslatableComponent("disconnect.timeout")); +- this.disconnect(Component.translatable("disconnect.timeout")); - } else { + // Paper Start - give clients a longer time to respond to pings as per pre 1.12.2 timings + // This should effectively place the keepalive handling back to "as it was" before 1.12.2 @@ -59,7 +55,7 @@ index a74b0cda6451e4368744e6d191bc5cf50eac3109..e7f39bebc1ac4cbc5a0a7109c21d16d8 + if (this.keepAlivePending) { + if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected + ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info -+ this.disconnect(new TranslatableComponent("disconnect.timeout", new Object[0])); ++ this.disconnect(Component.translatable("disconnect.timeout", new Object[0])); + } + } else { + if (elapsedTime >= 15000L) { // 15 seconds diff --git a/patches/unapplied/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch similarity index 89% rename from patches/unapplied/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch rename to patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch index ed1bc704a..4a113d36a 100644 --- a/patches/unapplied/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/patches/server/0159-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -6,18 +6,18 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac826f9e2e 100644 +index b876bbb08c868bc6984a395b84b0c0aaf1666912..c468e3406bd50b58e4cccba955e3fa9a5a3cb22e 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -31,6 +31,7 @@ import net.minecraft.network.chat.MutableComponent; - import net.minecraft.network.chat.TextComponent; - import net.minecraft.network.chat.TranslatableComponent; +@@ -35,6 +35,7 @@ import net.minecraft.network.chat.ClickEvent; + import net.minecraft.network.chat.Component; + import net.minecraft.network.chat.MutableComponent; import net.minecraft.network.protocol.game.ClientboundSetEntityMotionPacket; +import net.minecraft.network.protocol.game.ClientboundSoundPacket; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; -@@ -1201,7 +1202,7 @@ public abstract class Player extends LivingEntity { +@@ -1247,7 +1248,7 @@ public abstract class Player extends LivingEntity { int i = b0 + EnchantmentHelper.getKnockbackBonus(this); if (this.isSprinting() && flag) { @@ -26,7 +26,7 @@ index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac ++i; flag1 = true; } -@@ -1276,7 +1277,7 @@ public abstract class Player extends LivingEntity { +@@ -1322,7 +1323,7 @@ public abstract class Player extends LivingEntity { } } @@ -35,7 +35,7 @@ index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac this.sweepAttack(); } -@@ -1304,15 +1305,15 @@ public abstract class Player extends LivingEntity { +@@ -1350,15 +1351,15 @@ public abstract class Player extends LivingEntity { } if (flag2) { @@ -54,7 +54,7 @@ index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac } } -@@ -1364,7 +1365,7 @@ public abstract class Player extends LivingEntity { +@@ -1410,7 +1411,7 @@ public abstract class Player extends LivingEntity { this.causeFoodExhaustion(level.spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value } else { @@ -63,7 +63,7 @@ index 7fc4cd29bd487955886c81e6997d832a3185ec8e..de71d57b86d681efe0916dbee53be3ac if (flag4) { target.clearFire(); } -@@ -1811,6 +1812,14 @@ public abstract class Player extends LivingEntity { +@@ -1863,6 +1864,14 @@ public abstract class Player extends LivingEntity { public int getXpNeededForNextLevel() { return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2); } diff --git a/patches/unapplied/server/0160-Add-PlayerArmorChangeEvent.patch b/patches/server/0160-Add-PlayerArmorChangeEvent.patch similarity index 90% rename from patches/unapplied/server/0160-Add-PlayerArmorChangeEvent.patch rename to patches/server/0160-Add-PlayerArmorChangeEvent.patch index acb13c738..0e0a79eff 100644 --- a/patches/unapplied/server/0160-Add-PlayerArmorChangeEvent.patch +++ b/patches/server/0160-Add-PlayerArmorChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a7e09145160f9c26b19a8d61564bf9c04e2616b1..2449cd753ec52b7e2d2213fcd3979d616a33c677 100644 +index 2eed84529ad9a34ae88c4f37f2b0c7943f51b0ad..fc63d202e8cc28d5664c0f5749b195e3c1220cc9 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -1,5 +1,6 @@ @@ -15,7 +15,7 @@ index a7e09145160f9c26b19a8d61564bf9c04e2616b1..2449cd753ec52b7e2d2213fcd3979d61 import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -@@ -2941,6 +2942,13 @@ public abstract class LivingEntity extends Entity { +@@ -2974,6 +2975,13 @@ public abstract class LivingEntity extends Entity { ItemStack itemstack1 = this.getItemBySlot(enumitemslot); if (!ItemStack.matches(itemstack1, itemstack)) { diff --git a/patches/unapplied/server/0161-Prevent-logins-from-being-processed-when-the-player-.patch b/patches/server/0161-Prevent-logins-from-being-processed-when-the-player-.patch similarity index 88% rename from patches/unapplied/server/0161-Prevent-logins-from-being-processed-when-the-player-.patch rename to patches/server/0161-Prevent-logins-from-being-processed-when-the-player-.patch index 9be38dd14..c4b309647 100644 --- a/patches/unapplied/server/0161-Prevent-logins-from-being-processed-when-the-player-.patch +++ b/patches/server/0161-Prevent-logins-from-being-processed-when-the-player-.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Prevent logins from being processed when the player has diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 6834c67b38f0679497bef4b2174817d9688cbbd8..73efc3084b04914f7f06875651269fd584b60989 100644 +index 6d015b226ea32f9d658ca9674b9500494c837949..c927fc378254812ca630b2d1c48d6b378dee5ef0 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -75,7 +75,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener +@@ -86,7 +86,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener } // Paper end if (this.state == ServerLoginPacketListenerImpl.State.READY_TO_ACCEPT) { diff --git a/patches/unapplied/server/0162-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/patches/server/0162-Fix-MC-117075-TE-Unload-Lag-Spike.patch similarity index 84% rename from patches/unapplied/server/0162-Fix-MC-117075-TE-Unload-Lag-Spike.patch rename to patches/server/0162-Fix-MC-117075-TE-Unload-Lag-Spike.patch index bfd6705b7..3ebc01232 100644 --- a/patches/unapplied/server/0162-Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/patches/server/0162-Fix-MC-117075-TE-Unload-Lag-Spike.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index d22b7edc9ddea765c11e82346afd3942e37831de..a7fbaa420bf18649cdcb94d53e7d5cfd704d9555 100644 +index 4aea5e937e2e0e272e5aeb4e6b9ed750064f3828..fc7d5f89b0ad56ab30d32b8ff2a301a55ad768dc 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -730,6 +730,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -687,6 +687,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Spigot start // Iterator iterator = this.blockEntityTickers.iterator(); int tilesThisCycle = 0; @@ -17,7 +17,7 @@ index d22b7edc9ddea765c11e82346afd3942e37831de..a7fbaa420bf18649cdcb94d53e7d5cfd for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0; TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(tileTickPosition); -@@ -737,7 +739,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -694,7 +696,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { if (tickingblockentity == null) { this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash"); tilesThisCycle--; @@ -25,14 +25,14 @@ index d22b7edc9ddea765c11e82346afd3942e37831de..a7fbaa420bf18649cdcb94d53e7d5cfd continue; } // Spigot end -@@ -745,12 +746,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -702,12 +703,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { if (tickingblockentity.isRemoved()) { // Spigot start tilesThisCycle--; - this.blockEntityTickers.remove(this.tileTickPosition--); + toRemove.add(tickingblockentity); // Paper - use removeAll // Spigot end - } else if (this.shouldTickBlocksAt(ChunkPos.asLong(tickingblockentity.getPos()))) { + } else if (this.shouldTickBlocksAt(tickingblockentity.getPos())) { tickingblockentity.tick(); } } diff --git a/patches/unapplied/server/0163-use-CB-BlockState-implementations-for-captured-block.patch b/patches/server/0163-use-CB-BlockState-implementations-for-captured-block.patch similarity index 91% rename from patches/unapplied/server/0163-use-CB-BlockState-implementations-for-captured-block.patch rename to patches/server/0163-use-CB-BlockState-implementations-for-captured-block.patch index b448867fd..5155fc0f8 100644 --- a/patches/unapplied/server/0163-use-CB-BlockState-implementations-for-captured-block.patch +++ b/patches/server/0163-use-CB-BlockState-implementations-for-captured-block.patch @@ -18,10 +18,10 @@ the blockstate that will be valid for restoration, as opposed to dropping information on restoration when the event is cancelled. diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index a7fbaa420bf18649cdcb94d53e7d5cfd704d9555..46168d119d10231b8b946015245a476e0b56d567 100644 +index fc7d5f89b0ad56ab30d32b8ff2a301a55ad768dc..1569c9249804de05b2650463f32a94d599ffd427 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -142,7 +142,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -148,7 +148,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710 public boolean captureBlockStates = false; public boolean captureTreeGeneration = false; @@ -30,7 +30,7 @@ index a7fbaa420bf18649cdcb94d53e7d5cfd704d9555..46168d119d10231b8b946015245a476e public Map capturedTileEntities = new HashMap<>(); public List captureDrops; public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>(); -@@ -361,7 +361,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -372,7 +372,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { @@ -39,7 +39,7 @@ index a7fbaa420bf18649cdcb94d53e7d5cfd704d9555..46168d119d10231b8b946015245a476e if (blockstate == null) { blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags); this.capturedBlockStates.put(pos.immutable(), blockstate); -@@ -381,7 +381,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -392,7 +392,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // CraftBukkit start - capture blockstates boolean captured = false; if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) { @@ -49,7 +49,7 @@ index a7fbaa420bf18649cdcb94d53e7d5cfd704d9555..46168d119d10231b8b946015245a476e this.capturedBlockStates.put(pos.immutable(), blockstate); captured = true; } -@@ -650,7 +651,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -599,7 +600,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { public BlockState getBlockState(BlockPos pos) { // CraftBukkit start - tree generation if (this.captureTreeGeneration) { diff --git a/patches/unapplied/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch similarity index 98% rename from patches/unapplied/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch rename to patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch index f3b9b0813..c2d8befb3 100644 --- a/patches/unapplied/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch +++ b/patches/server/0164-API-to-get-a-BlockState-without-a-snapshot.patch @@ -114,10 +114,10 @@ index 7629a51ec284cab0db7e9238027d6acfa4f3083c..a76cce199acdcecfdd8b998ec08974c2 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java -index 51ea68c433c4d530f8404d3174c5a121ce808a96..93a8aeb5545c794ac425c35f8af52a443cd060ca 100644 +index 521d981e72955b1e2c96427882e336b034456678..e609cfeaf5aa6807f57360dde9b0dccf40a23eb1 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java -@@ -324,15 +324,30 @@ public final class CraftBlockStates { +@@ -336,15 +336,30 @@ public final class CraftBlockStates { } public static BlockState getBlockState(Block block) { diff --git a/patches/unapplied/server/0165-AsyncTabCompleteEvent.patch b/patches/server/0165-AsyncTabCompleteEvent.patch similarity index 92% rename from patches/unapplied/server/0165-AsyncTabCompleteEvent.patch rename to patches/server/0165-AsyncTabCompleteEvent.patch index bca3b525a..f32e64cd5 100644 --- a/patches/unapplied/server/0165-AsyncTabCompleteEvent.patch +++ b/patches/server/0165-AsyncTabCompleteEvent.patch @@ -14,10 +14,10 @@ completion, such as offline players. Also adds isCommand and getLocation to the sync TabCompleteEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e7f39bebc1ac4cbc5a0a7109c21d16d8126fd3cc..ee482d8942a355d989a2c913c23245bdbfb866a1 100644 +index fb681f9607f2b17a5edafc60c40342532e33021c..9e7a3a58bf944e612fa4c3bcb3b87efe5eb21c5b 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -708,10 +708,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -740,10 +740,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @Override public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) { @@ -25,12 +25,12 @@ index e7f39bebc1ac4cbc5a0a7109c21d16d8126fd3cc..ee482d8942a355d989a2c913c23245bd + // PlayerConnectionUtils.ensureMainThread(packetplayintabcomplete, this, this.player.getWorldServer()); // Paper - run this async // CraftBukkit start if (this.chatSpamTickCount.addAndGet(1) > 500 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { -- this.disconnect(new TranslatableComponent("disconnect.spam", new Object[0])); -+ server.scheduleOnMain(() -> this.disconnect(new TranslatableComponent("disconnect.spam", new Object[0]))); // Paper +- this.disconnect(Component.translatable("disconnect.spam")); ++ server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]))); // Paper return; } // CraftBukkit end -@@ -721,12 +721,35 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser +@@ -753,12 +753,35 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser stringreader.skip(); } @@ -72,10 +72,10 @@ index e7f39bebc1ac4cbc5a0a7109c21d16d8126fd3cc..ee482d8942a355d989a2c913c23245bd @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index c091aa6cbb541ce5349ffb183bc7d67b0c4fafeb..77c5180d36f09cfeb7a82c6e321793ac1a363a48 100644 +index fbe26f8a592ed0a3b970b6f02126b6e3e454d8af..5d62881b974081d7207773580697c5d6ccdc8880 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2078,7 +2078,7 @@ public final class CraftServer implements Server { +@@ -2061,7 +2061,7 @@ public final class CraftServer implements Server { offers = this.tabCompleteChat(player, message); } diff --git a/patches/unapplied/server/0166-PlayerPickupExperienceEvent.patch b/patches/server/0166-PlayerPickupExperienceEvent.patch similarity index 100% rename from patches/unapplied/server/0166-PlayerPickupExperienceEvent.patch rename to patches/server/0166-PlayerPickupExperienceEvent.patch diff --git a/patches/unapplied/server/0167-Ability-to-apply-mending-to-XP-API.patch b/patches/server/0167-Ability-to-apply-mending-to-XP-API.patch similarity index 94% rename from patches/unapplied/server/0167-Ability-to-apply-mending-to-XP-API.patch rename to patches/server/0167-Ability-to-apply-mending-to-XP-API.patch index 5994a73d9..0883c5a63 100644 --- a/patches/unapplied/server/0167-Ability-to-apply-mending-to-XP-API.patch +++ b/patches/server/0167-Ability-to-apply-mending-to-XP-API.patch @@ -10,10 +10,10 @@ of giving the player experience points. Both an API To standalone mend, and apply mending logic to .giveExp has been added. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index bb75dd9d6280f36f4ce03236558606c75026059e..19e8ec4baf0967693121b2e3443d436f85f518ec 100644 +index 58af2e8e2c0ede727f976e7a26eda75da0b48039..3352880b06a25b90b338dc15c99e9df08caa86dc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1349,7 +1349,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1347,7 +1347,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } @Override diff --git a/patches/unapplied/server/0168-PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch similarity index 88% rename from patches/unapplied/server/0168-PlayerNaturallySpawnCreaturesEvent.patch rename to patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch index f05e6a739..9b6e6139c 100644 --- a/patches/unapplied/server/0168-PlayerNaturallySpawnCreaturesEvent.patch +++ b/patches/server/0168-PlayerNaturallySpawnCreaturesEvent.patch @@ -9,10 +9,10 @@ from triggering monster spawns on a server. Also a highly more effecient way to blanket block spawns in a world diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index f5cf71258732aa040443eb82e09ab28f130e4c79..81eb73e9fde37e3b196bd899ecd4d614897d1a98 100644 +index 943cad9a08d72b90b92f92ef90588501bbf158d5..f9ef45635b731cafc9b6879603cac34c146833b0 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1114,7 +1114,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1150,7 +1150,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange; chunkRange = (chunkRange > 8) ? 8 : chunkRange; @@ -23,7 +23,7 @@ index f5cf71258732aa040443eb82e09ab28f130e4c79..81eb73e9fde37e3b196bd899ecd4d614 // Spigot end long i = chunkcoordintpair.toLong(); -@@ -1131,6 +1133,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1167,6 +1169,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } entityplayer = (ServerPlayer) iterator.next(); @@ -40,10 +40,10 @@ index f5cf71258732aa040443eb82e09ab28f130e4c79..81eb73e9fde37e3b196bd899ecd4d614 return true; diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -index d198303d4d0cff34156c00176ec2f3f2ad42ada4..f2d92cd125cbc1bd6fdab774e7002d6b7eda29fc 100644 +index 63e11397d6efb293b140c4c4bca91e49464e8ea6..f4174e4b7c296407cb1b18af77ae855978ec1b6a 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -818,6 +818,15 @@ public class ServerChunkCache extends ChunkSource { +@@ -819,6 +819,15 @@ public class ServerChunkCache extends ChunkSource { boolean flag2 = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit Collections.shuffle(list); @@ -60,7 +60,7 @@ index d198303d4d0cff34156c00176ec2f3f2ad42ada4..f2d92cd125cbc1bd6fdab774e7002d6b while (iterator1.hasNext()) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index eaa968b6d91160947235fad29d3b955b3ee149f3..3c780c0679ba004577393b3d801ee18ac7e847b9 100644 +index bd6e22b849d6328b2fcc0244cc83a79d9ffb08c8..23bf128cb5b7598a9d4c145b14f8fe692660be0d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -1,5 +1,6 @@ @@ -70,7 +70,7 @@ index eaa968b6d91160947235fad29d3b955b3ee149f3..3c780c0679ba004577393b3d801ee18a import com.google.common.collect.Lists; import com.mojang.authlib.GameProfile; import com.mojang.datafixers.util.Either; -@@ -236,6 +237,7 @@ public class ServerPlayer extends Player { +@@ -243,6 +244,7 @@ public class ServerPlayer extends Player { public Integer clientViewDistance; public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent // CraftBukkit end diff --git a/patches/unapplied/server/0170-Add-setPlayerProfile-API-for-Skulls.patch b/patches/server/0169-Add-setPlayerProfile-API-for-Skulls.patch similarity index 100% rename from patches/unapplied/server/0170-Add-setPlayerProfile-API-for-Skulls.patch rename to patches/server/0169-Add-setPlayerProfile-API-for-Skulls.patch diff --git a/patches/unapplied/server/0171-Fill-Profile-Property-Events.patch b/patches/server/0170-Fill-Profile-Property-Events.patch similarity index 100% rename from patches/unapplied/server/0171-Fill-Profile-Property-Events.patch rename to patches/server/0170-Fill-Profile-Property-Events.patch diff --git a/patches/unapplied/server/0172-PlayerAdvancementCriterionGrantEvent.patch b/patches/server/0171-PlayerAdvancementCriterionGrantEvent.patch similarity index 87% rename from patches/unapplied/server/0172-PlayerAdvancementCriterionGrantEvent.patch rename to patches/server/0171-PlayerAdvancementCriterionGrantEvent.patch index 24c1ee0c7..de0f23f17 100644 --- a/patches/unapplied/server/0172-PlayerAdvancementCriterionGrantEvent.patch +++ b/patches/server/0171-PlayerAdvancementCriterionGrantEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] PlayerAdvancementCriterionGrantEvent diff --git a/src/main/java/net/minecraft/server/PlayerAdvancements.java b/src/main/java/net/minecraft/server/PlayerAdvancements.java -index e5ffc18cbd107b9fd20a9781f6f1979e9598378f..ecd62d2625bc5def3ac68f642f2c6f156060f129 100644 +index e4d7bc72545971ce9b74cce18e9b79abef9fefb7..4591364057110b8abe6cc669b76918096cb6b776 100644 --- a/src/main/java/net/minecraft/server/PlayerAdvancements.java +++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java -@@ -277,6 +277,12 @@ public class PlayerAdvancements { +@@ -276,6 +276,12 @@ public class PlayerAdvancements { boolean flag1 = advancementprogress.isDone(); if (advancementprogress.grantProgress(criterionName)) { diff --git a/patches/unapplied/server/0173-Add-ArmorStand-Item-Meta.patch b/patches/server/0172-Add-ArmorStand-Item-Meta.patch similarity index 99% rename from patches/unapplied/server/0173-Add-ArmorStand-Item-Meta.patch rename to patches/server/0172-Add-ArmorStand-Item-Meta.patch index 159aa8fb7..08077b513 100644 --- a/patches/unapplied/server/0173-Add-ArmorStand-Item-Meta.patch +++ b/patches/server/0172-Add-ArmorStand-Item-Meta.patch @@ -255,7 +255,7 @@ index 1b8be8a7103e09065a405a22d427b9a747fc1a3e..2afedf24e485dd36e95988843c70af88 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 20d10e5b54edaf1c5212bbc33b8cd1aa426fa826..d5df6fc244ab82b94196be9c436ba77020716df2 100644 +index 4d687fa31f4d889ac755c178b9afd2b927c78ee2..01ceb8de8411193fa407bf19bbd25a4bf44765d3 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -1452,6 +1452,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { diff --git a/patches/unapplied/server/0174-Extend-Player-Interact-cancellation.patch b/patches/server/0173-Extend-Player-Interact-cancellation.patch similarity index 93% rename from patches/unapplied/server/0174-Extend-Player-Interact-cancellation.patch rename to patches/server/0173-Extend-Player-Interact-cancellation.patch index f775b34e7..ef330b35a 100644 --- a/patches/unapplied/server/0174-Extend-Player-Interact-cancellation.patch +++ b/patches/server/0173-Extend-Player-Interact-cancellation.patch @@ -13,10 +13,10 @@ Update adjacent blocks of doors, double plants, pistons and beds when cancelling interaction. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index c0f712fd4dd57080044341c7c7c8faf09572c2c5..91d6885da13138e1def16e1876910ef893ce244d 100644 +index b18bb06caf5f034dffbb72120c8f21da482ae3df..53717a4a2bfd841346c00b5f854899e23661122c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -196,6 +196,11 @@ public class ServerPlayerGameMode { +@@ -186,6 +186,11 @@ public class ServerPlayerGameMode { PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, pos, direction, this.player.getInventory().getSelected(), InteractionHand.MAIN_HAND); if (event.isCancelled()) { // Let the client know the block still exists @@ -28,7 +28,7 @@ index c0f712fd4dd57080044341c7c7c8faf09572c2c5..91d6885da13138e1def16e1876910ef8 this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos)); // Update any tile entity data for this block BlockEntity tileentity = this.level.getBlockEntity(pos); -@@ -513,7 +518,13 @@ public class ServerPlayerGameMode { +@@ -509,7 +514,13 @@ public class ServerPlayerGameMode { // send a correcting update to the client for the block above as well, this because of replaceable blocks (such as grass, sea grass etc) player.connection.send(new ClientboundBlockUpdatePacket(world, blockposition.above())); diff --git a/patches/unapplied/server/0175-Tameable-getOwnerUniqueId-API.patch b/patches/server/0174-Tameable-getOwnerUniqueId-API.patch similarity index 100% rename from patches/unapplied/server/0175-Tameable-getOwnerUniqueId-API.patch rename to patches/server/0174-Tameable-getOwnerUniqueId-API.patch diff --git a/patches/unapplied/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/patches/server/0175-Toggleable-player-crits-helps-mitigate-hacked-client.patch similarity index 91% rename from patches/unapplied/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch rename to patches/server/0175-Toggleable-player-crits-helps-mitigate-hacked-client.patch index cafc3eaeb..da2f1f125 100644 --- a/patches/unapplied/server/0176-Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/patches/server/0175-Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -21,10 +21,10 @@ index 99ce64e4d01b58d887506841451e561c2796c413..665b7f4cddfef1631ba2fad6eebeb193 private void allChunksAreSlimeChunks() { allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false); diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index de71d57b86d681efe0916dbee53be3ac826f9e2e..66b474304f659efcc7bd1181e3eaee70657013eb 100644 +index c468e3406bd50b58e4cccba955e3fa9a5a3cb22e..3008f0ac5aee6443645b7c888a5e8e5b630138e7 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1209,6 +1209,7 @@ public abstract class Player extends LivingEntity { +@@ -1255,6 +1255,7 @@ public abstract class Player extends LivingEntity { boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity; diff --git a/patches/unapplied/server/0177-Disable-Explicit-Network-Manager-Flushing.patch b/patches/server/0176-Disable-Explicit-Network-Manager-Flushing.patch similarity index 94% rename from patches/unapplied/server/0177-Disable-Explicit-Network-Manager-Flushing.patch rename to patches/server/0176-Disable-Explicit-Network-Manager-Flushing.patch index 1ccb5ac58..137aaae93 100644 --- a/patches/unapplied/server/0177-Disable-Explicit-Network-Manager-Flushing.patch +++ b/patches/server/0176-Disable-Explicit-Network-Manager-Flushing.patch @@ -12,7 +12,7 @@ flushing on the netty event loop, so it won't do the flush on the main thread. Renable flushing by passing -Dpaper.explicit-flush=true diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java -index 1a2184e23f1e1b8e39141689ebc5f1d13d364038..7e7d33a843566440f815d779ef2f3db9efc3b92d 100644 +index 0e338ebdea3a02d56e9149a6904bfdc8889167f1..311148ba8ca073d522cac81f9a3f66f30eb70909 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java @@ -96,6 +96,7 @@ public class Connection extends SimpleChannelInboundHandler> { diff --git a/patches/unapplied/server/0178-Implement-extended-PaperServerListPingEvent.patch b/patches/server/0177-Implement-extended-PaperServerListPingEvent.patch similarity index 96% rename from patches/unapplied/server/0178-Implement-extended-PaperServerListPingEvent.patch rename to patches/server/0177-Implement-extended-PaperServerListPingEvent.patch index 5a45cbe4b..c196a608f 100644 --- a/patches/unapplied/server/0178-Implement-extended-PaperServerListPingEvent.patch +++ b/patches/server/0177-Implement-extended-PaperServerListPingEvent.patch @@ -190,7 +190,7 @@ index 67455a5ba75c9b816213e44d6872c5ddf8e27e98..23efad80934930beadf15e65781551d4 public ClientboundStatusResponsePacket(ServerStatus metadata) { diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 22c4598e00d1a27d86584e7bfcbb73038f2f2c1a..c7881eebb02424ce488d2c04aa736f17402109a0 100644 +index f67392be663dd558ce6458dc210c6ac90538d9e5..661ee126886691cbd6db1a6e08ec6ab402698a76 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2,6 +2,9 @@ package net.minecraft.server; @@ -203,7 +203,7 @@ index 22c4598e00d1a27d86584e7bfcbb73038f2f2c1a..c7881eebb02424ce488d2c04aa736f17 import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -1350,7 +1353,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop