Skip to content

Commit 4df47e0

Browse files
committed
remove deprecations
1 parent 9e90a83 commit 4df47e0

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ public interface Pathfinder {
5757
*
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
60-
*
61-
* @deprecated Use {@link #findPath(Entity)} instead.
6260
*/
63-
@Deprecated(forRemoval = true)
6461
@Nullable PathResult findPath(LivingEntity target);
6562

6663
/**
@@ -113,12 +110,9 @@ default boolean moveTo(Location loc, double speed) {
113110
*
114111
* @param target the Entity to navigate to
115112
* @return If the pathfinding was successfully started
116-
*
117-
* @deprecated Use {@link #moveTo(Entity)} instead
118113
*/
119-
@Deprecated(forRemoval = true)
120114
default boolean moveTo(LivingEntity target) {
121-
return this.moveTo(target, 1);
115+
return this.moveTo((Entity)target);
122116
}
123117

124118
/**
@@ -133,13 +127,9 @@ default boolean moveTo(LivingEntity target) {
133127
* @param target the Entity to navigate to
134128
* @param speed Speed multiplier to navigate at, where 1 is 'normal'
135129
* @return If the pathfinding was successfully started
136-
*
137-
* @deprecated Use {@link #moveTo(Entity, double)} instead.
138130
*/
139-
@Deprecated(forRemoval = true)
140131
default boolean moveTo(LivingEntity target, double speed) {
141-
PathResult path = this.findPath(target);
142-
return path != null && this.moveTo(path, speed);
132+
return this.moveTo((Entity)target, speed);
143133
}
144134

145135
/**

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ public PathResult findPath(Location loc) {
6060
@Nullable
6161
@Override
6262
public PathResult findPath(LivingEntity target) {
63-
Preconditions.checkArgument(target != null, "Target can not be null");
64-
Path path = this.entity.getNavigation().createPath(((CraftLivingEntity) target).getHandle(), 0);
65-
return path != null ? new PaperPathResult(path) : null;
63+
return this.findPath((Entity)target);
6664
}
6765

6866
@Nullable

0 commit comments

Comments
 (0)