Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public ItemStack transferStackInSlot(EntityPlayer player, int i)
- {
- ItemStack itemstack = null;
- Slot slot = (Slot)this.inventorySlots.get(i);
- Item item = null;
- Item item2 = null;
- if (slot != null && slot.getHasStack()) {
- ItemStack itemstack1 = slot.getStack();
- itemstack = itemstack1.copy();
- if (i == 2)
- {
- if (!this.mergeItemStack(itemstack1, 3, 39, true))
- {
- return null;
- }
- slot.onSlotChange(itemstack1, itemstack);
- }
- else if (i != 1 && i != 0)
- {
- if (IceCreamMakerRecipes.getIceCreamResult(item, item2) != null)
- {
- if (!this.mergeItemStack(itemstack1, 0, 1, false))
- {
- return null;
- }
- }
- else if (icemaker.hasItemPower(itemstack1))
- {
- if (!this.mergeItemStack(itemstack1, 2, 2, false))
- {
- return null;
- }
- }
- else if (i >= 3 && i < 30)
- {
- if (!this.mergeItemStack(itemstack1, 30, 39, false))
- {
- return null;
- }
- }
- else if (i >= 30 && i < 39 && !this.mergeItemStack(itemstack1, 3, 30, false))
- {
- return null;
- }
- }
- else if (!this.mergeItemStack(itemstack1, 3, 39, false))
- {
- return null;
- }
- if (itemstack1.stackSize == 0)
- {
- slot.putStack((ItemStack)null);
- }
- else
- {
- slot.onSlotChanged();
- }
- if (itemstack1.stackSize == itemstack.stackSize)
- {
- return null;
- }
- slot.onPickupFromSlot(player, itemstack1);
- }
- return itemstack;
- }
Advertisement
Add Comment
Please, Sign In to add comment