/// <summary> /// Threaded function, loads all the voxel data for this chunk /// </summary> protected override void doWorkOnChunk(Coordinate chunkLocation) { if (jobManager.level.getChunk(chunkLocation).isEmpty) { VoxelStorageType voxelData = jobManager.level.generateVoxelDataForChunk(chunkLocation); jobManager.level.setChunkData(chunkLocation, voxelData); World.NotifyAllOf(new ChunkDataLoadingFinishedEvent(chunkLocation)); } }
/// <summary> /// Threaded function, loads all the voxel data for this chunk /// </summary> protected override void doWork(Coordinate chunkLocation) { IVoxelChunk chunk = jobManager.chunkManager.level.getChunk(chunkLocation); if (chunk.isEmpty && !chunk.isLoaded) { VoxelStorageType voxelData = jobManager.chunkManager.getVoxelDataForChunkFromFile(chunkLocation); jobManager.chunkManager.level.chunkDataStorage.setChunkVoxelData(chunkLocation, voxelData); } }