use of org.terasology.fixtures.TestStorageManager 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));
}
Aggregations