API reference / @jsprismarine/prismarine / world/generators/datadriven/javaStructurePlacement / CandidateChunkMemo
Class: CandidateChunkMemo
Defined in: packages/prismarine/src/world/generators/datadriven/javaStructurePlacement.ts:125
candidateChunksIn with each region's answer remembered.
A region's candidate is fixed by the seed, and the windows neighboring chunks scan overlap almost entirely: a set spaced one chunk apart, such as the mineshafts, asks the same 289 regions of every chunk around it, and each answer is two seeded draws. The memo draws a tile of regions once and keeps only the candidates it holds, so a later window reads a few tiles and filters their candidates instead of visiting each region.
Constructors
Constructor
new CandidateChunkMemo(
seed,ringChunks?):CandidateChunkMemo
Defined in: packages/prismarine/src/world/generators/datadriven/javaStructurePlacement.ts:135
Parameters
seed
bigint
ringChunks?
(placement, range) => ChunkPosition[]
Where a concentric rings placement starts in a range once its positions are moved to their preferred biomes. Without it, the drawn positions are used as they are.
Returns
CandidateChunkMemo
Accessors
regionsDrawn
Get Signature
get regionsDrawn():
number
Defined in: packages/prismarine/src/world/generators/datadriven/javaStructurePlacement.ts:141
How many random spread regions this memo has drawn a candidate for, for profiling.
Returns
number
Methods
in()
in(
placement,range):ChunkPosition[]
Defined in: packages/prismarine/src/world/generators/datadriven/javaStructurePlacement.ts:146
The same chunks, in the same order, as candidateChunksIn returns.