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 2015-01-16 23:16:22 +01:00
parent 204c6119e7
commit e629774753
1 changed files with 5 additions and 5 deletions

View File

@ -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;
}