use of org.terasology.engine.world.chunks.pipeline.stages.ChunkTaskProvider in project Terasology by MovingBlocks.
the class ChunkProcessingPipeline method getChunkBy.
private Chunk getChunkBy(ChunkTaskProvider requiredStage, Vector3ic position) {
Chunk chunk = chunkProvider.apply(position);
if (chunk == null) {
ChunkProcessingInfo candidate = chunkProcessingInfoMap.get(position);
if (candidate == null) {
return null;
}
ChunkTaskProvider candidateCurrentStage = candidate.getChunkTaskProvider();
if (stages.indexOf(candidateCurrentStage) >= stages.indexOf(requiredStage)) {
chunk = candidate.getChunk();
}
}
return chunk;
}
Aggregations