handle emission error when submitting chunk for mesh
@@ -396,7 +396,10 @@ public int queueVisibleChunks(boolean isFirstRenderingStageForCurrentFrame) {
for (Chunk chunk : chunksInProximityOfCamera) {
if (isChunkValidForRender(chunk) && chunk.isDirty()) {
statDirtyChunks++;
- chunkMeshPublisher.tryEmitNext(chunk);
+ Sinks.EmitResult result = chunkMeshPublisher.tryEmitNext(chunk);
+ if (result.isFailure()) {
+ logger.error("failed to process chunk {} : {}", chunk, result);
+ }
}
}
}
