code: @Override // CHECKSTYLE IGNORE LINE: TrailingComment|ReturnCount
      public Path findPath(Pathfindable mover, int dtx, int dty, boolean ignoreRef)
      {
          final int stx = mover.getInTileX();
          final int sty = mover.getInTileY();
  
          if (mapPath.isBlocked(mover, dtx, dty, false) && UtilMath.getDistance(stx, sty, dtx, dty) <= 1)
          {
              return null;
          }
          if (mapPath.isBlocked(mover, dtx, dty, ignoreRef))
          {
              final CoordTile tile = mapPath.getClosestAvailableTile(mover, dtx, dty, stx, sty, map.getInTileRadius());
              if (tile == null)
              {
                  return null;
              }
              return findPath(mover, tile.getX(), tile.getY(), ignoreRef);
          }
  
          nodes[sty][stx].setCost(0);
          nodes[sty][stx].setDepth(0);
          closed.clear();
          open.clear();
          open.add(nodes[sty][stx]);
          nodes[dty][dtx].setParent(null);
  
          int maxDepth = 0;
          while (maxDepth < maxSearchDistance && !open.isEmpty())
          {
              final Node current = open.first();
              if (current == nodes[dty][dtx])
              {
                  break;
              }
              open.remove(current);
              closed.add(current);
              maxDepth = updateList(mover, stx, sty, dtx, dty, ignoreRef, current, maxDepth);
          }
          if (nodes[dty][dtx].getParent() == null)
          {
              return null;
          }
          final Path path = new Path();
          Node target = nodes[dty][dtx];
  
          while (target != nodes[sty][stx])
          {
              path.prependStep(target.getX(), target.getY());
              target = target.getParent();
          }
          path.prependStep(stx, sty);
  
          return path;
      }
docs: /*
  PathFinder