From 18c706ab8a17a0532ac74ce326a2f2420913eed4 Mon Sep 17 00:00:00 2001 From: KernelFreeze Date: Tue, 9 May 2017 23:19:23 -0500 Subject: [PATCH 1/2] Fixing item count on 1.11, where size <= 0. Fixes #553 --- .../ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java index 1b0ff04d6..3cbc96c50 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java @@ -97,6 +97,7 @@ public class ItemRewriter { } } } + if (stack.getAmount() <= 0) stack.setAmount((byte) 1); } public static void toServer(Item item) { From 1d5d0012e6202d41ca6224236557f0d4341038d6 Mon Sep 17 00:00:00 2001 From: KernelFreeze Date: Tue, 9 May 2017 23:32:32 -0500 Subject: [PATCH 2/2] Item count on 1.11. --- .../ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java index 3cbc96c50..61ebcdea6 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java @@ -97,7 +97,7 @@ public class ItemRewriter { } } } - if (stack.getAmount() <= 0) stack.setAmount((byte) 1); + if (item.getAmount() <= 0) item.setAmount((byte) 1); } public static void toServer(Item item) {