StructurePlacement 5.46.0
Where the structures of a structure set may start (vanilla's StructurePlacement): the placement chunks of the concrete placement, then the frequency reduction and the exclusion zone.
Constants
REDUCTION_DEFAULT
public const REDUCTION_DEFAULT = 0REDUCTION_LEGACY_1
public const REDUCTION_LEGACY_1 = 1REDUCTION_LEGACY_2
public const REDUCTION_LEGACY_2 = 2REDUCTION_LEGACY_3
public const REDUCTION_LEGACY_3 = 3Properties
$exclusionChunks
public readonly int $exclusionChunks$exclusionSet
public readonly ?string $exclusionSet$frequency
public readonly float $frequency$frequencyReduction
public readonly int $frequencyReduction$locateOffset
public readonly array $locateOffset$salt
public readonly int $saltMethods
__construct()
public function __construct(int $salt, float $frequency = 1.0, int $frequencyReduction = self::REDUCTION_DEFAULT, ?string $exclusionSet = null, int $exclusionChunks = 0, array $locateOffset = [0, 0, 0])getLocatePos()
public function getLocatePos(int $chunkX, int $chunkZ) : arrayThe block position /locate reports for a start chunk (StructurePlacement.getLocatePos()).
getSpacing()
abstract public function getSpacing() : intTypical distance in chunks between two placement chunks (used to size searches).
isPlacementChunk()
abstract public function isPlacementChunk(int $seed, int $chunkX, int $chunkZ) : boolWhether the chunk is a placement chunk of this placement (before frequency and exclusion checks).
isStructureChunk()
public function isStructureChunk(int $seed, int $chunkX, int $chunkZ, \Closure $hasStructureChunkInRange) : boolStructurePlacement.isStructureChunk()
parseCommon() protected
protected static function parseCommon(array $json) : arrayParses the common fields of a placement ("frequency", "frequency_reduction_method", "exclusion_zone", "locate_offset").
passesFrequency()
public function passesFrequency(int $seed, int $chunkX, int $chunkZ) : boolStructurePlacement.FrequencyReductionMethod
passesRestrictions()
public function passesRestrictions(int $seed, int $chunkX, int $chunkZ, \Closure $hasStructureChunkInRange) : boolThe frequency and exclusion zone checks of isStructureChunk(), for a known placement chunk.
placementChunksIn()
abstract public function placementChunksIn(int $seed, int $minChunkX, int $minChunkZ, int $maxChunkX, int $maxChunkZ) : arrayThe placement chunks inside the given chunk area (inclusive), as [chunkX, chunkZ] pairs.
