Skip to content

GradientFunction 5.46.0 ​

final class · pocketmine\world\generator\vanilla\density\GradientFunction · source

Extends DensityFunction

"minecraft:gradient": clamped linear ramp along one axis between two coordinates, optionally repeating.

Constants ​

AXIS_X ​

php
public const AXIS_X = 0

AXIS_Y ​

php
public const AXIS_Y = 1

AXIS_Z ​

php
public const AXIS_Z = 2

TILING_CLAMP ​

php
public const TILING_CLAMP = 0

TILING_MIRRORED ​

php
public const TILING_MIRRORED = 2

TILING_REPEAT ​

php
public const TILING_REPEAT = 1

Properties ​

$axis ​

php
public readonly int $axis

$fromCoordinate ​

php
public readonly int $fromCoordinate

$fromValue ​

php
public readonly float $fromValue

$tiling ​

php
public readonly int $tiling

$toCoordinate ​

php
public readonly int $toCoordinate

$toValue ​

php
public readonly float $toValue

Methods ​

__construct() ​

php
public function __construct(int $axis, int $tiling, int $fromCoordinate, int $toCoordinate, float $fromValue, float $toValue)

children() ​

php
public function children() : array

compute() ​

php
public function compute(float $x, float $y, float $z) : float

dependsOnY() ​

php
public function dependsOnY() : bool

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