Repository: PaperMC/Paper
File: paper-api/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java (Java)

Code before:
     */
    @Nullable PathResult getCurrentPath();

    /**
     * Calculates a destination for the Entity to navigate to, but does not set it
     * as the current target. Useful for calculating what would happen before setting it.
     *
     * @param loc Location to navigate to
     * @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
     */
    @Nullable PathResult findPath(Location loc);

    /**
     * Calculates a destination for the Entity to navigate to to reach the target entity,
     * but does not set it as the current target.
     * Useful for calculating what would happen before setting it.
     * <p>
     * The behavior of this PathResult is subject to the games pathfinding rules, and may
     * result in the pathfinding automatically updating to follow the target Entity.
     * <p>
     * However, this behavior is not guaranteed, and is subject to the game's behavior.
     *
     * @param target the Entity to navigate to
     * @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
     */
    @Nullable PathResult findPath(LivingEntity target);

    /**
     * Calculates a destination for the Entity to navigate to to reach the target entity,
     * but does not set it as the current target.
     * Useful for calculating what would happen before setting it.
     * <p>
     * The behavior of this PathResult is subject to the games pathfinding rules, and may
     * result in the pathfinding automatically updating to follow the target Entity.
     * <p>
     * However, this behavior is not guaranteed, and is subject to the game's behavior.
     *
     * @param target the Entity to navigate to
     * @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
     */
    @Nullable PathResult findPath(Entity target);

    /**
     * Calculates a destination for the Entity to navigate to, and sets it with default speed
     * as the current target.
     *
     * @param loc Location to navigate to
     * @return If the pathfinding was successfully started
     */
    default boolean moveTo(Location loc) {
        return this.moveTo(loc, 1);

Review comment (suggestion):
You can make this default and point to the method with the `Entity` param for not make the redirection in the server implementation.

Code after:
     */
    @Nullable PathResult getCurrentPath();

    /**
     * Calculates a destination for the Entity to navigate to, but does not set it
     * as the current target. Useful for calculating what would happen before setting it.
     *
     * @param loc Location to navigate to
     * @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
     */
    @Nullable PathResult findPath(Location loc);

    /**
     * Calculates a destination for the Entity to navigate to reach the target entity,
     * but does not set it as the current target.
     * Useful for calculating what would happen before setting it.
     * <p>
     * The behavior of this PathResult is subject to the games pathfinding rules, and may
     * result in the pathfinding automatically updating to follow the target Entity.
     * <p>
     * However, this behavior is not guaranteed, and is subject to the game's behavior.
     *
     * @param target the Entity to navigate to
     * @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
     */
    @Nullable
    default PathResult findPath(LivingEntity target) {
        return this.findPath((Entity) target);
    }

    /**
     * Calculates a destination for the Entity to navigate to reach the target entity,
     * but does not set it as the current target.
     * Useful for calculating what would happen before setting it.
     * <p>
     * The behavior of this PathResult is subject to the games pathfinding rules, and may
     * result in the pathfinding automatically updating to follow the target Entity.
     * <p>
     * However, this behavior is not guaranteed, and is subject to the game's behavior.
     *
     * @param target the Entity to navigate to
     * @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
     */
    @Nullable PathResult findPath(Entity target);

    /**
     * Calculates a destination for the Entity to navigate to, and sets it with default speed
     * as the current target.
     *
     * @param loc Location to navigate to
     * @return If the pathfinding was successfully started