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
|
@ -72,7 +72,7 @@ public class TileRecycler extends TilePowerAcceptor implements IWrenchable, IInv
|
|||
ItemStack itemstack = ItemParts.getPartByName("scrap");
|
||||
int randomchance = world.rand.nextInt(chance);
|
||||
|
||||
if (getStackInSlot(output) == null) {
|
||||
if (getStackInSlot(output) == ItemStack.EMPTY) {
|
||||
useEnergy(cost);
|
||||
if (randomchance == 1) {
|
||||
setInventorySlotContents(output, itemstack.copy());
|
||||
|
@ -98,7 +98,7 @@ public class TileRecycler extends TilePowerAcceptor implements IWrenchable, IInv
|
|||
}
|
||||
|
||||
public boolean hasSlotGotSpace(int slot) {
|
||||
if (getStackInSlot(slot) == null) {
|
||||
if (getStackInSlot(slot) == ItemStack.EMPTY) {
|
||||
return true;
|
||||
} else if (getStackInSlot(slot).getCount() < getStackInSlot(slot).getMaxStackSize()) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue