Added saving crafting time to nbt
This commit is contained in:
parent
ed249fdf75
commit
0bf7af8a84
2 changed files with 12 additions and 2 deletions
|
@ -175,10 +175,18 @@ public class RecipeCrafter {
|
|||
}
|
||||
}
|
||||
|
||||
public void readFromNBT(NBTTagCompound tagCompound) {
|
||||
public void readFromNBT(NBTTagCompound tag) {
|
||||
NBTTagCompound data = tag.getCompoundTag("Crater");
|
||||
|
||||
currentTickTime = data.getInteger("currentTickTime");
|
||||
}
|
||||
|
||||
public void writeToNBT(NBTTagCompound tagCompound) {
|
||||
public void writeToNBT(NBTTagCompound tag) {
|
||||
|
||||
NBTTagCompound data = new NBTTagCompound();
|
||||
|
||||
data.setDouble("currentTickTime", currentTickTime);
|
||||
|
||||
tag.setTag("Crater", data);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,6 +79,7 @@ public class TileImplosionCompressor extends TileMachineBase implements IWrencha
|
|||
super.readFromNBT(tagCompound);
|
||||
inventory.readFromNBT(tagCompound);
|
||||
energy.readFromNBT(tagCompound);
|
||||
crafter.readFromNBT(tagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -87,6 +88,7 @@ public class TileImplosionCompressor extends TileMachineBase implements IWrencha
|
|||
super.writeToNBT(tagCompound);
|
||||
inventory.writeToNBT(tagCompound);
|
||||
energy.writeToNBT(tagCompound);
|
||||
crafter.writeToNBT(tagCompound);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue