Closed Tim020 closed 9 years ago
@Override public ItemStack transferStackInSlot(EntityPlayer entityPlayer, int slotIndex) { ItemStack newItemStack = null; Slot slot = (Slot) inventorySlots.get(slotIndex);
if (slot != null && slot.getHasStack()) { ItemStack itemStack = slot.getStack(); newItemStack = itemStack.copy(); if (slotIndex < chestInventoryRows * chestInventoryColumns) { if (!this.mergeItemStack(itemStack, chestInventoryRows * chestInventoryColumns, inventorySlots.size(), false)) { return null; } } else if (!this.mergeItemStack(itemStack, 0, chestInventoryRows * chestInventoryColumns, false)) { return null; } if (itemStack.stackSize == 0) { slot.putStack(null); } else { slot.onSlotChanged(); } } return newItemStack; }
@Override public ItemStack transferStackInSlot(EntityPlayer entityPlayer, int slotIndex) { ItemStack newItemStack = null; Slot slot = (Slot) inventorySlots.get(slotIndex);