Skip to content

BoundingBox 5.46.0 ​

final class · pocketmine\world\generator\vanilla\structure\BoundingBox · source

Vanilla's BoundingBox: an integer box with inclusive bounds. Mutable like vanilla's (move() and encapsulate() change the box); use copy() where vanilla creates a new box.

Properties ​

$maxX ​

php
public int $maxX

$maxY ​

php
public int $maxY

$maxZ ​

php
public int $maxZ

$minX ​

php
public int $minX

$minY ​

php
public int $minY

$minZ ​

php
public int $minZ

Methods ​

__construct() ​

php
public function __construct(int $minX, int $minY, int $minZ, int $maxX, int $maxY, int $maxZ)

__toString() ​

php
public function __toString() : string

chunk() ​

php
public static function chunk(int $chunkX, int $chunkZ, int $minY, int $maxY) : self

The box of one chunk, between the given heights.

contains() ​

php
public function contains(\pocketmine\world\generator\vanilla\structure\BoundingBox $other) : bool

Whether the other box is entirely inside this one.

copy() ​

php
public function copy() : self

encapsulate() ​

php
public function encapsulate(\pocketmine\world\generator\vanilla\structure\BoundingBox $other) : self

encapsulatePoint() ​

php
public function encapsulatePoint(int $x, int $y, int $z) : self

equals() ​

php
public function equals(\pocketmine\world\generator\vanilla\structure\BoundingBox $other) : bool

fromCorners() ​

php
public static function fromCorners(int $x1, int $y1, int $z1, int $x2, int $y2, int $z2) : self

getCenter() ​

php
public function getCenter() : array

BoundingBox.getCenter()

getXSpan() ​

php
public function getXSpan() : int

getYSpan() ​

php
public function getYSpan() : int

getZSpan() ​

php
public function getZSpan() : int

inflatedBy() ​

php
public function inflatedBy(int $amount) : self

intersects() ​

php
public function intersects(\pocketmine\world\generator\vanilla\structure\BoundingBox $other) : bool

intersectsXZ() ​

php
public function intersectsXZ(int $minX, int $minZ, int $maxX, int $maxZ) : bool

isInside() ​

php
public function isInside(int $x, int $y, int $z) : bool

move() ​

php
public function move(int $dx, int $dy, int $dz) : self

moved() ​

php
public function moved(int $dx, int $dy, int $dz) : self

orientBox() ​

php
public static function orientBox(int $footX, int $footY, int $footZ, int $offX, int $offY, int $offZ, int $width, int $height, int $depth, int $direction) : self

BoundingBox.orientBox(): a box of the given size whose foot is at (footX, footY, footZ), offset in the local frame of a piece facing the given direction.

toArray() ​

php
public function toArray() : array

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