Package org.terasology.module

Examples of org.terasology.module.ModuleEnvironment


        entityManager.clear();

        if (storageManager != null) {
            storageManager.finishSavingAndShutdown();
        }
        ModuleEnvironment environment = CoreRegistry.get(ModuleManager.class).loadEnvironment(Collections.<Module>emptySet(), true);
        CoreRegistry.get(AssetManager.class).setEnvironment(environment);
        CoreRegistry.get(Console.class).dispose();
        CoreRegistry.clear();
        BlockManager.getAir().setEntity(EntityRef.NULL);
        GameThread.clearWaitingProcesses();
View Full Code Here


        for (Module module : registry) {
            if (module.isOnClasspath()) {
                finalModules.add(module);
            }
        }
        ModuleEnvironment newEnvironment = new ModuleEnvironment(finalModules, moduleSecurityManager, Collections.<BytecodeInjector>emptyList());
        if (asPrimary) {
            if (environment != null) {
                environment.close();
            }
            environment = newEnvironment;
View Full Code Here

        DependencyResolver resolver = new DependencyResolver(registry);
        ResolutionResult result = resolver.resolve(moduleNames);

        if (result.isSuccess()) {
            ModuleEnvironment modEnv = moduleManager.loadEnvironment(result.getModules(), true);
            Log.debug("Loaded modules: " + modEnv.getModuleIdsOrderedByDependencies());
        } else {
            Log.error("Could not resolve module dependencies for " + moduleNames);
        }

        CoreRegistry.put(ModuleManager.class, moduleManager);
View Full Code Here

        this.canvas = new CanvasImpl(this, CoreRegistry.get(Time.class), renderer);
    }

    public void refreshWidgetsLibrary() {
        widgetsLibrary = new WidgetLibrary(CoreRegistry.get(ReflectFactory.class), CoreRegistry.get(CopyStrategyLibrary.class));
        ModuleEnvironment environment = CoreRegistry.get(ModuleManager.class).getEnvironment();
        for (Class<? extends UIWidget> type : environment.getSubtypesOf(UIWidget.class)) {
            widgetsLibrary.register(new SimpleUri(environment.getModuleProviding(type), type.getSimpleName()), type);
        }
    }
View Full Code Here

    }

    @Override
    public boolean step() {
        NetworkSystem networkSystem = CoreRegistry.get(NetworkSystem.class);
        ModuleEnvironment moduleEnvironment = CoreRegistry.get(ModuleManager.class).getEnvironment();

        BiomeManager biomeManager;
        if (networkSystem.getMode().isAuthority()) {
            biomeManager = new BiomeManager(moduleEnvironment, gameManifest.getBiomeIdMap());
//            biomeManager.subscribe(CoreRegistry.get(NetworkSystem.class));
View Full Code Here

                for (DependencyInfo dependencyInfo : module.getMetadata().getDependencies()) {
                    selectedModules.add(moduleManager.getRegistry().getLatestModuleVersion(dependencyInfo.getId()));
                }
            }
        }
        ModuleEnvironment environment = moduleManager.loadEnvironment(selectedModules, false);
        assetManager.setEnvironment(environment);
        return environment;
    }
View Full Code Here

TOP

Related Classes of org.terasology.module.ModuleEnvironment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.