Fixed #312 Position::getSide() now returns a Position object instead of a Vector3 one

This commit is contained in:
Shoghi Cervantes 2013-06-02 12:46:27 +02:00
parent 4f39818cae
commit 9ead05a6fa

View File

@ -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;