/** * Handles the placement of a specified ItemStack in a specified container/inventory slot */ public void handleWindowItems(SPacketWindowItems packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); EntityPlayer entityplayer = this.gameController.player; if (packetIn.getWindowId() == 0) { entityplayer.inventoryContainer.func_190896_a(packetIn.getItemStacks()); } else if (packetIn.getWindowId() == entityplayer.openContainer.windowId) { entityplayer.openContainer.func_190896_a(packetIn.getItemStacks()); } }
/** * Handles the placement of a specified ItemStack in a specified container/inventory slot */ public void handleWindowItems(SPacketWindowItems packetIn) { PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController); EntityPlayer entityplayer = this.gameController.thePlayer; if (packetIn.getWindowId() == 0) { entityplayer.inventoryContainer.putStacksInSlots(packetIn.getItemStacks()); } else if (packetIn.getWindowId() == entityplayer.openContainer.windowId) { entityplayer.openContainer.putStacksInSlots(packetIn.getItemStacks()); } }
/** * update the crafting window inventory with the items in the list */ public void updateCraftingInventory(Container containerToSend, NonNullList<ItemStack> itemsList) { this.connection.sendPacket(new SPacketWindowItems(containerToSend.windowId, itemsList)); this.connection.sendPacket(new SPacketSetSlot(-1, -1, this.inventory.getItemStack())); }
/** * update the crafting window inventory with the items in the list */ public void updateCraftingInventory(Container containerToSend, List<ItemStack> itemsList) { this.connection.sendPacket(new SPacketWindowItems(containerToSend.windowId, itemsList)); this.connection.sendPacket(new SPacketSetSlot(-1, -1, this.inventory.getItemStack())); }
/** * Handles the placement of a specified ItemStack in a specified container/inventory slot */ void handleWindowItems(SPacketWindowItems packetIn);