From df5fb9475b9fa9eb4bf1d4840e31f8615fc4f7e3 Mon Sep 17 00:00:00 2001 From: Owen <23108066+Owen1212055@users.noreply.github.com> Date: Sat, 5 Nov 2022 14:50:16 -0400 Subject: [PATCH] Properly resend entities (#7041) --- .../0305-Properly-resend-entities.patch | 147 ++++++++++++++++++ ...ity-Metadata-for-all-tracked-players.patch | 43 ----- ...27-Dont-send-unnecessary-sign-update.patch | 4 +- ...llocation-of-Vec3D-by-entity-tracker.patch | 6 +- ...implement-PlayerRecipeBookClickEvent.patch | 4 +- ...ld-Difficulty-Remembering-Difficulty.patch | 4 +- patches/server/0462-Brand-support.patch | 8 +- .../server/0520-Limit-recipe-packets.patch | 4 +- ...d-RespawnFlags-to-PlayerRespawnEvent.patch | 4 +- ...ditions-to-PlayerGameModeChangeEvent.patch | 4 +- .../0640-Add-PlayerKickEvent-causes.patch | 14 +- ...mize-entity-tracker-passenger-checks.patch | 4 +- ...tem-frame-map-cursor-update-interval.patch | 4 +- ...-packets-for-hard-colliding-entities.patch | 4 +- ...oversized-item-data-in-equipment-and.patch | 4 +- ...de-unnecessary-itemmeta-from-clients.patch | 8 +- .../0818-Fix-Entity-Position-Desync.patch | 4 +- ...nt-tile-entity-copies-loading-chunks.patch | 4 +- ...s-ServerLevel-for-gamerule-callbacks.patch | 6 +- ...o-not-accept-invalid-client-settings.patch | 4 +- 20 files changed, 194 insertions(+), 90 deletions(-) create mode 100644 patches/server/0305-Properly-resend-entities.patch delete mode 100644 patches/server/0305-Update-entity-Metadata-for-all-tracked-players.patch diff --git a/patches/server/0305-Properly-resend-entities.patch b/patches/server/0305-Properly-resend-entities.patch new file mode 100644 index 0000000000..eff903a1db --- /dev/null +++ b/patches/server/0305-Properly-resend-entities.patch @@ -0,0 +1,147 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> +Date: Fri, 22 Mar 2019 22:24:03 -0700 +Subject: [PATCH] Properly resend entities + +This resolves some issues which caused entities to not be resent correctly. +Entities that are interacted with need to be resent to the client, so we resend all the entity +data to the player whilst making sure not to clear dirty entries from the tracker. This makes +sure that values will be correctly updated to other players. + +See: https://github.com/PaperMC/Paper/pull/1896 + +Co-authored-by: AgentTroll m + +diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEntityDataPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEntityDataPacket.java +index 3e17f6131bf590d7c4a16b79c1c145cb4f565bc9..bf838c097aeb79fbe82c0b6cdf3315acf03474cd 100644 +--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEntityDataPacket.java ++++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetEntityDataPacket.java +@@ -12,10 +12,15 @@ public class ClientboundSetEntityDataPacket implements Packet> packedItems; + + public ClientboundSetEntityDataPacket(int id, SynchedEntityData tracker, boolean forceUpdateAll) { ++ // Paper start ++ this(id, tracker, forceUpdateAll, true); ++ } ++ public ClientboundSetEntityDataPacket(int id, SynchedEntityData tracker, boolean forceUpdateAll, boolean clearDirty) { ++ // Paper end + this.id = id; + if (forceUpdateAll) { + this.packedItems = tracker.getAll(); +- tracker.clearDirty(); ++ if (clearDirty) tracker.clearDirty(); // Paper + } else { + this.packedItems = tracker.packDirty(); + } +diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java +index b6034a7f6748a87669326e1bcfde351757e88234..2077f0cea1735e33243f0d63156cb4b0a8bacc22 100644 +--- a/src/main/java/net/minecraft/server/level/ChunkMap.java ++++ b/src/main/java/net/minecraft/server/level/ChunkMap.java +@@ -1194,5 +1194,24 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider + } + + } ++ // Paper start ++ // This method should only be used if the data of an entity could have became desynced ++ // due to interactions on the client. ++ public void resendPossiblyDesyncedEntity(ServerPlayer player) { ++ if (player.getBukkitEntity().canSee(entity.getBukkitEntity())) { ++ // This will prevent the entity data from being cleared, so that ONLY this player ++ // will have its entity data updated and it won't dirty the datatracker for other players. ++ this.serverEntity.clearDirtyEntityData = false; ++ this.serverEntity.sendPairingData(player.connection::send, player); ++ this.serverEntity.clearDirtyEntityData = true; ++ } ++ } ++ ++ public void resendPossiblyDesyncedEntityData(ServerPlayer player) { ++ if (player.getBukkitEntity().canSee(entity.getBukkitEntity())) { ++ player.connection.send(new net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData(), true, false)); ++ } ++ } ++ // Paper end + } + } +diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java +index d6f34adbdf45bbef4a39e629dd7cb6d7fcb5db0f..286a14aafe2e8b4662515165ede8a74833897f33 100644 +--- a/src/main/java/net/minecraft/server/level/ServerEntity.java ++++ b/src/main/java/net/minecraft/server/level/ServerEntity.java +@@ -66,6 +66,7 @@ public class ServerEntity { + private boolean wasOnGround; + // CraftBukkit start + final Set trackedPlayers; // Paper - private -> package ++ public boolean clearDirtyEntityData = true; // Paper + + public ServerEntity(ServerLevel worldserver, Entity entity, int i, boolean flag, Consumer> consumer, Set trackedPlayers) { + this.trackedPlayers = trackedPlayers; +@@ -265,7 +266,7 @@ public class ServerEntity { + this.yHeadRotp = Mth.floor(this.entity.getYHeadRot() * 256.0F / 360.0F); + consumer.accept(packet); + if (!this.entity.getEntityData().isEmpty()) { +- consumer.accept(new ClientboundSetEntityDataPacket(this.entity.getId(), this.entity.getEntityData(), true)); ++ consumer.accept(new ClientboundSetEntityDataPacket(this.entity.getId(), this.entity.getEntityData(), true, this.clearDirtyEntityData)); // Paper + } + + boolean flag = this.trackDelta; +@@ -371,6 +372,13 @@ public class ServerEntity { + + } + ++ // Paper start - Add broadcast method ++ @Deprecated(forRemoval = true) ++ void broadcast(Packet packet) { ++ this.broadcast.accept(packet); ++ } ++ // Paper end ++ + private void broadcastAndSend(Packet packet) { + this.broadcast.accept(packet); + if (this.entity instanceof ServerPlayer) { +diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +index 1c1ba459535296e029a8d39a5f78d60eb29cdb71..838b867c5e7e8730a200a53687e7470087df9fce 100644 +--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java ++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +@@ -2721,7 +2721,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + + // Entity in bucket - SPIGOT-4048 and SPIGOT-6859 + if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) { +- ServerGamePacketListenerImpl.this.send(new ClientboundAddEntityPacket(entity)); ++ // Paper start ++ if (entity.tracker != null) { ++ entity.tracker.resendPossiblyDesyncedEntity(((ServerPlayer) player)); // The entire mob gets deleted, so resend it. ++ } ++ // Paper end + player.containerMenu.sendAllDataToRemote(); + } + +@@ -2732,7 +2736,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic + + if (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem) { + // Refresh the current entity metadata +- ServerGamePacketListenerImpl.this.send(new ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData(), true)); ++ // Paper start ++ if (entity.tracker != null) { ++ entity.tracker.resendPossiblyDesyncedEntityData(((ServerPlayer) player)); ++ } ++ // Paper end + // SPIGOT-7136 - Allays + if (entity instanceof Allay) { + ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList()))); +diff --git a/src/main/java/net/minecraft/world/entity/animal/Bucketable.java b/src/main/java/net/minecraft/world/entity/animal/Bucketable.java +index 87b9c3cd91f91df58e5175aaf3e8d32914b062d4..974ced175bf2bcd1b4529e6d14f0931df5cbde26 100644 +--- a/src/main/java/net/minecraft/world/entity/animal/Bucketable.java ++++ b/src/main/java/net/minecraft/world/entity/animal/Bucketable.java +@@ -110,8 +110,11 @@ public interface Bucketable { + itemstack1 = CraftItemStack.asNMSCopy(playerBucketFishEvent.getEntityBucket()); + if (playerBucketFishEvent.isCancelled()) { + ((ServerPlayer) player).containerMenu.sendAllDataToRemote(); // We need to update inventory to resync client's bucket +- ((ServerPlayer) player).connection.send(new ClientboundAddEntityPacket(entity)); // We need to play out these packets as the client assumes the fish is gone +- ((ServerPlayer) player).connection.send(new ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData(), true)); // Need to send data such as the display name to client ++ // Paper start ++ if (entity.tracker != null) { ++ entity.tracker.resendPossiblyDesyncedEntity(((ServerPlayer) player)); ++ } ++ // Paper end + return Optional.of(InteractionResult.FAIL); + } + entity.playSound(((Bucketable) entity).getPickupSound(), 1.0F, 1.0F); diff --git a/patches/server/0305-Update-entity-Metadata-for-all-tracked-players.patch b/patches/server/0305-Update-entity-Metadata-for-all-tracked-players.patch deleted file mode 100644 index 3ddc7c5d06..0000000000 --- a/patches/server/0305-Update-entity-Metadata-for-all-tracked-players.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: AgentTroll -Date: Fri, 22 Mar 2019 22:24:03 -0700 -Subject: [PATCH] Update entity Metadata for all tracked players - - -diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index d6f34adbdf45bbef4a39e629dd7cb6d7fcb5db0f..7881176a900daa3306c691454f688c1f79b73475 100644 ---- a/src/main/java/net/minecraft/server/level/ServerEntity.java -+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -371,6 +371,12 @@ public class ServerEntity { - - } - -+ // Paper start - Add broadcast method -+ void broadcast(Packet packet) { -+ this.broadcast.accept(packet); -+ } -+ // Paper end -+ - private void broadcastAndSend(Packet packet) { - this.broadcast.accept(packet); - if (this.entity instanceof ServerPlayer) { -diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1c1ba459535296e029a8d39a5f78d60eb29cdb71..9f60c0786b4676726036ca56906663698d26aaea 100644 ---- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2732,7 +2732,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic - - if (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem) { - // Refresh the current entity metadata -- ServerGamePacketListenerImpl.this.send(new ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData(), true)); -+ // Paper start - update entity for all players -+ ClientboundSetEntityDataPacket entityDataPacket = new ClientboundSetEntityDataPacket(entity.getId(), entity.getEntityData(), true); -+ if (entity.tracker != null) { -+ entity.tracker.broadcast(entityDataPacket); -+ } else { -+ ServerGamePacketListenerImpl.this.send(entityDataPacket); -+ } -+ // Paper end - // SPIGOT-7136 - Allays - if (entity instanceof Allay) { - ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList()))); diff --git a/patches/server/0327-Dont-send-unnecessary-sign-update.patch b/patches/server/0327-Dont-send-unnecessary-sign-update.patch index 4d63dfa58a..9b8336fe3f 100644 --- a/patches/server/0327-Dont-send-unnecessary-sign-update.patch +++ b/patches/server/0327-Dont-send-unnecessary-sign-update.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Dont send unnecessary sign update diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 4ebae3246e3866bbdfa17e43bd0252d637885052..3af9f2d86cf2a9566e22865689101245647d05a5 100644 +index 399372cdb9d4ed2fc7bbe7d52742be7271e6744f..c91768eb4f238eb59a3e451dc8c3d299f9712b30 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3341,6 +3341,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3342,6 +3342,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic if (!tileentitysign.isEditable() || !this.player.getUUID().equals(tileentitysign.getPlayerWhoMayEdit())) { ServerGamePacketListenerImpl.LOGGER.warn("Player {} just tried to change non-editable sign", this.player.getName().getString()); diff --git a/patches/server/0411-Reduce-allocation-of-Vec3D-by-entity-tracker.patch b/patches/server/0411-Reduce-allocation-of-Vec3D-by-entity-tracker.patch index d099ae8f18..cb28946d0e 100644 --- a/patches/server/0411-Reduce-allocation-of-Vec3D-by-entity-tracker.patch +++ b/patches/server/0411-Reduce-allocation-of-Vec3D-by-entity-tracker.patch @@ -18,7 +18,7 @@ index 3167f5c6be39757e3cc42cbb17ab0cf13a2fe470..3768a71491ef7836b9739bdaec7a077c private static long encode(double value) { return Mth.lfloor(value * 4096.0D); diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 4488d8719be0d685ef99e7903adc0889552d8185..999a675dd42c37b27e40d1a32b77641188b8d432 100644 +index 7e11a85cb826deedcf9aa22b849ced2c1240e64a..97f58099f310b1c6fe8f9a1c8247fb0648d5277b 100644 --- a/src/main/java/net/minecraft/server/level/ChunkMap.java +++ b/src/main/java/net/minecraft/server/level/ChunkMap.java @@ -1302,9 +1302,13 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider @@ -38,10 +38,10 @@ index 4488d8719be0d685ef99e7903adc0889552d8185..999a675dd42c37b27e40d1a32b776411 boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(player); diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 7881176a900daa3306c691454f688c1f79b73475..ddc5b4849939a96b76611cfa1cd34c06c7acc0f8 100644 +index 286a14aafe2e8b4662515165ede8a74833897f33..5d16d9dc07349c4193084ba9e70c16e58155c892 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -147,7 +147,13 @@ public class ServerEntity { +@@ -148,7 +148,13 @@ public class ServerEntity { i = Mth.floor(this.entity.getYRot() * 256.0F / 360.0F); j = Mth.floor(this.entity.getXRot() * 256.0F / 360.0F); Vec3 vec3d = this.entity.trackingPosition(); diff --git a/patches/server/0426-Add-and-implement-PlayerRecipeBookClickEvent.patch b/patches/server/0426-Add-and-implement-PlayerRecipeBookClickEvent.patch index c067c44ca1..8c4d05e3c5 100644 --- a/patches/server/0426-Add-and-implement-PlayerRecipeBookClickEvent.patch +++ b/patches/server/0426-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 30a69fa8f8266909fe98bea7ea781789c74bf50b..b7865696d9b939791b0315ab2a231e2dc5872de8 100644 +index 939eb9fee9d856ace268f89081e6a9777a452a8a..8df02b4fb9df21ce8185dd9a22235c13eb42463f 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3228,9 +3228,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3229,9 +3229,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/0430-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0430-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index e81d409f96..0cc2b96c65 100644 --- a/patches/server/0430-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0430-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -89,10 +89,10 @@ index 83d05b2546fe54485daede323a0f6343b62d278a..d8c77533a44e316693535ea66fe6ae7f 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 02b6cf65f6abedfd4933e4e64d254f190e061301..c59e90ba0de83eeda3719b6303bee9796b4a1af0 100644 +index d47cec95660d7754921d06f7316cc6ab4ab6016a..3526e4f179b36d1ab61488e4b9c2404d5754c258 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3498,7 +3498,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3499,7 +3499,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()) { diff --git a/patches/server/0462-Brand-support.patch b/patches/server/0462-Brand-support.patch index 2273e092a8..a4020275ce 100644 --- a/patches/server/0462-Brand-support.patch +++ b/patches/server/0462-Brand-support.patch @@ -5,7 +5,7 @@ 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 c59e90ba0de83eeda3719b6303bee9796b4a1af0..da6a0171bd63ac68635de1c23fc9eafa732503bd 100644 +index 3526e4f179b36d1ab61488e4b9c2404d5754c258..35362ffc16eb8ed070d001ab3ca9037f78519a77 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -298,6 +298,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -17,7 +17,7 @@ index c59e90ba0de83eeda3719b6303bee9796b4a1af0..da6a0171bd63ac68635de1c23fc9eafa public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player) { this.lastChatTimeStamp = new AtomicReference(Instant.EPOCH); this.lastSeenMessagesValidator = new LastSeenMessagesValidator(); -@@ -3453,6 +3455,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3454,6 +3456,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 c59e90ba0de83eeda3719b6303bee9796b4a1af0..da6a0171bd63ac68635de1c23fc9eafa @Override public void handleCustomPayload(ServerboundCustomPayloadPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); -@@ -3480,6 +3484,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3481,6 +3485,15 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic try { byte[] data = new byte[packet.data.readableBytes()]; packet.data.readBytes(data); @@ -42,7 +42,7 @@ index c59e90ba0de83eeda3719b6303bee9796b4a1af0..da6a0171bd63ac68635de1c23fc9eafa this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), packet.identifier.toString(), data); } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); -@@ -3489,6 +3502,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3490,6 +3503,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } diff --git a/patches/server/0520-Limit-recipe-packets.patch b/patches/server/0520-Limit-recipe-packets.patch index f40301fce3..f8fd1bff8d 100644 --- a/patches/server/0520-Limit-recipe-packets.patch +++ b/patches/server/0520-Limit-recipe-packets.patch @@ -5,7 +5,7 @@ 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 8e12c4d4b54c2f0a265dc627d7981282fc6fda6e..32227020d0cba1aba3ec0fcda5f4b4cd4b1ce394 100644 +index 83b98097f8664123448ad852ef94a4ff999b9d4f..d4454ecd2b67c1162a99b65af85b801a48471f86 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -263,6 +263,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -24,7 +24,7 @@ index 8e12c4d4b54c2f0a265dc627d7981282fc6fda6e..32227020d0cba1aba3ec0fcda5f4b4cd /* Use thread-safe field access instead if (this.chatSpamTickCount > 0) { --this.chatSpamTickCount; -@@ -3247,6 +3249,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3248,6 +3250,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) { diff --git a/patches/server/0615-add-RespawnFlags-to-PlayerRespawnEvent.patch b/patches/server/0615-add-RespawnFlags-to-PlayerRespawnEvent.patch index 9a0ef4da45..02b477915e 100644 --- a/patches/server/0615-add-RespawnFlags-to-PlayerRespawnEvent.patch +++ b/patches/server/0615-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 917aa2bd63db9a63c75267564d0c3602b0f01392..161b5d6f0d420ac7b6ed112d1b03d42c3aaec421 100644 +index 405ea7deeb1033d45f9bd14be3d5305d2ba3522f..542ab2799681e711e7330794693ade5bd3fda554 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2894,7 +2894,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2895,7 +2895,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic case PERFORM_RESPAWN: if (this.player.wonGame) { this.player.wonGame = false; diff --git a/patches/server/0628-additions-to-PlayerGameModeChangeEvent.patch b/patches/server/0628-additions-to-PlayerGameModeChangeEvent.patch index 30f25e8474..069e50b9f5 100644 --- a/patches/server/0628-additions-to-PlayerGameModeChangeEvent.patch +++ b/patches/server/0628-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 161b5d6f0d420ac7b6ed112d1b03d42c3aaec421..de4c3849cc60151de8f3a873adad2bc36e30fbc4 100644 +index 542ab2799681e711e7330794693ade5bd3fda554..cf5aac0c7bb719246b49a0ee08148141a381a16a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2903,7 +2903,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2904,7 +2904,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/0640-Add-PlayerKickEvent-causes.patch b/patches/server/0640-Add-PlayerKickEvent-causes.patch index be8213e6ea..a5ef4fe797 100644 --- a/patches/server/0640-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0640-Add-PlayerKickEvent-causes.patch @@ -57,7 +57,7 @@ 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 3ef39ebeb76f43d521266402e170bd1af6af2348..55c5348e793fa560d7042cf90076a8f7a3b76547 100644 +index 3fcd92c408258a60de049437478f6dab010f1fb1..1673082e5badbc0f3057b11544fb39be0ed84a44 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -369,7 +369,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -312,7 +312,7 @@ index 3ef39ebeb76f43d521266402e170bd1af6af2348..55c5348e793fa560d7042cf90076a8f7 return; } // Spigot End -@@ -2850,7 +2860,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2851,7 +2861,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // CraftBukkit end } else { @@ -321,7 +321,7 @@ index 3ef39ebeb76f43d521266402e170bd1af6af2348..55c5348e793fa560d7042cf90076a8f7 ServerGamePacketListenerImpl.LOGGER.warn("Player {} tried to attack an invalid entity", ServerGamePacketListenerImpl.this.player.getName().getString()); } } -@@ -3258,7 +3268,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3259,7 +3269,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 3ef39ebeb76f43d521266402e170bd1af6af2348..55c5348e793fa560d7042cf90076a8f7 return; } } -@@ -3461,7 +3471,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3462,7 +3472,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 3ef39ebeb76f43d521266402e170bd1af6af2348..55c5348e793fa560d7042cf90076a8f7 }); // Paper end } -@@ -3507,7 +3517,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3508,7 +3518,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex); @@ -348,7 +348,7 @@ index 3ef39ebeb76f43d521266402e170bd1af6af2348..55c5348e793fa560d7042cf90076a8f7 } } else if (packet.identifier.equals(CUSTOM_UNREGISTER)) { try { -@@ -3517,7 +3527,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3518,7 +3528,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex); @@ -357,7 +357,7 @@ index 3ef39ebeb76f43d521266402e170bd1af6af2348..55c5348e793fa560d7042cf90076a8f7 } } else { try { -@@ -3535,7 +3545,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3536,7 +3546,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); diff --git a/patches/server/0678-Optimize-entity-tracker-passenger-checks.patch b/patches/server/0678-Optimize-entity-tracker-passenger-checks.patch index d3fef67200..463446a38b 100644 --- a/patches/server/0678-Optimize-entity-tracker-passenger-checks.patch +++ b/patches/server/0678-Optimize-entity-tracker-passenger-checks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Optimize entity tracker passenger checks diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index ddc5b4849939a96b76611cfa1cd34c06c7acc0f8..5246d427973f34843046e59c198785c73fccec33 100644 +index 5d16d9dc07349c4193084ba9e70c16e58155c892..464fef44317949839a5f050c11eacd67b1cf8f8a 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -71,7 +71,7 @@ public class ServerEntity { +@@ -72,7 +72,7 @@ public class ServerEntity { this.trackedPlayers = trackedPlayers; // CraftBukkit end this.ap = Vec3.ZERO; diff --git a/patches/server/0683-Configurable-item-frame-map-cursor-update-interval.patch b/patches/server/0683-Configurable-item-frame-map-cursor-update-interval.patch index 5e1d739a7c..1c23124230 100644 --- a/patches/server/0683-Configurable-item-frame-map-cursor-update-interval.patch +++ b/patches/server/0683-Configurable-item-frame-map-cursor-update-interval.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Configurable item frame map cursor update interval diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 5246d427973f34843046e59c198785c73fccec33..c84ec3b93f2783de7a2815f23a9f1de89c1ab109 100644 +index 464fef44317949839a5f050c11eacd67b1cf8f8a..98b8239205c61df5a2a4e344c50645e2cd2cbaad 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -100,7 +100,7 @@ public class ServerEntity { +@@ -101,7 +101,7 @@ public class ServerEntity { if (true || this.tickCount % 10 == 0) { // CraftBukkit - Moved below, should always enter this block ItemStack itemstack = entityitemframe.getItem(); diff --git a/patches/server/0726-Send-full-pos-packets-for-hard-colliding-entities.patch b/patches/server/0726-Send-full-pos-packets-for-hard-colliding-entities.patch index b63f55bd81..cb24315567 100644 --- a/patches/server/0726-Send-full-pos-packets-for-hard-colliding-entities.patch +++ b/patches/server/0726-Send-full-pos-packets-for-hard-colliding-entities.patch @@ -9,10 +9,10 @@ Configurable under `send-full-pos-for-hard-colliding-entities` diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index c84ec3b93f2783de7a2815f23a9f1de89c1ab109..cc418554b655ea4111631e4a1abf69776e150e7c 100644 +index 98b8239205c61df5a2a4e344c50645e2cd2cbaad..523a4963b644cec57c7338cdda72b5e17247f49a 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -164,7 +164,7 @@ public class ServerEntity { +@@ -165,7 +165,7 @@ public class ServerEntity { long i1 = this.positionCodec.encodeZ(vec3d); boolean flag4 = k < -32768L || k > 32767L || l < -32768L || l > 32767L || i1 < -32768L || i1 > 32767L; diff --git a/patches/server/0762-Prevent-sending-oversized-item-data-in-equipment-and.patch b/patches/server/0762-Prevent-sending-oversized-item-data-in-equipment-and.patch index 4bd83e942f..33e70220d1 100644 --- a/patches/server/0762-Prevent-sending-oversized-item-data-in-equipment-and.patch +++ b/patches/server/0762-Prevent-sending-oversized-item-data-in-equipment-and.patch @@ -18,10 +18,10 @@ index 0c79613597e9ed1fbeeb36e9cb60a70bbda17bb9..79593d42ef881aa96eab7ea1e50683fa @Override diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index cc418554b655ea4111631e4a1abf69776e150e7c..319dfa82dff1fe188a52bed5aa2d39575853b793 100644 +index 523a4963b644cec57c7338cdda72b5e17247f49a..715b49e5e00231e7bd4270534039d520b6549c72 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -309,7 +309,10 @@ public class ServerEntity { +@@ -310,7 +310,10 @@ public class ServerEntity { ItemStack itemstack = ((LivingEntity) this.entity).getItemBySlot(enumitemslot); if (!itemstack.isEmpty()) { diff --git a/patches/server/0763-Hide-unnecessary-itemmeta-from-clients.patch b/patches/server/0763-Hide-unnecessary-itemmeta-from-clients.patch index 46b7980c35..082500f81f 100644 --- a/patches/server/0763-Hide-unnecessary-itemmeta-from-clients.patch +++ b/patches/server/0763-Hide-unnecessary-itemmeta-from-clients.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Hide unnecessary itemmeta from clients diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 319dfa82dff1fe188a52bed5aa2d39575853b793..919758363c7b703cb200582768e68c97ce5c807a 100644 +index 715b49e5e00231e7bd4270534039d520b6549c72..036d7478c477ce1e794b8311d94f47c42fe9aee9 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -311,7 +311,7 @@ public class ServerEntity { +@@ -312,7 +312,7 @@ public class ServerEntity { if (!itemstack.isEmpty()) { // Paper start - prevent oversized data final ItemStack sanitized = LivingEntity.sanitizeItemStack(itemstack.copy(), false); @@ -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 678c0b1c37b16e405205933a16f0d2d29359fd12..1d024bfbada440c93b1174568feaa67544f7f0d2 100644 +index f9e2392e705a0168b9dc359313e68cbca08b2d3a..2db7071d80a2d288d864ae32f250435d63b5ac45 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2816,8 +2816,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2817,8 +2817,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Paper end // SPIGOT-7136 - Allays diff --git a/patches/server/0818-Fix-Entity-Position-Desync.patch b/patches/server/0818-Fix-Entity-Position-Desync.patch index f4b0a0dc54..497ef1b0d3 100644 --- a/patches/server/0818-Fix-Entity-Position-Desync.patch +++ b/patches/server/0818-Fix-Entity-Position-Desync.patch @@ -9,10 +9,10 @@ This excludes hanging entities, as this fix caused problematic behavior due to t position field. diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java -index 919758363c7b703cb200582768e68c97ce5c807a..3b144c820531122eb37d41be06c182b5f5dc0724 100644 +index 036d7478c477ce1e794b8311d94f47c42fe9aee9..2358bb1788cfb902bac9b3b7588954af2d2cd823 100644 --- a/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java -@@ -158,7 +158,7 @@ public class ServerEntity { +@@ -159,7 +159,7 @@ public class ServerEntity { boolean flag2 = flag1 || this.tickCount % 60 == 0; boolean flag3 = Math.abs(i - this.yRotp) >= 1 || Math.abs(j - this.xRotp) >= 1; diff --git a/patches/server/0843-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0843-Prevent-tile-entity-copies-loading-chunks.patch index 3c5eabbf49..afc63fb49b 100644 --- a/patches/server/0843-Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/0843-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 cf3f9d225e4c4114fd14979ac5f7bf8ea45c3765..cea81ea8afa1cedc2be997357db2a920a9e3499b 100644 +index c29e3d867a4a4ed30a075c07cfafc58d21b6e709..e2860b34354d374bc02f874eae5436d3d0c9a84e 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3411,7 +3411,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3412,7 +3412,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); if (this.player.level.isLoaded(blockposition)) { diff --git a/patches/server/0846-Pass-ServerLevel-for-gamerule-callbacks.patch b/patches/server/0846-Pass-ServerLevel-for-gamerule-callbacks.patch index 095d44c0bb..63a579eb9e 100644 --- a/patches/server/0846-Pass-ServerLevel-for-gamerule-callbacks.patch +++ b/patches/server/0846-Pass-ServerLevel-for-gamerule-callbacks.patch @@ -18,10 +18,10 @@ index c399aaeee89e12a7da4e054acd877fe033676dfd..ff3eced0e20c39b825586897ee2fed01 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 cea81ea8afa1cedc2be997357db2a920a9e3499b..15694736c7ee8836355409e0046e221ebdb7e524 100644 +index e2860b34354d374bc02f874eae5436d3d0c9a84e..86e0853ac450bdd9a5478a6edb8ebc490133066c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3007,7 +3007,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3008,7 +3008,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 @@ -158,7 +158,7 @@ index 3c93bfeb94168f832904a8462ae23b06e81e080d..468c635d31cfa8051666bbefce8df4b4 this.onChanged(server); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 10c57995a65980a37ab9bd601332686a9ba97482..532727b69f8af7351e78c428a06b7c8d13990ab5 100644 +index 1aa28195d2d2ef466764a162891c232f99b678e7..5fcea8546b574a6fc91502c0674ab8f9389c7cf3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1899,7 +1899,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { diff --git a/patches/server/0857-Do-not-accept-invalid-client-settings.patch b/patches/server/0857-Do-not-accept-invalid-client-settings.patch index 88c7e8c514..4f7fd70440 100644 --- a/patches/server/0857-Do-not-accept-invalid-client-settings.patch +++ b/patches/server/0857-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 15694736c7ee8836355409e0046e221ebdb7e524..a7fe72d745625951172a8fdf9a4689b5bf540445 100644 +index 86e0853ac450bdd9a5478a6edb8ebc490133066c..a630bc98e5cfb82c1a706214344c4d73d9fc6c1a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3590,6 +3590,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3591,6 +3591,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleClientInformation(ServerboundClientInformationPacket packet) { PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());