Position: use setLevel() in constructor to validate level

This commit is contained in:
Dylan K. Taylor 2018-03-24 10:02:10 +00:00
parent e4b6a18404
commit 5eb1ee3416

View File

@ -39,7 +39,7 @@ class Position extends Vector3{
*/
public function __construct($x = 0, $y = 0, $z = 0, Level $level = null){
parent::__construct($x, $y, $z);
$this->level = $level;
$this->setLevel($level);
}
public static function fromObject(Vector3 $pos, Level $level = null){