Skip to content

TwoByTwoTree 5.46.0 ​

abstract class · pocketmine\world\generator\object\TwoByTwoTree · source

Extends Tree

A tree with a 2x2 trunk, grown from a 2x2 square of saplings. x, z is the north-west sapling; the centre of the trunk is at x + 1, z + 1 (block corners).

Methods ​

canPlaceObject() ​

php
public function canPlaceObject(\pocketmine\world\ChunkManager $world, int $x, int $y, int $z, \pocketmine\utils\Random $random) : bool

placeLeafDisc() protected ​

php
protected function placeLeafDisc(\pocketmine\world\BlockTransaction $transaction, float $cx, int $y, float $cz, float $radius, \pocketmine\utils\Random $random, bool $ragged = true) : array

Places a disc of leaves at height y, centred on the point (cx, cz) (block corners, e.g. the centre of a 2x2 trunk). Leaves at the edge of the disc are left out at random when $ragged is true.

placeTrunk() protected ​

php
protected function placeTrunk(int $x, int $y, int $z, \pocketmine\utils\Random $random, int $trunkHeight, \pocketmine\world\BlockTransaction $transaction) : void

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