mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-29 22:45:00 +00:00
Fixed #312 Position::getSide() now returns a Position object instead of a Vector3 one
This commit is contained in:
parent
4f39818cae
commit
9ead05a6fa
@ -33,6 +33,10 @@ class Position extends Vector3{
|
|||||||
$this->level = $level;
|
$this->level = $level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getSide($side){
|
||||||
|
return new Position(parent::side($side), 0, 0, $this->level);
|
||||||
|
}
|
||||||
|
|
||||||
public function distance($x = 0, $y = 0, $z = 0){
|
public function distance($x = 0, $y = 0, $z = 0){
|
||||||
if(($x instanceof Position) and $x->level !== $this->level){
|
if(($x instanceof Position) and $x->level !== $this->level){
|
||||||
return PHP_INT_MAX;
|
return PHP_INT_MAX;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user