public function __construct(Position $a, Vector3 $b)
 {
     $this->raw0 = $a;
     if (!$b instanceof Position) {
         $b = new Position($b->getX(), $b->getY(), $b->getZ(), $a->getLevel());
     }
     $this->raw1 = $b;
     if ($a->getLevel()->getName() !== $b->getLevel()->getName()) {
         trigger_error("Positions of different levels (\"" . $a->getLevel()->getName() . "\" and \"" . $b->getLevel()->getName() . "\" passed to constructor of " . get_class($this), E_USER_WARNING);
     }
     $this->bake();
     parent::__construct();
     // call this at the last because it has to bake before acquiring
 }
 public function __construct(Position $centre, $radius)
 {
     $this->centre = $centre;
     $this->radius = $radius;
     $y = $centre->y;
     $y = [$y + $radius, $y - $radius];
     $maxY = max($y);
     $minY = min($y);
     $maxHeight = 127;
     if (defined($path = "pemapmodder\\worldeditart\\MAX_WORLD_HEIGHT")) {
         $maxHeight = constant($path);
         // **** PhpStorm
     }
     if ($maxY > $maxHeight or $minY < 0) {
         throw new SelectionExceedWorldException("SphereSpace");
     }
     parent::__construct();
 }
 public function __construct($axis, $radius, Position $base, $height)
 {
     $this->base = Position::fromObject($base->floor(), $base->getLevel());
     $this->height = $height;
     $this->radius = $radius;
     $this->axis = $axis % 3;
     if ($this->axis === self::Y) {
         $y = [$this->base->getY(), $this->base->getY() + $height];
         $maxY = max($y);
         $minY = min($y);
     } else {
         $y = [$this->base->getY() + $radius, $this->base->getY() - $radius];
         $maxY = max($y);
         $minY = min($y);
     }
     $maxHeight = 127;
     if (defined($path = "pemapmodder\\worldeditart\\MAX_WORLD_HEIGHT")) {
         $maxHeight = constant($path);
     }
     if ($maxY > $maxHeight or $minY < 0) {
         throw new SelectionExceedWorldException("CylinderSpace");
     }
     parent::__construct();
 }