mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 16:19:03 +01:00
3d9d0a7227
- Lots of itemstack cloning removed. Only clone if the item is actually moved - Return true when a plugin cancels inventory move item event instead of false, as false causes pulls to cycle through all items. However, pushes do not exhibit the same behavior, so this is not something plugins could of been relying on. - Add option (Default on) to cooldown hoppers when they fail to move an item due to full inventory - Skip subsequent InventoryMoveItemEvents if a plugin does not use the item after first event fire for an iteration
25 lines
No EOL
1.3 KiB
Diff
25 lines
No EOL
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
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 a8fc7e431..c1273e988 100644
|
|
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
|
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
|
@@ -0,0 +0,0 @@ public class PacketDataSerializer extends ByteBuf {
|
|
public PacketDataSerializer a(String s) {
|
|
byte[] abyte = s.getBytes(StandardCharsets.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);
|
|
--
|