diff options
author | Zach Brown <[email protected]> | 2017-04-29 05:27:31 -0500 |
---|---|---|
committer | Zach Brown <[email protected]> | 2017-04-29 05:27:31 -0500 |
commit | 974b0afca91844fed61c5fda9293bbcd88752c2f (patch) | |
tree | d3a7b65e14f34b7cc8928efaf6403f67eaaaf708 /Spigot-Server-Patches/0161-Raise-string-limit-for-packet-serialization.patch | |
parent | 8b2122a291e3ea68f0e1516209914ef43a2d55e9 (diff) | |
download | Paper-974b0afca91844fed61c5fda9293bbcd88752c2f.tar.gz Paper-974b0afca91844fed61c5fda9293bbcd88752c2f.zip |
Remove last bit of chunk exists region file fix
CraftBukkit removed their implementation that caused this issue,
switching to Mojang's implementation which doesn't appear to share it. I
already removed the important bit in the last upstream merge, this is
just unused and unnecessary now. So we remove it.
Diffstat (limited to 'Spigot-Server-Patches/0161-Raise-string-limit-for-packet-serialization.patch')
-rw-r--r-- | Spigot-Server-Patches/0161-Raise-string-limit-for-packet-serialization.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0161-Raise-string-limit-for-packet-serialization.patch b/Spigot-Server-Patches/0161-Raise-string-limit-for-packet-serialization.patch new file mode 100644 index 0000000000..39138523f5 --- /dev/null +++ b/Spigot-Server-Patches/0161-Raise-string-limit-for-packet-serialization.patch @@ -0,0 +1,27 @@ +From cfc4ef10920340b7a0d02dc201354ac16d37f0a2 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Wed, 21 Sep 2016 23:54:20 -0400 +Subject: [PATCH] Raise string limit for packet serialization + +The default limit is possible to hit with 50 page books with color codes, causing clients to disconnect. + +Bump the limit up a hair to above currently seen sizes. + +diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java +index 7a6619595..68e8c4671 100644 +--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java ++++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java +@@ -297,8 +297,8 @@ public class PacketDataSerializer extends ByteBuf { + public PacketDataSerializer a(String s) { + byte[] abyte = s.getBytes(Charsets.UTF_8); + +- if (abyte.length > 32767) { +- throw new EncoderException("String too big (was " + abyte.length + " bytes encoded, max " + 32767 + ")"); ++ if (abyte.length > 44767) { // Paper - raise limit a bit more as normal means can trigger this ++ throw new EncoderException("String too big (was " + s.length() + " bytes encoded, max " + 44767 + ")"); // Paper + } else { + this.d(abyte.length); + this.writeBytes(abyte); +-- +2.12.2.windows.2 + |