use of org.terasology.engine.core.ComponentSystemManager in project Terasology by MovingBlocks.
the class RegisterSystems method step.
@Override
public boolean step() {
componentSystemManager = context.get(ComponentSystemManager.class);
ModuleManager moduleManager = context.get(ModuleManager.class);
TerasologyEngine terasologyEngine = (TerasologyEngine) context.get(GameEngine.class);
for (EngineSubsystem subsystem : terasologyEngine.getSubsystems()) {
subsystem.registerSystems(componentSystemManager);
}
componentSystemManager.loadSystems(moduleManager.getEnvironment(), netMode);
return true;
}
use of org.terasology.engine.core.ComponentSystemManager in project Terasology by MovingBlocks.
the class InitialiseSystems method step.
@Override
public boolean step() {
EngineEntityManager entityManager = (EngineEntityManager) context.get(EntityManager.class);
EventLibrary eventLibrary = context.get(EventLibrary.class);
BlockEntityRegistry blockEntityRegistry = context.get(BlockEntityRegistry.class);
context.get(NetworkSystem.class).connectToEntitySystem(entityManager, eventLibrary, blockEntityRegistry);
ComponentSystemManager csm = context.get(ComponentSystemManager.class);
csm.initialise();
return true;
}
use of org.terasology.engine.core.ComponentSystemManager in project Terasology by MovingBlocks.
the class ReadWriteStorageManager method startAutoSaving.
private void startAutoSaving() {
logger.info("Auto Saving - Creating game snapshot");
PerformanceMonitor.startActivity("Auto Saving");
ComponentSystemManager componentSystemManager = CoreRegistry.get(ComponentSystemManager.class);
for (ComponentSystem sys : componentSystemManager.getAllSystems()) {
sys.preAutoSave();
}
saveTransaction = createSaveTransaction();
saveThreadManager.offer(saveTransaction);
for (ComponentSystem sys : componentSystemManager.getAllSystems()) {
sys.postAutoSave();
}
scheduleNextAutoSave();
PerformanceMonitor.endActivity();
entitySetDeltaRecorder = new EntitySetDeltaRecorder(this.entityRefReplacingComponentLibrary);
logger.info("Auto Saving - Snapshot created: Writing phase starts");
}
Aggregations