BedrockSpreadPlacement 5.46.0
Extends StructurePlacement
Bedrock Edition's random spread placement: like Java's (one placement chunk per spacing x spacing region), but the offset comes from a Mersenne Twister seeded with the region coordinates, the world seed and the structure salt.
The seeding constants come from public Bedrock seed tools and are NOT verified against BDS yet (see STRUCTURES-PLAN.md): compare with /locate on a Bedrock Dedicated Server before relying on exact positions.
Constants
REGION_X_MULTIPLIER
php
public const REGION_X_MULTIPLIER = -1683231919REGION_Z_MULTIPLIER
php
public const REGION_Z_MULTIPLIER = -1100435783Properties
$range
php
public readonly int $range$spacing
php
public readonly int $spacing$triangular
php
public readonly bool $triangularMethods
__construct()
php
public function __construct(int $salt, int $spacing, int $range, bool $triangular, float $frequency = 1.0, int $frequencyReduction = self::REDUCTION_DEFAULT, ?string $exclusionSet = null, int $exclusionChunks = 0, array $locateOffset = [0, 0, 0])getPotentialChunk()
php
public function getPotentialChunk(int $seed, int $regionX, int $regionZ) : arraygetSpacing()
php
public function getSpacing() : intisPlacementChunk()
php
public function isPlacementChunk(int $seed, int $chunkX, int $chunkZ) : boolplacementChunksIn()
php
public function placementChunksIn(int $seed, int $minChunkX, int $minChunkZ, int $maxChunkX, int $maxChunkZ) : array