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(); }