From f12620f3762fa0b0befab25a9138a137302a4fae Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Date: Tue, 4 Jun 2013 17:42:32 +0200 Subject: [PATCH] Possible fix for #323 --- src/math/Vector3.php | 2 +- src/world/Position.php | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/math/Vector3.php b/src/math/Vector3.php index e7c2ae1f4..91f425df6 100644 --- a/src/math/Vector3.php +++ b/src/math/Vector3.php @@ -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; diff --git a/src/world/Position.php b/src/world/Position.php index 75e55c82a..4f998b0e6 100644 --- a/src/world/Position.php +++ b/src/world/Position.php @@ -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; }