Fix fluid tanks incorrectly reading NBT when empty

If the Empty flag was set, the tank would not correctly read the data, keeping the outdated FluidStack instead. This is especially relevant with updatable TileFluidHandler TEs.
This commit is contained in:
Ivorius committed 2015-01-17 00:36:42 +01:00
1 parent 204c6119e7
commit e629774753
1 file changed
+5 -5
@@ -37,11 +37,11 @@ public class FluidTank implements IFluidTank
if (!nbt.hasKey("Empty"))
{
FluidStack fluid = FluidStack.loadFluidStackFromNBT(nbt);
if (fluid != null)
{
setFluid(fluid);
}
setFluid(fluid);
}
else
{
setFluid(null);
}
return this;
}