Source:
public boolean step() { EntityManager entityManager = context.get(EntityManager.class); ChunkProvider chunkProvider = context.get(ChunkProvider.class); Iterator<EntityRef> worldEntityIterator = entityManager.getEntitiesWith(WorldComponent.class).iterator(); if (worldEntityIterator.hasNext()) { EntityRef worldEntity = worldEntityIterator.next(); chunkProvider.setWorldEntity(worldEntity); WorldGenerator worldGenerator = context.get(WorldGenerator.class); WorldConfigurator worldConfigurator = worldGenerator.getConfigurator(); Map<String, Component> params = worldConfigurator.getProperties(); for (Map.Entry<String, Component> entry : params.entrySet()) { Class<? extends Component> clazz = entry.getValue().getClass(); Component comp = worldEntity.getComponent(clazz); if (comp != null) { worldConfigurator.setProperty(entry.getKey(), comp); } } } else { EntityRef worldEntity; if (gameManifest.getWorldInfoMap().size() > 1) { worldEntity = entityManager.create(gameManifest); } else { worldEntity = entityManager.create(); } worldEntity.addComponent(new WorldComponent()); NetworkComponent networkComponent = new NetworkComponent(); networkComponent.replicateMode = NetworkComponent.ReplicateMode.ALWAYS; worldEntity.addComponent(networkComponent); chunkProvider.setWorldEntity(worldEntity); WorldGenerator worldGenerator = context.get(WorldGenerator.class); SimpleUri generatorUri = worldGenerator.getUri(); Config config = context.get(Config.class); WorldConfigurator worldConfigurator = worldGenerator.getConfigurator(); Map<String, Component> params = worldConfigurator.getProperties(); for (Map.Entry<String, Component> entry : params.entrySet()) { Class<? extends Component> clazz = entry.getValue().getClass(); Component comp = config.getModuleConfig(generatorUri, entry.getKey(), clazz); if (comp != null) { worldEntity.addComponent(comp); worldConfigurator.setProperty(entry.getKey(), comp); } else { worldEntity.addComponent(entry.getValue()); } } } return true; }

Target:
public boolean step() { EntityManager entityManager = context.get(EntityManager.class); ChunkProvider chunkProvider = context.get(ChunkProvider.class); Iterator<EntityRef> worldEntityIterator = entityManager.getEntitiesWith(WorldComponent.class).iterator(); if (worldEntityIterator.hasNext()) { EntityRef worldEntity = worldEntityIterator.next(); chunkProvider.setWorldEntity(worldEntity); WorldGenerator worldGenerator = context.get(WorldGenerator.class); WorldConfigurator worldConfigurator = worldGenerator.getConfigurator(); Map<String, Component> params = worldConfigurator.getProperties(); for (Map.Entry<String, Component> entry : params.entrySet()) { Class<? extends Component> clazz = entry.getValue().getClass(); Component comp = worldEntity.getComponent(clazz); if (comp != null) { worldConfigurator.setProperty(entry.getKey(), comp); } } } else { EntityRef worldEntity; entityManager.createWorldPools(gameManifest); worldEntity = entityManager.create(); worldEntity.addComponent(new WorldComponent()); NetworkComponent networkComponent = new NetworkComponent(); networkComponent.replicateMode = NetworkComponent.ReplicateMode.ALWAYS; worldEntity.addComponent(networkComponent); chunkProvider.setWorldEntity(worldEntity); WorldGenerator worldGenerator = context.get(WorldGenerator.class); SimpleUri generatorUri = worldGenerator.getUri(); Config config = context.get(Config.class); WorldConfigurator worldConfigurator = worldGenerator.getConfigurator(); Map<String, Component> params = worldConfigurator.getProperties(); for (Map.Entry<String, Component> entry : params.entrySet()) { Class<? extends Component> clazz = entry.getValue().getClass(); Component comp = config.getModuleConfig(generatorUri, entry.getKey(), clazz); if (comp != null) { worldEntity.addComponent(comp); worldConfigurator.setProperty(entry.getKey(), comp); } else { worldEntity.addComponent(entry.getValue()); } } } return true; }