From c60dd35989cfb5132798805ff637cf819bf8b938 Mon Sep 17 00:00:00 2001 From: Noah van der Aa Date: Thu, 21 Sep 2023 23:04:51 +0200 Subject: [PATCH] more more more more more work --- ...t-serverside-behavior-of-keepalives.patch} | 40 +++++++++---------- ...Effects-only-to-players-who-can-see.patch} | 12 +++--- .../0161-Add-PlayerArmorChangeEvent.patch} | 4 +- ...rom-being-processed-when-the-player-.patch | 21 ++++++++++ ...3-Fix-MC-117075-TE-Unload-Lag-Spike.patch} | 8 ++-- ...-implementations-for-captured-block.patch} | 4 +- ...get-a-BlockState-without-a-snapshot.patch} | 0 .../0166-AsyncTabCompleteEvent.patch} | 14 +++---- .../0167-PlayerPickupExperienceEvent.patch} | 0 ...-Ability-to-apply-mending-to-XP-API.patch} | 4 +- ...-PlayerNaturallySpawnCreaturesEvent.patch} | 22 +++++----- ...Add-setPlayerProfile-API-for-Skulls.patch} | 16 ++++---- .../0171-PreCreatureSpawnEvent.patch} | 12 +++--- .../0172-Fill-Profile-Property-Events.patch} | 0 ...layerAdvancementCriterionGrantEvent.patch} | 4 +- .../0174-Add-ArmorStand-Item-Meta.patch} | 0 ...Extend-Player-Interact-cancellation.patch} | 0 .../0176-Tameable-getOwnerUniqueId-API.patch} | 0 ...-crits-helps-mitigate-hacked-client.patch} | 4 +- ...e-Explicit-Network-Manager-Flushing.patch} | 6 +-- ...t-extended-PaperServerListPingEvent.patch} | 4 +- ...-PlayerProfile-in-AsyncPreLoginEven.patch} | 6 +-- .../0181-Player.setPlayerProfile-API.patch} | 22 +++++----- .../0182-getPlayerUniqueId-API.patch} | 4 +- .../0183-Improved-Async-Task-Scheduler.patch} | 0 ...rom-being-processed-when-the-player-.patch | 24 ----------- ...8-Add-openSign-method-to-HumanEntity.patch | 2 +- ...urable-sprint-interruption-on-attack.patch | 4 +- .../server/0190-EndermanEscapeEvent.patch | 10 ++--- .../0191-Enderman.teleportRandomly.patch | 2 +- ...0192-Block-Enderpearl-Travel-Exploit.patch | 6 +-- ...ld.spawnParticle-API-and-add-Builder.patch | 8 ++-- ...-allowed-colored-signs-to-be-created.patch | 4 +- ...sted-Ice-from-loading-holding-chunks.patch | 4 +- .../0196-EndermanAttackPlayerEvent.patch | 4 +- .../server/0197-WitchConsumePotionEvent.patch | 4 +- .../server/0198-WitchThrowPotionEvent.patch | 2 +- 37 files changed, 135 insertions(+), 146 deletions(-) rename patches/{unapplied/server/0160-revert-serverside-behavior-of-keepalives.patch => server/0159-revert-serverside-behavior-of-keepalives.patch} (63%) rename patches/{unapplied/server/0161-Send-attack-SoundEffects-only-to-players-who-can-see.patch => server/0160-Send-attack-SoundEffects-only-to-players-who-can-see.patch} (92%) rename patches/{unapplied/server/0162-Add-PlayerArmorChangeEvent.patch => server/0161-Add-PlayerArmorChangeEvent.patch} (97%) create mode 100644 patches/server/0162-Prevent-logins-from-being-processed-when-the-player-.patch rename patches/{unapplied/server/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch => server/0163-Fix-MC-117075-TE-Unload-Lag-Spike.patch} (88%) rename patches/{unapplied/server/0165-use-CB-BlockState-implementations-for-captured-block.patch => server/0164-use-CB-BlockState-implementations-for-captured-block.patch} (95%) rename patches/{unapplied/server/0166-API-to-get-a-BlockState-without-a-snapshot.patch => server/0165-API-to-get-a-BlockState-without-a-snapshot.patch} (100%) rename patches/{unapplied/server/0167-AsyncTabCompleteEvent.patch => server/0166-AsyncTabCompleteEvent.patch} (94%) rename patches/{unapplied/server/0168-PlayerPickupExperienceEvent.patch => server/0167-PlayerPickupExperienceEvent.patch} (100%) rename patches/{unapplied/server/0169-Ability-to-apply-mending-to-XP-API.patch => server/0168-Ability-to-apply-mending-to-XP-API.patch} (94%) rename patches/{unapplied/server/0170-PlayerNaturallySpawnCreaturesEvent.patch => server/0169-PlayerNaturallySpawnCreaturesEvent.patch} (79%) rename patches/{unapplied/server/0171-Add-setPlayerProfile-API-for-Skulls.patch => server/0170-Add-setPlayerProfile-API-for-Skulls.patch} (87%) rename patches/{unapplied/server/0172-PreCreatureSpawnEvent.patch => server/0171-PreCreatureSpawnEvent.patch} (95%) rename patches/{unapplied/server/0173-Fill-Profile-Property-Events.patch => server/0172-Fill-Profile-Property-Events.patch} (100%) rename patches/{unapplied/server/0174-PlayerAdvancementCriterionGrantEvent.patch => server/0173-PlayerAdvancementCriterionGrantEvent.patch} (87%) rename patches/{unapplied/server/0175-Add-ArmorStand-Item-Meta.patch => server/0174-Add-ArmorStand-Item-Meta.patch} (100%) rename patches/{unapplied/server/0176-Extend-Player-Interact-cancellation.patch => server/0175-Extend-Player-Interact-cancellation.patch} (100%) rename patches/{unapplied/server/0177-Tameable-getOwnerUniqueId-API.patch => server/0176-Tameable-getOwnerUniqueId-API.patch} (100%) rename patches/{unapplied/server/0178-Toggleable-player-crits-helps-mitigate-hacked-client.patch => server/0177-Toggleable-player-crits-helps-mitigate-hacked-client.patch} (85%) rename patches/{unapplied/server/0179-Disable-Explicit-Network-Manager-Flushing.patch => server/0178-Disable-Explicit-Network-Manager-Flushing.patch} (86%) rename patches/{unapplied/server/0180-Implement-extended-PaperServerListPingEvent.patch => server/0179-Implement-extended-PaperServerListPingEvent.patch} (98%) rename patches/{unapplied/server/0181-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch => server/0180-Ability-to-change-PlayerProfile-in-AsyncPreLoginEven.patch} (87%) rename patches/{unapplied/server/0182-Player.setPlayerProfile-API.patch => server/0181-Player.setPlayerProfile-API.patch} (93%) rename patches/{unapplied/server/0183-getPlayerUniqueId-API.patch => server/0182-getPlayerUniqueId-API.patch} (90%) rename patches/{unapplied/server/0184-Improved-Async-Task-Scheduler.patch => server/0183-Improved-Async-Task-Scheduler.patch} (100%) delete mode 100644 patches/unapplied/server/0163-Prevent-logins-from-being-processed-when-the-player-.patch diff --git a/patches/unapplied/server/0160-revert-serverside-behavior-of-keepalives.patch b/patches/server/0159-revert-serverside-behavior-of-keepalives.patch similarity index 63% rename from patches/unapplied/server/0160-revert-serverside-behavior-of-keepalives.patch rename to patches/server/0159-revert-serverside-behavior-of-keepalives.patch index f9c36a4bcd..c3378b6db9 100644 --- a/patches/unapplied/server/0160-revert-serverside-behavior-of-keepalives.patch +++ b/patches/server/0159-revert-serverside-behavior-of-keepalives.patch @@ -16,37 +16,32 @@ whereas higher values will make this less sensitive to issues such as spikes 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 63003915799f636af2d60778f059a5667e199baf..51edb4f6be04b9c3b0745bc13fe7ce7cc4868e59 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -261,7 +261,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - public ServerPlayer player; - private int tickCount; - private int ackBlockChangesUpTo = -1; +diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +index e8fb051bf24a4c239ae980c37d8d64f261b5db60..988820d6041f3784fec9321c7bc08e2e84a52ad5 100644 +--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java +@@ -48,11 +48,12 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + private static final Component TIMEOUT_DISCONNECTION_MESSAGE = Component.translatable("disconnect.timeout"); + protected final MinecraftServer server; + public final Connection connection; // Paper - private long keepAliveTime; -+ private long keepAliveTime = Util.getMillis(); ++ private long keepAliveTime = Util.getMillis(); // Paper private boolean keepAlivePending; private long keepAliveChallenge; - // CraftBukkit start - multithreaded fields -@@ -299,6 +299,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - private final LastSeenMessagesValidator lastSeenMessages; - private final MessageSignatureCache messageSignatureCache; - private final FutureChain chatMessageChain; + private int latency; + private volatile boolean suspendFlushingOnServerThread = false; + 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.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); -@@ -390,18 +391,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - } + public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, Connection networkmanager, CommonListenerCookie commonlistenercookie, ServerPlayer player) { // CraftBukkit + this.server = minecraftserver; +@@ -170,18 +171,25 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack + protected void keepConnectionAlive() { this.server.getProfiler().push("keepAlive"); - long i = Util.getMillis(); - - if (i - this.keepAliveTime >= 25000L) { // CraftBukkit - if (this.keepAlivePending) { -- 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 + long currentTime = Util.getMillis(); @@ -55,7 +50,8 @@ index 63003915799f636af2d60778f059a5667e199baf..51edb4f6be04b9c3b0745bc13fe7ce7c + 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(Component.translatable("disconnect.timeout", new Object[0])); + this.disconnect(ServerCommonPacketListenerImpl.TIMEOUT_DISCONNECTION_MESSAGE); +- } else { + } + } else { + if (elapsedTime >= 15000L) { // 15 seconds @@ -70,4 +66,4 @@ index 63003915799f636af2d60778f059a5667e199baf..51edb4f6be04b9c3b0745bc13fe7ce7c + // Paper end this.server.getProfiler().pop(); - // CraftBukkit start + } diff --git a/patches/unapplied/server/0161-Send-attack-SoundEffects-only-to-players-who-can-see.patch b/patches/server/0160-Send-attack-SoundEffects-only-to-players-who-can-see.patch similarity index 92% rename from patches/unapplied/server/0161-Send-attack-SoundEffects-only-to-players-who-can-see.patch rename to patches/server/0160-Send-attack-SoundEffects-only-to-players-who-can-see.patch index cb7094caa5..5e6a90819e 100644 --- a/patches/unapplied/server/0161-Send-attack-SoundEffects-only-to-players-who-can-see.patch +++ b/patches/server/0160-Send-attack-SoundEffects-only-to-players-who-can-see.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 85488adc9c822c89ab5778bc1d48c58e916795c8..9922ab54fa2ea3abef759aba08cca535f70030e8 100644 +index 3d333332ae02951af087cd37cbe7f1ecf8b0c932..42663ab48cb8a18c5e724ca840bc6f50d9b91170 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1234,7 +1234,7 @@ public abstract class Player extends LivingEntity { +@@ -1240,7 +1240,7 @@ public abstract class Player extends LivingEntity { int i = b0 + EnchantmentHelper.getKnockbackBonus(this); if (this.isSprinting() && flag) { @@ -18,7 +18,7 @@ index 85488adc9c822c89ab5778bc1d48c58e916795c8..9922ab54fa2ea3abef759aba08cca535 ++i; flag1 = true; } -@@ -1309,7 +1309,7 @@ public abstract class Player extends LivingEntity { +@@ -1315,7 +1315,7 @@ public abstract class Player extends LivingEntity { } } @@ -27,7 +27,7 @@ index 85488adc9c822c89ab5778bc1d48c58e916795c8..9922ab54fa2ea3abef759aba08cca535 this.sweepAttack(); } -@@ -1337,15 +1337,15 @@ public abstract class Player extends LivingEntity { +@@ -1343,15 +1343,15 @@ public abstract class Player extends LivingEntity { } if (flag2) { @@ -46,7 +46,7 @@ index 85488adc9c822c89ab5778bc1d48c58e916795c8..9922ab54fa2ea3abef759aba08cca535 } } -@@ -1397,7 +1397,7 @@ public abstract class Player extends LivingEntity { +@@ -1403,7 +1403,7 @@ public abstract class Player extends LivingEntity { this.causeFoodExhaustion(this.level().spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value } else { @@ -55,7 +55,7 @@ index 85488adc9c822c89ab5778bc1d48c58e916795c8..9922ab54fa2ea3abef759aba08cca535 if (flag4) { target.clearFire(); } -@@ -1871,6 +1871,14 @@ public abstract class Player extends LivingEntity { +@@ -1877,6 +1877,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/0162-Add-PlayerArmorChangeEvent.patch b/patches/server/0161-Add-PlayerArmorChangeEvent.patch similarity index 97% rename from patches/unapplied/server/0162-Add-PlayerArmorChangeEvent.patch rename to patches/server/0161-Add-PlayerArmorChangeEvent.patch index f40e40b0a5..3bb1cc8702 100644 --- a/patches/unapplied/server/0162-Add-PlayerArmorChangeEvent.patch +++ b/patches/server/0161-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 0470329b43afd4e8c5e033666d1c5f8f0a03fe6a..021f3f81746a6e986c8899aa4b28ef87a67bed44 100644 +index a8d39b7257332ec8b3b711aab2c4b76a867e73bc..231ba23fabeb88b659a7ea9702eebe4aad72a209 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 0470329b43afd4e8c5e033666d1c5f8f0a03fe6a..021f3f81746a6e986c8899aa4b28ef87 import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; -@@ -3016,6 +3017,13 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3053,6 +3054,13 @@ public abstract class LivingEntity extends Entity implements Attackable { ItemStack itemstack1 = this.getItemBySlot(enumitemslot); if (this.equipmentHasChanged(itemstack, itemstack1)) { diff --git a/patches/server/0162-Prevent-logins-from-being-processed-when-the-player-.patch b/patches/server/0162-Prevent-logins-from-being-processed-when-the-player-.patch new file mode 100644 index 0000000000..d271a12cd3 --- /dev/null +++ b/patches/server/0162-Prevent-logins-from-being-processed-when-the-player-.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: killme +Date: Sun, 12 Nov 2017 19:40:01 +0100 +Subject: [PATCH] Prevent logins from being processed when the player has + disconnected + + +diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +index b98c7bb70a2d8867e1236d3c8d78d2cfffe76e28..1202a60cf955dbfbfc2135c06d3304f215b23c2c 100644 +--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +@@ -79,7 +79,9 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, + } + // Paper end + if (this.state == ServerLoginPacketListenerImpl.State.VERIFYING) { ++ if (this.connection.isConnected()) { // Paper - prevent logins to be processed even though disconnect was called + this.verifyLoginAndFinishConnectionSetup((GameProfile) Objects.requireNonNull(this.authenticatedProfile)); ++ } // Paper + } + + if (this.state == ServerLoginPacketListenerImpl.State.WAITING_FOR_DUPE_DISCONNECT && !this.isPlayerAlreadyInWorld((GameProfile) Objects.requireNonNull(this.authenticatedProfile))) { diff --git a/patches/unapplied/server/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch b/patches/server/0163-Fix-MC-117075-TE-Unload-Lag-Spike.patch similarity index 88% rename from patches/unapplied/server/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch rename to patches/server/0163-Fix-MC-117075-TE-Unload-Lag-Spike.patch index 169d912a4b..10951ab2ba 100644 --- a/patches/unapplied/server/0164-Fix-MC-117075-TE-Unload-Lag-Spike.patch +++ b/patches/server/0163-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 7cfcbc1e38f5e9145c827dfe26299277a3f14cee..22dab285bbcea77d04a8625b025f054c625cadd4 100644 +index 776a5a9947c56eb63df7ac9797166be456282af1..e00e9a6ca14622c2baeba71f54710fedc838ffd7 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -805,6 +805,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -800,6 +800,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable { // Spigot start // Iterator iterator = this.blockEntityTickers.iterator(); int tilesThisCycle = 0; @@ -17,7 +17,7 @@ index 7cfcbc1e38f5e9145c827dfe26299277a3f14cee..22dab285bbcea77d04a8625b025f054c 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); -@@ -812,7 +814,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -807,7 +809,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,7 +25,7 @@ index 7cfcbc1e38f5e9145c827dfe26299277a3f14cee..22dab285bbcea77d04a8625b025f054c continue; } // Spigot end -@@ -820,12 +821,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -815,12 +816,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable { if (tickingblockentity.isRemoved()) { // Spigot start tilesThisCycle--; diff --git a/patches/unapplied/server/0165-use-CB-BlockState-implementations-for-captured-block.patch b/patches/server/0164-use-CB-BlockState-implementations-for-captured-block.patch similarity index 95% rename from patches/unapplied/server/0165-use-CB-BlockState-implementations-for-captured-block.patch rename to patches/server/0164-use-CB-BlockState-implementations-for-captured-block.patch index c5f6827d65..f2aca08353 100644 --- a/patches/unapplied/server/0165-use-CB-BlockState-implementations-for-captured-block.patch +++ b/patches/server/0164-use-CB-BlockState-implementations-for-captured-block.patch @@ -18,7 +18,7 @@ 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 22dab285bbcea77d04a8625b025f054c625cadd4..ce24a52b2b9fb0ae7cfb085a204de8780bc8f5d6 100644 +index e00e9a6ca14622c2baeba71f54710fedc838ffd7..068382daaeae03e67b2859cce7d15e290c92352e 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java @@ -154,7 +154,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -49,7 +49,7 @@ index 22dab285bbcea77d04a8625b025f054c625cadd4..ce24a52b2b9fb0ae7cfb085a204de878 this.capturedBlockStates.put(pos.immutable(), blockstate); captured = true; } -@@ -695,7 +696,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -690,7 +691,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/0166-API-to-get-a-BlockState-without-a-snapshot.patch b/patches/server/0165-API-to-get-a-BlockState-without-a-snapshot.patch similarity index 100% rename from patches/unapplied/server/0166-API-to-get-a-BlockState-without-a-snapshot.patch rename to patches/server/0165-API-to-get-a-BlockState-without-a-snapshot.patch diff --git a/patches/unapplied/server/0167-AsyncTabCompleteEvent.patch b/patches/server/0166-AsyncTabCompleteEvent.patch similarity index 94% rename from patches/unapplied/server/0167-AsyncTabCompleteEvent.patch rename to patches/server/0166-AsyncTabCompleteEvent.patch index 472209c2bd..aff93af70c 100644 --- a/patches/unapplied/server/0167-AsyncTabCompleteEvent.patch +++ b/patches/server/0166-AsyncTabCompleteEvent.patch @@ -16,10 +16,10 @@ Also adds isCommand and getLocation to the sync TabCompleteEvent Co-authored-by: Aikar diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 51edb4f6be04b9c3b0745bc13fe7ce7cc4868e59..a6e6c82be3a6f397c6cefbd843b17c86bb0ff2f7 100644 +index d849ca56d36f4652a5c1526a92f183a2defb3e0d..8e27c443b31566a8e57c29ba29fa914fe4a53275 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -790,12 +790,16 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -687,27 +687,58 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl } @@ -37,10 +37,6 @@ index 51edb4f6be04b9c3b0745bc13fe7ce7cc4868e59..a6e6c82be3a6f397c6cefbd843b17c86 + server.scheduleOnMain(() -> this.disconnect(Component.translatable("disconnect.spam", new Object[0]))); // Paper return; } - // Paper start -@@ -806,18 +810,45 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - } - // Paper end // CraftBukkit end + // Paper start - async tab completion + TAB_COMPLETE_EXECUTOR.execute(() -> { @@ -54,7 +50,7 @@ index 51edb4f6be04b9c3b0745bc13fe7ce7cc4868e59..a6e6c82be3a6f397c6cefbd843b17c86 - - this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> { - if (suggestions.isEmpty()) return; // CraftBukkit - don't send through empty suggestions - prevents [] from showing for plugins with nothing more to offer -- this.connection.send(new ClientboundCommandSuggestionsPacket(packet.getId(), suggestions)); +- this.send(new ClientboundCommandSuggestionsPacket(packet.getId(), suggestions)); + final String command = packet.getCommand(); + final com.destroystokyo.paper.event.server.AsyncTabCompleteEvent event = new com.destroystokyo.paper.event.server.AsyncTabCompleteEvent(this.getCraftPlayer(), command, true, null); + event.callEvent(); @@ -91,10 +87,10 @@ index 51edb4f6be04b9c3b0745bc13fe7ce7cc4868e59..a6e6c82be3a6f397c6cefbd843b17c86 @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index baa2d98530f28b21796c15125ee9dcbbba7bbf77..95e08874f993c826839184fa894f82d07224cb12 100644 +index 35dc09187b0bed916c9a10f3cf3a900052926a72..659e239a407f793706e4f133f6168a556e9de68b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2129,7 +2129,7 @@ public final class CraftServer implements Server { +@@ -2132,7 +2132,7 @@ public final class CraftServer implements Server { offers = this.tabCompleteChat(player, message); } diff --git a/patches/unapplied/server/0168-PlayerPickupExperienceEvent.patch b/patches/server/0167-PlayerPickupExperienceEvent.patch similarity index 100% rename from patches/unapplied/server/0168-PlayerPickupExperienceEvent.patch rename to patches/server/0167-PlayerPickupExperienceEvent.patch diff --git a/patches/unapplied/server/0169-Ability-to-apply-mending-to-XP-API.patch b/patches/server/0168-Ability-to-apply-mending-to-XP-API.patch similarity index 94% rename from patches/unapplied/server/0169-Ability-to-apply-mending-to-XP-API.patch rename to patches/server/0168-Ability-to-apply-mending-to-XP-API.patch index 0be22f3bae..31643177d4 100644 --- a/patches/unapplied/server/0169-Ability-to-apply-mending-to-XP-API.patch +++ b/patches/server/0168-Ability-to-apply-mending-to-XP-API.patch @@ -14,10 +14,10 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4d83b02dd2f00b613bfb1c7be7c93f0bc00bbf58..b71b83b2984e51202e9a40945946ebdd6b999cc2 100644 +index e12ae345142f27efa9a4b97c9da522571fc1288a..4eab2d038a247053353f437bada1f3d87b20c92a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1538,7 +1538,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1498,7 +1498,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } @Override diff --git a/patches/unapplied/server/0170-PlayerNaturallySpawnCreaturesEvent.patch b/patches/server/0169-PlayerNaturallySpawnCreaturesEvent.patch similarity index 79% rename from patches/unapplied/server/0170-PlayerNaturallySpawnCreaturesEvent.patch rename to patches/server/0169-PlayerNaturallySpawnCreaturesEvent.patch index f74c580eae..6f5ba94289 100644 --- a/patches/unapplied/server/0170-PlayerNaturallySpawnCreaturesEvent.patch +++ b/patches/server/0169-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 6f30a16595e352e32375530a0482d8c0ee9c1113..8dc2a217d018e0a11fb852cf46d4e9b5290ea6a0 100644 +index 17182c7f130853b4b5d942e7d60adaded14f84f6..425a0baa9321e9b484814f38fe28de3c82333443 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -708,7 +708,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1193,7 +1193,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange; chunkRange = (chunkRange > 8) ? 8 : chunkRange; @@ -21,9 +21,9 @@ index 6f30a16595e352e32375530a0482d8c0ee9c1113..8dc2a217d018e0a11fb852cf46d4e9b5 + //double blockRange = (reducedRange) ? Math.pow(chunkRange << 4, 2) : 16384.0D; // Paper - use from event + double blockRange = 16384.0D; // Paper // Spigot end - long i = chunkcoordintpair.toLong(); - -@@ -725,6 +727,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + if (!this.distanceManager.hasPlayersNearby(chunkcoordintpair.toLong())) { + return false; +@@ -1208,6 +1210,15 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } entityplayer = (ServerPlayer) iterator.next(); @@ -40,10 +40,10 @@ index 6f30a16595e352e32375530a0482d8c0ee9c1113..8dc2a217d018e0a11fb852cf46d4e9b5 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 b0687dcf8af84af627b67e7fbb68170a2fd28da0..5cb151a7d89c7281b03f24c5f79afb7edf7cbfea 100644 +index b1fd6118132ba38f60d2a2b15c09231fa29be8fa..0f38bdf2c9a29f2111c27138b8d997c230633bb8 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java +++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java -@@ -565,6 +565,15 @@ public class ServerChunkCache extends ChunkSource { +@@ -718,6 +718,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 b0687dcf8af84af627b67e7fbb68170a2fd28da0..5cb151a7d89c7281b03f24c5f79afb7e 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 5c855a15f7847ca37c263755f643eeb1fd79668b..3842caf61e388aa65b3a18c587480a7dabb8341b 100644 +index 40efa19ffe9275748a62e0546c3fd42bbcb0883d..491dffdcbb065acf5861dc01b403d1a895c92baa 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,11 +70,11 @@ index 5c855a15f7847ca37c263755f643eeb1fd79668b..3842caf61e388aa65b3a18c587480a7d import com.google.common.collect.Lists; import com.google.common.net.InetAddresses; import com.mojang.authlib.GameProfile; -@@ -260,6 +261,7 @@ public class ServerPlayer extends Player { +@@ -257,6 +258,7 @@ public class ServerPlayer extends Player { // CraftBukkit end public boolean isRealPlayer; // Paper public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet cachedSingleHashSet; // Paper + public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper - private final java.util.concurrent.atomic.AtomicReference viewDistances = new java.util.concurrent.atomic.AtomicReference<>(new io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.ViewDistances(-1, -1, -1)); - public io.papermc.paper.chunk.system.RegionizedPlayerChunkLoader.PlayerChunkLoaderData chunkLoader; + public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) { + super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile); diff --git a/patches/unapplied/server/0171-Add-setPlayerProfile-API-for-Skulls.patch b/patches/server/0170-Add-setPlayerProfile-API-for-Skulls.patch similarity index 87% rename from patches/unapplied/server/0171-Add-setPlayerProfile-API-for-Skulls.patch rename to patches/server/0170-Add-setPlayerProfile-API-for-Skulls.patch index 45c86f49cd..ec21bcdbde 100644 --- a/patches/unapplied/server/0171-Add-setPlayerProfile-API-for-Skulls.patch +++ b/patches/server/0170-Add-setPlayerProfile-API-for-Skulls.patch @@ -7,10 +7,10 @@ This allows you to create already filled textures on Skulls to avoid texture loo which commonly cause rate limit issues with Mojang API diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java -index cf76e486bc873580c3b28dee88e168a2f3666a79..1325e9140a4b568170f0bd400904fe3c9d00cd4f 100644 +index 4650b4cd7f8625ee5e1dba47f47ffa9221e3d097..e193572862fbc78b3adb531fd567c919afdc718e 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java -@@ -106,7 +106,22 @@ public class CraftSkull extends CraftBlockEntityState implemen +@@ -107,7 +107,22 @@ public class CraftSkull extends CraftBlockEntityState implemen } } @@ -33,7 +33,7 @@ index cf76e486bc873580c3b28dee88e168a2f3666a79..1325e9140a4b568170f0bd400904fe3c public PlayerProfile getOwnerProfile() { if (!this.hasOwner()) { return null; -@@ -116,11 +131,12 @@ public class CraftSkull extends CraftBlockEntityState implemen +@@ -117,11 +132,12 @@ public class CraftSkull extends CraftBlockEntityState implemen } @Override @@ -48,10 +48,10 @@ index cf76e486bc873580c3b28dee88e168a2f3666a79..1325e9140a4b568170f0bd400904fe3c } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -index 85b9baad074634a2f21c15adbb393ebc5924bdd8..deed77a3d44bc55681483d7f47f148b5220135f2 100644 +index f8e2315845b15af230f43521b53f943ee58b9117..fe7a8e48a620630a6365edd22466f348de0dc508 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java -@@ -184,6 +184,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -187,6 +187,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { return this.hasOwner() ? this.profile.getName() : null; } @@ -71,7 +71,7 @@ index 85b9baad074634a2f21c15adbb393ebc5924bdd8..deed77a3d44bc55681483d7f47f148b5 @Override public OfflinePlayer getOwningPlayer() { if (this.hasOwner()) { -@@ -234,6 +247,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -237,6 +250,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { } @Override @@ -79,7 +79,7 @@ index 85b9baad074634a2f21c15adbb393ebc5924bdd8..deed77a3d44bc55681483d7f47f148b5 public PlayerProfile getOwnerProfile() { if (!this.hasOwner()) { return null; -@@ -243,11 +257,12 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -246,11 +260,12 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { } @Override @@ -93,7 +93,7 @@ index 85b9baad074634a2f21c15adbb393ebc5924bdd8..deed77a3d44bc55681483d7f47f148b5 } } -@@ -301,7 +316,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { +@@ -304,7 +319,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta { Builder serialize(Builder builder) { super.serialize(builder); if (this.profile != null) { diff --git a/patches/unapplied/server/0172-PreCreatureSpawnEvent.patch b/patches/server/0171-PreCreatureSpawnEvent.patch similarity index 95% rename from patches/unapplied/server/0172-PreCreatureSpawnEvent.patch rename to patches/server/0171-PreCreatureSpawnEvent.patch index 6088886f36..ba6c94c19d 100644 --- a/patches/unapplied/server/0172-PreCreatureSpawnEvent.patch +++ b/patches/server/0171-PreCreatureSpawnEvent.patch @@ -59,10 +59,10 @@ index b77ebe04f1018962b85110258c8a0a2db8612485..028d69907a988e191213a17e072ef227 if (t0 != null) { diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 93a43ef867d0961b46f9ecadc2c7be6a4b17c72b..c2aafe4e1afec2793735bf7b0bbd6af94ad393f8 100644 +index cea1a8eaae8dfc36efd09e3ac57a7062bf536aac..5981b2bd5745ac32cdb377c15c4384d074a47680 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java -@@ -413,6 +413,20 @@ public class EntityType implements FeatureElement, EntityTypeT +@@ -414,6 +414,20 @@ public class EntityType implements FeatureElement, EntityTypeT @Nullable public T spawn(ServerLevel worldserver, @Nullable CompoundTag nbttagcompound, @Nullable Consumer consumer, BlockPos blockposition, MobSpawnType enummobspawn, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) { // CraftBukkit end @@ -84,14 +84,14 @@ index 93a43ef867d0961b46f9ecadc2c7be6a4b17c72b..c2aafe4e1afec2793735bf7b0bbd6af9 if (t0 != null) { diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 68594d2621267f4b112b4d14d2bec3a0dd6a044a..73a5750dd47cf8869070f92594cfb926193c8761 100644 +index b3127238cea62c47d710abab44f6570103ba9364..7d7390dc76f683178fc332ea3c2c945ba8e9b84b 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -966,7 +966,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -975,7 +975,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler }).limit(5L).collect(Collectors.toList()); if (list1.size() >= requiredCount) { -- if (SpawnUtil.trySpawnMob(EntityType.IRON_GOLEM, MobSpawnType.MOB_SUMMONED, world, this.blockPosition(), 10, 8, 6, SpawnUtil.Strategy.LEGACY_IRON_GOLEM, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE).isPresent()) { // CraftBukkit +- if (!SpawnUtil.trySpawnMob(EntityType.IRON_GOLEM, MobSpawnType.MOB_SUMMONED, world, this.blockPosition(), 10, 8, 6, SpawnUtil.Strategy.LEGACY_IRON_GOLEM, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE).isEmpty()) { // CraftBukkit + if (SpawnUtil.trySpawnMob(EntityType.IRON_GOLEM, MobSpawnType.MOB_SUMMONED, world, this.blockPosition(), 10, 8, 6, SpawnUtil.Strategy.LEGACY_IRON_GOLEM, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE, () -> {GolemSensor.golemDetected(this);}).isPresent()) { // CraftBukkit // Paper - Set Golem Last Seen to stop it from spawning another one list.forEach(GolemSensor::golemDetected); } @@ -129,7 +129,7 @@ index 20c39481bcf05e0d43c97b7e841ec9f5f6a0d45d..fc7719d12b5f6011aec2e41a36b4bacd Entity entity = EntityType.loadEntityRecursive(nbttagcompound, world, (entity1) -> { entity1.moveTo(d0, d1, d2, entity1.getYRot(), entity1.getXRot()); diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java -index b2bb9bbd3af414c50ec3f8e3e171a679e95ef75e..6ac513d3044fab1cb1ca0b0c7e85ff871d49d572 100644 +index 92e76dd39dc3575e9466031dd799080a98ad8b8d..b3a7d065900f63b15ee2a8e3c1d69d5513f7b85c 100644 --- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java +++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java @@ -213,7 +213,13 @@ public final class NaturalSpawner { diff --git a/patches/unapplied/server/0173-Fill-Profile-Property-Events.patch b/patches/server/0172-Fill-Profile-Property-Events.patch similarity index 100% rename from patches/unapplied/server/0173-Fill-Profile-Property-Events.patch rename to patches/server/0172-Fill-Profile-Property-Events.patch diff --git a/patches/unapplied/server/0174-PlayerAdvancementCriterionGrantEvent.patch b/patches/server/0173-PlayerAdvancementCriterionGrantEvent.patch similarity index 87% rename from patches/unapplied/server/0174-PlayerAdvancementCriterionGrantEvent.patch rename to patches/server/0173-PlayerAdvancementCriterionGrantEvent.patch index 072a9d4b2a..223deb23b5 100644 --- a/patches/unapplied/server/0174-PlayerAdvancementCriterionGrantEvent.patch +++ b/patches/server/0173-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 8f7ca41726551fd99b028e2fb3ff72df50a36d88..100781852965e09c92aca34785673c5de51c7107 100644 +index f5f26c0327f0dae47badcc914fc89a4019c784a3..0128c29bc0a99d4eb4f53b2beb20045c0126db9d 100644 --- a/src/main/java/net/minecraft/server/PlayerAdvancements.java +++ b/src/main/java/net/minecraft/server/PlayerAdvancements.java -@@ -228,6 +228,12 @@ public class PlayerAdvancements { +@@ -226,6 +226,12 @@ public class PlayerAdvancements { boolean flag1 = advancementprogress.isDone(); if (advancementprogress.grantProgress(criterionName)) { diff --git a/patches/unapplied/server/0175-Add-ArmorStand-Item-Meta.patch b/patches/server/0174-Add-ArmorStand-Item-Meta.patch similarity index 100% rename from patches/unapplied/server/0175-Add-ArmorStand-Item-Meta.patch rename to patches/server/0174-Add-ArmorStand-Item-Meta.patch diff --git a/patches/unapplied/server/0176-Extend-Player-Interact-cancellation.patch b/patches/server/0175-Extend-Player-Interact-cancellation.patch similarity index 100% rename from patches/unapplied/server/0176-Extend-Player-Interact-cancellation.patch rename to patches/server/0175-Extend-Player-Interact-cancellation.patch diff --git a/patches/unapplied/server/0177-Tameable-getOwnerUniqueId-API.patch b/patches/server/0176-Tameable-getOwnerUniqueId-API.patch similarity index 100% rename from patches/unapplied/server/0177-Tameable-getOwnerUniqueId-API.patch rename to patches/server/0176-Tameable-getOwnerUniqueId-API.patch diff --git a/patches/unapplied/server/0178-Toggleable-player-crits-helps-mitigate-hacked-client.patch b/patches/server/0177-Toggleable-player-crits-helps-mitigate-hacked-client.patch similarity index 85% rename from patches/unapplied/server/0178-Toggleable-player-crits-helps-mitigate-hacked-client.patch rename to patches/server/0177-Toggleable-player-crits-helps-mitigate-hacked-client.patch index f2da60a6cf..69ff693120 100644 --- a/patches/unapplied/server/0178-Toggleable-player-crits-helps-mitigate-hacked-client.patch +++ b/patches/server/0177-Toggleable-player-crits-helps-mitigate-hacked-client.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients. 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 9922ab54fa2ea3abef759aba08cca535f70030e8..a668a62da9fb7fc013f078c030580b13a62db3ca 100644 +index 42663ab48cb8a18c5e724ca840bc6f50d9b91170..dabd68122861d673fc70cb1c66d24cb176129965 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1241,6 +1241,7 @@ public abstract class Player extends LivingEntity { +@@ -1247,6 +1247,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/0179-Disable-Explicit-Network-Manager-Flushing.patch b/patches/server/0178-Disable-Explicit-Network-Manager-Flushing.patch similarity index 86% rename from patches/unapplied/server/0179-Disable-Explicit-Network-Manager-Flushing.patch rename to patches/server/0178-Disable-Explicit-Network-Manager-Flushing.patch index 0c92845887..70cd06eab6 100644 --- a/patches/unapplied/server/0179-Disable-Explicit-Network-Manager-Flushing.patch +++ b/patches/server/0178-Disable-Explicit-Network-Manager-Flushing.patch @@ -12,10 +12,10 @@ 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 f2c5764a447d0895e90a5aa73ee28a9feb453483..7065d8e2b0782f1dbaf9932db9201b94ae455a31 100644 +index e5e4a5fb2c342a249344d207ffea4000cc998710..2d7f332910328cef616609dc4c89facafcbe66cc 100644 --- a/src/main/java/net/minecraft/network/Connection.java +++ b/src/main/java/net/minecraft/network/Connection.java -@@ -119,6 +119,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -114,6 +114,7 @@ public class Connection extends SimpleChannelInboundHandler> { // Paper start - NetworkClient implementation public int protocolVersion; public java.net.InetSocketAddress virtualHost; @@ -23,7 +23,7 @@ index f2c5764a447d0895e90a5aa73ee28a9feb453483..7065d8e2b0782f1dbaf9932db9201b94 // Paper end public Connection(PacketFlow side) { -@@ -323,7 +324,7 @@ public class Connection extends SimpleChannelInboundHandler> { +@@ -401,7 +402,7 @@ public class Connection extends SimpleChannelInboundHandler> { } if (this.channel != null) { diff --git a/patches/unapplied/server/0180-Implement-extended-PaperServerListPingEvent.patch b/patches/server/0179-Implement-extended-PaperServerListPingEvent.patch similarity index 98% rename from patches/unapplied/server/0180-Implement-extended-PaperServerListPingEvent.patch rename to patches/server/0179-Implement-extended-PaperServerListPingEvent.patch index e8838b5561..0d198442e2 100644 --- a/patches/unapplied/server/0180-Implement-extended-PaperServerListPingEvent.patch +++ b/patches/server/0179-Implement-extended-PaperServerListPingEvent.patch @@ -181,7 +181,7 @@ index 0000000000000000000000000000000000000000..6b0bdc266109cdfb874f08bf74323603 + +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index bb1280569181e8e3acb78ef622b4d2f905007222..9f59ef54ef6f6af8b0fef8567d8cfbefb64bc29f 100644 +index 440d1db090dfa62843124cec802224553aad51c0..59864c92d6371e6dbd6afa11aee5f8ad0689379d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -3,6 +3,9 @@ package net.minecraft.server; @@ -194,7 +194,7 @@ index bb1280569181e8e3acb78ef622b4d2f905007222..9f59ef54ef6f6af8b0fef8567d8cfbef import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.google.common.collect.Sets; -@@ -1344,7 +1347,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop