Position::fromObject() world parameter is now mandatory (although still nullable)

This commit is contained in:
Dylan K. Taylor 2020-11-03 14:33:26 +00:00
parent 5cc2a9c3dd
commit a05f67bc77
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ class Location extends Position{
/**
* @return Location
*/
public static function fromObject(Vector3 $pos, ?World $world = null, float $yaw = 0.0, float $pitch = 0.0){
public static function fromObject(Vector3 $pos, ?World $world, float $yaw = 0.0, float $pitch = 0.0){
return new Location($pos->x, $pos->y, $pos->z, $yaw, $pitch, $world ?? (($pos instanceof Position) ? $pos->world : null));
}

View File

@ -49,7 +49,7 @@ class Position extends Vector3{
/**
* @return Position
*/
public static function fromObject(Vector3 $pos, ?World $world = null){
public static function fromObject(Vector3 $pos, ?World $world){
return new Position($pos->x, $pos->y, $pos->z, $world);
}