diff --git a/patches/server/0395-Load-Chunks-for-Login-Asynchronously.patch b/patches/server/0395-Load-Chunks-for-Login-Asynchronously.patch index d3065b728..82b57d890 100644 --- a/patches/server/0395-Load-Chunks-for-Login-Asynchronously.patch +++ b/patches/server/0395-Load-Chunks-for-Login-Asynchronously.patch @@ -57,34 +57,21 @@ index be677d437d17b74c6188ce1bd5fc6fdc228fd92f..78fbb4c3e52e900956ae0811aaf934c8 public static final TicketType UNKNOWN = TicketType.create("unknown", Comparator.comparingLong(ChunkPos::toLong), 1); public static final TicketType PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0df93b204ddf55a2a3b8af33d6a3273697eea91e..cadc14777f6a978d4a58bbaf1b606a53c28b2c08 100644 +index 0df93b204ddf55a2a3b8af33d6a3273697eea91e..88d4c2a9c628d32f1633a376eff37c3e6ae33a72 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -254,6 +254,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - private static final int PENDING_MESSAGE_DISCONNECT_THRESHOLD = 4096; - public final Connection connection; - private final MinecraftServer server; -+ public Runnable playerJoinReady; // Paper - public ServerPlayer player; - private int tickCount; - private int ackBlockChangesUpTo = -1; -@@ -346,6 +347,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -346,6 +346,10 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void tick() { + // Paper start - login async -+ Runnable playerJoinReady = this.playerJoinReady; -+ if (playerJoinReady != null) { -+ this.playerJoinReady = null; -+ playerJoinReady.run(); -+ } + // Don't tick if not valid (dead), otherwise we load chunks below + if (this.player.valid) { + // Paper end if (this.ackBlockChangesUpTo > -1) { this.send(new ClientboundBlockChangedAckPacket(this.ackBlockChangesUpTo)); this.ackBlockChangesUpTo = -1; -@@ -392,7 +402,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -392,7 +396,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.lastVehicle = null; this.clientVehicleIsFloating = false; this.aboveGroundVehicleTickCount = 0; @@ -116,7 +103,7 @@ index c83395364edb4f2ba8515326b19c4f1a436a0502..c99266d4782c5d58339e63f7564c28b4 try { ServerPlayer entityplayer1 = this.server.getPlayerList().getPlayerForLogin(this.gameProfile, s); // CraftBukkit - add player reference diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b48641bbe371ffacbbd659a0ee1783437267a4dc..9bfa4ff2eefa47e7468eeb4f912873b07ad17ac1 100644 +index b48641bbe371ffacbbd659a0ee1783437267a4dc..b1f6dc751c3dab5220a02223f6ba205aa0949f84 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -139,6 +139,7 @@ public abstract class PlayerList { @@ -165,7 +152,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..9bfa4ff2eefa47e7468eeb4f912873b0 // Spigot start - spawn location event Player spawnPlayer = player.getBukkitEntity(); -@@ -264,6 +274,54 @@ public abstract class PlayerList { +@@ -264,6 +274,61 @@ public abstract class PlayerList { player.getRecipeBook().sendInitialRecipeBook(player); this.updateEntireScoreboard(worldserver1.getScoreboard(), player); this.server.invalidateStatus(); @@ -187,13 +174,20 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..9bfa4ff2eefa47e7468eeb4f912873b0 + return java.util.concurrent.CompletableFuture.completedFuture(chunk); + } + }).thenAccept(chunk -> { -+ playerconnection.playerJoinReady = () -> { -+ postChunkLoadJoin( -+ player, finalWorldserver, connection, playerconnection, -+ nbttagcompound, s1, lastKnownName -+ ); -+ finalWorldserver.pendingLogin.remove(player); -+ }; ++ MinecraftServer.getServer().scheduleOnMain(() -> { ++ try { ++ if (!playerconnection.connection.isConnected()) { ++ return; ++ } ++ PlayerList.this.postChunkLoadJoin( ++ player, finalWorldserver, connection, playerconnection, ++ nbttagcompound, s1, lastKnownName ++ ); ++ distanceManager.addTicket(net.minecraft.server.level.TicketType.LOGIN, pos, 31, pos.toLong()); ++ } finally { ++ finalWorldserver.pendingLogin.remove(player); ++ } ++ }); + }); + } + @@ -220,7 +214,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..9bfa4ff2eefa47e7468eeb4f912873b0 MutableComponent ichatmutablecomponent; if (player.getGameProfile().getName().equalsIgnoreCase(s)) { -@@ -505,6 +563,7 @@ public abstract class PlayerList { +@@ -505,6 +570,7 @@ public abstract class PlayerList { protected void save(ServerPlayer player) { if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit @@ -228,7 +222,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..9bfa4ff2eefa47e7468eeb4f912873b0 this.playerIo.save(player); ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit -@@ -532,7 +591,7 @@ public abstract class PlayerList { +@@ -532,7 +598,7 @@ public abstract class PlayerList { } PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(entityplayer.getScoreboardName()))); @@ -237,7 +231,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..9bfa4ff2eefa47e7468eeb4f912873b0 entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage()); if (server.isSameThread()) entityplayer.doTick(); // SPIGOT-924 // Paper - don't tick during emergency shutdowns (Watchdog) -@@ -577,6 +636,13 @@ public abstract class PlayerList { +@@ -577,6 +643,13 @@ public abstract class PlayerList { // this.advancements.remove(uuid); // CraftBukkit end } @@ -251,7 +245,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..9bfa4ff2eefa47e7468eeb4f912873b0 // CraftBukkit start // this.broadcastAll(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{entityplayer})); -@@ -594,7 +660,7 @@ public abstract class PlayerList { +@@ -594,7 +667,7 @@ public abstract class PlayerList { this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity()); // CraftBukkit end @@ -260,7 +254,7 @@ index b48641bbe371ffacbbd659a0ee1783437267a4dc..9bfa4ff2eefa47e7468eeb4f912873b0 } // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer -@@ -613,6 +679,13 @@ public abstract class PlayerList { +@@ -613,6 +686,13 @@ public abstract class PlayerList { list.add(entityplayer); } } diff --git a/patches/server/0402-Validate-PickItem-Packet-and-kick-for-invalid.patch b/patches/server/0402-Validate-PickItem-Packet-and-kick-for-invalid.patch index 93013fac5..73612dfd5 100644 --- a/patches/server/0402-Validate-PickItem-Packet-and-kick-for-invalid.patch +++ b/patches/server/0402-Validate-PickItem-Packet-and-kick-for-invalid.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Validate PickItem Packet and kick for invalid diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index cadc14777f6a978d4a58bbaf1b606a53c28b2c08..7b6dedcf405e3f9ff85ebe8702ab6459385c5ff9 100644 +index 88d4c2a9c628d32f1633a376eff37c3e6ae33a72..dac18223143ea10054787f8954744311be7df7aa 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -973,7 +973,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -967,7 +967,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handlePickItem(ServerboundPickItemPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); diff --git a/patches/server/0407-Prevent-teleporting-dead-entities.patch b/patches/server/0407-Prevent-teleporting-dead-entities.patch index 4b8c3b56d..526b593a8 100644 --- a/patches/server/0407-Prevent-teleporting-dead-entities.patch +++ b/patches/server/0407-Prevent-teleporting-dead-entities.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent teleporting dead entities diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7b6dedcf405e3f9ff85ebe8702ab6459385c5ff9..0bfd835a22b8bc353878f3f9b04564d6f3049279 100644 +index dac18223143ea10054787f8954744311be7df7aa..245c1ff9fe02a6f8fe1f320e2a751c7579425b1f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1638,6 +1638,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1632,6 +1632,13 @@ 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/server/0434-Prevent-position-desync-in-playerconnection-causing-.patch b/patches/server/0434-Prevent-position-desync-in-playerconnection-causing-.patch index 80b8c23d4..8abc2018d 100644 --- a/patches/server/0434-Prevent-position-desync-in-playerconnection-causing-.patch +++ b/patches/server/0434-Prevent-position-desync-in-playerconnection-causing-.patch @@ -14,10 +14,10 @@ behaviour, we need to move all of this dangerous logic outside of the move call and into an appropriate place in the tick method. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0bfd835a22b8bc353878f3f9b04564d6f3049279..a8014da4583bac40deecd439bb59287bf1de56f4 100644 +index 245c1ff9fe02a6f8fe1f320e2a751c7579425b1f..0885f265cadb1ebc1f6bdfcd2a39502b0617f185 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1452,6 +1452,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1446,6 +1446,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9)); this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move diff --git a/patches/server/0437-Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/0437-Add-and-implement-PlayerRecipeBookClickEvent.patch index 5fbd29a58..c3f21e269 100644 --- a/patches/server/0437-Add-and-implement-PlayerRecipeBookClickEvent.patch +++ b/patches/server/0437-Add-and-implement-PlayerRecipeBookClickEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a8014da4583bac40deecd439bb59287bf1de56f4..74df19cb16ea840f8d5d5354906f16757d5fe56d 100644 +index 0885f265cadb1ebc1f6bdfcd2a39502b0617f185..2da61f9cc0f930538348bc185063c3d7dfeeb3b2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3236,9 +3236,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3230,9 +3230,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!this.player.containerMenu.stillValid(this.player)) { ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu); } else { diff --git a/patches/server/0439-Add-permission-for-command-blocks.patch b/patches/server/0439-Add-permission-for-command-blocks.patch index b3d3be6d0..4acfd8ed3 100644 --- a/patches/server/0439-Add-permission-for-command-blocks.patch +++ b/patches/server/0439-Add-permission-for-command-blocks.patch @@ -18,10 +18,10 @@ index af00442931f9f6cf878bd61137c2f29fc7c8d0b1..431ff490760f54be76847c7b370dbbb4 return false; } else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 74df19cb16ea840f8d5d5354906f16757d5fe56d..cf53c3cdbfd0a610aedee474c164f2d1ca5dacad 100644 +index 2da61f9cc0f930538348bc185063c3d7dfeeb3b2..02635061fe59156a1c94ad3bf05d2fc534a8cf29 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -884,7 +884,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -878,7 +878,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (!this.server.isCommandBlockEnabled()) { this.player.sendSystemMessage(Component.translatable("advMode.notEnabled")); @@ -30,7 +30,7 @@ index 74df19cb16ea840f8d5d5354906f16757d5fe56d..cf53c3cdbfd0a610aedee474c164f2d1 this.player.sendSystemMessage(Component.translatable("advMode.notAllowed")); } else { BaseCommandBlock commandblocklistenerabstract = null; -@@ -951,7 +951,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -945,7 +945,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (!this.server.isCommandBlockEnabled()) { this.player.sendSystemMessage(Component.translatable("advMode.notEnabled")); diff --git a/patches/server/0441-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0441-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index 4e360c653..0bf7d5bc7 100644 --- a/patches/server/0441-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0441-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -89,10 +89,10 @@ index 06e711aa9a0afedda48395ba2ee369bb211584da..28944fc50ea43a3ea40bd1e69c560c8f playerlist.sendPlayerPermissionLevel(this); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index cf53c3cdbfd0a610aedee474c164f2d1ca5dacad..4e8977ab293816fa5dee530eea63193dcc9162b9 100644 +index 02635061fe59156a1c94ad3bf05d2fc534a8cf29..487003209da9fce5c365be041a7b9643404bce8e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3506,7 +3506,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3500,7 +3500,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) { @@ -102,7 +102,7 @@ index cf53c3cdbfd0a610aedee474c164f2d1ca5dacad..4e8977ab293816fa5dee530eea63193d } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index be14033f3a16ab020916720c678f6c738f6c5f15..32fbc7ec5ebf58a46e20fb5c5aaa9c76481b96b4 100644 +index f0f2a5e94e0a4b143befa422fa99e68316f93d7f..99a9bf12f2e3e6ac5457da53f6f12118efce5d82 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -951,8 +951,8 @@ public final class CraftServer implements Server { diff --git a/patches/server/0447-incremental-chunk-and-player-saving.patch b/patches/server/0447-incremental-chunk-and-player-saving.patch index 739602ae7..cb5d5e682 100644 --- a/patches/server/0447-incremental-chunk-and-player-saving.patch +++ b/patches/server/0447-incremental-chunk-and-player-saving.patch @@ -310,10 +310,10 @@ index 28944fc50ea43a3ea40bd1e69c560c8fe022337e..0720b748ed42bbd2a12cc5de79224f60 private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y = 10; public ServerGamePacketListenerImpl connection; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 9bfa4ff2eefa47e7468eeb4f912873b07ad17ac1..98ddbc2d9dd2e63e9bdbb2f454d565270200962e 100644 +index b1f6dc751c3dab5220a02223f6ba205aa0949f84..2ceddd78fb3b69eff60b5cd2b1f42c641f6ecd70 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -564,6 +564,7 @@ public abstract class PlayerList { +@@ -571,6 +571,7 @@ public abstract class PlayerList { protected void save(ServerPlayer player) { if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit if (!player.didPlayerJoinEvent) return; // Paper - If we never fired PJE, we disconnected during login. Data has not changed, and additionally, our saved vehicle is not loaded! If we save now, we will lose our vehicle (CraftBukkit bug) @@ -321,7 +321,7 @@ index 9bfa4ff2eefa47e7468eeb4f912873b07ad17ac1..98ddbc2d9dd2e63e9bdbb2f454d56527 this.playerIo.save(player); ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit -@@ -1166,10 +1167,22 @@ public abstract class PlayerList { +@@ -1173,10 +1174,22 @@ public abstract class PlayerList { } public void saveAll() { diff --git a/patches/server/0466-Fix-SPIGOT-5989.patch b/patches/server/0466-Fix-SPIGOT-5989.patch index 6e460e7e6..9d1324f0e 100644 --- a/patches/server/0466-Fix-SPIGOT-5989.patch +++ b/patches/server/0466-Fix-SPIGOT-5989.patch @@ -10,10 +10,10 @@ This fixes that by checking if the modified spawn location is still at a respawn anchor. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 3ca3275f7f66410217b86ba8ca09d85ef64f3f83..8f5dcd77b3a6ccce9b4ff8139e6b3a9700502ebf 100644 +index 2700a1337e08727078e52b90b477ff7291c8af8d..0cbfbd9f274974674970def11e5d76ba9e663e16 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -838,6 +838,7 @@ public abstract class PlayerList { +@@ -845,6 +845,7 @@ public abstract class PlayerList { // Paper start boolean isBedSpawn = false; boolean isRespawn = false; @@ -21,7 +21,7 @@ index 3ca3275f7f66410217b86ba8ca09d85ef64f3f83..8f5dcd77b3a6ccce9b4ff8139e6b3a97 // Paper end // CraftBukkit start - fire PlayerRespawnEvent -@@ -848,7 +849,7 @@ public abstract class PlayerList { +@@ -855,7 +856,7 @@ public abstract class PlayerList { Optional optional; if (blockposition != null) { @@ -30,7 +30,7 @@ index 3ca3275f7f66410217b86ba8ca09d85ef64f3f83..8f5dcd77b3a6ccce9b4ff8139e6b3a97 } else { optional = Optional.empty(); } -@@ -892,7 +893,12 @@ public abstract class PlayerList { +@@ -899,7 +900,12 @@ public abstract class PlayerList { } // Spigot End @@ -44,7 +44,7 @@ index 3ca3275f7f66410217b86ba8ca09d85ef64f3f83..8f5dcd77b3a6ccce9b4ff8139e6b3a97 if (!flag) entityplayer.reset(); // SPIGOT-4785 isRespawn = true; // Paper } else { -@@ -930,8 +936,12 @@ public abstract class PlayerList { +@@ -937,8 +943,12 @@ public abstract class PlayerList { } // entityplayer1.initInventoryMenu(); entityplayer1.setHealth(entityplayer1.getHealth()); diff --git a/patches/server/0474-Brand-support.patch b/patches/server/0474-Brand-support.patch index 37cf273f1..5cfc2a82a 100644 --- a/patches/server/0474-Brand-support.patch +++ b/patches/server/0474-Brand-support.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Brand support diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4e8977ab293816fa5dee530eea63193dcc9162b9..40487804d50798a5bfd05754fb882d82a7b7a693 100644 +index 487003209da9fce5c365be041a7b9643404bce8e..ecd3d2cb0a4da4360c420f8c733a5898c54ba72e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -299,6 +299,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -298,6 +298,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper @@ -17,7 +17,7 @@ index 4e8977ab293816fa5dee530eea63193dcc9162b9..40487804d50798a5bfd05754fb882d82 public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); this.lastSeenMessagesValidator = new LastSeenMessagesValidator(); -@@ -3461,6 +3463,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3455,6 +3457,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private static final ResourceLocation CUSTOM_REGISTER = new ResourceLocation("register"); private static final ResourceLocation CUSTOM_UNREGISTER = new ResourceLocation("unregister"); @@ -26,7 +26,7 @@ index 4e8977ab293816fa5dee530eea63193dcc9162b9..40487804d50798a5bfd05754fb882d82 @Override public void handleCustomPayload(ServerboundCustomPayloadPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); -@@ -3488,6 +3492,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3482,6 +3486,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic try { byte[] data = new byte[packet.data.readableBytes()]; packet.data.readBytes(data); @@ -42,7 +42,7 @@ index 4e8977ab293816fa5dee530eea63193dcc9162b9..40487804d50798a5bfd05754fb882d82 this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data); } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); -@@ -3497,6 +3510,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3491,6 +3504,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } diff --git a/patches/server/0493-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch b/patches/server/0493-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch index ba70a37bd..efcb3aac9 100644 --- a/patches/server/0493-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch +++ b/patches/server/0493-Fix-Entity-Teleportation-and-cancel-velocity-if-tele.patch @@ -9,10 +9,10 @@ as this is how Vanilla teleports entities. Cancel any pending motion when teleported. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 40487804d50798a5bfd05754fb882d82a7b7a693..47f5a771c42c6a6e1c610913af1bf11c0dc2f660 100644 +index ecd3d2cb0a4da4360c420f8c733a5898c54ba72e..70ef7e4a86cc080ff47dcc648088bf007d6ddee6 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -766,7 +766,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -760,7 +760,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } @@ -21,7 +21,7 @@ index 40487804d50798a5bfd05754fb882d82a7b7a693..47f5a771c42c6a6e1c610913af1bf11c this.lastGoodX = this.awaitingPositionFromClient.x; this.lastGoodY = this.awaitingPositionFromClient.y; this.lastGoodZ = this.awaitingPositionFromClient.z; -@@ -1682,7 +1682,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1676,7 +1676,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // CraftBukkit end this.awaitingTeleportTime = this.tickCount; diff --git a/patches/server/0504-Fix-for-large-move-vectors-crashing-server.patch b/patches/server/0504-Fix-for-large-move-vectors-crashing-server.patch index c24127d0e..415947895 100644 --- a/patches/server/0504-Fix-for-large-move-vectors-crashing-server.patch +++ b/patches/server/0504-Fix-for-large-move-vectors-crashing-server.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix for large move vectors crashing server Check movement distance also based on current position. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 47f5a771c42c6a6e1c610913af1bf11c0dc2f660..a33334b45493c714b48439986b484256c03bdf8e 100644 +index 70ef7e4a86cc080ff47dcc648088bf007d6ddee6..3b422cd28b3fb8a172a734e3d59636b293d4a5cb 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -581,9 +581,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -575,9 +575,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) { ServerLevel worldserver = this.player.getLevel(); @@ -22,7 +22,7 @@ index 47f5a771c42c6a6e1c610913af1bf11c0dc2f660..a33334b45493c714b48439986b484256 double d3 = ServerGamePacketListenerImpl.clampHorizontal(packet.getX()); final double toX = d3; // Paper - OBFHELPER double d4 = ServerGamePacketListenerImpl.clampVertical(packet.getY()); final double toY = d4; // Paper - OBFHELPER double d5 = ServerGamePacketListenerImpl.clampHorizontal(packet.getZ()); final double toZ = d5; // Paper - OBFHELPER -@@ -593,8 +593,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -587,8 +587,19 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic double d7 = d4 - this.vehicleFirstGoodY; double d8 = d5 - this.vehicleFirstGoodZ; double d9 = entity.getDeltaMovement().lengthSqr(); @@ -44,7 +44,7 @@ index 47f5a771c42c6a6e1c610913af1bf11c0dc2f660..a33334b45493c714b48439986b484256 // CraftBukkit start - handle custom speeds and skipped ticks this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick; -@@ -640,9 +651,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -634,9 +645,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D)); @@ -57,7 +57,7 @@ index 47f5a771c42c6a6e1c610913af1bf11c0dc2f660..a33334b45493c714b48439986b484256 boolean flag1 = entity.verticalCollisionBelow; entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8)); -@@ -1362,7 +1373,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1356,7 +1367,18 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic double d8 = d1 - this.firstGoodY; double d9 = d2 - this.firstGoodZ; double d10 = this.player.getDeltaMovement().lengthSqr(); @@ -77,7 +77,7 @@ index 47f5a771c42c6a6e1c610913af1bf11c0dc2f660..a33334b45493c714b48439986b484256 if (this.player.isSleeping()) { if (d11 > 1.0D) { -@@ -1414,9 +1436,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1408,9 +1430,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic AABB axisalignedbb = this.player.getBoundingBox(); diff --git a/patches/server/0521-Add-API-for-quit-reason.patch b/patches/server/0521-Add-API-for-quit-reason.patch index 1189e201d..a632927b3 100644 --- a/patches/server/0521-Add-API-for-quit-reason.patch +++ b/patches/server/0521-Add-API-for-quit-reason.patch @@ -37,10 +37,10 @@ index 6f2b52165c1935511790a429792d3754251537c8..9b4436bdb697d8350eac57282f8fad81 public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, @Nullable ProfilePublicKey publicKey) { super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile, publicKey); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a33334b45493c714b48439986b484256c03bdf8e..cf490d9f622e7300c36aa4776987e328d151097d 100644 +index 3b422cd28b3fb8a172a734e3d59636b293d4a5cb..a6820c2262dd2198b772eae491c40ee379ec2da7 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -521,6 +521,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -515,6 +515,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure // CraftBukkit end @@ -49,10 +49,10 @@ index a33334b45493c714b48439986b484256c03bdf8e..cf490d9f622e7300c36aa4776987e328 this.connection.disconnect(ichatbasecomponent); })); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index f41a8510e1bdfbc5b9c0a599fc17fadd74280be9..0259c8fe65e723a8d2dcde2971a10ca50fb685c1 100644 +index c00922556462a18543975f7f9c60ea6727e9b114..10acd0256cbe5393b3736be33a55285b7f214a5d 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -603,7 +603,7 @@ public abstract class PlayerList { +@@ -610,7 +610,7 @@ public abstract class PlayerList { entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper } diff --git a/patches/server/0523-Expose-world-spawn-angle.patch b/patches/server/0523-Expose-world-spawn-angle.patch index 72e1b69da..1626858a0 100644 --- a/patches/server/0523-Expose-world-spawn-angle.patch +++ b/patches/server/0523-Expose-world-spawn-angle.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expose world spawn angle diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 0259c8fe65e723a8d2dcde2971a10ca50fb685c1..30b98d4ee39990b98e6c15b23a598eb472ebea45 100644 +index 10acd0256cbe5393b3736be33a55285b7f214a5d..2fc183222e539e66c050e146c784a66222dee419 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -881,7 +881,7 @@ public abstract class PlayerList { +@@ -888,7 +888,7 @@ public abstract class PlayerList { if (location == null) { worldserver1 = this.server.getLevel(Level.OVERWORLD); blockposition = entityplayer1.getSpawnPoint(worldserver1); diff --git a/patches/server/0534-Limit-recipe-packets.patch b/patches/server/0534-Limit-recipe-packets.patch index 4bf6259d4..e2c1e0ee6 100644 --- a/patches/server/0534-Limit-recipe-packets.patch +++ b/patches/server/0534-Limit-recipe-packets.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Limit recipe packets diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index cf490d9f622e7300c36aa4776987e328d151097d..8edaa8bcf250b9d363fe03e2c50b04f34dde8ea0 100644 +index a6820c2262dd2198b772eae491c40ee379ec2da7..38bc886317dec183bb276d1a81b4b0a001350312 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -264,6 +264,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -263,6 +263,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // CraftBukkit start - multithreaded fields private final AtomicInteger chatSpamTickCount = new AtomicInteger(); private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits @@ -16,7 +16,7 @@ index cf490d9f622e7300c36aa4776987e328d151097d..8edaa8bcf250b9d363fe03e2c50b04f3 // CraftBukkit end private int dropSpamTickCount; private double firstGoodX; -@@ -431,6 +432,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -425,6 +426,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // CraftBukkit start for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ; if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable @@ -24,7 +24,7 @@ index cf490d9f622e7300c36aa4776987e328d151097d..8edaa8bcf250b9d363fe03e2c50b04f3 /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -3255,6 +3257,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3249,6 +3251,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) { diff --git a/patches/server/0551-Fix-interact-event-not-being-called-in-adventure.patch b/patches/server/0551-Fix-interact-event-not-being-called-in-adventure.patch index b7969d61a..ff22b7462 100644 --- a/patches/server/0551-Fix-interact-event-not-being-called-in-adventure.patch +++ b/patches/server/0551-Fix-interact-event-not-being-called-in-adventure.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix interact event not being called in adventure Call PlayerInteractEvent when left-clicking on a block in adventure mode diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 8edaa8bcf250b9d363fe03e2c50b04f34dde8ea0..9da69a6e4d20e6b5f702f3a307239d789654de60 100644 +index 38bc886317dec183bb276d1a81b4b0a001350312..2ad4df9895728185d6e5db2e8525ed3b08a518a1 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1858,7 +1858,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1852,7 +1852,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic MutableComponent ichatmutablecomponent = Component.translatable("build.tooHigh", i - 1).withStyle(ChatFormatting.RED); this.player.sendSystemMessage(ichatmutablecomponent, true); @@ -18,7 +18,7 @@ index 8edaa8bcf250b9d363fe03e2c50b04f34dde8ea0..9da69a6e4d20e6b5f702f3a307239d78 this.player.swing(enumhand, true); } } -@@ -2618,7 +2618,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2612,7 +2612,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic Vec3 vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3); HitResult movingobjectposition = this.player.level.clip(new ClipContext(vec3d, vec3d1, ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, this.player)); diff --git a/patches/server/0566-Fix-villager-boat-exploit.patch b/patches/server/0566-Fix-villager-boat-exploit.patch index 5b7b3f8e3..0ad7ee193 100644 --- a/patches/server/0566-Fix-villager-boat-exploit.patch +++ b/patches/server/0566-Fix-villager-boat-exploit.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix villager boat exploit diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 30b98d4ee39990b98e6c15b23a598eb472ebea45..6c561f3259074fa1320dd812fe9f514aea34d2b6 100644 +index 2fc183222e539e66c050e146c784a66222dee419..02611a3929d5cc0904e938db1314567ef23fb041 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -628,6 +628,14 @@ public abstract class PlayerList { +@@ -635,6 +635,14 @@ public abstract class PlayerList { PlayerList.LOGGER.debug("Removing player mount"); entityplayer.stopRiding(); entity.getPassengersAndSelf().forEach((entity1) -> { diff --git a/patches/server/0567-Add-sendOpLevel-API.patch b/patches/server/0567-Add-sendOpLevel-API.patch index d2b05ecbe..d418dc936 100644 --- a/patches/server/0567-Add-sendOpLevel-API.patch +++ b/patches/server/0567-Add-sendOpLevel-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add sendOpLevel API diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 6c561f3259074fa1320dd812fe9f514aea34d2b6..6cc4711123976cfbc2131732e78abf86c8e5b104 100644 +index 02611a3929d5cc0904e938db1314567ef23fb041..5203bcb732c77b1c232ab262431914c53efd0ae9 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1126,6 +1126,11 @@ public abstract class PlayerList { +@@ -1133,6 +1133,11 @@ public abstract class PlayerList { } private void sendPlayerPermissionLevel(ServerPlayer player, int permissionLevel) { @@ -20,7 +20,7 @@ index 6c561f3259074fa1320dd812fe9f514aea34d2b6..6cc4711123976cfbc2131732e78abf86 if (player.connection != null) { byte b0; -@@ -1140,8 +1145,10 @@ public abstract class PlayerList { +@@ -1147,8 +1152,10 @@ public abstract class PlayerList { player.connection.send(new ClientboundEntityEventPacket(player, b0)); } diff --git a/patches/server/0602-Allow-using-signs-inside-spawn-protection.patch b/patches/server/0602-Allow-using-signs-inside-spawn-protection.patch index 052778bb8..d48b61abd 100644 --- a/patches/server/0602-Allow-using-signs-inside-spawn-protection.patch +++ b/patches/server/0602-Allow-using-signs-inside-spawn-protection.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Allow using signs inside spawn protection diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 9da69a6e4d20e6b5f702f3a307239d789654de60..d153bcdba1377ff89263840fcb7d0a99283583dc 100644 +index 2ad4df9895728185d6e5db2e8525ed3b08a518a1..582f8bbc3eb169d2cf41cba9ab324c933466b2b2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1850,7 +1850,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1844,7 +1844,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic int i = this.player.level.getMaxBuildHeight(); if (blockposition.getY() < i) { diff --git a/patches/server/0608-Drop-carried-item-when-player-has-disconnected.patch b/patches/server/0608-Drop-carried-item-when-player-has-disconnected.patch index 47ed8bb33..6235dc89f 100644 --- a/patches/server/0608-Drop-carried-item-when-player-has-disconnected.patch +++ b/patches/server/0608-Drop-carried-item-when-player-has-disconnected.patch @@ -7,10 +7,10 @@ Fixes disappearance of held items, when a player gets disconnected and PlayerDro Closes #5036 diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index e11595885bd48036b141d1d449281dceadae5598..c4d83bd96b060342c5a03a684e5eb3403ab708a8 100644 +index 57e1fa9aa74b237763eb797a4fbe67b791666f84..b4a4fe2ba4cb00ed25fe5899723623f8e915d8d6 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -621,6 +621,14 @@ public abstract class PlayerList { +@@ -628,6 +628,14 @@ public abstract class PlayerList { } // Paper end diff --git a/patches/server/0610-Don-t-ignore-result-of-PlayerEditBookEvent.patch b/patches/server/0610-Don-t-ignore-result-of-PlayerEditBookEvent.patch index cacdcb66b..8fc5df118 100644 --- a/patches/server/0610-Don-t-ignore-result-of-PlayerEditBookEvent.patch +++ b/patches/server/0610-Don-t-ignore-result-of-PlayerEditBookEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Don't ignore result of PlayerEditBookEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index d153bcdba1377ff89263840fcb7d0a99283583dc..3e32419d7038b2f87d81a1075039437f43b219c4 100644 +index 582f8bbc3eb169d2cf41cba9ab324c933466b2b2..ed1b8507c98cbc11ec6dd3ceae2800bd69d99cf2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1300,7 +1300,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1294,7 +1294,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } itemstack.addTagElement("pages", nbttaglist); diff --git a/patches/server/0622-fix-PlayerItemHeldEvent-firing-twice.patch b/patches/server/0622-fix-PlayerItemHeldEvent-firing-twice.patch index b5844f82d..ad8570497 100644 --- a/patches/server/0622-fix-PlayerItemHeldEvent-firing-twice.patch +++ b/patches/server/0622-fix-PlayerItemHeldEvent-firing-twice.patch @@ -5,10 +5,10 @@ Subject: [PATCH] fix PlayerItemHeldEvent firing twice diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 3e32419d7038b2f87d81a1075039437f43b219c4..2723bb42f3618fa57f3996b7880484d88afb552d 100644 +index ed1b8507c98cbc11ec6dd3ceae2800bd69d99cf2..35b906d74a4cc03a5878cedff2ee9e694bb03ad4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2059,6 +2059,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2053,6 +2053,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (this.player.isImmobile()) return; // CraftBukkit if (packet.getSlot() >= 0 && packet.getSlot() < Inventory.getSelectionSize()) { diff --git a/patches/server/0627-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch b/patches/server/0627-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch index 317c2d8c7..cfe54e00f 100644 --- a/patches/server/0627-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch +++ b/patches/server/0627-Fix-anchor-respawn-acting-as-a-bed-respawn-from-the-.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix anchor respawn acting as a bed respawn from the end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index c4d83bd96b060342c5a03a684e5eb3403ab708a8..b927d5b60e2571f4a7a56237d0da46e5162d6588 100644 +index b4a4fe2ba4cb00ed25fe5899723623f8e915d8d6..b41b9d9ac1e28f44eed4b6c56d63cb5f249b9ea7 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -854,6 +854,7 @@ public abstract class PlayerList { +@@ -861,6 +861,7 @@ public abstract class PlayerList { // Paper start boolean isBedSpawn = false; @@ -17,7 +17,7 @@ index c4d83bd96b060342c5a03a684e5eb3403ab708a8..b927d5b60e2571f4a7a56237d0da46e5 boolean isRespawn = false; boolean isLocAltered = false; // Paper - Fix SPIGOT-5989 // Paper end -@@ -874,6 +875,7 @@ public abstract class PlayerList { +@@ -881,6 +882,7 @@ public abstract class PlayerList { if (optional.isPresent()) { BlockState iblockdata = worldserver1.getBlockState(blockposition); boolean flag3 = iblockdata.is(Blocks.RESPAWN_ANCHOR); @@ -25,7 +25,7 @@ index c4d83bd96b060342c5a03a684e5eb3403ab708a8..b927d5b60e2571f4a7a56237d0da46e5 Vec3 vec3d = (Vec3) optional.get(); float f1; -@@ -902,7 +904,7 @@ public abstract class PlayerList { +@@ -909,7 +911,7 @@ public abstract class PlayerList { } Player respawnPlayer = entityplayer1.getBukkitEntity(); diff --git a/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch index bb31a61ea..19655c981 100644 --- a/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch +++ b/patches/server/0629-add-RespawnFlags-to-PlayerRespawnEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add RespawnFlags to PlayerRespawnEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2723bb42f3618fa57f3996b7880484d88afb552d..8dc4eac46bb7f127cb23d3994308d6ceb5dfedf5 100644 +index 35b906d74a4cc03a5878cedff2ee9e694bb03ad4..1a987fe9bbfe4e59e6a10a0ef94e1b18ed874a9a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2902,7 +2902,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2896,7 +2896,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic case PERFORM_RESPAWN: if (this.player.wonGame) { this.player.wonGame = false; @@ -18,10 +18,10 @@ index 2723bb42f3618fa57f3996b7880484d88afb552d..8dc4eac46bb7f127cb23d3994308d6ce } else { if (this.player.getHealth() > 0.0F) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index b927d5b60e2571f4a7a56237d0da46e5162d6588..cffc11789ac3db3b5b674feac47785d693ae064a 100644 +index b41b9d9ac1e28f44eed4b6c56d63cb5f249b9ea7..4b00359d413058c49f79db8cdd81eaa1e729e3a7 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -813,6 +813,12 @@ public abstract class PlayerList { +@@ -820,6 +820,12 @@ public abstract class PlayerList { } public ServerPlayer respawn(ServerPlayer entityplayer, ServerLevel worldserver, boolean flag, Location location, boolean avoidSuffocation) { @@ -34,7 +34,7 @@ index b927d5b60e2571f4a7a56237d0da46e5162d6588..cffc11789ac3db3b5b674feac47785d6 entityplayer.stopRiding(); // CraftBukkit this.players.remove(entityplayer); this.playersByName.remove(entityplayer.getScoreboardName().toLowerCase(java.util.Locale.ROOT)); // Spigot -@@ -904,7 +910,7 @@ public abstract class PlayerList { +@@ -911,7 +917,7 @@ public abstract class PlayerList { } Player respawnPlayer = entityplayer1.getBukkitEntity(); diff --git a/patches/server/0642-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0642-additions-to-PlayerGameModeChangeEvent.patch index 38bab498e..1236b864d 100644 --- a/patches/server/0642-additions-to-PlayerGameModeChangeEvent.patch +++ b/patches/server/0642-additions-to-PlayerGameModeChangeEvent.patch @@ -126,10 +126,10 @@ index 32746dfbc2fdfc150583676b1bf0762398b76d75..1ad1f958a9b6e1bc21f1c505aa7ea549 } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 8dc4eac46bb7f127cb23d3994308d6ceb5dfedf5..1b6cad1fda904a1c76af508325c21c1db642e8ff 100644 +index 1a987fe9bbfe4e59e6a10a0ef94e1b18ed874a9a..66d5b3d44fb56aa6142f730e4742bb8f04f4d1c8 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2911,7 +2911,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2905,7 +2905,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player = this.server.getPlayerList().respawn(this.player, false); if (this.server.isHardcore()) { diff --git a/patches/server/0645-Move-range-check-for-block-placing-up.patch b/patches/server/0645-Move-range-check-for-block-placing-up.patch index 911af5fa0..bb8c5f2ba 100644 --- a/patches/server/0645-Move-range-check-for-block-placing-up.patch +++ b/patches/server/0645-Move-range-check-for-block-placing-up.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Move range check for block placing up diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1b6cad1fda904a1c76af508325c21c1db642e8ff..2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26 100644 +index 66d5b3d44fb56aa6142f730e4742bb8f04f4d1c8..da9001a29b2ec2f715336c8187e6c918dd32db5e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1836,6 +1836,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1830,6 +1830,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic ItemStack itemstack = this.player.getItemInHand(enumhand); BlockHitResult movingobjectpositionblock = packet.getHitResult(); Vec3 vec3d = movingobjectpositionblock.getLocation(); diff --git a/patches/server/0654-Add-PlayerKickEvent-causes.patch b/patches/server/0654-Add-PlayerKickEvent-causes.patch index 462caa2c4..cfd6959de 100644 --- a/patches/server/0654-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0654-Add-PlayerKickEvent-causes.patch @@ -57,10 +57,10 @@ index 65637a33ba171a4b598f70cd943d24b0ee44a69f..57a9146bf2dee7a60aab16716e25348f } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789de7659e6 100644 +index da9001a29b2ec2f715336c8187e6c918dd32db5e..b87d5dda2ac847cdc4c83b713568d9e9a37d0c8f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -375,7 +375,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -369,7 +369,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.clientIsFloating && !this.player.isSleeping() && !this.player.isPassenger()) { if (++this.aboveGroundTickCount > 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString()); @@ -69,7 +69,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return; } } else { -@@ -394,7 +394,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -388,7 +388,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) { if (++this.aboveGroundVehicleTickCount > 80) { ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString()); @@ -78,7 +78,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return; } } else { -@@ -416,7 +416,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -410,7 +410,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.keepAlivePending) { if (!this.processedDisconnect && elapsedTime >= KEEPALIVE_LIMIT) { // check keepalive limit, don't fire if already disconnected ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked due to keepalive timeout!", this.player.getScoreboardName()); // more info @@ -87,7 +87,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } } else { if (elapsedTime >= 15000L) { // 15 seconds -@@ -446,7 +446,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -440,7 +440,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > (long) (this.server.getPlayerIdleTimeout() * 1000 * 60)) { this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854 @@ -96,7 +96,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } this.chatPreviewThrottler.tick(); -@@ -470,16 +470,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -464,16 +464,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return this.server.isSingleplayerOwner(this.player.getGameProfile()); } @@ -126,7 +126,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 // Paper end // CraftBukkit start - fire PlayerKickEvent if (this.processedDisconnect) { -@@ -508,7 +518,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -502,7 +512,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic net.kyori.adventure.text.Component leaveMessage = net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? this.player.getBukkitEntity().displayName() : net.kyori.adventure.text.Component.text(this.player.getScoreboardName())); // Paper - Adventure @@ -135,7 +135,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 if (this.cserver.getServer().isRunning()) { this.cserver.getPluginManager().callEvent(event); -@@ -578,7 +588,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -572,7 +582,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleMoveVehicle(ServerboundMoveVehiclePacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(), packet.getY(), packet.getZ(), packet.getYRot(), packet.getXRot())) { @@ -144,7 +144,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } else { Entity entity = this.player.getRootVehicle(); -@@ -776,7 +786,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -770,7 +780,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (packet.getId() == this.awaitingTeleport) { if (this.awaitingPositionFromClient == null) { @@ -153,7 +153,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return; } -@@ -833,13 +843,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -827,13 +837,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); // Paper - run this async // CraftBukkit start if (this.chatSpamTickCount.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.tabSpamLimit && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // Paper start - split and make configurable @@ -169,7 +169,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return; } // Paper end -@@ -992,7 +1002,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -986,7 +996,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper start - validate pick item position if (!(packet.getSlot() >= 0 && packet.getSlot() < this.player.getInventory().items.size())) { ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString()); @@ -178,7 +178,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return; } this.player.getInventory().pickSlot(packet.getSlot()); // Paper - Diff above if changed -@@ -1179,7 +1189,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1173,7 +1183,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic int byteLength = testString.getBytes(java.nio.charset.StandardCharsets.UTF_8).length; if (byteLength > 256 * 4) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send a book with with a page too large!"); @@ -187,7 +187,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return; } byteTotal += byteLength; -@@ -1202,14 +1212,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1196,14 +1206,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (byteTotal > byteAllowed) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send too large of a book. Book Size: " + byteTotal + " - Allowed: "+ byteAllowed + " - Pages: " + pageList.size()); @@ -204,7 +204,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return; } this.lastBookTick = MinecraftServer.currentTick; -@@ -1333,7 +1343,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1327,7 +1337,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleMovePlayer(ServerboundMovePlayerPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (ServerGamePacketListenerImpl.containsInvalidValues(packet.getX(0.0D), packet.getY(0.0D), packet.getZ(0.0D), packet.getYRot(0.0F), packet.getXRot(0.0F))) { @@ -213,7 +213,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } else { ServerLevel worldserver = this.player.getLevel(); -@@ -1760,7 +1770,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1754,7 +1764,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.dropCount++; if (this.dropCount >= 20) { ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!"); @@ -222,7 +222,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return; } } -@@ -1968,7 +1978,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1962,7 +1972,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) { ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName()); @@ -231,7 +231,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } // Paper start PlayerResourcePackStatusEvent.Status packStatus = PlayerResourcePackStatusEvent.Status.values()[packet.action.ordinal()]; -@@ -2081,7 +2091,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2075,7 +2085,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.resetLastActionTime(); } else { ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString()); @@ -240,7 +240,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } } -@@ -2094,7 +2104,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2088,7 +2098,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) { @@ -249,7 +249,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } else { if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) { // this.server.submit(() -> { // CraftBukkit - async chat -@@ -2122,7 +2132,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2116,7 +2126,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) { @@ -258,7 +258,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } else { if (this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages())) { this.server.submit(() -> { -@@ -2208,7 +2218,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2202,7 +2212,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private boolean 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); @@ -267,7 +267,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return false; } else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false)); -@@ -2467,7 +2477,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2461,7 +2471,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (!playerchatmessage.verify(chatsender)) { @@ -276,7 +276,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return false; } } -@@ -2495,7 +2505,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2489,7 +2499,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // this.chatSpamTickCount += 20; if (this.chatSpamTickCount.addAndGet(20) > 200 && !this.server.getPlayerList().isOp(this.player.getGameProfile())) { // CraftBukkit end @@ -285,7 +285,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } } -@@ -2598,7 +2608,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2592,7 +2602,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private void handleValidationFailure(Set reasons) { ServerGamePacketListenerImpl.LOGGER.warn("Failed to validate message from {}, reasons: {}", this.player.getName().getString(), reasons.stream().map(LastSeenMessagesValidator.ErrorCondition::message).collect(Collectors.joining(","))); @@ -294,7 +294,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } @Override -@@ -2745,7 +2755,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2739,7 +2749,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (i > 4096) { @@ -303,7 +303,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } } -@@ -2760,7 +2770,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2754,7 +2764,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Spigot Start if ( entity == this.player && !this.player.isSpectator() ) { @@ -312,7 +312,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return; } // Spigot End -@@ -2858,7 +2868,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2852,7 +2862,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end } else { @@ -321,7 +321,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString()); } } -@@ -3266,7 +3276,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3260,7 +3270,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper start if (!org.bukkit.Bukkit.isPrimaryThread()) { if (recipeSpamPackets.addAndGet(io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamIncrement) > io.papermc.paper.configuration.GlobalConfiguration.get().spamLimiter.recipeSpamLimit) { @@ -330,7 +330,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 return; } } -@@ -3469,7 +3479,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3463,7 +3473,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } else if (!this.isSingleplayerOwner()) { // Paper start - This needs to be handled on the main thread for plugins server.submit(() -> { @@ -339,7 +339,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 }); // Paper end } -@@ -3515,7 +3525,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3509,7 +3519,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex); @@ -348,7 +348,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } } else if (packet.identifier.equals(CUSTOM_UNREGISTER)) { try { -@@ -3525,7 +3535,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3519,7 +3529,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex); @@ -357,7 +357,7 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } } else { try { -@@ -3543,7 +3553,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3537,7 +3547,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data); } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); @@ -367,10 +367,10 @@ index 2da9dd2b5cc0f9e74976e4c927ebf3130aaa1b26..32262185c3997c17f1b5b1847f768789 } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index cffc11789ac3db3b5b674feac47785d693ae064a..dfc7eb831bc97535385f2471187e0c0a088aa023 100644 +index 4b00359d413058c49f79db8cdd81eaa1e729e3a7..07423d228b91d1482498c2e22bc23bf3ae997a38 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -722,7 +722,7 @@ public abstract class PlayerList { +@@ -729,7 +729,7 @@ public abstract class PlayerList { while (iterator.hasNext()) { entityplayer = (ServerPlayer) iterator.next(); this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved @@ -379,7 +379,7 @@ index cffc11789ac3db3b5b674feac47785d693ae064a..dfc7eb831bc97535385f2471187e0c0a } // Instead of kicking then returning, we need to store the kick reason -@@ -1353,8 +1353,8 @@ public abstract class PlayerList { +@@ -1360,8 +1360,8 @@ public abstract class PlayerList { // Paper end // CraftBukkit start - disconnect safely for (ServerPlayer player : this.players) { diff --git a/patches/server/0671-Ensure-disconnect-for-book-edit-is-called-on-main.patch b/patches/server/0671-Ensure-disconnect-for-book-edit-is-called-on-main.patch index 1901b7c97..8dfe520cc 100644 --- a/patches/server/0671-Ensure-disconnect-for-book-edit-is-called-on-main.patch +++ b/patches/server/0671-Ensure-disconnect-for-book-edit-is-called-on-main.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Ensure disconnect for book edit is called on main diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 32262185c3997c17f1b5b1847f768789de7659e6..c59cfe44536b62e1853903bd22990197b9d85083 100644 +index b87d5dda2ac847cdc4c83b713568d9e9a37d0c8f..6d3929916da5ea45c5f9f3d0d11b3bd4db9660ef 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1219,7 +1219,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1213,7 +1213,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Paper end // CraftBukkit start if (this.lastBookTick + 20 > MinecraftServer.currentTick) { diff --git a/patches/server/0675-Adds-PlayerArmSwingEvent.patch b/patches/server/0675-Adds-PlayerArmSwingEvent.patch index 60040336f..be2b656c7 100644 --- a/patches/server/0675-Adds-PlayerArmSwingEvent.patch +++ b/patches/server/0675-Adds-PlayerArmSwingEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Adds PlayerArmSwingEvent diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index c59cfe44536b62e1853903bd22990197b9d85083..93dc44365bb3140a4b6989f1d520091c4b35e76e 100644 +index 6d3929916da5ea45c5f9f3d0d11b3bd4db9660ef..47043ebc5054a03ac56d171dc0c8c54bff0230c3 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2639,7 +2639,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2633,7 +2633,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Arm swing animation diff --git a/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch b/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch index 58fd38e05..843edab18 100644 --- a/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch +++ b/patches/server/0676-Fixes-kick-event-leave-message-not-being-sent.patch @@ -17,10 +17,10 @@ index 9a60cf249e0b9f089b0966c670e6046e7e1ed08a..787f2b23352fbfb66a76ca5fce6de94c public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 93dc44365bb3140a4b6989f1d520091c4b35e76e..e1b3045d4fa6f69e9d70279980ab7ef46404e782 100644 +index 47043ebc5054a03ac56d171dc0c8c54bff0230c3..513a0e9c941a3ce7c3123d2476454ccc21dbeeba 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -528,7 +528,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -522,7 +522,6 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Do not kick the player return; } @@ -28,7 +28,7 @@ index 93dc44365bb3140a4b6989f1d520091c4b35e76e..e1b3045d4fa6f69e9d70279980ab7ef4 // Send the possibly modified leave message final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure // CraftBukkit end -@@ -537,7 +536,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -531,7 +530,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.connection.send(new ClientboundDisconnectPacket(ichatbasecomponent), PacketSendListener.thenRun(() -> { this.connection.disconnect(ichatbasecomponent); })); @@ -37,7 +37,7 @@ index 93dc44365bb3140a4b6989f1d520091c4b35e76e..e1b3045d4fa6f69e9d70279980ab7ef4 this.connection.setReadOnly(); MinecraftServer minecraftserver = this.server; Connection networkmanager = this.connection; -@@ -2003,6 +2002,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1997,6 +1996,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void onDisconnect(Component reason) { @@ -49,7 +49,7 @@ index 93dc44365bb3140a4b6989f1d520091c4b35e76e..e1b3045d4fa6f69e9d70279980ab7ef4 // CraftBukkit start - Rarely it would send a disconnect line twice if (this.processedDisconnect) { return; -@@ -2019,7 +2023,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2013,7 +2017,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player.disconnect(); // Paper start - Adventure @@ -59,10 +59,10 @@ index 93dc44365bb3140a4b6989f1d520091c4b35e76e..e1b3045d4fa6f69e9d70279980ab7ef4 this.server.getPlayerList().broadcastSystemMessage(PaperAdventure.asVanilla(quitMessage), false); // Paper end diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index dfc7eb831bc97535385f2471187e0c0a088aa023..0e70a431219c8c0a13cb3c9059d8a77ee2f1ca55 100644 +index 07423d228b91d1482498c2e22bc23bf3ae997a38..f239acbf6ad778b06bbaf3e03aef9963e5467d0b 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -594,6 +594,11 @@ public abstract class PlayerList { +@@ -601,6 +601,11 @@ public abstract class PlayerList { } public net.kyori.adventure.text.Component remove(ServerPlayer entityplayer) { // Paper - return Component @@ -74,7 +74,7 @@ index dfc7eb831bc97535385f2471187e0c0a088aa023..0e70a431219c8c0a13cb3c9059d8a77e ServerLevel worldserver = entityplayer.getLevel(); entityplayer.awardStat(Stats.LEAVE_GAME); -@@ -604,7 +609,7 @@ public abstract class PlayerList { +@@ -611,7 +616,7 @@ public abstract class PlayerList { entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper } diff --git a/patches/server/0688-Prevent-AFK-kick-while-watching-end-credits.patch b/patches/server/0688-Prevent-AFK-kick-while-watching-end-credits.patch index 256b53226..ac9275d80 100644 --- a/patches/server/0688-Prevent-AFK-kick-while-watching-end-credits.patch +++ b/patches/server/0688-Prevent-AFK-kick-while-watching-end-credits.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent AFK kick while watching end credits. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e1b3045d4fa6f69e9d70279980ab7ef46404e782..6a20b0265b278593c87f61206785090b9392f6d6 100644 +index 513a0e9c941a3ce7c3123d2476454ccc21dbeeba..fe2b99d0cde747c86cdc04c3d48f717b94747101 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -444,7 +444,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -438,7 +438,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic --this.dropSpamTickCount; } diff --git a/patches/server/0690-Add-PlayerSetSpawnEvent.patch b/patches/server/0690-Add-PlayerSetSpawnEvent.patch index 8e714a1f6..8fc9df37b 100644 --- a/patches/server/0690-Add-PlayerSetSpawnEvent.patch +++ b/patches/server/0690-Add-PlayerSetSpawnEvent.patch @@ -89,10 +89,10 @@ index 56ac440465813a7dab8d166e882e18143a50729f..80e1970f568a74a43e624188a77cfbd2 public void trackChunk(ChunkPos chunkPos, Packet chunkDataPacket) { diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 0e70a431219c8c0a13cb3c9059d8a77ee2f1ca55..18772fd8a4b90ef39f208ed45355e5c3ccf06657 100644 +index f239acbf6ad778b06bbaf3e03aef9963e5467d0b..66dcd4141ee3b650c4e7a6de2456eb3eb19ea287 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -898,13 +898,13 @@ public abstract class PlayerList { +@@ -905,13 +905,13 @@ public abstract class PlayerList { f1 = (float) Mth.wrapDegrees(Mth.atan2(vec3d1.z, vec3d1.x) * 57.2957763671875D - 90.0D); } diff --git a/patches/server/0768-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch b/patches/server/0768-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch index 4377fac5e..0f32675f8 100644 --- a/patches/server/0768-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch +++ b/patches/server/0768-Don-t-respond-to-ServerboundCommandSuggestionPacket-.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Don't respond to ServerboundCommandSuggestionPacket when diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6a20b0265b278593c87f61206785090b9392f6d6..aecf10bddc2607924f716791315333d93e78bddf 100644 +index fe2b99d0cde747c86cdc04c3d48f717b94747101..f63ff3240b477e86e45bd7572ab0dda308bab5f3 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -853,6 +853,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -847,6 +847,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Paper end // CraftBukkit end diff --git a/patches/server/0793-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0793-Hide-unnecessary-itemmeta-from-clients.patch index ae7f6deb5..f360bfdbd 100644 --- a/patches/server/0793-Hide-unnecessary-itemmeta-from-clients.patch +++ b/patches/server/0793-Hide-unnecessary-itemmeta-from-clients.patch @@ -18,10 +18,10 @@ index 319dfa82dff1fe188a52bed5aa2d39575853b793..919758363c7b703cb200582768e68c97 } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index aecf10bddc2607924f716791315333d93e78bddf..52a5df31e7e0420c0cebeca4f9bfc1c981b8e128 100644 +index f63ff3240b477e86e45bd7572ab0dda308bab5f3..583f61adf2122ff94be79814a04616a42a827f75 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2824,8 +2824,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2818,8 +2818,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Paper end // SPIGOT-7136 - Allays diff --git a/patches/server/0800-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch b/patches/server/0800-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch index b0da4e34b..74fdb0cea 100644 --- a/patches/server/0800-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch +++ b/patches/server/0800-Highly-optimise-single-and-multi-AABB-VoxelShapes-an.patch @@ -1202,10 +1202,10 @@ index 97de35c614e1e9b0e825f9914173a3e1e0e53221..b35b36527294dd697d146d2ad817d791 } } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index eea9ff2418324de3d5158cce8fbe1257e2fa4e4f..bbaabf47ff303353660042609c045f2e5f4391fb 100644 +index fa7885b5ecde24e0d6bd3e8aa49668859ce275ed..0c8e0ce1e02c5865bef855ca8f68c6dfb06eca82 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -939,7 +939,7 @@ public abstract class PlayerList { +@@ -946,7 +946,7 @@ public abstract class PlayerList { // CraftBukkit end worldserver1.getChunkSource().addRegionTicket(net.minecraft.server.level.TicketType.POST_TELEPORT, new net.minecraft.world.level.ChunkPos(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper diff --git a/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch b/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch index 2f406412e..357ae5a70 100644 --- a/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch +++ b/patches/server/0801-Optimise-collision-checking-in-player-move-packet-ha.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Optimise collision checking in player move packet handling Move collision logic to just the hasNewCollision call instead of getCubes + hasNewCollision diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95e29be9a8 100644 +index 583f61adf2122ff94be79814a04616a42a827f75..5c9d7320536be70100f7e1d843e8c4e0c0802a19 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -661,7 +661,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -655,7 +655,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } @@ -18,7 +18,7 @@ index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95 d6 = d3 - this.vehicleLastGoodX; // Paper - diff on change, used for checking large move vectors above d7 = d4 - this.vehicleLastGoodY - 1.0E-6D; // Paper - diff on change, used for checking large move vectors above -@@ -669,6 +669,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -663,6 +663,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag1 = entity.verticalCollisionBelow; entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8)); @@ -26,7 +26,7 @@ index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95 double d11 = d7; d6 = d3 - entity.getX(); -@@ -682,16 +683,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -676,16 +677,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag2 = false; if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot @@ -54,7 +54,7 @@ index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95 entity.absMoveTo(d0, d1, d2, f, f1); this.player.absMoveTo(d0, d1, d2, this.player.getYRot(), this.player.getXRot()); // CraftBukkit this.connection.send(new ClientboundMoveVehiclePacket(entity)); -@@ -777,7 +786,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -771,7 +780,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } private boolean noBlocksAround(Entity entity) { @@ -88,7 +88,7 @@ index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95 } @Override -@@ -1357,7 +1391,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1351,7 +1385,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (this.awaitingPositionFromClient != null) { @@ -97,7 +97,7 @@ index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95 this.awaitingTeleportTime = this.tickCount; this.teleport(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot()); } -@@ -1451,7 +1485,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1445,7 +1479,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } @@ -106,7 +106,7 @@ index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95 d7 = d0 - this.lastGoodX; // Paper - diff on change, used for checking large move vectors above d8 = d1 - this.lastGoodY; // Paper - diff on change, used for checking large move vectors above -@@ -1492,6 +1526,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1486,6 +1520,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag1 = this.player.verticalCollisionBelow; this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9)); @@ -114,7 +114,7 @@ index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95 this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move // Paper start - prevent position desync if (this.awaitingPositionFromClient != null) { -@@ -1511,12 +1546,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1505,12 +1540,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic boolean flag2 = false; if (!this.player.isChangingDimension() && d11 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot @@ -140,7 +140,7 @@ index 52a5df31e7e0420c0cebeca4f9bfc1c981b8e128..36c37ae73696a5fe443e7fd6614bca95 this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet(), false); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet. } else { // CraftBukkit start - fire PlayerMoveEvent -@@ -1602,6 +1648,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1596,6 +1642,27 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } diff --git a/patches/server/0821-Validate-usernames.patch b/patches/server/0821-Validate-usernames.patch index 7ee4004d1..8422e5331 100644 --- a/patches/server/0821-Validate-usernames.patch +++ b/patches/server/0821-Validate-usernames.patch @@ -56,10 +56,10 @@ index acd581d14e0ef1fe5a6545ee67be00deff589879..553eb8e437b07376dbfc54b0018bcc3f GameProfile gameprofile = this.server.getSingleplayerProfile(); diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index bbaabf47ff303353660042609c045f2e5f4391fb..774b6058553683e0e13989212b4ff8cd46239d2b 100644 +index 0c8e0ce1e02c5865bef855ca8f68c6dfb06eca82..04d2f469dc045152c4fad0427d4d16d80d508f3f 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -710,7 +710,7 @@ public abstract class PlayerList { +@@ -717,7 +717,7 @@ public abstract class PlayerList { for (int i = 0; i < this.players.size(); ++i) { entityplayer = (ServerPlayer) this.players.get(i); diff --git a/patches/server/0832-Kick-on-main-for-illegal-chat.patch b/patches/server/0832-Kick-on-main-for-illegal-chat.patch index 475571bd7..06510268a 100644 --- a/patches/server/0832-Kick-on-main-for-illegal-chat.patch +++ b/patches/server/0832-Kick-on-main-for-illegal-chat.patch @@ -7,10 +7,10 @@ Makes the PlayerKickEvent fire on the main thread for illegal characters or chat out-of-order errors. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 36c37ae73696a5fe443e7fd6614bca95e29be9a8..e16de9e1cf9c6d5377f7ce434cc737056093e71f 100644 +index 5c9d7320536be70100f7e1d843e8c4e0c0802a19..26402aa8879e4e50c619c1e9d8e30ef49c3b8a34 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2180,7 +2180,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2174,7 +2174,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.message())) { @@ -20,7 +20,7 @@ index 36c37ae73696a5fe443e7fd6614bca95e29be9a8..e16de9e1cf9c6d5377f7ce434cc73705 } else { if (this.tryHandleChat(packet.message(), packet.timeStamp(), packet.lastSeenMessages())) { // this.server.submit(() -> { // CraftBukkit - async chat -@@ -2208,7 +2210,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2202,7 +2204,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleChatCommand(ServerboundChatCommandPacket packet) { if (ServerGamePacketListenerImpl.isChatMessageIllegal(packet.command())) { @@ -30,7 +30,7 @@ index 36c37ae73696a5fe443e7fd6614bca95e29be9a8..e16de9e1cf9c6d5377f7ce434cc73705 } else { if (this.tryHandleChat(packet.command(), packet.timeStamp(), packet.lastSeenMessages())) { this.server.submit(() -> { -@@ -2294,7 +2298,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2288,7 +2292,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private boolean tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { ServerGamePacketListenerImpl.LOGGER.warn("{} sent out-of-order chat: '{}'", this.player.getName().getString(), message); diff --git a/patches/server/0854-Replace-player-chunk-loader-system.patch b/patches/server/0854-Replace-player-chunk-loader-system.patch index 71fa99032..cb165d308 100644 --- a/patches/server/0854-Replace-player-chunk-loader-system.patch +++ b/patches/server/0854-Replace-player-chunk-loader-system.patch @@ -1900,7 +1900,7 @@ index b35b36527294dd697d146d2ad817d7911145ae8c..18c3d4aecf498f78040c27336d2ea56f + public final int getViewDistance() { throw new UnsupportedOperationException("Use PlayerChunkLoader"); } // Paper - placeholder } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 774b6058553683e0e13989212b4ff8cd46239d2b..5783f5000b02a2af708ceb3dc11cd1e697c5e9d4 100644 +index 04d2f469dc045152c4fad0427d4d16d80d508f3f..525b385cfd216f8ff2de02439c5cd0f8d77c5d42 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -274,7 +274,7 @@ public abstract class PlayerList { @@ -1912,7 +1912,7 @@ index 774b6058553683e0e13989212b4ff8cd46239d2b..5783f5000b02a2af708ceb3dc11cd1e6 player.getBukkitEntity().sendSupportedChannels(); // CraftBukkit playerconnection.send(new ClientboundCustomPayloadPacket(ClientboundCustomPayloadPacket.BRAND, (new FriendlyByteBuf(Unpooled.buffer())).writeUtf(this.getServer().getServerModName()))); playerconnection.send(new ClientboundChangeDifficultyPacket(worlddata.getDifficulty(), worlddata.isDifficultyLocked())); -@@ -945,8 +945,8 @@ public abstract class PlayerList { +@@ -952,8 +952,8 @@ public abstract class PlayerList { // CraftBukkit start LevelData worlddata = worldserver1.getLevelData(); entityplayer1.connection.send(new ClientboundRespawnPacket(worldserver1.dimensionTypeId(), worldserver1.dimension(), BiomeManager.obfuscateSeed(worldserver1.getSeed()), entityplayer1.gameMode.getGameModeForPlayer(), entityplayer1.gameMode.getPreviousGameModeForPlayer(), worldserver1.isDebug(), worldserver1.isFlat(), flag, entityplayer1.getLastDeathLocation())); @@ -1923,7 +1923,7 @@ index 774b6058553683e0e13989212b4ff8cd46239d2b..5783f5000b02a2af708ceb3dc11cd1e6 entityplayer1.spawnIn(worldserver1); entityplayer1.unsetRemoved(); entityplayer1.connection.teleport(new Location(worldserver1.getWorld(), entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot())); -@@ -1515,7 +1515,7 @@ public abstract class PlayerList { +@@ -1522,7 +1522,7 @@ public abstract class PlayerList { public void setViewDistance(int viewDistance) { this.viewDistance = viewDistance; @@ -1932,7 +1932,7 @@ index 774b6058553683e0e13989212b4ff8cd46239d2b..5783f5000b02a2af708ceb3dc11cd1e6 Iterator iterator = this.server.getAllLevels().iterator(); while (iterator.hasNext()) { -@@ -1530,7 +1530,7 @@ public abstract class PlayerList { +@@ -1537,7 +1537,7 @@ public abstract class PlayerList { public void setSimulationDistance(int simulationDistance) { this.simulationDistance = simulationDistance; diff --git a/patches/server/0856-Force-close-world-loading-screen.patch b/patches/server/0856-Force-close-world-loading-screen.patch index ff378640a..e55a25678 100644 --- a/patches/server/0856-Force-close-world-loading-screen.patch +++ b/patches/server/0856-Force-close-world-loading-screen.patch @@ -10,10 +10,10 @@ so we do not need that. The client only needs the chunk it is currently in to be loaded to close the loading screen, so we just send an empty one. diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 5783f5000b02a2af708ceb3dc11cd1e697c5e9d4..569c67206ad97d198311f780e7469016366e34b5 100644 +index 525b385cfd216f8ff2de02439c5cd0f8d77c5d42..26345ddd671175b9dfd457750ae0da7042ec649f 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -425,6 +425,16 @@ public abstract class PlayerList { +@@ -432,6 +432,16 @@ public abstract class PlayerList { // Paper start - move vehicle into method so it can be called above - short circuit around that code onPlayerJoinFinish(player, worldserver1, s1); diff --git a/patches/server/0863-Don-t-allow-vehicle-movement-from-players-while-tele.patch b/patches/server/0863-Don-t-allow-vehicle-movement-from-players-while-tele.patch index 933fa4076..c3a6450e6 100644 --- a/patches/server/0863-Don-t-allow-vehicle-movement-from-players-while-tele.patch +++ b/patches/server/0863-Don-t-allow-vehicle-movement-from-players-while-tele.patch @@ -7,10 +7,10 @@ Bring the vehicle move packet behavior in line with the regular player move packet. diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e16de9e1cf9c6d5377f7ce434cc737056093e71f..995cf6908108844299e582581a99d195a99df15b 100644 +index 26402aa8879e4e50c619c1e9d8e30ef49c3b8a34..faf63674f8c1ebc5f8dea1a937811f0d9e9d1d96 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -591,6 +591,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -585,6 +585,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } else { Entity entity = this.player.getRootVehicle(); diff --git a/patches/server/0879-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0879-Prevent-tile-entity-copies-loading-chunks.patch index d01f0f530..529185de4 100644 --- a/patches/server/0879-Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/0879-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 995cf6908108844299e582581a99d195a99df15b..d35a49294b344f2e5fd22738a259021e72392596 100644 +index faf63674f8c1ebc5f8dea1a937811f0d9e9d1d96..99efa1950b56d719f210cad5989b5535e2d3c934 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3419,7 +3419,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3413,7 +3413,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); if (this.player.level.isLoaded(blockposition)) { diff --git a/patches/server/0880-Use-username-instead-of-display-name-in-PlayerList-g.patch b/patches/server/0880-Use-username-instead-of-display-name-in-PlayerList-g.patch index 2e9d7e9f2..0c9a4f6f9 100644 --- a/patches/server/0880-Use-username-instead-of-display-name-in-PlayerList-g.patch +++ b/patches/server/0880-Use-username-instead-of-display-name-in-PlayerList-g.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use username instead of display name in diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 569c67206ad97d198311f780e7469016366e34b5..8326775a4005b03468fba1ec556f951dc740c302 100644 +index 26345ddd671175b9dfd457750ae0da7042ec649f..e1b6017953edffcea0be81b70cf7b22ce8c0570d 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1479,7 +1479,7 @@ public abstract class PlayerList { +@@ -1486,7 +1486,7 @@ public abstract class PlayerList { // CraftBukkit start public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) { ServerStatsCounter serverstatisticmanager = entityhuman.getStats(); diff --git a/patches/server/0882-Pass-ServerLevel-for-gamerule-callbacks.patch b/patches/server/0882-Pass-ServerLevel-for-gamerule-callbacks.patch index 049470071..649425acb 100644 --- a/patches/server/0882-Pass-ServerLevel-for-gamerule-callbacks.patch +++ b/patches/server/0882-Pass-ServerLevel-for-gamerule-callbacks.patch @@ -18,10 +18,10 @@ index 20670bc075c387ee0422eb1014207e26105efccd..bdd6560fe85950b0a857a949cb38c044 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 d35a49294b344f2e5fd22738a259021e72392596..f047f1027c5556b4dd7fe51875f075b3ba515c7f 100644 +index 99efa1950b56d719f210cad5989b5535e2d3c934..a7285b0e6c256d475c43b38a6d78f2f1f4bd17f5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3015,7 +3015,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3009,7 +3009,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/server/0893-Do-not-accept-invalid-client-settings.patch b/patches/server/0893-Do-not-accept-invalid-client-settings.patch index e45f54588..967f0644a 100644 --- a/patches/server/0893-Do-not-accept-invalid-client-settings.patch +++ b/patches/server/0893-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 f047f1027c5556b4dd7fe51875f075b3ba515c7f..82230f8f4e7f5287fe7f2da9ad5ad7d86ff28782 100644 +index a7285b0e6c256d475c43b38a6d78f2f1f4bd17f5..603e404e75d39279fa5c4222ec5373271dd1ae64 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3598,6 +3598,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3592,6 +3592,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleClientInformation(ServerboundClientInformationPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); diff --git a/patches/server/0911-Don-t-print-component-in-resource-pack-rejection-mes.patch b/patches/server/0911-Don-t-print-component-in-resource-pack-rejection-mes.patch index 683453db4..925d8eda8 100644 --- a/patches/server/0911-Don-t-print-component-in-resource-pack-rejection-mes.patch +++ b/patches/server/0911-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 82230f8f4e7f5287fe7f2da9ad5ad7d86ff28782..9f5879498999ad421cec055eaf3b031a4e10b1fc 100644 +index 603e404e75d39279fa5c4222ec5373271dd1ae64..b3e165a7731c272e4ad0adf1c5250d230f8d649c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2054,7 +2054,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2048,7 +2048,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/server/0915-Add-some-minimal-debug-information-to-chat-packet-er.patch b/patches/server/0915-Add-some-minimal-debug-information-to-chat-packet-er.patch index dcf893dfd..27a8f5fb1 100644 --- a/patches/server/0915-Add-some-minimal-debug-information-to-chat-packet-er.patch +++ b/patches/server/0915-Add-some-minimal-debug-information-to-chat-packet-er.patch @@ -6,10 +6,10 @@ 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 9f5879498999ad421cec055eaf3b031a4e10b1fc..421f8d21f3edb65b42bf7228989bd95877976e06 100644 +index b3e165a7731c272e4ad0adf1c5250d230f8d649c..b91e901792ea967e6612bfe74d73ad9bcfce4ed2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2303,7 +2303,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2297,7 +2297,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private boolean tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { @@ -18,7 +18,7 @@ index 9f5879498999ad421cec055eaf3b031a4e10b1fc..421f8d21f3edb65b42bf7228989bd958 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 }); // Paper - push to main -@@ -2571,7 +2571,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2565,7 +2565,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } if (playerchatmessage.hasExpiredServer(Instant.now())) { diff --git a/patches/server/0917-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch b/patches/server/0917-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch index 124437ae7..f982df386 100644 --- a/patches/server/0917-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch +++ b/patches/server/0917-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 421f8d21f3edb65b42bf7228989bd95877976e06..e2197e11f8ec49495802f7d265709d716bc0524c 100644 +index b91e901792ea967e6612bfe74d73ad9bcfce4ed2..13c253b1d7f6d4713135baba2bc2ad9cd84224f8 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2591,7 +2591,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2585,7 +2585,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Spigot end // this.chatSpamTickCount += 20; diff --git a/patches/server/0919-More-Teleport-API.patch b/patches/server/0919-More-Teleport-API.patch index e3daa5b39..735a1effb 100644 --- a/patches/server/0919-More-Teleport-API.patch +++ b/patches/server/0919-More-Teleport-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More Teleport API diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index e2197e11f8ec49495802f7d265709d716bc0524c..ad6ae4a8c9e5af5f75d796add202bd8b2dec701a 100644 +index 13c253b1d7f6d4713135baba2bc2ad9cd84224f8..0e365529695321ab2b164c75d4c67bdd2f51492d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1735,11 +1735,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1729,11 +1729,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return false; // CraftBukkit - Return event status } diff --git a/patches/server/0922-Send-block-entities-after-destroy-prediction.patch b/patches/server/0922-Send-block-entities-after-destroy-prediction.patch index 66eaf9d3a..9796172b9 100644 --- a/patches/server/0922-Send-block-entities-after-destroy-prediction.patch +++ b/patches/server/0922-Send-block-entities-after-destroy-prediction.patch @@ -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 ad6ae4a8c9e5af5f75d796add202bd8b2dec701a..d030574fbd282c018898b64b6ced9749f54cb813 100644 +index 0e365529695321ab2b164c75d4c67bdd2f51492d..6296683d900fa30b784e4e345856bdc3b175fb5e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1880,8 +1880,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1874,8 +1874,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } // Paper end - Don't allow digging in unloaded chunks diff --git a/patches/server/0928-Fix-command-preprocess-cancelling-and-command-changi.patch b/patches/server/0928-Fix-command-preprocess-cancelling-and-command-changi.patch index 691f427e1..dcb37bcd3 100644 --- a/patches/server/0928-Fix-command-preprocess-cancelling-and-command-changi.patch +++ b/patches/server/0928-Fix-command-preprocess-cancelling-and-command-changi.patch @@ -5,10 +5,10 @@ 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 d030574fbd282c018898b64b6ced9749f54cb813..50d89accf52799de11ab0488e9353ca40f2de3dd 100644 +index 6296683d900fa30b784e4e345856bdc3b175fb5e..c478693c3829937f64b9bed5d69fcfd2d7759a00 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2264,13 +2264,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2258,13 +2258,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command, new LazyPlayerSet(this.server)); this.cserver.getPluginManager().callEvent(event); diff --git a/patches/server/0930-Add-async-catcher-to-PlayerConnection-internalTelepo.patch b/patches/server/0930-Add-async-catcher-to-PlayerConnection-internalTelepo.patch index a78a24d0a..37115a72a 100644 --- a/patches/server/0930-Add-async-catcher-to-PlayerConnection-internalTelepo.patch +++ b/patches/server/0930-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 50d89accf52799de11ab0488e9353ca40f2de3dd..c3a5aa2cbfeef1d2841ef85d135a2f6e0a7a2f61 100644 +index c478693c3829937f64b9bed5d69fcfd2d7759a00..325def3149693f64b2b21e0e655b5b3e888fd9a0 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1763,6 +1763,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1757,6 +1757,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } public void internalTeleport(double d0, double d1, double d2, float f, float f1, Set set, boolean flag) {