Search in sources :

Example 6 with ModuleTypeRegistry

use of org.terasology.reflection.ModuleTypeRegistry in project Terasology by MovingBlocks.

the class ModuleEnvironmentTest method before.

@BeforeEach
public void before(@TempDir Path tempHome) throws Exception {
    PathManager.getInstance().useOverrideHomePath(tempHome);
    moduleManager = ModuleManagerFactory.create();
    TypeRegistry.WHITELISTED_CLASSES = ExternalApiWhitelist.CLASSES.stream().map(Class::getName).collect(Collectors.toSet());
    TypeRegistry.WHITELISTED_PACKAGES = ExternalApiWhitelist.PACKAGES;
    typeRegistry = new ModuleTypeRegistry(moduleManager.getEnvironment());
    setup();
}
Also used : ModuleTypeRegistry(org.terasology.reflection.ModuleTypeRegistry) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

ModuleTypeRegistry (org.terasology.reflection.ModuleTypeRegistry)6 ModuleManager (org.terasology.engine.core.module.ModuleManager)4 BeforeEach (org.junit.jupiter.api.BeforeEach)3 EntitySystemLibrary (org.terasology.engine.entitySystem.metadata.EntitySystemLibrary)2 TypeHandlerLibrary (org.terasology.persistence.typeHandling.TypeHandlerLibrary)2 CopyStrategyLibrary (org.terasology.reflection.copy.CopyStrategyLibrary)2 Config (org.terasology.engine.config.Config)1 AutoConfigManager (org.terasology.engine.config.flexible.AutoConfigManager)1 ContextImpl (org.terasology.engine.context.internal.ContextImpl)1 ComponentLibrary (org.terasology.engine.entitySystem.metadata.ComponentLibrary)1 Prefab (org.terasology.engine.entitySystem.prefab.Prefab)1 PrefabDeltaFormat (org.terasology.engine.entitySystem.prefab.internal.PrefabDeltaFormat)1 PrefabFormat (org.terasology.engine.entitySystem.prefab.internal.PrefabFormat)1 EventSerializer (org.terasology.engine.persistence.serializers.EventSerializer)1 CollisionGroupTypeHandler (org.terasology.engine.persistence.typeHandling.extensionTypes.CollisionGroupTypeHandler)1 ModuleAwareAssetTypeManager (org.terasology.gestalt.assets.module.ModuleAwareAssetTypeManager)1 AutoReloadAssetTypeManager (org.terasology.gestalt.assets.module.autoreload.AutoReloadAssetTypeManager)1 ModuleEnvironment (org.terasology.gestalt.module.ModuleEnvironment)1 ReflectFactory (org.terasology.reflection.reflect.ReflectFactory)1 ReflectionReflectFactory (org.terasology.reflection.reflect.ReflectionReflectFactory)1