Clipboard.

  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord
<insert the names of over two thousand cities and such in Nebraska here; not shown because that's a lot of text>

Testing something for a programming project I was working on. I was wondering why it said there were 2313 Nebraskan locations listed in the file it was reading from...
 
  • Like
Reactions: xTordX
Code:
    @Override
    public ItemStack transferStackInSlot(EntityPlayer player, int slotInd) {
        ItemStack copyStack = null;
        Slot slot = (Slot)inventorySlots.get(slotInd);
        
        if(slot != null && slot.getHasStack()) {
            ItemStack stackInSlot = slot.getStack();
            copyStack = stackInSlot.copy();
            
            if(!doTransferStack(stackInSlot, slotInd))
                return null;
            
            if(stackInSlot.stackSize == 0)
                slot.putStack(null);
            else
                slot.onSlotChanged();
            
            if(copyStack.stackSize == stackInSlot.stackSize)
                return null;
            
            slot.onPickupFromSlot(player, stackInSlot);
        }
        return copyStack;
    }
 
It's a hundred and six miles to Chicago, we've got a full tank of gas, half a pack of cigarettes, it's dark, and we're wearing sunglasses.
Jake: Hit it.

Sent from my SGH-T769 using Tapatalk 2