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:
parent
204c6119e7
commit
e629774753
|
@ -37,11 +37,11 @@ public class FluidTank implements IFluidTank
|
||||||
if (!nbt.hasKey("Empty"))
|
if (!nbt.hasKey("Empty"))
|
||||||
{
|
{
|
||||||
FluidStack fluid = FluidStack.loadFluidStackFromNBT(nbt);
|
FluidStack fluid = FluidStack.loadFluidStackFromNBT(nbt);
|
||||||
|
setFluid(fluid);
|
||||||
if (fluid != null)
|
}
|
||||||
{
|
else
|
||||||
setFluid(fluid);
|
{
|
||||||
}
|
setFluid(null);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue