Skip to content

BinaryFunction 5.46.0 ​

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

Extends DensityFunction

add, sub, mul, div, min, max. mul/div skip the right side when the left side is 0, min/max skip it when the left side is already outside the right side's range (same short-circuits as vanilla, so values are identical).

Constants ​

ADD ​

php
public const ADD = "add"

DIV ​

php
public const DIV = "div"

MAX ​

php
public const MAX = "max"

MIN ​

php
public const MIN = "min"

MUL ​

php
public const MUL = "mul"

SUB ​

php
public const SUB = "sub"

Properties ​

$left ​

php
public readonly \pocketmine\world\generator\vanilla\density\DensityFunction $left

$op ​

php
public readonly string $op

$right ​

php
public readonly \pocketmine\world\generator\vanilla\density\DensityFunction $right

Methods ​

__construct() ​

php
public function __construct(string $op, \pocketmine\world\generator\vanilla\density\DensityFunction $left, \pocketmine\world\generator\vanilla\density\DensityFunction $right)

children() ​

php
public function children() : array

compute() ​

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

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