mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Implemented asVector3(), asPosition() and asLocation()
Squash merge, closes #973
This commit is contained in:
@ -57,6 +57,15 @@ class Location extends Position{
|
||||
return new Location($pos->x, $pos->y, $pos->z, $yaw, $pitch, $level ?? (($pos instanceof Position) ? $pos->level : null));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a Location instance
|
||||
*
|
||||
* @return Location
|
||||
*/
|
||||
public function asLocation() : Location{
|
||||
return new Location($this->x, $this->y, $this->z, $this->yaw, $this->pitch, $this->level);
|
||||
}
|
||||
|
||||
public function getYaw(){
|
||||
return $this->yaw;
|
||||
}
|
||||
|
Reference in New Issue
Block a user