ConcentricRingsPlacement 5.46.0
Extends StructurePlacement
Java Edition's ConcentricRingsStructurePlacement (strongholds): count positions on rings around the origin (ChunkGeneratorStructureState.generateRingPositions()), each snapped to a random preferred biome within 112 blocks.
The positions depend on the seed and the biome source, so a placement read from the data is unbound; the structure manager of each generator binds it (bind()). The biome search of a position (57x57 noise biome samples) is done lazily, only for positions that can be near the chunks asked about: every position has its own forked random, so the order does not matter.
Constants
MAX_SHIFT_CHUNKS
public const MAX_SHIFT_CHUNKS = 8How far (in chunks) the biome search can move a position.
SEARCH_RADIUS
public const SEARCH_RADIUS = 112Biome search radius in blocks (findBiomeHorizontal(..., 112, ...)).
Properties
$count
public readonly int $count$distance
public readonly int $distance$preferredBiomes
public readonly array $preferredBiomes$spread
public readonly int $spreadMethods
__construct()
public function __construct(int $salt, int $distance, int $spread, int $count, array $preferredBiomes, float $frequency = 1.0, int $frequencyReduction = self::REDUCTION_DEFAULT, ?string $exclusionSet = null, int $exclusionChunks = 0, array $locateOffset = [0, 0, 0])bind()
public function bind(int $seed, \Closure $biomeAt) : selfA copy of this placement for one generator (ChunkGeneratorStructureState.createForNormal(): the rings seed is the level seed).
fromJson()
public static function fromJson(array $json, \Closure $resolveBiomes) : selfgetInitialRingPositions()
public function getInitialRingPositions() : arrayChunk positions of the ring positions before their biome search (each final position is within MAX_SHIFT_CHUNKS of it), indexed like resolveRingPosition().
getRingPositions()
public function getRingPositions() : arrayEvery ring position (runs all the biome searches: slow, ~0.3 s each with the PHP biome source).
getSpacing()
public function getSpacing() : intisPlacementChunk()
public function isPlacementChunk(int $seed, int $chunkX, int $chunkZ) : boolplacementChunksIn()
public function placementChunksIn(int $seed, int $minChunkX, int $minChunkZ, int $maxChunkX, int $maxChunkZ) : arrayresolveRingPosition()
public function resolveRingPosition(int $index) : arrayThe final chunk position of one ring position (runs its biome search the first time).
