Certain chunk loading errors are not logged
private Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> handleChunkLoadFailure(Throwable throwable, ChunkPos chunkPos) { // In ChunkMap.java if (throwable instanceof ReportedException reportedException) { Throwable throwable2 = reportedException.getCause(); if (!(throwable2 instanceof IOException)) { this.markPositionReplaceable(chunkPos); throw reportedException; } LOGGER.error("Couldn't load chunk {}", chunkPos, throwable2); } else if (throwable instanceof IOException) { LOGGER.error("Couldn't load chunk {}", chunkPos, throwable); } return Either.left(this.createEmptyChunk(chunkPos)); }
(From ChunkMap.java)
If the error is not IOException, it is simply ignored. Errors converting chunks using DFU fall into the ignored category here.
The exception should be logged as long as it's not ThreadDeath. ThreadDeath should be re-thrown, however that's impossible when using CompletableFuture.
Created Issue:
Certain chunk loading errors are not logged
private Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> handleChunkLoadFailure(Throwable throwable, ChunkPos chunkPos) { if (throwable instanceof ReportedException reportedException) { Throwable throwable2 = reportedException.getCause(); if (!(throwable2 instanceof IOException)) { this.markPositionReplaceable(chunkPos); throw reportedException; } LOGGER.error("Couldn't load chunk {}", chunkPos, throwable2); } else if (throwable instanceof IOException) { LOGGER.error("Couldn't load chunk {}", chunkPos, throwable); } return Either.left(this.createEmptyChunk(chunkPos)); }If the error is not IOException, it is simply ignored. Errors converting chunks using DFU fall into the ignored category here.
The exception should be logged as long as it's not ThreadDeath. ThreadDeath should be re-thrown, however that's impossible when using CompletableFuture.
Environment
Not relevant
private Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> handleChunkLoadFailure(Throwable throwable, ChunkPos chunkPos) {if(throwableinstanceof ReportedException reportedException) { Throwable throwable2 = reportedException.getCause(); if (!(throwable2 instanceof IOException)) { this.markPositionReplaceable(chunkPos); throw reportedException; } LOGGER.error("Couldn't load chunk {}", chunkPos, throwable2); } else if (throwable instanceof IOException) { LOGGER.error("Couldn't load chunk {}", chunkPos, throwable); } return Either.left(this.createEmptyChunk(chunkPos)); }If the error is not IOException, it is simply ignored. Errors converting chunks using DFU fall into the ignored category here.
The exception should be logged as long as it's not ThreadDeath. ThreadDeath should be re-thrown, however that's impossible when using CompletableFuture.
private Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> handleChunkLoadFailure(Throwable throwable, ChunkPos chunkPos) { // In ChunkMap.java if (throwable instanceof ReportedException reportedException) { Throwable throwable2 = reportedException.getCause(); if (!(throwable2 instanceof IOException)) { this.markPositionReplaceable(chunkPos); throw reportedException; } LOGGER.error("Couldn't load chunk {}", chunkPos, throwable2); } else if (throwable instanceof IOException) { LOGGER.error("Couldn't load chunk {}", chunkPos, throwable); } return Either.left(this.createEmptyChunk(chunkPos)); }If the error is not IOException, it is simply ignored. Errors converting chunks using DFU fall into the ignored category here.
The exception should be logged as long as it's not ThreadDeath. ThreadDeath should be re-thrown, however that's impossible when using CompletableFuture.
private Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> handleChunkLoadFailure(Throwable throwable, ChunkPos chunkPos) { // In ChunkMap.java if (throwable instanceof ReportedException reportedException) { Throwable throwable2 = reportedException.getCause(); if (!(throwable2 instanceof IOException)) { this.markPositionReplaceable(chunkPos); throw reportedException; } LOGGER.error("Couldn't load chunk {}", chunkPos, throwable2); } else if (throwable instanceof IOException) { LOGGER.error("Couldn't load chunk {}", chunkPos, throwable); } return Either.left(this.createEmptyChunk(chunkPos)); }(From ChunkMap.java)
If the error is not IOException, it is simply ignored. Errors converting chunks using DFU fall into the ignored category here.
The exception should be logged as long as it's not ThreadDeath. ThreadDeath should be re-thrown, however that's impossible when using CompletableFuture.
private Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> handleChunkLoadFailure(Throwable throwable, ChunkPos chunkPos) { // In ChunkMap.java if (throwable instanceof ReportedException reportedException) { Throwable throwable2 = reportedException.getCause(); if (!(throwable2 instanceof IOException)) { this.markPositionReplaceable(chunkPos); throw reportedException; } LOGGER.error("Couldn't load chunk {}", chunkPos, throwable2); } else if (throwable instanceof IOException) { LOGGER.error("Couldn't load chunk {}", chunkPos, throwable); } return Either.left(this.createEmptyChunk(chunkPos)); }(From ChunkMap.java)
If the error is not
IOException, it is simply ignored. Errorsconverting chunks using DFU fall into the ignored category here.
The exception should be logged as long as it's not ThreadDeath. ThreadDeath should be re-thrown, however that's impossible when using CompletableFuture.
private Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure> handleChunkLoadFailure(Throwable throwable, ChunkPos chunkPos) { // In ChunkMap.java if (throwable instanceof ReportedException reportedException) { Throwable throwable2 = reportedException.getCause(); if (!(throwable2 instanceof IOException)) { this.markPositionReplaceable(chunkPos); throw reportedException; } LOGGER.error("Couldn't load chunk {}", chunkPos, throwable2); } else if (throwable instanceof IOException) { LOGGER.error("Couldn't load chunk {}", chunkPos, throwable); } return Either.left(this.createEmptyChunk(chunkPos)); }(From ChunkMap.java)
If the error is not IOException, it is simply ignored. Errors converting chunks using DFU fall into the ignored category here.
The exception should be logged as long as it's not ThreadDeath. ThreadDeath should be re-thrown, however that's impossible when using CompletableFuture.
Not relevant
The chunks are still regenerated in 1.20.2, but the errors are no longer logged (MC-265252).