Skip to content

Commit a91cc3d

Browse files
committed
address review
1 parent fa764ca commit a91cc3d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

paper-api/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ public interface Pathfinder {
5858
* @param target the Entity to navigate to
5959
* @return The closest Location the Entity can get to for this navigation, or null if no path could be calculated
6060
*/
61-
@Nullable PathResult findPath(LivingEntity target);
61+
@Nullable
62+
default PathResult findPath(LivingEntity target) {
63+
return this.findPath((Entity)target);
64+
}
6265

6366
/**
6467
* Calculates a destination for the Entity to navigate to to reach the target entity,

paper-server/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import net.minecraft.world.level.pathfinder.Node;
99
import net.minecraft.world.level.pathfinder.Path;
1010
import org.bukkit.Location;
11-
import org.bukkit.craftbukkit.entity.CraftLivingEntity;
1211
import org.bukkit.craftbukkit.entity.CraftEntity;
1312
import org.bukkit.craftbukkit.util.CraftLocation;
1413
import org.bukkit.entity.LivingEntity;
@@ -57,12 +56,6 @@ public PathResult findPath(Location loc) {
5756
return path != null ? new PaperPathResult(path) : null;
5857
}
5958

60-
@Nullable
61-
@Override
62-
public PathResult findPath(LivingEntity target) {
63-
return this.findPath((Entity)target);
64-
}
65-
6659
@Nullable
6760
@Override
6861
public PathResult findPath(Entity target) {

0 commit comments

Comments
 (0)