Merge pull request #1743 from Prototik/builder-energy

Fix read/write nbt in builders
This commit is contained in:
SpaceToad 2014-05-08 15:35:42 +02:00
commit 915b9e2baf

View file

@ -139,14 +139,15 @@ public abstract class TileAbstractBuilder extends TileBuildCraft implements ITil
public void writeToNBT(NBTTagCompound nbttagcompound) {
super.writeToNBT(nbttagcompound);
mjStored = nbttagcompound.getDouble("mjStored");
nbttagcompound.setDouble("mjStored", mjStored);
}
@Override
public void readFromNBT(NBTTagCompound nbttagcompound) {
super.readFromNBT(nbttagcompound);
nbttagcompound.setDouble("mjStored", mjStored);
mjStored = nbttagcompound.getDouble("mjStored");
mjPrev = mjStored;
mjUnchangedCycles = 0;
}