mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Entity: add getHorizontalFacing(), clean up some boilerplate code
This commit is contained in:
@ -1289,6 +1289,10 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
return Bearing::fromAngle($this->yaw);
|
||||
}
|
||||
|
||||
public function getHorizontalFacing() : int{
|
||||
return Bearing::toFacing($this->getDirection());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Vector3
|
||||
*/
|
||||
|
Reference in New Issue
Block a user