Interface PortalLogic.PortalFinder

Enclosing interface:
PortalLogic
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface PortalLogic.PortalFinder
  • Method Details

    • findPortal

      Optional<Portal> findPortal(ServerLocation location, int searchRange)
      Searches for an existing portal at the location.

      If an existing portal is not found a new one may be generated using PortalLogic.PortalGenerator in PortalLogic

      It is left up to the discretion of the implementer how this is done. Portals come in all shapes and sizes or none at all.

      The location and search range is meant to be a hint and no expectation should be made that the a portal will be exactly at the location.

      Parameters:
      location - the location to search around
      searchRange - the range to search around
      Returns:
      the position of an existing portal if found