Fix a load of null issues, and get it to sort of work.

This commit is contained in:
modmuss50 2016-11-19 16:36:13 +00:00
parent 65e651f402
commit 528fecc2b5
No known key found for this signature in database
GPG key ID: 773D17BE8BF49C82
35 changed files with 101 additions and 87 deletions

View file

@ -61,10 +61,10 @@ public class TileQuantumTank extends TileLegacyMachineBase
if (!world.isRemote) {
FluidUtils.drainContainers(tank, inventory, 0, 1);
FluidUtils.fillContainers(tank, inventory, 0, 1, tank.getFluidType());
if (tank.getFluidType() != null && getStackInSlot(2) == null) {
if (tank.getFluidType() != null && getStackInSlot(2) == ItemStack.EMPTY) {
// inventory.setInventorySlotContents(2, new ItemStack(tank.getFluidType().getBlock()));
} else if (tank.getFluidType() == null && getStackInSlot(2) != null) {
setInventorySlotContents(2, null);
} else if (tank.getFluidType() == null && getStackInSlot(2) != ItemStack.EMPTY) {
setInventorySlotContents(2, ItemStack.EMPTY);
}
tank.compareAndUpdate();
}