use of org.terasology.persistence.WorldDumper in project Terasology by MovingBlocks.
the class CoreCommands method dumpEntities.
/**
* Writes out information on all entities to a text file for debugging
* @throws IOException thrown when error with saving file occures
*/
@Command(shortDescription = "Writes out information on all entities to a text file for debugging", helpText = "Writes entity information out into a file named \"entityDump.txt\".")
public void dumpEntities() throws IOException {
EngineEntityManager engineEntityManager = (EngineEntityManager) entityManager;
PrefabSerializer prefabSerializer = new PrefabSerializer(engineEntityManager.getComponentLibrary(), engineEntityManager.getTypeSerializerLibrary());
WorldDumper worldDumper = new WorldDumper(engineEntityManager, prefabSerializer);
worldDumper.save(PathManager.getInstance().getHomePath().resolve("entityDump.txt"));
}
Aggregations