pocketmine\level\Location::__construct PHP Method

__construct() public method

public __construct ( integer $x, integer $y, integer $z, float $yaw, float $pitch, Level $level = null )
$x integer
$y integer
$z integer
$yaw float
$pitch float
$level Level
    public function __construct($x = 0, $y = 0, $z = 0, $yaw = 0.0, $pitch = 0.0, Level $level = null)
    {
        $this->x = $x;
        $this->y = $y;
        $this->z = $z;
        $this->yaw = $yaw;
        $this->pitch = $pitch;
        $this->level = $level;
    }

Usage Example

Example #1
0
 public function __construct(Location $loc, $name, $skin, $skinName, Item $item, $message = "")
 {
     parent::__construct($loc->x, $loc->y, $loc->z, $loc->yaw, $loc->pitch, $loc->level);
     $this->eid = Entity::$entityCount++;
     $this->skin = $skin;
     $this->skinName = $skinName;
     $this->name = $name;
     $this->item = $item;
     $this->message = $message;
     $this->uuid = UUID::fromRandom();
 }
All Usage Examples Of pocketmine\level\Location::__construct