Fixed nbt writing crash

This commit is contained in:
DarkGuardsman 2013-07-29 00:51:57 -04:00
parent 357cffc9cd
commit 604703ab28

View file

@ -116,7 +116,7 @@ public class TileEntityTank extends TileEntityFluidStorage implements IFluidHand
public Packet getDescriptionPacket() public Packet getDescriptionPacket()
{ {
FluidStack stack = new FluidStack(FluidRegistry.WATER, 0); FluidStack stack = new FluidStack(FluidRegistry.WATER, 0);
if (this.getTank().getFluid() != null) if (this.getTank().getFluid() != null && this.getTank().getFluid().getFluid() != null)
{ {
stack = this.getTank().getFluid(); stack = this.getTank().getFluid();
} }
@ -194,7 +194,7 @@ public class TileEntityTank extends TileEntityFluidStorage implements IFluidHand
} }
/** Checks to make sure the connection is valid to the tileEntity /** Checks to make sure the connection is valid to the tileEntity
* *
* @param tileEntity - the tileEntity being checked * @param tileEntity - the tileEntity being checked
* @param side - side the connection is too */ * @param side - side the connection is too */
public void validateConnectionSide(TileEntity tileEntity, ForgeDirection side) public void validateConnectionSide(TileEntity tileEntity, ForgeDirection side)