mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +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;
|
||||
}
|
||||
|
||||
public function getSide($side){
|
||||
return new Position(parent::side($side), 0, 0, $this->level);
|
||||
}
|
||||
|
||||
public function distance($x = 0, $y = 0, $z = 0){
|
||||
if(($x instanceof Position) and $x->level !== $this->level){
|
||||
return PHP_INT_MAX;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue