From 57d58db35e1bbeb74bee7dcb5240505dbf831545 Mon Sep 17 00:00:00 2001 From: Mats Date: Fri, 15 Apr 2016 19:48:28 +0200 Subject: [PATCH] Fix item showing twice, one in the new slot (#359) --- .../protocols/protocol1_9to1_8/packets/InventoryPackets.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/InventoryPackets.java b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/InventoryPackets.java index 64443ef5d..21b064c97 100644 --- a/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/InventoryPackets.java +++ b/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/packets/InventoryPackets.java @@ -146,10 +146,10 @@ public class InventoryPackets { Item[] oldStack = wrapper.get(Type.ITEM_ARRAY, 0); Item[] newStack = new Item[oldStack.length + 1]; for (int i = 0; i < newStack.length; i++) { - if (i > 3) { + if (i > 4) { newStack[i] = oldStack[i - 1]; } else { - if (i != 3) { // Leave index 3 blank + if (i != 4) { // Leave index 3 blank newStack[i] = oldStack[i]; } }