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

Code before:
     *
     * @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
    default PathResult findPath(LivingEntity target) {
        return this.findPath((Entity)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):
```suggestion
     * Calculates a destination for the Entity to navigate to reach the target entity,
```

Code after:
     *
     * @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
     */
    default boolean moveTo(Location loc) {
        return this.moveTo(loc, 1);
    }

    /**