diff --git a/src/main/java/mezz/jei/util/CommandUtil.java b/src/main/java/mezz/jei/util/CommandUtil.java index bc5db3041..350ff547d 100644 --- a/src/main/java/mezz/jei/util/CommandUtil.java +++ b/src/main/java/mezz/jei/util/CommandUtil.java @@ -57,7 +57,9 @@ public static void setHotbarStack(ItemStack itemStack, int hotbarSlot) { if (ServerInfo.isJeiOnServer()) { ItemStack sendStack = ItemHandlerHelper.copyStackWithSize(itemStack, itemStack.getMaxStackSize()); PacketSetHotbarItemStack packet = new PacketSetHotbarItemStack(sendStack, hotbarSlot); - Network.sendPacketToServer(packet); + if (player.inventoryMenu.getCarried().getCount() < player.inventoryMenu.getCarried().getMaxStackSize()) { + Network.sendPacketToServer(packet); + } } }