Crash fix

This commit is contained in:
aidancbrady 2015-06-13 11:39:09 -04:00
parent 462c5a91b0
commit ebe48abd84

View file

@ -47,7 +47,11 @@ public interface ITankManager
int toInsert = Math.min(gasTank.getStored(), ItemGaugeDropper.CAPACITY-dropperStored);
GasStack drawn = gasTank.draw(toInsert, true);
dropper.setGas(stack, new GasStack(drawn.getGas(), dropperStored+(drawn != null ? drawn.amount : 0)));
if(drawn != null)
{
dropper.setGas(stack, new GasStack(drawn.getGas(), dropperStored+(drawn != null ? drawn.amount : 0)));
}
((EntityPlayerMP)player).sendContainerAndContentsToPlayer(player.openContainer, player.openContainer.getInventory());
}
@ -88,7 +92,11 @@ public interface ITankManager
int toInsert = Math.min(fluidTank.getFluidAmount(), ItemGaugeDropper.CAPACITY-dropperStored);
FluidStack drawn = fluidTank.drain(toInsert, true);
dropper.setFluid(stack, new FluidStack(drawn.getFluid(), dropperStored+(drawn != null ? drawn.amount : 0)));
if(drawn != null)
{
dropper.setFluid(stack, new FluidStack(drawn.getFluid(), dropperStored+(drawn != null ? drawn.amount : 0)));
}
((EntityPlayerMP)player).sendContainerAndContentsToPlayer(player.openContainer, player.openContainer.getInventory());
}