Skip to content

RandomSpreadPlacement 5.46.0 ​

final class · pocketmine\world\generator\vanilla\structure\placement\RandomSpreadPlacement · source

Extends StructurePlacement

Java Edition's RandomSpreadStructurePlacement: one placement chunk per spacing x spacing region, at a random offset in [0, spacing - separation) from the region corner (linear or triangular spread).

Properties ​

$separation ​

php
public readonly int $separation

$spacing ​

php
public readonly int $spacing

$triangular ​

php
public readonly bool $triangular

Methods ​

__construct() ​

php
public function __construct(int $salt, int $spacing, int $separation, bool $triangular, float $frequency = 1.0, int $frequencyReduction = self::REDUCTION_DEFAULT, ?string $exclusionSet = null, int $exclusionChunks = 0, array $locateOffset = [0, 0, 0])

floorDiv() ​

php
public static function floorDiv(int $a, int $b) : int

fromJson() ​

php
public static function fromJson(array $json) : self

getPotentialChunk() ​

php
public function getPotentialChunk(int $seed, int $regionX, int $regionZ) : array

RandomSpreadStructurePlacement.getPotentialStructureChunk()

getSpacing() ​

php
public function getSpacing() : int

isPlacementChunk() ​

php
public function isPlacementChunk(int $seed, int $chunkX, int $chunkZ) : bool

placementChunksIn() ​

php
public function placementChunksIn(int $seed, int $minChunkX, int $minChunkZ, int $maxChunkX, int $maxChunkZ) : array

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.