A bunch more null check \o/

This commit is contained in:
modmuss50 2016-12-06 18:22:18 +00:00
parent 97e5fcc032
commit 5dff31d937
19 changed files with 33 additions and 29 deletions

View file

@ -130,7 +130,7 @@ public class TileGasTurbine extends TilePowerAcceptor implements IWrenchable, II
if (tank.getFluidType() != null && getStackInSlot(2) == ItemStack.EMPTY) {
inventory.setInventorySlotContents(2, new ItemStack(tank.getFluidType().getBlock()));
} else if (tank.getFluidType() == null && getStackInSlot(2) != ItemStack.EMPTY) {
setInventorySlotContents(2, null);
setInventorySlotContents(2, ItemStack.EMPTY);
}
}

View file

@ -127,7 +127,7 @@ public class TileThermalGenerator extends TilePowerAcceptor implements IWrenchab
// inventory.setInventorySlotContents(2, new ItemStack(tank
// .getFluidType().getBlock()));
} else if (tank.getFluidType() == null && getStackInSlot(2) != ItemStack.EMPTY) {
setInventorySlotContents(2, null);
setInventorySlotContents(2, ItemStack.EMPTY);
}
}