pocketmine\level\generator\object\Tree::placeTrunk PHP Метод

placeTrunk() защищенный Метод

protected placeTrunk ( pocketmine\level\ChunkManager $level, $x, $y, $z, Random $random, $trunkHeight )
$level pocketmine\level\ChunkManager
$random pocketmine\utils\Random
    protected function placeTrunk(ChunkManager $level, $x, $y, $z, Random $random, $trunkHeight)
    {
        // The base dirt block
        $level->setBlockIdAt($x, $y - 1, $z, Block::DIRT);
        for ($yy = 0; $yy < $trunkHeight; ++$yy) {
            $blockId = $level->getBlockIdAt($x, $y + $yy, $z);
            if (isset($this->overridable[$blockId])) {
                $level->setBlockIdAt($x, $y + $yy, $z, $this->trunkBlock);
                $level->setBlockDataAt($x, $y + $yy, $z, $this->type);
            }
        }
    }