API reference / @jsprismarine/chunkgen / ChunkReadOutOfWindowError
Class: ChunkReadOutOfWindowError
Defined in: ChunkStep.ts:57
Raised when a status body asks for a chunk its step did not declare.
Java builds a CrashReport titled "Exception generating new chunk" and throws ReportedException in the same place, from WorldGenRegion.getChunk. An undeclared read is a crash on the first chunk rather than a difference on the thousandth, which is the reason the step table is enforced rather than documented.
Extends
Constructors
Constructor
new ChunkReadOutOfWindowError(
step,distance,requested,allowed):ChunkReadOutOfWindowError
Defined in: ChunkStep.ts:60
Parameters
step
"empty" | "structure_starts" | "structure_references" | "biomes" | "terrain" | "features" | "initialize_light" | "light" | "spawn" | "full"
The status whose body was running when the read happened.
distance
number
Chebyshev distance from the chunk being worked on to the chunk that was asked for.
requested
"empty" | "structure_starts" | "structure_references" | "biomes" | "terrain" | "features" | "initialize_light" | "light" | "spawn" | "full"
The status the body asked for.
allowed
"empty" | "structure_starts" | "structure_references" | "biomes" | "terrain" | "features" | "initialize_light" | "light" | "spawn" | "full" | undefined
The highest status that distance is guaranteed to hold, or undefined when out of range.
Returns
ChunkReadOutOfWindowError
Overrides
Error.constructor
Properties
allowed
readonlyallowed:"empty"|"structure_starts"|"structure_references"|"biomes"|"terrain"|"features"|"initialize_light"|"light"|"spawn"|"full"|undefined
Defined in: ChunkStep.ts:68
The highest status that distance is guaranteed to hold, or undefined when out of range.
distance
readonlydistance:number
Defined in: ChunkStep.ts:64
Chebyshev distance from the chunk being worked on to the chunk that was asked for.
name
name:
string='ChunkReadOutOfWindowError'
Defined in: ChunkStep.ts:58
Overrides
Error.name
requested
readonlyrequested:"empty"|"structure_starts"|"structure_references"|"biomes"|"terrain"|"features"|"initialize_light"|"light"|"spawn"|"full"
Defined in: ChunkStep.ts:66
The status the body asked for.
step
readonlystep:"empty"|"structure_starts"|"structure_references"|"biomes"|"terrain"|"features"|"initialize_light"|"light"|"spawn"|"full"
Defined in: ChunkStep.ts:62
The status whose body was running when the read happened.