use of org.terasology.engine.world.BlockEntityRegistry in project Terasology by MovingBlocks.
the class LocalChunkProviderTest method setUp.
@BeforeEach
public void setUp() {
entityManager = mock(EntityManager.class);
blockAtBlockManager = new Block();
blockAtBlockManager.setId((short) 1);
blockAtBlockManager.setUri(BlockManager.AIR_ID);
blockAtBlockManager.setEntity(mock(EntityRef.class));
blockManager = new TestBlockManager(blockAtBlockManager);
extraDataManager = new ExtraBlockDataManager();
blockEntityRegistry = mock(BlockEntityRegistry.class);
worldEntity = mock(EntityRef.class);
chunkCache = Maps.newConcurrentMap();
storageManager = new TestStorageManager();
generator = new TestWorldGenerator(blockManager);
chunkProvider = new LocalChunkProvider(storageManager, entityManager, generator, blockManager, extraDataManager, chunkCache);
chunkProvider.setBlockEntityRegistry(blockEntityRegistry);
chunkProvider.setWorldEntity(worldEntity);
// workaround. initialize loading pipeline
chunkProvider.setRelevanceSystem(new RelevanceSystem(chunkProvider));
}
use of org.terasology.engine.world.BlockEntityRegistry 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;
}
Aggregations