From f8430d1de782626540f1307254551b8284d0cb71 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Wed, 7 Dec 2022 22:57:15 +0100 Subject: [PATCH] More patchidy patched patch patches --- ...and-additions-to-the-SpawnReason-API.patch | 0 .../0183-Player.setPlayerProfile-API.patch | 4 +- ...de-unnecessary-itemmeta-from-clients.patch | 4 +- ...nt-tile-entity-copies-loading-chunks.patch | 4 +- ...s-ServerLevel-for-gamerule-callbacks.patch | 4 +- .../0845-Add-PlayerStopUsingItemEvent.patch} | 4 +- ...46-FallingBlock-auto-expire-setting.patch} | 10 ++-- .../0847-Don-t-tick-markers.patch} | 4 +- ...-not-accept-invalid-client-settings.patch} | 4 +- ...0849-Add-support-for-Proxy-Protocol.patch} | 12 ++--- ...x-OfflinePlayer-getBedSpawnLocation.patch} | 0 ...tory-for-smokers-and-blast-furnaces.patch} | 0 .../0852-Sanitize-Sent-BlockEntity-NBT.patch} | 6 +-- ...ntity-loading-causing-async-lookups.patch} | 2 +- ...-selector-resolving-in-books-by-def.patch} | 0 ...-on-world-create-while-being-ticked.patch} | 12 ++--- ...ate-Current-redstone-implementation.patch} | 22 ++++----- ...57-Dont-resent-entity-on-art-update.patch} | 0 .../0858-Add-missing-spawn-eggs.patch} | 8 ++-- .../0859-Add-WardenAngerChangeEvent.patch} | 6 +-- ...strict-advancement-dimension-checks.patch} | 4 +- ...tant-BlockStateListPopulator-method.patch} | 4 +- .../0862-Nameable-Banner-API.patch} | 0 ...roadcast-messages-to-command-blocks.patch} | 4 +- ...pty-items-from-being-added-to-world.patch} | 8 ++-- ...hPotion-and-LingeringPotion-spawnin.patch} | 0 ...nent-in-resource-pack-rejection-mes.patch} | 4 +- .../0867-Add-Player-getFishHook.patch} | 0 ...chunk-for-dynamic-game-event-listen.patch} | 6 +-- ...s-missing-EntityDropItemEvent-calls.patch} | 12 ++--- ...debug-information-to-chat-packet-er.patch} | 17 ++----- .../0871-Fix-Bee-flower-NPE.patch} | 4 +- ...-not-using-commands.spam-exclusions.patch} | 4 +- .../0873-More-Teleport-API.patch} | 18 +++---- .../0874-Add-EntityPortalReadyEvent.patch} | 6 +-- ...level-random-in-entity-constructors.patch} | 14 +++--- ...k-entities-after-destroy-prediction.patch} | 6 +-- ...on-plugins-accessing-faraway-chunks.patch} | 20 ++++---- ...tom-Chat-Completion-Suggestions-API.patch} | 4 +- .../0879-Add-missing-BlockFadeEvents.patch} | 2 +- .../0880-Collision-API.patch} | 8 ++-- ...nd-message-for-brigadier-syntax-exc.patch} | 4 +- ...e-invalid-signature-login-stacktrace.patch | 19 ++++++++ ...-to-PlayerConnection-internalTelepo.patch} | 4 +- .../0884-Block-Ticking-API.patch} | 8 ++-- ...-Add-Velocity-IP-Forwarding-Support.patch} | 18 +++---- ...andom-in-ServerLoginPacketListenerI.patch} | 6 +-- ...887-Add-NamespacedKey-biome-methods.patch} | 4 +- ...x-plugin-loggers-on-server-shutdown.patch} | 6 +-- ...und-for-client-lag-spikes-MC-162253.patch} | 6 +-- ...ok-changes-from-crashing-the-server.patch} | 8 ++-- ...estroyerIdentity-to-sendBlockDamage.patch} | 4 +- ...t-killed-statuses-should-be-false-f.patch} | 4 +- ...rocess-cancelling-and-command-changi.patch | 48 ------------------- ...e-invalid-signature-login-stacktrace.patch | 19 -------- 55 files changed, 176 insertions(+), 233 deletions(-) rename patches/{unapplied/server => removed/1.19.3}/0881-Fixes-and-additions-to-the-SpawnReason-API.patch (100%) rename patches/{unapplied/server/0853-Add-PlayerStopUsingItemEvent.patch => server/0845-Add-PlayerStopUsingItemEvent.patch} (85%) rename patches/{unapplied/server/0854-FallingBlock-auto-expire-setting.patch => server/0846-FallingBlock-auto-expire-setting.patch} (90%) rename patches/{unapplied/server/0855-Don-t-tick-markers.patch => server/0847-Don-t-tick-markers.patch} (94%) rename patches/{unapplied/server/0856-Do-not-accept-invalid-client-settings.patch => server/0848-Do-not-accept-invalid-client-settings.patch} (88%) rename patches/{unapplied/server/0857-Add-support-for-Proxy-Protocol.patch => server/0849-Add-support-for-Proxy-Protocol.patch} (91%) rename patches/{unapplied/server/0858-Fix-OfflinePlayer-getBedSpawnLocation.patch => server/0850-Fix-OfflinePlayer-getBedSpawnLocation.patch} (100%) rename patches/{unapplied/server/0859-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch => server/0851-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch} (100%) rename patches/{unapplied/server/0860-Sanitize-Sent-BlockEntity-NBT.patch => server/0852-Sanitize-Sent-BlockEntity-NBT.patch} (90%) rename patches/{unapplied/server/0861-Prevent-entity-loading-causing-async-lookups.patch => server/0853-Prevent-entity-loading-causing-async-lookups.patch} (97%) rename patches/{unapplied/server/0862-Disable-component-selector-resolving-in-books-by-def.patch => server/0854-Disable-component-selector-resolving-in-books-by-def.patch} (100%) rename patches/{unapplied/server/0863-Throw-exception-on-world-create-while-being-ticked.patch => server/0855-Throw-exception-on-world-create-while-being-ticked.patch} (89%) rename patches/{unapplied/server/0864-Add-Alternate-Current-redstone-implementation.patch => server/0856-Add-Alternate-Current-redstone-implementation.patch} (98%) rename patches/{unapplied/server/0865-Dont-resent-entity-on-art-update.patch => server/0857-Dont-resent-entity-on-art-update.patch} (100%) rename patches/{unapplied/server/0866-Add-missing-spawn-eggs.patch => server/0858-Add-missing-spawn-eggs.patch} (89%) rename patches/{unapplied/server/0867-Add-WardenAngerChangeEvent.patch => server/0859-Add-WardenAngerChangeEvent.patch} (90%) rename patches/{unapplied/server/0868-Add-option-for-strict-advancement-dimension-checks.patch => server/0860-Add-option-for-strict-advancement-dimension-checks.patch} (90%) rename patches/{unapplied/server/0869-Add-missing-important-BlockStateListPopulator-method.patch => server/0861-Add-missing-important-BlockStateListPopulator-method.patch} (94%) rename patches/{unapplied/server/0870-Nameable-Banner-API.patch => server/0862-Nameable-Banner-API.patch} (100%) rename patches/{unapplied/server/0871-Don-t-broadcast-messages-to-command-blocks.patch => server/0863-Don-t-broadcast-messages-to-command-blocks.patch} (92%) rename patches/{unapplied/server/0872-Prevent-empty-items-from-being-added-to-world.patch => server/0864-Prevent-empty-items-from-being-added-to-world.patch} (88%) rename patches/{unapplied/server/0873-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch => server/0865-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch} (100%) rename patches/{unapplied/server/0874-Don-t-print-component-in-resource-pack-rejection-mes.patch => server/0866-Don-t-print-component-in-resource-pack-rejection-mes.patch} (90%) rename patches/{unapplied/server/0875-Add-Player-getFishHook.patch => server/0867-Add-Player-getFishHook.patch} (100%) rename patches/{unapplied/server/0876-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch => server/0868-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch} (85%) rename patches/{unapplied/server/0877-Add-various-missing-EntityDropItemEvent-calls.patch => server/0869-Add-various-missing-EntityDropItemEvent-calls.patch} (88%) rename patches/{unapplied/server/0878-Add-some-minimal-debug-information-to-chat-packet-er.patch => server/0870-Add-some-minimal-debug-information-to-chat-packet-er.patch} (55%) rename patches/{unapplied/server/0879-Fix-Bee-flower-NPE.patch => server/0871-Fix-Bee-flower-NPE.patch} (85%) rename patches/{unapplied/server/0880-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch => server/0872-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch} (87%) rename patches/{unapplied/server/0882-More-Teleport-API.patch => server/0873-More-Teleport-API.patch} (93%) rename patches/{unapplied/server/0883-Add-EntityPortalReadyEvent.patch => server/0874-Add-EntityPortalReadyEvent.patch} (88%) rename patches/{unapplied/server/0884-Don-t-use-level-random-in-entity-constructors.patch => server/0875-Don-t-use-level-random-in-entity-constructors.patch} (85%) rename patches/{unapplied/server/0885-Send-block-entities-after-destroy-prediction.patch => server/0876-Send-block-entities-after-destroy-prediction.patch} (95%) rename patches/{unapplied/server/0886-Warn-on-plugins-accessing-faraway-chunks.patch => server/0877-Warn-on-plugins-accessing-faraway-chunks.patch} (87%) rename patches/{unapplied/server/0887-Custom-Chat-Completion-Suggestions-API.patch => server/0878-Custom-Chat-Completion-Suggestions-API.patch} (90%) rename patches/{unapplied/server/0888-Add-missing-BlockFadeEvents.patch => server/0879-Add-missing-BlockFadeEvents.patch} (92%) rename patches/{unapplied/server/0889-Collision-API.patch => server/0880-Collision-API.patch} (88%) rename patches/{unapplied/server/0890-Fix-suggest-command-message-for-brigadier-syntax-exc.patch => server/0881-Fix-suggest-command-message-for-brigadier-syntax-exc.patch} (89%) create mode 100644 patches/server/0882-Remove-invalid-signature-login-stacktrace.patch rename patches/{unapplied/server/0893-Add-async-catcher-to-PlayerConnection-internalTelepo.patch => server/0883-Add-async-catcher-to-PlayerConnection-internalTelepo.patch} (86%) rename patches/{unapplied/server/0894-Block-Ticking-API.patch => server/0884-Block-Ticking-API.patch} (85%) rename patches/{unapplied/server/0895-Add-Velocity-IP-Forwarding-Support.patch => server/0885-Add-Velocity-IP-Forwarding-Support.patch} (93%) rename patches/{unapplied/server/0896-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch => server/0886-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch} (82%) rename patches/{unapplied/server/0897-Add-NamespacedKey-biome-methods.patch => server/0887-Add-NamespacedKey-biome-methods.patch} (92%) rename patches/{unapplied/server/0898-Fix-plugin-loggers-on-server-shutdown.patch => server/0888-Fix-plugin-loggers-on-server-shutdown.patch} (90%) rename patches/{unapplied/server/0899-Workaround-for-client-lag-spikes-MC-162253.patch => server/0889-Workaround-for-client-lag-spikes-MC-162253.patch} (96%) rename patches/{unapplied/server/0900-Stop-large-look-changes-from-crashing-the-server.patch => server/0890-Stop-large-look-changes-from-crashing-the-server.patch} (89%) rename patches/{unapplied/server/0901-Add-custom-destroyerIdentity-to-sendBlockDamage.patch => server/0891-Add-custom-destroyerIdentity-to-sendBlockDamage.patch} (91%) rename patches/{unapplied/server/0902-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch => server/0892-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch} (88%) delete mode 100644 patches/unapplied/server/0891-Fix-command-preprocess-cancelling-and-command-changi.patch delete mode 100644 patches/unapplied/server/0892-Remove-invalid-signature-login-stacktrace.patch diff --git a/patches/unapplied/server/0881-Fixes-and-additions-to-the-SpawnReason-API.patch b/patches/removed/1.19.3/0881-Fixes-and-additions-to-the-SpawnReason-API.patch similarity index 100% rename from patches/unapplied/server/0881-Fixes-and-additions-to-the-SpawnReason-API.patch rename to patches/removed/1.19.3/0881-Fixes-and-additions-to-the-SpawnReason-API.patch diff --git a/patches/server/0183-Player.setPlayerProfile-API.patch b/patches/server/0183-Player.setPlayerProfile-API.patch index 18603236a2..74657f1c80 100644 --- a/patches/server/0183-Player.setPlayerProfile-API.patch +++ b/patches/server/0183-Player.setPlayerProfile-API.patch @@ -27,7 +27,7 @@ index bb5c4ecd43aa344dfe9cca8ab7c2ebf9760e94cf..203786383387765d1f5a2d2ccce79d79 playerName = gameProfile.getName(); uniqueId = gameProfile.getId(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index fb1e740b2a44c5f4b2d638303fc4f30b6aac08a2..b4a511c8c701949c614a7fd5a7b3e51d278dc27a 100644 +index fb1e740b2a44c5f4b2d638303fc4f30b6aac08a2..5a43e1bd537ac4431b3a7f508ec0b3ca48c8150f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -81,6 +81,7 @@ import net.minecraft.world.entity.ai.attributes.Attributes; @@ -132,7 +132,7 @@ index fb1e740b2a44c5f4b2d638303fc4f30b6aac08a2..b4a511c8c701949c614a7fd5a7b3e51d + + //Respawn the player then update their position and selected slot + ServerLevel worldserver = handle.getLevel(); -+ connection.send(new net.minecraft.network.protocol.game.ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), handle.gameMode.getGameModeForPlayer(), handle.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), (byte) 1, this.getHandle().getLastDeathLocation())); ++ connection.send(new net.minecraft.network.protocol.game.ClientboundRespawnPacket(worldserver.dimensionTypeId(), worldserver.dimension(), BiomeManager.obfuscateSeed(worldserver.getSeed()), handle.gameMode.getGameModeForPlayer(), handle.gameMode.getPreviousGameModeForPlayer(), worldserver.isDebug(), worldserver.isFlat(), net.minecraft.network.protocol.game.ClientboundRespawnPacket.KEEP_ALL_DATA, this.getHandle().getLastDeathLocation())); + handle.onUpdateAbilities(); + connection.internalTeleport(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch(), java.util.Collections.emptySet(), false); + net.minecraft.server.MinecraftServer.getServer().getPlayerList().sendAllPlayerInfo(handle); diff --git a/patches/server/0756-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0756-Hide-unnecessary-itemmeta-from-clients.patch index 46d212e6e1..e1a09e241f 100644 --- a/patches/server/0756-Hide-unnecessary-itemmeta-from-clients.patch +++ b/patches/server/0756-Hide-unnecessary-itemmeta-from-clients.patch @@ -18,10 +18,10 @@ index d2fed123ed56eaf550ac2c7a3fcc1678a127bba3..77443525e68fab0211ff48af12020ff0 } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 045f1b81e568d9adca8e5f9374b5a3ce1267d118..ff7298b9ecd11349dfe57aec4ed0ed0b458faa23 100644 +index 88c1393d4a68c938e65852b9aaa74a7de0043f0d..1602af65ac25e9029d6628ba20aa42a069cee23a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2716,8 +2716,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2681,8 +2681,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Refresh the current entity metadata entity.getEntityData().refresh(player); // SPIGOT-7136 - Allays diff --git a/patches/server/0834-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0834-Prevent-tile-entity-copies-loading-chunks.patch index 1c0bbb7575..34137d1e65 100644 --- a/patches/server/0834-Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/0834-Prevent-tile-entity-copies-loading-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent tile entity copies loading chunks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index b51e0dfad64cf9844bd511689786a456f7c8e48e..93603aabe8b96c8d85a355dcf8c2d5ca45036f89 100644 +index 472f7c246542c08840ea7f18711c13d875e35608..40794142f7882b6f95e00ffe286b590a4f0bf62d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3319,7 +3319,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3284,7 +3284,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); if (this.player.level.isLoaded(blockposition)) { diff --git a/patches/server/0837-Pass-ServerLevel-for-gamerule-callbacks.patch b/patches/server/0837-Pass-ServerLevel-for-gamerule-callbacks.patch index 036564244b..86864cbebc 100644 --- a/patches/server/0837-Pass-ServerLevel-for-gamerule-callbacks.patch +++ b/patches/server/0837-Pass-ServerLevel-for-gamerule-callbacks.patch @@ -18,10 +18,10 @@ index 5b46cabf4f2e2a1f7feaad378dd98d64aeef8671..51b3db0b6c2cede95b584268e035c0fb if (dedicatedserverproperties.enableQuery) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 93603aabe8b96c8d85a355dcf8c2d5ca45036f89..b5a8bea33fbaf0cf793808a1bba364a2d87431be 100644 +index 40794142f7882b6f95e00ffe286b590a4f0bf62d..9133213a8a786f2293bc1a09a44be46b1a8bc011 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2910,7 +2910,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2875,7 +2875,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player = this.server.getPlayerList().respawn(this.player, false); if (this.server.isHardcore()) { this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper diff --git a/patches/unapplied/server/0853-Add-PlayerStopUsingItemEvent.patch b/patches/server/0845-Add-PlayerStopUsingItemEvent.patch similarity index 85% rename from patches/unapplied/server/0853-Add-PlayerStopUsingItemEvent.patch rename to patches/server/0845-Add-PlayerStopUsingItemEvent.patch index 7480a44cc6..efdc15d74d 100644 --- a/patches/unapplied/server/0853-Add-PlayerStopUsingItemEvent.patch +++ b/patches/server/0845-Add-PlayerStopUsingItemEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerStopUsingItemEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 655253c267925a704e55abe23f1142c15ecb8d2e..5463b2fd9fdb8c979baa49479e3dbd7eb2d6dda7 100644 +index 2ee07665521804157e4c0a3f6f09455b14b2867f..efe719de95fb38b6770b9ce9c93590d7c1522ea3 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3949,6 +3949,7 @@ public abstract class LivingEntity extends Entity { +@@ -3974,6 +3974,7 @@ public abstract class LivingEntity extends Entity { public void releaseUsingItem() { if (!this.useItem.isEmpty()) { diff --git a/patches/unapplied/server/0854-FallingBlock-auto-expire-setting.patch b/patches/server/0846-FallingBlock-auto-expire-setting.patch similarity index 90% rename from patches/unapplied/server/0854-FallingBlock-auto-expire-setting.patch rename to patches/server/0846-FallingBlock-auto-expire-setting.patch index 59902948f9..3898a05650 100644 --- a/patches/unapplied/server/0854-FallingBlock-auto-expire-setting.patch +++ b/patches/server/0846-FallingBlock-auto-expire-setting.patch @@ -5,10 +5,10 @@ Subject: [PATCH] FallingBlock auto expire setting diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index da00fab453f3fb580acc9de65a0853656f9b6fc4..b2d1a17867cdbaad0c6e5c2376c716f9461af124 100644 +index 23bd2a9af71b63bf463c7091ac261b033e9ce9af..72f1866226269396ba0f0c1be269e237925d9322 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -@@ -61,6 +61,7 @@ public class FallingBlockEntity extends Entity { +@@ -63,6 +63,7 @@ public class FallingBlockEntity extends Entity { @Nullable public CompoundTag blockData; protected static final EntityDataAccessor DATA_START_POS = SynchedEntityData.defineId(FallingBlockEntity.class, EntityDataSerializers.BLOCK_POS); @@ -16,7 +16,7 @@ index da00fab453f3fb580acc9de65a0853656f9b6fc4..b2d1a17867cdbaad0c6e5c2376c716f9 public FallingBlockEntity(EntityType type, Level world) { super(type, world); -@@ -175,7 +176,7 @@ public class FallingBlockEntity extends Entity { +@@ -177,7 +178,7 @@ public class FallingBlockEntity extends Entity { } if (!this.onGround && !flag1) { @@ -25,7 +25,7 @@ index da00fab453f3fb580acc9de65a0853656f9b6fc4..b2d1a17867cdbaad0c6e5c2376c716f9 if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { this.spawnAtLocation((ItemLike) block); } -@@ -321,6 +322,7 @@ public class FallingBlockEntity extends Entity { +@@ -323,6 +324,7 @@ public class FallingBlockEntity extends Entity { if (this.blockData != null) { nbt.put("TileEntityData", this.blockData); } @@ -33,7 +33,7 @@ index da00fab453f3fb580acc9de65a0853656f9b6fc4..b2d1a17867cdbaad0c6e5c2376c716f9 } -@@ -367,6 +369,10 @@ public class FallingBlockEntity extends Entity { +@@ -369,6 +371,10 @@ public class FallingBlockEntity extends Entity { int srcZ = nbt.getInt("SourceLoc_z"); this.setOrigin(new org.bukkit.Location(level.getWorld(), srcX, srcY, srcZ)); } diff --git a/patches/unapplied/server/0855-Don-t-tick-markers.patch b/patches/server/0847-Don-t-tick-markers.patch similarity index 94% rename from patches/unapplied/server/0855-Don-t-tick-markers.patch rename to patches/server/0847-Don-t-tick-markers.patch index c9c696b68a..fac3c839c0 100644 --- a/patches/unapplied/server/0855-Don-t-tick-markers.patch +++ b/patches/server/0847-Don-t-tick-markers.patch @@ -22,10 +22,10 @@ index 68f99e93ed3e843b4001a7a27620f88a48b85e67..0dc96c39151ec4dbeec3947cb17606f5 } }); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index ffe42e757d11978d861a70b69f9050014f7f8ea8..979f6e925c2b0300ebddefc98a15b170a455d952 100644 +index 2b823f40c9435cfac6590487426e1ec1c051ecec..22f738ed5e93e868caba0af7077c3623c2013a43 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2519,6 +2519,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2500,6 +2500,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } public void onTickingStart(Entity entity) { diff --git a/patches/unapplied/server/0856-Do-not-accept-invalid-client-settings.patch b/patches/server/0848-Do-not-accept-invalid-client-settings.patch similarity index 88% rename from patches/unapplied/server/0856-Do-not-accept-invalid-client-settings.patch rename to patches/server/0848-Do-not-accept-invalid-client-settings.patch index ab175a55c1..6e44c9388c 100644 --- a/patches/unapplied/server/0856-Do-not-accept-invalid-client-settings.patch +++ b/patches/server/0848-Do-not-accept-invalid-client-settings.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Do not accept invalid client settings diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7ef7a9203f6376cd13e6a9803dd01522d217f700..7a46f1148216102dc02b9a3e74b9113cb285a89d 100644 +index 9133213a8a786f2293bc1a09a44be46b1a8bc011..1e4899e9f99c57a62330c82545157f38f9c3d26a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3591,6 +3591,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3463,6 +3463,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleClientInformation(ServerboundClientInformationPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); diff --git a/patches/unapplied/server/0857-Add-support-for-Proxy-Protocol.patch b/patches/server/0849-Add-support-for-Proxy-Protocol.patch similarity index 91% rename from patches/unapplied/server/0857-Add-support-for-Proxy-Protocol.patch rename to patches/server/0849-Add-support-for-Proxy-Protocol.patch index 031bd56593..fa51d0e17c 100644 --- a/patches/unapplied/server/0857-Add-support-for-Proxy-Protocol.patch +++ b/patches/server/0849-Add-support-for-Proxy-Protocol.patch @@ -5,17 +5,17 @@ Subject: [PATCH] Add support for Proxy Protocol diff --git a/build.gradle.kts b/build.gradle.kts -index ea1faaf4820059b4a67dbd229a90bc6b78b861bc..b0e4f11e8af4b909a56bb5576d05ef0537fb25f7 100644 +index f9839f17bcda4619c257162e9bf14d5e00053c80..d5d49bb2b47c889e12d17dc87b8c439a60b3fe67 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,6 +20,7 @@ dependencies { */ - implementation("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - implementation - annotationProcessor("org.apache.logging.log4j:log4j-core:2.17.1") // Paper - Needed to generate meta for our Log4j plugins -+ implementation("io.netty:netty-codec-haproxy:4.1.77.Final") + implementation("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - implementation + annotationProcessor("org.apache.logging.log4j:log4j-core:2.14.1") // Paper - Needed to generate meta for our Log4j plugins ++ implementation("io.netty:netty-codec-haproxy:4.1.77.Final") // Paper - Add support for proxy protocol // Paper end - implementation("org.apache.logging.log4j:log4j-iostreams:2.17.1") // Paper - implementation("org.apache.logging.log4j:log4j-slf4j18-impl:2.17.1") // Paper + implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion + implementation("org.ow2.asm:asm:9.3") diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java index cfdbcd024de6ad0f9d4e83b2f912b36ef3299458..abcc3266d18f34d160eac87fdea153dce24c60b8 100644 --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java diff --git a/patches/unapplied/server/0858-Fix-OfflinePlayer-getBedSpawnLocation.patch b/patches/server/0850-Fix-OfflinePlayer-getBedSpawnLocation.patch similarity index 100% rename from patches/unapplied/server/0858-Fix-OfflinePlayer-getBedSpawnLocation.patch rename to patches/server/0850-Fix-OfflinePlayer-getBedSpawnLocation.patch diff --git a/patches/unapplied/server/0859-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch b/patches/server/0851-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch similarity index 100% rename from patches/unapplied/server/0859-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch rename to patches/server/0851-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch diff --git a/patches/unapplied/server/0860-Sanitize-Sent-BlockEntity-NBT.patch b/patches/server/0852-Sanitize-Sent-BlockEntity-NBT.patch similarity index 90% rename from patches/unapplied/server/0860-Sanitize-Sent-BlockEntity-NBT.patch rename to patches/server/0852-Sanitize-Sent-BlockEntity-NBT.patch index fb3c8b1818..dfc90bce59 100644 --- a/patches/unapplied/server/0860-Sanitize-Sent-BlockEntity-NBT.patch +++ b/patches/server/0852-Sanitize-Sent-BlockEntity-NBT.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Sanitize Sent BlockEntity NBT diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java -index 12d7cb0eb485987d245454fa2d9fef67ea7e9c76..b1e326cf4f7fe447f81b588dcb0eda9a435e59a8 100644 +index d79284a790569141c2ac8178d6ecc20b17cdd0d3..3944852921335c78a04a9dc301882ab5b152b1ed 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundBlockEntityDataPacket.java @@ -17,7 +17,7 @@ public class ClientboundBlockEntityDataPacket implements Packet(this.worlds.values()); } @@ -60,7 +60,7 @@ index 0f3156c2dd1884bc5952708636ec559307bb61ba..36239f5c3074a2043442bd0d76a7d6ab public DedicatedPlayerList getHandle() { return this.playerList; } -@@ -1139,6 +1144,7 @@ public final class CraftServer implements Server { +@@ -1152,6 +1157,7 @@ public final class CraftServer implements Server { @Override public World createWorld(WorldCreator creator) { Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP"); @@ -68,7 +68,7 @@ index 0f3156c2dd1884bc5952708636ec559307bb61ba..36239f5c3074a2043442bd0d76a7d6ab Validate.notNull(creator, "Creator may not be null"); String name = creator.name(); -@@ -1263,6 +1269,7 @@ public final class CraftServer implements Server { +@@ -1287,6 +1293,7 @@ public final class CraftServer implements Server { @Override public boolean unloadWorld(World world, boolean save) { diff --git a/patches/unapplied/server/0864-Add-Alternate-Current-redstone-implementation.patch b/patches/server/0856-Add-Alternate-Current-redstone-implementation.patch similarity index 98% rename from patches/unapplied/server/0864-Add-Alternate-Current-redstone-implementation.patch rename to patches/server/0856-Add-Alternate-Current-redstone-implementation.patch index bfbb29cf4e..c712f64505 100644 --- a/patches/unapplied/server/0864-Add-Alternate-Current-redstone-implementation.patch +++ b/patches/server/0856-Add-Alternate-Current-redstone-implementation.patch @@ -2008,10 +2008,10 @@ index 0000000000000000000000000000000000000000..33cd90c30c22200a4e1ae64f40a0bf78 + } +} diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 979f6e925c2b0300ebddefc98a15b170a455d952..ba52939ac3a6a467c76632874dfb32def0012f86 100644 +index 22f738ed5e93e868caba0af7077c3623c2013a43..557a5aa50d9d23f9c8bda3d39865a96bd6b395ee 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -219,6 +219,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel { public final UUID uuid; public boolean hasPhysicsEvent = true; // Paper public boolean hasEntityMoveEvent = false; // Paper @@ -2019,8 +2019,8 @@ index 979f6e925c2b0300ebddefc98a15b170a455d952..ba52939ac3a6a467c76632874dfb32de public static Throwable getAddToWorldStackTrace(Entity entity) { final Throwable thr = new Throwable(entity + " Added to world at " + new java.util.Date()); io.papermc.paper.util.StacktraceDeobfuscator.INSTANCE.deobfuscateThrowable(thr); -@@ -2508,6 +2509,13 @@ public class ServerLevel extends Level implements WorldGenLevel { - // Paper end - rewrite chunk system +@@ -2489,6 +2490,13 @@ public class ServerLevel extends Level implements WorldGenLevel { + return this.server.getWorldData().enabledFeatures(); } + // Paper start - optimize redstone (Alternate Current) @@ -2034,10 +2034,10 @@ index 979f6e925c2b0300ebddefc98a15b170a455d952..ba52939ac3a6a467c76632874dfb32de EntityCallbacks() {} diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 09c2d318330e03d0230a82b30985bba3a4231615..cd6edd02da99ef0e53d5cf451e037a591b4f585a 100644 +index 363d908ef7707311210fa662f706c59a8a5e7f76..502d7c7322e1b48ae59c8e0fd271a6bf2dcd2ec8 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -1452,4 +1452,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -1520,4 +1520,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable { return ret; } // Paper end @@ -2054,10 +2054,10 @@ index 09c2d318330e03d0230a82b30985bba3a4231615..cd6edd02da99ef0e53d5cf451e037a59 + // Paper end } diff --git a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java -index 3cba4921daad4b346a3f964f0fa48e1bb4d634a3..2bc21e3373f6fc6fbbaa7202ba82e7da86045b6a 100644 +index 004894157f732046e89f124872da86c79af1676f..5ea09cc455bd86beb450f0e0275d7c6c8da98084 100644 --- a/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RedStoneWireBlock.java -@@ -253,7 +253,7 @@ public class RedStoneWireBlock extends Block { +@@ -252,7 +252,7 @@ public class RedStoneWireBlock extends Block { return floor.isFaceSturdy(world, pos, Direction.UP) || floor.is(Blocks.HOPPER); } @@ -2066,7 +2066,7 @@ index 3cba4921daad4b346a3f964f0fa48e1bb4d634a3..2bc21e3373f6fc6fbbaa7202ba82e7da // The bulk of the new functionality is found in RedstoneWireTurbo.java com.destroystokyo.paper.util.RedstoneWireTurbo turbo = new com.destroystokyo.paper.util.RedstoneWireTurbo(this); -@@ -455,7 +455,13 @@ public class RedStoneWireBlock extends Block { +@@ -454,7 +454,13 @@ public class RedStoneWireBlock extends Block { @Override public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) { if (!oldState.is(state.getBlock()) && !world.isClientSide) { @@ -2081,7 +2081,7 @@ index 3cba4921daad4b346a3f964f0fa48e1bb4d634a3..2bc21e3373f6fc6fbbaa7202ba82e7da Iterator iterator = Direction.Plane.VERTICAL.iterator(); while (iterator.hasNext()) { -@@ -482,7 +488,13 @@ public class RedStoneWireBlock extends Block { +@@ -481,7 +487,13 @@ public class RedStoneWireBlock extends Block { world.updateNeighborsAt(pos.relative(enumdirection), this); } @@ -2096,7 +2096,7 @@ index 3cba4921daad4b346a3f964f0fa48e1bb4d634a3..2bc21e3373f6fc6fbbaa7202ba82e7da this.updateNeighborsOfNeighboringWires(world, pos); } } -@@ -516,8 +528,14 @@ public class RedStoneWireBlock extends Block { +@@ -515,8 +527,14 @@ public class RedStoneWireBlock extends Block { @Override public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) { if (!world.isClientSide) { diff --git a/patches/unapplied/server/0865-Dont-resent-entity-on-art-update.patch b/patches/server/0857-Dont-resent-entity-on-art-update.patch similarity index 100% rename from patches/unapplied/server/0865-Dont-resent-entity-on-art-update.patch rename to patches/server/0857-Dont-resent-entity-on-art-update.patch diff --git a/patches/unapplied/server/0866-Add-missing-spawn-eggs.patch b/patches/server/0858-Add-missing-spawn-eggs.patch similarity index 89% rename from patches/unapplied/server/0866-Add-missing-spawn-eggs.patch rename to patches/server/0858-Add-missing-spawn-eggs.patch index a23528037d..12bcb9e31d 100644 --- a/patches/unapplied/server/0866-Add-missing-spawn-eggs.patch +++ b/patches/server/0858-Add-missing-spawn-eggs.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add missing spawn eggs diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -index 8e5bc2bf5fed1f70a9fdcdeb4b23468aa0c7fb8e..760628349ca1ba49d660485b01492cdec7411d72 100644 +index 4214420d6670b394758f14dbf6de628420c56e3b..3901777934c6f3404e980602aa07c6f5df3a8a1b 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java -@@ -196,6 +196,12 @@ public final class CraftItemFactory implements ItemFactory { +@@ -198,6 +198,12 @@ public final class CraftItemFactory implements ItemFactory { case ZOMBIE_SPAWN_EGG: case ZOMBIE_VILLAGER_SPAWN_EGG: case ZOMBIFIED_PIGLIN_SPAWN_EGG: @@ -22,10 +22,10 @@ index 8e5bc2bf5fed1f70a9fdcdeb4b23468aa0c7fb8e..760628349ca1ba49d660485b01492cde case ARMOR_STAND: return meta instanceof CraftMetaArmorStand ? meta : new CraftMetaArmorStand(meta); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index bfb1ad0b6e20e10fee53f94a3e6c4f8aad7aae7d..03b4f18000d455e48044eb7a15cd667acef5f14d 100644 +index 2d0e828687e9f4e860348eb10b1a40e12a654f2a..613c11c3bfd773fff7684b017959efd0a13b49ec 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -@@ -428,6 +428,12 @@ public final class CraftItemStack extends ItemStack { +@@ -430,6 +430,12 @@ public final class CraftItemStack extends ItemStack { case ZOMBIE_SPAWN_EGG: case ZOMBIE_VILLAGER_SPAWN_EGG: case ZOMBIFIED_PIGLIN_SPAWN_EGG: diff --git a/patches/unapplied/server/0867-Add-WardenAngerChangeEvent.patch b/patches/server/0859-Add-WardenAngerChangeEvent.patch similarity index 90% rename from patches/unapplied/server/0867-Add-WardenAngerChangeEvent.patch rename to patches/server/0859-Add-WardenAngerChangeEvent.patch index cfe1a98c72..dd2b21dbc1 100644 --- a/patches/unapplied/server/0867-Add-WardenAngerChangeEvent.patch +++ b/patches/server/0859-Add-WardenAngerChangeEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add WardenAngerChangeEvent diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java -index e9b4f29e1844f7c44e341f9b1c07c676469ca3b6..d76800a79faef26aab0cf99b28dfa4621877ecc7 100644 +index 02abc5f387d781094bd2f39233444add3a470be1..ece82743df21f0b776382821ad75dee96d0a0748 100644 --- a/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java +++ b/src/main/java/net/minecraft/world/entity/monster/warden/AngerManagement.java -@@ -145,7 +145,7 @@ public class AngerManagement { +@@ -146,7 +146,7 @@ public class AngerManagement { public int increaseAnger(Entity entity, int amount) { boolean bl = !this.angerBySuspect.containsKey(entity); int i = this.angerBySuspect.computeInt(entity, (suspect, anger) -> { @@ -18,7 +18,7 @@ index e9b4f29e1844f7c44e341f9b1c07c676469ca3b6..d76800a79faef26aab0cf99b28dfa462 if (bl) { int j = this.angerByUuid.removeInt(entity.getUUID()); diff --git a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java -index 42ee13841319ef92bacfeffb2f8881e42b801695..27bd70dc30c8472e5a80f3273f9233a0392f831d 100644 +index 9fb1bfc394362108aa5ae0d7ec9feeda7753abfb..1ae7408048f951cb94d7cfbea60efc5567b1af84 100644 --- a/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java +++ b/src/main/java/net/minecraft/world/entity/monster/warden/Warden.java @@ -495,6 +495,15 @@ public class Warden extends Monster implements VibrationListener.VibrationListen diff --git a/patches/unapplied/server/0868-Add-option-for-strict-advancement-dimension-checks.patch b/patches/server/0860-Add-option-for-strict-advancement-dimension-checks.patch similarity index 90% rename from patches/unapplied/server/0868-Add-option-for-strict-advancement-dimension-checks.patch rename to patches/server/0860-Add-option-for-strict-advancement-dimension-checks.patch index 8ac83721d0..0516f0d7c1 100644 --- a/patches/unapplied/server/0868-Add-option-for-strict-advancement-dimension-checks.patch +++ b/patches/server/0860-Add-option-for-strict-advancement-dimension-checks.patch @@ -11,10 +11,10 @@ distance trigger. This adds a config option to ignore that and use the exact dimension key of the worlds involved. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 58d17cc0c5ba5093fe306c8a1514c27f355f49ae..20f29f0570ceb077dbd92f19b27f36f2fdc925ed 100644 +index 2741a218ce45377479ad47ec0141fa70e2b0acca..ebefc46c41529659a0f1ce17191b852aabc1668a 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -1238,6 +1238,12 @@ public class ServerPlayer extends Player { +@@ -1260,6 +1260,12 @@ public class ServerPlayer extends Player { // CraftBukkit start ResourceKey maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin); ResourceKey maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level); diff --git a/patches/unapplied/server/0869-Add-missing-important-BlockStateListPopulator-method.patch b/patches/server/0861-Add-missing-important-BlockStateListPopulator-method.patch similarity index 94% rename from patches/unapplied/server/0869-Add-missing-important-BlockStateListPopulator-method.patch rename to patches/server/0861-Add-missing-important-BlockStateListPopulator-method.patch index 2296cce864..626d855b8e 100644 --- a/patches/unapplied/server/0869-Add-missing-important-BlockStateListPopulator-method.patch +++ b/patches/server/0861-Add-missing-important-BlockStateListPopulator-method.patch @@ -43,10 +43,10 @@ index 8e6a71c1e8b53faa70b893c76f5bd25f96a5e142..19abf7b6000a875be8c7141cfba81b27 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java -index fbd82b6be6604bf854e01ed5718e4e072f42b265..cd0dc080fbd8c5b1509d67e2b60264393b2b7dbb 100644 +index 57acc7195f83b23c9b84ec4b94e0d7ab22851604..b303eb2989be28dadf183d12a4bd706e43d1fa98 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java -@@ -269,5 +269,17 @@ public class DummyGeneratorAccess implements WorldGenLevel { +@@ -274,5 +274,17 @@ public class DummyGeneratorAccess implements WorldGenLevel { @Override public void getEntitiesByClass(Class clazz, Entity except, AABB box, List into, Predicate predicate) {} diff --git a/patches/unapplied/server/0870-Nameable-Banner-API.patch b/patches/server/0862-Nameable-Banner-API.patch similarity index 100% rename from patches/unapplied/server/0870-Nameable-Banner-API.patch rename to patches/server/0862-Nameable-Banner-API.patch diff --git a/patches/unapplied/server/0871-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0863-Don-t-broadcast-messages-to-command-blocks.patch similarity index 92% rename from patches/unapplied/server/0871-Don-t-broadcast-messages-to-command-blocks.patch rename to patches/server/0863-Don-t-broadcast-messages-to-command-blocks.patch index e51d59b56b..c507262831 100644 --- a/patches/unapplied/server/0871-Don-t-broadcast-messages-to-command-blocks.patch +++ b/patches/server/0863-Don-t-broadcast-messages-to-command-blocks.patch @@ -20,10 +20,10 @@ index 7c7e5f3c0f9cd1f16192a8fc8163da9b2d9519d5..888936385196a178ab8b730fd5e4fff4 Date date = new Date(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 36239f5c3074a2043442bd0d76a7d6ab68c67020..410f4f539aaca338b09e503a6828fb1954936556 100644 +index c94bb0fc7e96cb0e20e1527813b9f57394f69504..f5836a017d793214b41c02b344463e6a171b230c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1763,7 +1763,7 @@ public final class CraftServer implements Server { +@@ -1787,7 +1787,7 @@ public final class CraftServer implements Server { // Paper end Set recipients = new HashSet<>(); for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) { diff --git a/patches/unapplied/server/0872-Prevent-empty-items-from-being-added-to-world.patch b/patches/server/0864-Prevent-empty-items-from-being-added-to-world.patch similarity index 88% rename from patches/unapplied/server/0872-Prevent-empty-items-from-being-added-to-world.patch rename to patches/server/0864-Prevent-empty-items-from-being-added-to-world.patch index 041967b493..90c7a2f0a6 100644 --- a/patches/unapplied/server/0872-Prevent-empty-items-from-being-added-to-world.patch +++ b/patches/server/0864-Prevent-empty-items-from-being-added-to-world.patch @@ -7,10 +7,10 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca Just simply prevent them from being added to the world instead. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index ba52939ac3a6a467c76632874dfb32def0012f86..2b4565dfaff3ee4ea3a49d3195b1336eac5b5b68 100644 +index 557a5aa50d9d23f9c8bda3d39865a96bd6b395ee..89e27bf61e1fc24d162dab3c33f942036b1f647e 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1467,6 +1467,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1507,6 +1507,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit return false; } else { @@ -19,10 +19,10 @@ index ba52939ac3a6a467c76632874dfb32def0012f86..2b4565dfaff3ee4ea3a49d3195b1336e if (captureDrops != null && entity instanceof net.minecraft.world.entity.item.ItemEntity) { captureDrops.add((net.minecraft.world.entity.item.ItemEntity) entity); diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 30c417c3169c1df43662fd77ac6816db64a42802..4c78c04ed031ec2e04642ebe5d79527e848d95f6 100644 +index 1f965e4428d627eaab69ace45486f1d14d2bb504..62f2a070e4c80846a9d696445212c65289037928 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -507,7 +507,7 @@ public class ItemEntity extends Entity { +@@ -505,7 +505,7 @@ public class ItemEntity extends Entity { } public void setItem(ItemStack stack) { diff --git a/patches/unapplied/server/0873-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch b/patches/server/0865-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch similarity index 100% rename from patches/unapplied/server/0873-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch rename to patches/server/0865-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch diff --git a/patches/unapplied/server/0874-Don-t-print-component-in-resource-pack-rejection-mes.patch b/patches/server/0866-Don-t-print-component-in-resource-pack-rejection-mes.patch similarity index 90% rename from patches/unapplied/server/0874-Don-t-print-component-in-resource-pack-rejection-mes.patch rename to patches/server/0866-Don-t-print-component-in-resource-pack-rejection-mes.patch index b49280e498..96a8f2e596 100644 --- a/patches/unapplied/server/0874-Don-t-print-component-in-resource-pack-rejection-mes.patch +++ b/patches/server/0866-Don-t-print-component-in-resource-pack-rejection-mes.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't print component in resource pack rejection message diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7a46f1148216102dc02b9a3e74b9113cb285a89d..2ac47839f238b547baa78fc9a2a5944e2ad17eea 100644 +index 1e4899e9f99c57a62330c82545157f38f9c3d26a..c6db193e5603b047f07fc7edd64890e2a9a29355 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2049,7 +2049,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2045,7 +2045,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleResourcePackResponse(ServerboundResourcePackPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) { diff --git a/patches/unapplied/server/0875-Add-Player-getFishHook.patch b/patches/server/0867-Add-Player-getFishHook.patch similarity index 100% rename from patches/unapplied/server/0875-Add-Player-getFishHook.patch rename to patches/server/0867-Add-Player-getFishHook.patch diff --git a/patches/unapplied/server/0876-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch b/patches/server/0868-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch similarity index 85% rename from patches/unapplied/server/0876-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch rename to patches/server/0868-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch index f9cbdd0899..7ff6d28d74 100644 --- a/patches/unapplied/server/0876-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch +++ b/patches/server/0868-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch @@ -15,15 +15,15 @@ to account for the case where the chunk is _not_ currently loaded and then later loaded. diff --git a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java -index 39f79c6d95e0f14d55783375df9ecf053e8d19de..610bfcceec51fcd1d82040f0dbfc03be20b8dce7 100644 +index 1977fde5e9b18406389dfb7374ecf4784f362233..7ee6e2dfb3441c992f4206f5bb8389733cea9dfc 100644 --- a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java +++ b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java @@ -66,7 +66,7 @@ public class DynamicGameEventListener { - private static void ifChunkExists(LevelReader world, @Nullable SectionPos sectionPos, Consumer dispatcherConsumer) { + private static void ifChunkExists(LevelReader world, @Nullable SectionPos sectionPos, Consumer dispatcherConsumer) { if (sectionPos != null) { - ChunkAccess chunkAccess = world.getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.FULL, false); + ChunkAccess chunkAccess = world.getChunkIfLoadedImmediately(sectionPos.getX(), sectionPos.getZ()); // Paper - can cause sync loads while completing a chunk, resulting in deadlock if (chunkAccess != null) { - dispatcherConsumer.accept(chunkAccess.getEventDispatcher(sectionPos.y())); + dispatcherConsumer.accept(chunkAccess.getListenerRegistry(sectionPos.y())); } diff --git a/patches/unapplied/server/0877-Add-various-missing-EntityDropItemEvent-calls.patch b/patches/server/0869-Add-various-missing-EntityDropItemEvent-calls.patch similarity index 88% rename from patches/unapplied/server/0877-Add-various-missing-EntityDropItemEvent-calls.patch rename to patches/server/0869-Add-various-missing-EntityDropItemEvent-calls.patch index 3ba384acaf..f6ee3e20a6 100644 --- a/patches/unapplied/server/0877-Add-various-missing-EntityDropItemEvent-calls.patch +++ b/patches/server/0869-Add-various-missing-EntityDropItemEvent-calls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 7bb45ae3ed51975972e013aaf66acc352277c375..5a540e0ba51a0edb1f6310f93f6f3c84b5963d0e 100644 +index 0bc808ac268dce5a170e7e55666885b8c2c09164..b2a0423b92f1a74a6c07433519fdbd5fdfa56976 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2520,6 +2520,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2535,6 +2535,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe entityitem.setDefaultPickUpDelay(); @@ -37,10 +37,10 @@ index 7c53dddb598de85abf1eb8b8ee183a6e8e6f9c74..3f100d847fbce6db5b625e99c4f36945 } } diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java -index 8f294f10aca2df007830b12da0506f7614206a89..6a66b5d1a3d8615dcc15057f03476e9ccbf4b4f2 100644 +index f4cfefd72704b3423392ffeb57e78c5d6410ff6f..e4edeeb04fd7183514e53e20dcef8aca56f02f7d 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java -@@ -497,14 +497,14 @@ public class Fox extends Animal { +@@ -502,14 +502,14 @@ public class Fox extends Animal implements VariantHolder { entityitem.setPickUpDelay(40); entityitem.setThrower(this.getUUID()); this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F); @@ -58,10 +58,10 @@ index 8f294f10aca2df007830b12da0506f7614206a89..6a66b5d1a3d8615dcc15057f03476e9c @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -index 4d6c3cb8eb2da05b7f0c8fba92e371cd440605b0..c17d9a7cb69d3b6ea6e17b689921fa239db3552b 100644 +index d562ad27bf690927e6a84e416ab74a460950f249..0b0377fa1483e4fcb31456af6c7e1749bd8af484 100644 --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -@@ -329,8 +329,7 @@ public class Goat extends Animal { +@@ -354,8 +354,7 @@ public class Goat extends Animal { double d2 = (double) Mth.randomBetween(this.random, -0.2F, 0.2F); ItemEntity entityitem = new ItemEntity(this.level, vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2); diff --git a/patches/unapplied/server/0878-Add-some-minimal-debug-information-to-chat-packet-er.patch b/patches/server/0870-Add-some-minimal-debug-information-to-chat-packet-er.patch similarity index 55% rename from patches/unapplied/server/0878-Add-some-minimal-debug-information-to-chat-packet-er.patch rename to patches/server/0870-Add-some-minimal-debug-information-to-chat-packet-er.patch index e57c8a6a84..e11e603ffb 100644 --- a/patches/unapplied/server/0878-Add-some-minimal-debug-information-to-chat-packet-er.patch +++ b/patches/server/0870-Add-some-minimal-debug-information-to-chat-packet-er.patch @@ -6,24 +6,15 @@ Subject: [PATCH] Add some minimal debug information to chat packet errors TODO: potentially add some kick leeway diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2ac47839f238b547baa78fc9a2a5944e2ad17eea..0205fc3969c5faf92b43c2cbf274c8e0bd8bf752 100644 +index c6db193e5603b047f07fc7edd64890e2a9a29355..b537b49afba734ba498f5cf584c0924d3c10514d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2298,7 +2298,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2295,7 +2295,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - private boolean tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { + private Optional tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { - ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); + ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}': {} > {}", this.player.getName().getString(), message, this.lastChatTimeStamp.get().getEpochSecond(), timestamp.getEpochSecond()); // Paper this.server.scheduleOnMain(() -> { // Paper - push to main - this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event cause + this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event ca }); // Paper - push to main -@@ -2569,7 +2569,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - } - - if (message.hasExpiredServer(Instant.now())) { -- ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized?", this.player.getName().getString(), message.signedContent().plain()); -+ ServerGamePacketListenerImpl.LOGGER.warn("{} sent expired chat: '{}'. Is the client/server system time unsynchronized? c: {} s: {}", this.player.getName().getString(), message.signedContent().plain(), message.timeStamp().getEpochSecond(), Instant.now().getEpochSecond()); // Paper - } - - return true; diff --git a/patches/unapplied/server/0879-Fix-Bee-flower-NPE.patch b/patches/server/0871-Fix-Bee-flower-NPE.patch similarity index 85% rename from patches/unapplied/server/0879-Fix-Bee-flower-NPE.patch rename to patches/server/0871-Fix-Bee-flower-NPE.patch index 6072e1dcc5..2ccba6512b 100644 --- a/patches/unapplied/server/0879-Fix-Bee-flower-NPE.patch +++ b/patches/server/0871-Fix-Bee-flower-NPE.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Bee flower NPE diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index f2243f65cdf0e4b327e8597dfefe5b2de8912cef..87f8d46cb2032474008811ca11dc7ff1f7859f7e 100644 +index 5cb23a6b85bccb6e873be24a5be39224870dac3c..a3aeab5fa137f80a229db2edba07d9900f7becfe 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -802,7 +802,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -805,7 +805,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { ++this.pollinatingTicks; if (this.pollinatingTicks > 600) { Bee.this.savedFlowerPos = null; diff --git a/patches/unapplied/server/0880-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch b/patches/server/0872-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch similarity index 87% rename from patches/unapplied/server/0880-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch rename to patches/server/0872-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch index 71bcbceae0..a691c15a06 100644 --- a/patches/unapplied/server/0880-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch +++ b/patches/server/0872-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0205fc3969c5faf92b43c2cbf274c8e0bd8bf752..0227a7df2b3a30d1c0d95acdd1b0a43f9170d19b 100644 +index b537b49afba734ba498f5cf584c0924d3c10514d..ecba65304d97647ab0ec0bfca2fc80b8399e6581 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2589,7 +2589,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2540,7 +2540,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Spigot end // this.chatSpamTickCount += 20; diff --git a/patches/unapplied/server/0882-More-Teleport-API.patch b/patches/server/0873-More-Teleport-API.patch similarity index 93% rename from patches/unapplied/server/0882-More-Teleport-API.patch rename to patches/server/0873-More-Teleport-API.patch index db6e6b1d53..f3acfe16bc 100644 --- a/patches/unapplied/server/0882-More-Teleport-API.patch +++ b/patches/server/0873-More-Teleport-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] More Teleport API public net.minecraft.server.network.ServerGamePacketListenerImpl internalTeleport(DDDFFLjava/util/Set;Z)V diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0227a7df2b3a30d1c0d95acdd1b0a43f9170d19b..a42e2cb31d636637db9f4e7edbe06acdf47d34d2 100644 +index ecba65304d97647ab0ec0bfca2fc80b8399e6581..cb59fee583519fd650e42ffefa660d72e604bb53 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1729,11 +1729,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1722,11 +1722,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return false; // CraftBukkit - Return event status } @@ -31,10 +31,10 @@ index 0227a7df2b3a30d1c0d95acdd1b0a43f9170d19b..a42e2cb31d636637db9f4e7edbe06acd d0 = to.getX(); d1 = to.getY(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index ea9622e80c8799b33e0edfc2a4a94ba35d1a3b12..e6780f645f456b0def13aef17ddfb231dc94cde7 100644 +index 32b9816283c8c1de929d5664733553277cf6bf3c..32c724060a532e551f0ab4e7277831bb6bf61de3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -548,15 +548,33 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -550,15 +550,33 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @Override public boolean teleport(Location location, TeleportCause cause) { @@ -71,10 +71,10 @@ index ea9622e80c8799b33e0edfc2a4a94ba35d1a3b12..e6780f645f456b0def13aef17ddfb231 // Let the server handle cross world teleports if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e88fc016d8f928e378747ce26b808192f22597a7..f6d728be8deb18d4e81c064e60eb6b35bf9831ff 100644 +index 71b899ba2a2495dcc40f292b46a0b4b545d376ee..fc77e4bed1257cd7f3617552d591a2736168d47c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1182,13 +1182,92 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1184,13 +1184,92 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setRotation(float yaw, float pitch) { @@ -168,7 +168,7 @@ index e88fc016d8f928e378747ce26b808192f22597a7..f6d728be8deb18d4e81c064e60eb6b35 location.checkFinite(); ServerPlayer entity = this.getHandle(); -@@ -1201,7 +1280,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1203,7 +1282,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return false; } @@ -177,7 +177,7 @@ index e88fc016d8f928e378747ce26b808192f22597a7..f6d728be8deb18d4e81c064e60eb6b35 return false; } -@@ -1219,7 +1298,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1221,7 +1300,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // If this player is riding another entity, we must dismount before teleporting. @@ -186,7 +186,7 @@ index e88fc016d8f928e378747ce26b808192f22597a7..f6d728be8deb18d4e81c064e60eb6b35 // SPIGOT-5509: Wakeup, similar to riding if (this.isSleeping()) { -@@ -1241,7 +1320,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1243,7 +1322,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { // Check if the fromWorld and toWorld are the same. if (fromWorld == toWorld) { diff --git a/patches/unapplied/server/0883-Add-EntityPortalReadyEvent.patch b/patches/server/0874-Add-EntityPortalReadyEvent.patch similarity index 88% rename from patches/unapplied/server/0883-Add-EntityPortalReadyEvent.patch rename to patches/server/0874-Add-EntityPortalReadyEvent.patch index a16122aad2..a9e12231e1 100644 --- a/patches/unapplied/server/0883-Add-EntityPortalReadyEvent.patch +++ b/patches/server/0874-Add-EntityPortalReadyEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityPortalReadyEvent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 5a540e0ba51a0edb1f6310f93f6f3c84b5963d0e..f2908cf61ff28bef44fcf46b15cf585e942fd7ce 100644 +index b2a0423b92f1a74a6c07433519fdbd5fdfa56976..23a2551fa27a0882f939268ab1595c20b81194e7 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2867,6 +2867,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2886,6 +2886,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit this.level.getProfiler().push("portal"); this.portalTime = i; @@ -22,7 +22,7 @@ index 5a540e0ba51a0edb1f6310f93f6f3c84b5963d0e..f2908cf61ff28bef44fcf46b15cf585e this.setPortalCooldown(); // CraftBukkit start if (this instanceof ServerPlayer) { -@@ -2874,6 +2881,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2893,6 +2900,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } else { this.changeDimension(worldserver1); } diff --git a/patches/unapplied/server/0884-Don-t-use-level-random-in-entity-constructors.patch b/patches/server/0875-Don-t-use-level-random-in-entity-constructors.patch similarity index 85% rename from patches/unapplied/server/0884-Don-t-use-level-random-in-entity-constructors.patch rename to patches/server/0875-Don-t-use-level-random-in-entity-constructors.patch index 32c6071e98..1c56d8c07d 100644 --- a/patches/unapplied/server/0884-Don-t-use-level-random-in-entity-constructors.patch +++ b/patches/server/0875-Don-t-use-level-random-in-entity-constructors.patch @@ -9,10 +9,10 @@ should be supported. Some entities (for whatever reason) use the level's random in some places. diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index 87f8d46cb2032474008811ca11dc7ff1f7859f7e..2e05c953182c27e3571b2c33eceeb379e60b54be 100644 +index a3aeab5fa137f80a229db2edba07d9900f7becfe..337a88a7cd6445004d005ef8d56af1b1cdf800d9 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -1028,7 +1028,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -1031,7 +1031,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { BeeGoToHiveGoal() { super(); @@ -21,7 +21,7 @@ index 87f8d46cb2032474008811ca11dc7ff1f7859f7e..2e05c953182c27e3571b2c33eceeb379 this.blacklistedTargets = Lists.newArrayList(); this.setFlags(EnumSet.of(Goal.Flag.MOVE)); } -@@ -1145,7 +1145,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -1148,7 +1148,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { BeeGoToKnownFlowerGoal() { super(); @@ -31,10 +31,10 @@ index 87f8d46cb2032474008811ca11dc7ff1f7859f7e..2e05c953182c27e3571b2c33eceeb379 } diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 4c78c04ed031ec2e04642ebe5d79527e848d95f6..fcc5444a1268931a0fd2df1e6bbbc17cfd5a61e0 100644 +index 62f2a070e4c80846a9d696445212c65289037928..d9da6728d60e97eb9032b0a5aa71757d11f36e22 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -64,7 +64,12 @@ public class ItemEntity extends Entity { +@@ -62,7 +62,12 @@ public class ItemEntity extends Entity { } public ItemEntity(Level world, double x, double y, double z, ItemStack stack) { @@ -49,10 +49,10 @@ index 4c78c04ed031ec2e04642ebe5d79527e848d95f6..fcc5444a1268931a0fd2df1e6bbbc17c public ItemEntity(Level world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ) { diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java -index 65f0aa076dbfc4cd72d14ec485d1edf5533d825e..438de71a17d7bfaed8fbb1b4f7aa7f53538603a2 100644 +index 4b81d62d3250b99cbcb4eb2468ef81c149bf177e..bedee2c93bd0aff148f93dcf111e0fc3d9bce4a0 100644 --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java -@@ -35,7 +35,7 @@ public class PrimedTnt extends Entity { +@@ -32,7 +32,7 @@ public class PrimedTnt extends Entity { public PrimedTnt(Level world, double x, double y, double z, @Nullable LivingEntity igniter) { this(EntityType.TNT, world); this.setPos(x, y, z); diff --git a/patches/unapplied/server/0885-Send-block-entities-after-destroy-prediction.patch b/patches/server/0876-Send-block-entities-after-destroy-prediction.patch similarity index 95% rename from patches/unapplied/server/0885-Send-block-entities-after-destroy-prediction.patch rename to patches/server/0876-Send-block-entities-after-destroy-prediction.patch index 4f5e9bab9e..c1b61444af 100644 --- a/patches/unapplied/server/0885-Send-block-entities-after-destroy-prediction.patch +++ b/patches/server/0876-Send-block-entities-after-destroy-prediction.patch @@ -7,7 +7,7 @@ Minecraft's prediction system does not handle block entities, so if we are manua block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 9378e83a67a70dbb1fb4f05b33f1e553d008e62b..5a60f5dc202c44b06ca34e9a19d45cb715f74fd3 100644 +index 796d17f51496974cfdfed2593753b8c09b5c81c1..13031576c20bda3bb12c926f6cd938fa5fb105f2 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -62,6 +62,8 @@ public class ServerPlayerGameMode { @@ -57,10 +57,10 @@ index 9378e83a67a70dbb1fb4f05b33f1e553d008e62b..5a60f5dc202c44b06ca34e9a19d45cb7 } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a42e2cb31d636637db9f4e7edbe06acdf47d34d2..f082e121331be8aee523751a2d3f3393e3b0d02c 100644 +index cb59fee583519fd650e42ffefa660d72e604bb53..1af9cbfd657e3d998b871e1ada77a804462bc3ad 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1874,8 +1874,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1867,8 +1867,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } // Paper end - Don't allow digging in unloaded chunks diff --git a/patches/unapplied/server/0886-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0877-Warn-on-plugins-accessing-faraway-chunks.patch similarity index 87% rename from patches/unapplied/server/0886-Warn-on-plugins-accessing-faraway-chunks.patch rename to patches/server/0877-Warn-on-plugins-accessing-faraway-chunks.patch index d73136cc05..93a8482e35 100644 --- a/patches/unapplied/server/0886-Warn-on-plugins-accessing-faraway-chunks.patch +++ b/patches/server/0877-Warn-on-plugins-accessing-faraway-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Warn on plugins accessing faraway chunks diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index cd6edd02da99ef0e53d5cf451e037a591b4f585a..596fb8ee21ba8450db13a11890d241ef3974d81d 100644 +index 502d7c7322e1b48ae59c8e0fd271a6bf2dcd2ec8..628922887e49df43f7e92b8f6cfeb3dd5d00e5d7 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -417,7 +417,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -416,7 +416,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } private static boolean isInWorldBoundsHorizontal(BlockPos pos) { @@ -18,10 +18,10 @@ index cd6edd02da99ef0e53d5cf451e037a591b4f585a..596fb8ee21ba8450db13a11890d241ef private static boolean isOutsideSpawnableHeight(int y) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77dfb51b97e 100644 +index 2976b3469a7870611862c28ef555be974309ee34..f10b941012a59c056c120c8ee112ee4b9ed0e9b8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -313,9 +313,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -312,9 +312,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean setSpawnLocation(int x, int y, int z) { return this.setSpawnLocation(x, y, z, 0.0F); } @@ -46,7 +46,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d // Paper start - add ticket to hold chunk for a little while longer if plugin accesses it net.minecraft.world.level.chunk.LevelChunk chunk = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); if (chunk == null) { -@@ -420,6 +435,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -419,6 +434,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean regenerateChunk(int x, int z) { org.spigotmc.AsyncCatcher.catchOp("chunk regenerate"); // Spigot @@ -54,7 +54,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d // Paper start - implement regenerateChunk method final ServerLevel serverLevel = this.world; final net.minecraft.server.level.ServerChunkCache serverChunkCache = serverLevel.getChunkSource(); -@@ -516,6 +532,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -515,6 +531,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot @@ -62,7 +62,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d // Paper start - Optimize this method ChunkPos chunkPos = new ChunkPos(x, z); ChunkAccess immediate = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); // Paper -@@ -580,6 +597,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -579,6 +596,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean addPluginChunkTicket(int x, int z, Plugin plugin) { @@ -70,7 +70,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d Preconditions.checkArgument(plugin != null, "null plugin"); Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled"); -@@ -648,6 +666,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -647,6 +665,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setChunkForceLoaded(int x, int z, boolean forced) { @@ -78,7 +78,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d this.getHandle().setChunkForced(x, z, forced); } -@@ -959,6 +978,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -958,6 +977,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) { @@ -86,7 +86,7 @@ index 5fcea8546b574a6fc91502c0674ab8f9389c7cf3..55d83a9a691d11c9408d2c3260c3e77d // Transient load for this tick return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z); } -@@ -2315,6 +2335,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2314,6 +2334,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Spigot end // Paper start public java.util.concurrent.CompletableFuture getChunkAtAsync(int x, int z, boolean gen, boolean urgent) { diff --git a/patches/unapplied/server/0887-Custom-Chat-Completion-Suggestions-API.patch b/patches/server/0878-Custom-Chat-Completion-Suggestions-API.patch similarity index 90% rename from patches/unapplied/server/0887-Custom-Chat-Completion-Suggestions-API.patch rename to patches/server/0878-Custom-Chat-Completion-Suggestions-API.patch index 7626d4ebac..f4600e329a 100644 --- a/patches/unapplied/server/0887-Custom-Chat-Completion-Suggestions-API.patch +++ b/patches/server/0878-Custom-Chat-Completion-Suggestions-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Custom Chat Completion Suggestions API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f6d728be8deb18d4e81c064e60eb6b35bf9831ff..af439ea7800a8d4d606ac6cbfb6a621c5175d3de 100644 +index fc77e4bed1257cd7f3617552d591a2736168d47c..d87324ccf3490fff0981336ef7d22071cd573b51 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -663,6 +663,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -665,6 +665,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false); } diff --git a/patches/unapplied/server/0888-Add-missing-BlockFadeEvents.patch b/patches/server/0879-Add-missing-BlockFadeEvents.patch similarity index 92% rename from patches/unapplied/server/0888-Add-missing-BlockFadeEvents.patch rename to patches/server/0879-Add-missing-BlockFadeEvents.patch index 6b887deccf..2d2a6fa5d4 100644 --- a/patches/unapplied/server/0888-Add-missing-BlockFadeEvents.patch +++ b/patches/server/0879-Add-missing-BlockFadeEvents.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add missing BlockFadeEvents diff --git a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java -index e1d8ababdb992821cc0ac383c13f1f4d10b09107..d6232d6f14a195a0e3f8489f148eb8b44d0355c6 100644 +index b63835fe3eda974746163e7a9e26080da7538c4d..2974f64d5a931a08e450aacbfd1281c4d3f15303 100644 --- a/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FrogspawnBlock.java @@ -84,6 +84,11 @@ public class FrogspawnBlock extends Block { diff --git a/patches/unapplied/server/0889-Collision-API.patch b/patches/server/0880-Collision-API.patch similarity index 88% rename from patches/unapplied/server/0889-Collision-API.patch rename to patches/server/0880-Collision-API.patch index fa1ac8d2e1..2ee61e720a 100644 --- a/patches/unapplied/server/0889-Collision-API.patch +++ b/patches/server/0880-Collision-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Collision API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index d5cc47eb1fd1ea9a0638827483b03165f6a7e10c..afa802987f96e7d0c5f28d26b759e36edf34b8f4 100644 +index 3209d13a12a033e157621920a0cefdad5727463f..c6f896c230f343af2d825f0dff458a0e4578dbe8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -@@ -967,5 +967,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor { +@@ -973,5 +973,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor { return this.getHandle().clip(new net.minecraft.world.level.ClipContext(vec3d, vec3d1, net.minecraft.world.level.ClipContext.Block.COLLIDER, net.minecraft.world.level.ClipContext.Fluid.NONE, null)).getType() == net.minecraft.world.phys.HitResult.Type.MISS; } @@ -22,10 +22,10 @@ index d5cc47eb1fd1ea9a0638827483b03165f6a7e10c..afa802987f96e7d0c5f28d26b759e36e // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index e6780f645f456b0def13aef17ddfb231dc94cde7..01132b10799034232e7e5cbb460d848601e04012 100644 +index 32c724060a532e551f0ab4e7277831bb6bf61de3..6cd6cb256bde958416a0e4b13fc1d3df74f230fd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -@@ -1375,4 +1375,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { +@@ -1377,4 +1377,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return getHandle().isInPowderSnow || getHandle().wasInPowderSnow; // depending on the location in the entity "tick" either could be needed. } // Paper end diff --git a/patches/unapplied/server/0890-Fix-suggest-command-message-for-brigadier-syntax-exc.patch b/patches/server/0881-Fix-suggest-command-message-for-brigadier-syntax-exc.patch similarity index 89% rename from patches/unapplied/server/0890-Fix-suggest-command-message-for-brigadier-syntax-exc.patch rename to patches/server/0881-Fix-suggest-command-message-for-brigadier-syntax-exc.patch index 3a5bf3be59..49e5f4b7c3 100644 --- a/patches/unapplied/server/0890-Fix-suggest-command-message-for-brigadier-syntax-exc.patch +++ b/patches/server/0881-Fix-suggest-command-message-for-brigadier-syntax-exc.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix suggest command message for brigadier syntax exceptions This is a bug accidentally introduced in upstream CB diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 67ab16743b36dbf8b4336e33988d8e78433f566d..7c96f7fc5997761426a0c62cad0cab5cc668f282 100644 +index 6a82d83bca27b3b023d9d6771d194b4db9c97dc2..330f6c79417378da855326b4da665f9d240e748d 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -314,7 +314,7 @@ public class Commands { +@@ -322,7 +322,7 @@ public class Commands { if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) { int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor()); MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> { diff --git a/patches/server/0882-Remove-invalid-signature-login-stacktrace.patch b/patches/server/0882-Remove-invalid-signature-login-stacktrace.patch new file mode 100644 index 0000000000..b599caec29 --- /dev/null +++ b/patches/server/0882-Remove-invalid-signature-login-stacktrace.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke +Date: Fri, 10 Jun 2022 16:02:35 +0200 +Subject: [PATCH] Remove invalid signature login stacktrace + + +diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +index 1af9cbfd657e3d998b871e1ada77a804462bc3ad..d3d881a9eedd81b0d6814b49e81fe5cc28aa2c9f 100644 +--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +@@ -3593,7 +3593,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + + this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator, Duration.ZERO)); + } catch (ProfilePublicKey.ValidationException profilepublickey_b) { +- ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage()); ++ //ServerGamePacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage()); // Paper - unnecessary log + this.disconnect(profilepublickey_b.getComponent()); + } + diff --git a/patches/unapplied/server/0893-Add-async-catcher-to-PlayerConnection-internalTelepo.patch b/patches/server/0883-Add-async-catcher-to-PlayerConnection-internalTelepo.patch similarity index 86% rename from patches/unapplied/server/0893-Add-async-catcher-to-PlayerConnection-internalTelepo.patch rename to patches/server/0883-Add-async-catcher-to-PlayerConnection-internalTelepo.patch index 7b076d8d38..dadca8fdde 100644 --- a/patches/unapplied/server/0893-Add-async-catcher-to-PlayerConnection-internalTelepo.patch +++ b/patches/server/0883-Add-async-catcher-to-PlayerConnection-internalTelepo.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add async catcher to PlayerConnection internalTeleport diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ca7afdbfa936801e53e8bb0d154538bc0f042ad3..fddd60ab705f548e54fc741ad9c5b13fde8c852d 100644 +index d3d881a9eedd81b0d6814b49e81fe5cc28aa2c9f..317a53cbaea38e1191f455b3d2c9c7971f505e9e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1757,6 +1757,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1750,6 +1750,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set set, boolean flag) { diff --git a/patches/unapplied/server/0894-Block-Ticking-API.patch b/patches/server/0884-Block-Ticking-API.patch similarity index 85% rename from patches/unapplied/server/0894-Block-Ticking-API.patch rename to patches/server/0884-Block-Ticking-API.patch index 43db29d605..eadd922c45 100644 --- a/patches/unapplied/server/0894-Block-Ticking-API.patch +++ b/patches/server/0884-Block-Ticking-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Block Ticking API diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index bfe9dc935c87e01fb435d8b46ce413b84ca74856..0d47460494135d4ec4c95260de033e054c2f0404 100644 +index 47ee348a7042a8e0705bc7d2c4077c0f270a8239..2b78bdd5773872405690084fea5a92bc40894fe9 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -@@ -736,5 +736,21 @@ public class CraftBlock implements Block { +@@ -738,5 +738,21 @@ public class CraftBlock implements Block { public boolean isValidTool(ItemStack itemStack) { return getDrops(itemStack).size() != 0; } @@ -31,10 +31,10 @@ index bfe9dc935c87e01fb435d8b46ce413b84ca74856..0d47460494135d4ec4c95260de033e05 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index aae7f7ab4931db8f955c3055157fe01f99931ec7..e4c15fcbd21f70836c26133ef10f3d0da9b6c238 100644 +index 14fd37f4bdb9b0b7f28abfccffe682f6fdc6339e..5f0acece20208047e9d17b6e72d77a5f80cb125f 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -614,4 +614,10 @@ public class CraftBlockData implements BlockData { +@@ -617,4 +617,10 @@ public class CraftBlockData implements BlockData { return this.state.isFaceSturdy(EmptyBlockGetter.INSTANCE, BlockPos.ZERO, CraftBlock.blockFaceToNotch(face), CraftBlockSupport.toNMS(support)); } diff --git a/patches/unapplied/server/0895-Add-Velocity-IP-Forwarding-Support.patch b/patches/server/0885-Add-Velocity-IP-Forwarding-Support.patch similarity index 93% rename from patches/unapplied/server/0895-Add-Velocity-IP-Forwarding-Support.patch rename to patches/server/0885-Add-Velocity-IP-Forwarding-Support.patch index 0f17d8b62c..4056f6a2bd 100644 --- a/patches/unapplied/server/0895-Add-Velocity-IP-Forwarding-Support.patch +++ b/patches/server/0885-Add-Velocity-IP-Forwarding-Support.patch @@ -94,20 +94,20 @@ index 0000000000000000000000000000000000000000..5de2dabbc076a9482b1d6c299f1cff74 + } +} diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index df1a1681cdd5f055ff4394aa6990b252a3e25ea8..4be871c79cebfa62b6d2a22674ad2cde8bc9799c 100644 +index d2cba3fb9eb0d344b71c79387d1d160596b1dc62..9c6473beae78cd6e173e28335e6b06f878b162a9 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -66,6 +66,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -61,6 +61,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, @Nullable - private ProfilePublicKey.Data profilePublicKeyData; + private ServerPlayer delayedAcceptPlayer; public boolean iKnowThisMayNotBeTheBestIdeaButPleaseDisableUsernameValidation = false; // Paper - username validation overriding + private int velocityLoginMessageId = -1; // Paper - Velocity support public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection) { this.state = ServerLoginPacketListenerImpl.State.HELLO; -@@ -289,6 +290,16 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -256,6 +257,16 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, this.state = ServerLoginPacketListenerImpl.State.KEY; - this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce)); + this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge)); } else { + // Paper start - Velocity support + if (io.papermc.paper.configuration.GlobalConfiguration.get().proxies.velocity.enabled) { @@ -122,7 +122,7 @@ index df1a1681cdd5f055ff4394aa6990b252a3e25ea8..4be871c79cebfa62b6d2a22674ad2cde // Spigot start // Paper start - Cache authenticator threads authenticatorPool.execute(new Runnable() { -@@ -402,6 +413,12 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -363,6 +374,12 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, public class LoginHandler { public void fireEvents() throws Exception { @@ -135,7 +135,7 @@ index df1a1681cdd5f055ff4394aa6990b252a3e25ea8..4be871c79cebfa62b6d2a22674ad2cde String playerName = ServerLoginPacketListenerImpl.this.gameProfile.getName(); java.net.InetAddress address = ((java.net.InetSocketAddress) ServerLoginPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(); java.net.InetAddress rawAddress = ((java.net.InetSocketAddress) connection.getRawAddress()).getAddress(); // Paper -@@ -450,6 +467,60 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -411,6 +428,60 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, // Spigot end public void handleCustomQueryPacket(ServerboundCustomQueryPacket packet) { @@ -197,10 +197,10 @@ index df1a1681cdd5f055ff4394aa6990b252a3e25ea8..4be871c79cebfa62b6d2a22674ad2cde } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 410f4f539aaca338b09e503a6828fb1954936556..07eac5439164a7345476c55277538a152359630a 100644 +index f5836a017d793214b41c02b344463e6a171b230c..16abfbf72b6033c190e1523ba6be8cfc467f7855 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -784,7 +784,7 @@ public final class CraftServer implements Server { +@@ -797,7 +797,7 @@ public final class CraftServer implements Server { @Override public long getConnectionThrottle() { // Spigot Start - Automatically set connection throttle for bungee configurations diff --git a/patches/unapplied/server/0896-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch b/patches/server/0886-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch similarity index 82% rename from patches/unapplied/server/0896-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch rename to patches/server/0886-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch index 5466a7d29f..b38e0c3b14 100644 --- a/patches/unapplied/server/0896-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch +++ b/patches/server/0886-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch @@ -5,15 +5,15 @@ Subject: [PATCH] Use thread safe random in ServerLoginPacketListenerImpl diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 4be871c79cebfa62b6d2a22674ad2cde8bc9799c..fbd9807e3a9ad555999fa99e06211ecaf455a091 100644 +index 9c6473beae78cd6e173e28335e6b06f878b162a9..1de5252f038cfb26646df4f8b8acf2b0ddf21c57 100644 --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -52,7 +52,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se +@@ -49,7 +49,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0); static final Logger LOGGER = LogUtils.getLogger(); private static final int MAX_TICKS_BEFORE_LOGIN = 600; - private static final RandomSource RANDOM = RandomSource.create(); + private static final RandomSource RANDOM = new org.bukkit.craftbukkit.util.RandomSourceWrapper(new java.util.Random()); // Paper - This is called across threads, make safe - private final byte[] nonce; + private final byte[] challenge; final MinecraftServer server; public final Connection connection; diff --git a/patches/unapplied/server/0897-Add-NamespacedKey-biome-methods.patch b/patches/server/0887-Add-NamespacedKey-biome-methods.patch similarity index 92% rename from patches/unapplied/server/0897-Add-NamespacedKey-biome-methods.patch rename to patches/server/0887-Add-NamespacedKey-biome-methods.patch index 75c824ab88..dc1a4c8335 100644 --- a/patches/unapplied/server/0897-Add-NamespacedKey-biome-methods.patch +++ b/patches/server/0887-Add-NamespacedKey-biome-methods.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add NamespacedKey biome methods Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index f833213ce3aceffa7771e55659987e126e28cf50..103ab25119bfcdd21eac7e1deeac025108e3c138 100644 +index 7afa387ab07da199ba719fa08a1faba66c3025fa..ee25a6f714d58f3a6b9f7d9d28880c4e63bc6a44 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -609,6 +609,19 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -607,6 +607,19 @@ public final class CraftMagicNumbers implements UnsafeValues { Preconditions.checkArgument(material.isBlock(), material + " is not a block"); return getBlock(material).hasCollision; } diff --git a/patches/unapplied/server/0898-Fix-plugin-loggers-on-server-shutdown.patch b/patches/server/0888-Fix-plugin-loggers-on-server-shutdown.patch similarity index 90% rename from patches/unapplied/server/0898-Fix-plugin-loggers-on-server-shutdown.patch rename to patches/server/0888-Fix-plugin-loggers-on-server-shutdown.patch index 2ddeeb6b45..c0b46a577a 100644 --- a/patches/unapplied/server/0898-Fix-plugin-loggers-on-server-shutdown.patch +++ b/patches/server/0888-Fix-plugin-loggers-on-server-shutdown.patch @@ -37,10 +37,10 @@ index 0000000000000000000000000000000000000000..c1d3bac79bb8b4796c013ff4472f75dc + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 5113e04bae5b1a1944b3e80889d9985937de936f..6dc6c3bccb4ba34268a87b0754c87eb1e0df4135 100644 +index 7275c708a6a2ad138ded2eb6b3c4a57a9406883a..f6d52a1a6305d04fe650a0747b6e972921955a38 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -997,6 +997,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop Co-authored-by: Nassim Jahnke diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 882820653800e0fe9e16441cb4edcd119aa2c44d..55d8ced734a408c990c6c4fbc81707bcb1f27daa 100644 +index fb47e820beb5b8224a44d41a7b83e10e6eb783c1..01420d687b0ffac4dd1f784c95525f811069b4d1 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -1328,6 +1328,46 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1365,6 +1365,46 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider } @@ -66,7 +66,7 @@ index 882820653800e0fe9e16441cb4edcd119aa2c44d..55d8ced734a408c990c6c4fbc81707bc // Paper start - Anti-Xray - Bypass private void playerLoadedChunk(ServerPlayer player, MutableObject> cachedDataPackets, LevelChunk chunk) { if (cachedDataPackets.getValue() == null) { -@@ -1336,6 +1376,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider +@@ -1373,6 +1413,45 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider Boolean shouldModify = chunk.getLevel().chunkPacketBlockController.shouldModify(player, chunk); player.trackChunk(chunk.getPos(), (Packet) cachedDataPackets.getValue().computeIfAbsent(shouldModify, (s) -> { diff --git a/patches/unapplied/server/0900-Stop-large-look-changes-from-crashing-the-server.patch b/patches/server/0890-Stop-large-look-changes-from-crashing-the-server.patch similarity index 89% rename from patches/unapplied/server/0900-Stop-large-look-changes-from-crashing-the-server.patch rename to patches/server/0890-Stop-large-look-changes-from-crashing-the-server.patch index 0e245c2f92..6831fe665f 100644 --- a/patches/unapplied/server/0900-Stop-large-look-changes-from-crashing-the-server.patch +++ b/patches/server/0890-Stop-large-look-changes-from-crashing-the-server.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Stop large look changes from crashing the server Co-authored-by: Jaren Knodel diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 5463b2fd9fdb8c979baa49479e3dbd7eb2d6dda7..763b065adee8fad24c6cc6898338ab57c6380baa 100644 +index efe719de95fb38b6770b9ce9c93590d7c1522ea3..6d682a78c6fe4cbf44cd20449cfe89d530e1d28c 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3011,37 +3011,15 @@ public abstract class LivingEntity extends Entity { +@@ -3028,37 +3028,15 @@ public abstract class LivingEntity extends Entity { this.level.getProfiler().pop(); this.level.getProfiler().push("rangeChecks"); @@ -54,10 +54,10 @@ index 5463b2fd9fdb8c979baa49479e3dbd7eb2d6dda7..763b065adee8fad24c6cc6898338ab57 this.level.getProfiler().pop(); this.animStep += f2; diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 68f3131eb5d3c725279796effff083345edbaec9..713c11d6547cb02ac4b6a02aec07a8ba68019f3f 100644 +index 3eb33d83b9cfa6ac87876a6343c88ac992b60374..66476b33cede1e44db5ec166a0cea81f82ffe47a 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -245,13 +245,7 @@ public abstract class Projectile extends Entity { +@@ -246,13 +246,7 @@ public abstract class Projectile extends Entity { } protected static float lerpRotation(float prevRot, float newRot) { diff --git a/patches/unapplied/server/0901-Add-custom-destroyerIdentity-to-sendBlockDamage.patch b/patches/server/0891-Add-custom-destroyerIdentity-to-sendBlockDamage.patch similarity index 91% rename from patches/unapplied/server/0901-Add-custom-destroyerIdentity-to-sendBlockDamage.patch rename to patches/server/0891-Add-custom-destroyerIdentity-to-sendBlockDamage.patch index e5b945974c..e1f0ee630c 100644 --- a/patches/unapplied/server/0901-Add-custom-destroyerIdentity-to-sendBlockDamage.patch +++ b/patches/server/0891-Add-custom-destroyerIdentity-to-sendBlockDamage.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add custom destroyerIdentity to sendBlockDamage diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index af439ea7800a8d4d606ac6cbfb6a621c5175d3de..e5248ea5abfe693f62175d69288f5b686f3ebebe 100644 +index d87324ccf3490fff0981336ef7d22071cd573b51..a511e41a1bba469a3d21f758f6e363bd95ecc49c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1012,13 +1012,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1014,13 +1014,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void sendBlockDamage(Location loc, float progress) { diff --git a/patches/unapplied/server/0902-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch b/patches/server/0892-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch similarity index 88% rename from patches/unapplied/server/0902-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch rename to patches/server/0892-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch index 0bdc6667a6..7a4404512c 100644 --- a/patches/unapplied/server/0902-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch +++ b/patches/server/0892-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix: EndDragonFight killed statuses should be false for newly diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index f8d846345c1cc3c78f9ac14635b26f2affc77190..c36a543f091447ad50beb71741de3301e4fb81e3 100644 +index 230de1c71b0a6d6370df2fedb337cf0e332a7596..8cf4ae35eb66e69de32295d707db6845b4b02962 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -@@ -112,9 +112,11 @@ public class EndDragonFight { +@@ -113,9 +113,11 @@ public class EndDragonFight { if (nbt.contains("ExitPortalLocation", 10)) { this.portalLocation = NbtUtils.readBlockPos(nbt.getCompound("ExitPortalLocation")); } diff --git a/patches/unapplied/server/0891-Fix-command-preprocess-cancelling-and-command-changi.patch b/patches/unapplied/server/0891-Fix-command-preprocess-cancelling-and-command-changi.patch deleted file mode 100644 index 06d09e04d7..0000000000 --- a/patches/unapplied/server/0891-Fix-command-preprocess-cancelling-and-command-changi.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nassim Jahnke -Date: Tue, 2 Aug 2022 19:16:23 +0200 -Subject: [PATCH] Fix command preprocess cancelling and command changing - - -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index f082e121331be8aee523751a2d3f3393e3b0d02c..ca7afdbfa936801e53e8bb0d154538bc0f042ad3 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2259,13 +2259,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command, new LazyPlayerSet(this.server)); - this.cserver.getPluginManager().callEvent(event); - -- if (event.isCancelled()) { -- return; -- } - command = event.getMessage().substring(1); - -- ParseResults parseresults = this.parseCommand(command); -- Map map = (packet.command().equals(command)) ? this.collectSignedArguments(packet, PreviewableCommand.of(parseresults)) : Collections.emptyMap(); -+ // Paper start - send message headers for cancelled or changed commands -+ ParseResults parseresults = this.parseCommand(packet.command()); -+ Map map = this.collectSignedArguments(packet, PreviewableCommand.of(parseresults)); -+ if (event.isCancelled() || !packet.command().equals(command)) { -+ for (final PlayerChatMessage message : map.values()) { -+ player.server.getPlayerList().broadcastMessageHeader(message, Set.of()); -+ } -+ if (event.isCancelled()) { -+ return; -+ } -+ -+ // Remove signatures if the command was changed and use the changed command source stack -+ map.clear(); -+ parseresults = this.parseCommand(command); -+ } -+ // Paper end - // CraftBukkit end - Iterator iterator = map.values().iterator(); - -@@ -2569,6 +2580,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - } - }); - } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Re-add "Command Only" flag check -+ this.server.getPlayerList().broadcastMessageHeader(message, Set.of()); // Paper - this.send(new ClientboundSystemChatPacket(Component.translatable("chat.cannotSend").withStyle(ChatFormatting.RED), false)); - } else { - this.chat(s, message, true); diff --git a/patches/unapplied/server/0892-Remove-invalid-signature-login-stacktrace.patch b/patches/unapplied/server/0892-Remove-invalid-signature-login-stacktrace.patch deleted file mode 100644 index 5f564a6286..0000000000 --- a/patches/unapplied/server/0892-Remove-invalid-signature-login-stacktrace.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Nassim Jahnke -Date: Fri, 10 Jun 2022 16:02:35 +0200 -Subject: [PATCH] Remove invalid signature login stacktrace - - -diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -index 96e33103773ae2b8807a6c0a6daac95c35c18bda..df1a1681cdd5f055ff4394aa6990b252a3e25ea8 100644 ---- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java -@@ -166,7 +166,7 @@ public class ServerLoginPacketListenerImpl implements TickablePacketListener, Se - - profilepublickey = ServerLoginPacketListenerImpl.validatePublicKey(this.profilePublicKeyData, this.gameProfile.getId(), signaturevalidator, this.server.enforceSecureProfile()); - } catch (ProfilePublicKey.ValidationException profilepublickey_b) { -- ServerLoginPacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage()); -+ // ServerLoginPacketListenerImpl.LOGGER.error("Failed to validate profile key: {}", profilepublickey_b.getMessage()); // Paper - unnecessary log - if (!this.connection.isMemoryConnection()) { - this.disconnect(profilepublickey_b.getComponent()); - return;