Various fixes to data not loading properly (#5407)

* Cleanup redstone handling of TileEntitySidedPipe
Properly mark the transmitters as dirty if the redstone mode changed during refresh

* Fix not updating tank capacity when loading TEFluidTank from NBT

* Make transmitters fix invalid connections on load

* Address comments and call refreshConnections() directly.
This commit is contained in:
Richard Freimer authored and GitHub committed 2019-04-17 11:24:44 -04:00
1 parent 9b70069eaf
commit 04372a6426
2 files changed
+38 -34

No files matched your search

@@ -288,9 +288,10 @@ public class TileEntityFluidTank extends TileEntityContainerBlock implements IAc
tier = FluidTankTier.values()[nbtTags.getInteger("tier")];
clientActive = isActive = nbtTags.getBoolean("isActive");
editMode = ContainerEditMode.values()[nbtTags.getInteger("editMode")];
//Needs to be outside the hasKey check because this is just based on the tier which is known information
fluidTank.setCapacity(tier.getStorage());
if (nbtTags.hasKey("fluidTank")) {
fluidTank.setCapacity(tier.getStorage());
fluidTank.readFromNBT(nbtTags.getCompoundTag("fluidTank"));
}
}