ChunkIOErrorReporter .java

net.minecraft.world.level.chunk.storage.ChunkIOErrorReporter (interface): members: createMisplacedChunkReport, reportMisplacedChunk. imports: CrashReport.

net.minecraft.world.level.chunk.storageinterface26 linescommon1.2 KB

API Surface (0)

No public/protected methods detected (fields or constants only).

String literals (5)

"Retrieved chunk position "
" does not match requested "
"Chunk found in invalid location"
"Misplaced Chunk"
"Stored Position"

Code Graph: Dependencies (5)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

ChunkIOErrorReporter.java26 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.world.level.chunk.storage;
2
3
import net.minecraft.CrashReport;
4
import net.minecraft.CrashReportCategory;
5
import net.minecraft.ReportedException;
6
import net.minecraft.world.level.ChunkPos;
7
8
public interface ChunkIOErrorReporter {
9
	void reportChunkLoadFailure(Throwable throwable, RegionStorageInfo storageInfo, ChunkPos pos);
10
11
	void reportChunkSaveFailure(Throwable throwable, RegionStorageInfo storageInfo, ChunkPos pos);
12
13
	static ReportedException createMisplacedChunkReport(final ChunkPos storedPos, final ChunkPos requestedPos) {
14
		CrashReport report = CrashReport.forThrowable(
15
			new IllegalStateException("Retrieved chunk position " + storedPos + " does not match requested " + requestedPos), "Chunk found in invalid location"
16
		);
17
		CrashReportCategory category = report.addCategory("Misplaced Chunk");
18
		category.setDetail("Stored Position", storedPos::toString);
19
		return new ReportedException(report);
20
	}
21
22
	default void reportMisplacedChunk(final ChunkPos storedPos, final ChunkPos requestedPos, final RegionStorageInfo storageInfo) {
23
		this.reportChunkLoadFailure(createMisplacedChunkReport(storedPos, requestedPos), storageInfo, requestedPos);
24
	}
25
}
26

Decompiled Minecraft 26.3 source of ChunkIOErrorReporter (net/minecraft/world/level/chunk/storage/ChunkIOErrorReporter.java) with Mojang official mappings, stored verbatim on the site.