use of org.terasology.engine.entitySystem.metadata.EntitySystemLibrary in project Terasology by MovingBlocks.
the class EntitySystemSetupUtil method addReflectionBasedLibraries.
public static void addReflectionBasedLibraries(Context context) {
ReflectionReflectFactory reflectFactory = new ReflectionReflectFactory();
context.put(ReflectFactory.class, reflectFactory);
CopyStrategyLibrary copyStrategyLibrary = new CopyStrategyLibrary(reflectFactory);
context.put(CopyStrategyLibrary.class, copyStrategyLibrary);
ModuleManager moduleManager = context.get(ModuleManager.class);
TypeRegistry typeRegistry = context.get(TypeRegistry.class);
TypeHandlerLibrary typeHandlerLibrary = TypeHandlerLibraryImpl.forModuleEnvironment(moduleManager, typeRegistry);
context.put(TypeHandlerLibrary.class, typeHandlerLibrary);
EntitySystemLibrary library = new EntitySystemLibrary(context, typeHandlerLibrary);
context.put(EntitySystemLibrary.class, library);
context.put(ComponentLibrary.class, library.getComponentLibrary());
context.put(EventLibrary.class, library.getEventLibrary());
}
Aggregations