Fix a load of null issues, and get it to sort of work.
This commit is contained in:
parent
65e651f402
commit
528fecc2b5
35 changed files with 101 additions and 87 deletions
|
@ -86,14 +86,14 @@ public class TileIndustrialSawmill extends TilePowerAcceptor implements IWrencha
|
|||
}
|
||||
|
||||
public void addOutput(int slot, ItemStack stack) {
|
||||
if (getStackInSlot(slot) == null)
|
||||
if (getStackInSlot(slot) == ItemStack.EMPTY)
|
||||
setInventorySlotContents(slot, stack);
|
||||
getStackInSlot(slot).grow(stack.getCount());
|
||||
}
|
||||
|
||||
public boolean canAddOutput(int slot, int amount) {
|
||||
ItemStack stack = getStackInSlot(slot);
|
||||
return stack == null || getInventoryStackLimit() - stack.getCount() >= amount;
|
||||
return stack == ItemStack.EMPTY || getInventoryStackLimit() - stack.getCount() >= amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue