diff options
Diffstat (limited to 'patches/server/0273-Handle-Large-Packets-disconnecting-client.patch')
-rw-r--r-- | patches/server/0273-Handle-Large-Packets-disconnecting-client.patch | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/patches/server/0273-Handle-Large-Packets-disconnecting-client.patch b/patches/server/0273-Handle-Large-Packets-disconnecting-client.patch index f5fce50aca..65d62e20f2 100644 --- a/patches/server/0273-Handle-Large-Packets-disconnecting-client.patch +++ b/patches/server/0273-Handle-Large-Packets-disconnecting-client.patch @@ -34,7 +34,7 @@ index 02b3f5c67b47a098f7fe15ddba0df6cb586a9ae5..157f055df00faf3a7870df8109e84fdb Connection.LOGGER.debug("Skipping packet due to errors", throwable.getCause()); } else { diff --git a/src/main/java/net/minecraft/network/PacketEncoder.java b/src/main/java/net/minecraft/network/PacketEncoder.java -index 7070d093c80033b61a9c8495bc56153d986b6b03..61f05f34ca33837c643f2915e753ec3935a38314 100644 +index 0d80fcee1831af59b06c4d00dc713bd4dad947fc..061eada043325142d33a0cec02e9e484d14a7fca 100644 --- a/src/main/java/net/minecraft/network/PacketEncoder.java +++ b/src/main/java/net/minecraft/network/PacketEncoder.java @@ -41,7 +41,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> { @@ -46,7 +46,7 @@ index 7070d093c80033b61a9c8495bc56153d986b6b03..61f05f34ca33837c643f2915e753ec39 throw new IllegalArgumentException("Packet too big (is " + k + ", should be less than 8388608): " + packet); } -@@ -54,10 +54,35 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> { +@@ -54,9 +54,34 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> { throw var13; } finally { @@ -58,7 +58,6 @@ index 7070d093c80033b61a9c8495bc56153d986b6b03..61f05f34ca33837c643f2915e753ec39 + // Paper end - Handle large packets disconnecting client ProtocolSwapHandler.swapProtocolIfNeeded(attribute, packet); } - } } } @@ -100,7 +99,7 @@ index 700418bb0c9fbed3f161611881b1e222248ca4eb..cc658a61065d5c0021a4b88fa58b4021 return false; } diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundContainerSetContentPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundContainerSetContentPacket.java -index 0e076173033278587df2b5dfbd01cc9005651eb5..dbd8b9b09b82c1b75e8be9dc7416d9f0863c8c87 100644 +index 6206d4d71dfe95b454b22f5b3055623638e145c0..6765175c98d52e5cbc191e88e0d545a05606dfd4 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundContainerSetContentPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundContainerSetContentPacket.java @@ -31,6 +31,16 @@ public class ClientboundContainerSetContentPacket implements Packet<ClientGamePa @@ -121,10 +120,10 @@ index 0e076173033278587df2b5dfbd01cc9005651eb5..dbd8b9b09b82c1b75e8be9dc7416d9f0 public void write(FriendlyByteBuf buf) { buf.writeByte(this.containerId); diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java -index 932cca4d957c1fc212b7a514ea23e8dc7ab5b9d9..f47eeb70661661610ef1a96dd9da67785825c126 100644 +index 0c593b7a4e893568db9c1b0b5dfa7ee4984cd8c9..99fe90094f1cabdaea9db89cfc016a98c1ee8c2d 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java -@@ -50,7 +50,7 @@ public class ClientboundLevelChunkPacketData { +@@ -49,7 +49,7 @@ public class ClientboundLevelChunkPacketData { throw new RuntimeException("Can't read heightmap in packet for [" + x + ", " + z + "]"); } else { int i = buf.readVarInt(); |