src/falkirks/minereset/listener/MineCreationSession.php
/**
	 * @param MineManager $owner
	 * @return Mine
	 * @throws InvalidStateException
	 */
@param MineManager $owner
@return Mine
@throws InvalidStateException
@param MineManager $owner @return Mine @throws InvalidStateException
public function generate(MineManager $owner): Mine {
		if ($this->canGenerate()) {
			$mine = new Mine($owner,
				new Vector3(min($this->pointA->getFloorX(), $this->pointB->getFloorX()), min($this->pointA->getFloorY(), $this->pointB->getFloorY()), min($this->pointA->getFloorZ(), $this->pointB->getFloorZ())),
				new Vector3(max($this->pointA->getFloorX(), $this->pointB->getFloorX()), max($this->pointA->getFloorY(), $this->pointB->getFloorY()), max($this->pointA->getFloorZ(), $this->pointB->getFloorZ())),
				$this->world->getFolderName(),
				$this->name);
			$owner[$this->name] = $mine;
			return $mine;
		} else {
			throw new InvalidStateException();
		}
	}
public function generate ( MineManager $ owner ) : Mine { if ( $ this -> canGenerate ( ) ) { $ mine = new Mine ( $ owner , new Vector3 ( min ( $ this -> pointA -> getFloorX ( ) , $ this -> pointB -> getFloorX ( ) ) , min ( $ this -> pointA -> getFloorY ( ) , $ this -> pointB -> getFloorY ( ) ) , min ( $ this -> pointA -> getFloorZ ( ) , $ this -> pointB -> getFloorZ ( ) ) ) , new Vector3 ( max ( $ this -> pointA -> getFloorX ( ) , $ this -> pointB -> getFloorX ( ) ) , max ( $ this -> pointA -> getFloorY ( ) , $ this -> pointB -> getFloorY ( ) ) , max ( $ this -> pointA -> getFloorZ ( ) , $ this -> pointB -> getFloorZ ( ) ) ) , $ this -> world -> getFolderName ( ) , $ this -> name ) ; $ owner [ $ this -> name ] = $ mine ; return $ mine ; } else { throw new InvalidStateException ( ) ; } }
@param MineManager $owner
 @return Mine
 @throws InvalidStateException
@param MineManager $owner @return Mine @throws InvalidStateException