mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 13:09:44 +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
1 changed files with 4 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue