}
public void writeToNBT(NBTTagCompound nbt) {
nbt.setLong("initialDate", initialDate);
MappingRegistry registry = new MappingRegistry();
NBTTagList list = new NBTTagList();
for (SequenceAction action : actions) {
NBTTagCompound cpt = new NBTTagCompound();
action.writeToNBT(cpt);
cpt.setString("class", classToStr.get(action.getClass()));
registry.scanAndTranslateStacksToRegistry(cpt);
list.appendTag(cpt);
}
nbt.setTag("actions", list);
NBTTagCompound registryNBT = new NBTTagCompound();
registry.write(registryNBT);
nbt.setTag("registry", registryNBT);
}