mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-01 15:49:54 +00:00
Possible fix for #323
This commit is contained in:
parent
dce9b3140a
commit
f12620f376
@ -30,7 +30,7 @@ class Vector3{
|
||||
|
||||
public function __construct($x = 0, $y = 0, $z = 0){
|
||||
if(($x instanceof Vector3) === true){
|
||||
Vector3::__construct($x->x, $x->y, $x->z);
|
||||
$this->__construct($x->x, $x->y, $x->z);
|
||||
}else{
|
||||
$this->x = $x;
|
||||
$this->y = $y;
|
||||
|
@ -29,7 +29,13 @@ class Position extends Vector3{
|
||||
public $level;
|
||||
|
||||
public function __construct($x = 0, $y = 0, $z = 0, Level $level){
|
||||
parent::__construct($x, $y, $z);
|
||||
if(($x instanceof Vector3) === true){
|
||||
$this->__construct($x->x, $x->y, $x->z, $level);
|
||||
}else{
|
||||
$this->x = $x;
|
||||
$this->y = $y;
|
||||
$this->z = $z;
|
||||
}
|
||||
$this->level = $level;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user