Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public ItemStack transferStackInSlot(EntityPlayer playerIn, int index)
- {
- ItemStack itemstack = ItemStack.EMPTY;
- Slot slot = this.inventorySlots.get(index);
- if (slot != null && slot.getHasStack())
- {
- ItemStack itemstack1 = slot.getStack();
- itemstack = itemstack1.copy();
- if (index < this.numRows * 9)
- {
- if (!this.mergeItemStack(itemstack1, this.numRows * 9, this.inventorySlots.size(), true))
- {
- return ItemStack.EMPTY;
- }
- }
- else if (!this.mergeItemStack(itemstack1, 0, this.numRows * 9, false))
- {
- return ItemStack.EMPTY;
- }
- if (itemstack1.isEmpty())
- {
- slot.putStack(ItemStack.EMPTY);
- }
- else
- {
- slot.onSlotChanged();
- }
- }
- return itemstack;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement