mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
Revert "Optimize Pathfinding"
This patch appears to be causing some issues with 1.14.3 entity AI
This commit is contained in:
@@ -123,7 +123,7 @@ index 0000000000..f68a07cb96
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
index a473c03b9d..856ff22b04 100644
|
||||
index 65b38d75b4..d8da790aec 100644
|
||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
@@ -0,0 +0,0 @@ public abstract class NavigationAbstract {
|
||||
@@ -145,8 +145,8 @@ index a473c03b9d..856ff22b04 100644
|
||||
double d0 = entity.locX;
|
||||
double d1 = entity.getBoundingBox().minY;
|
||||
@@ -0,0 +0,0 @@ public abstract class NavigationAbstract {
|
||||
private int pathfindFailures = 0;
|
||||
// Paper end
|
||||
return pathentity != null && this.a(pathentity, d0);
|
||||
}
|
||||
|
||||
+ public boolean setDestination(@Nullable PathEntity pathentity, double speed) { return a(pathentity, speed); } // Paper - OBFHELPER
|
||||
public boolean a(@Nullable PathEntity pathentity, double d0) {
|
||||
@@ -167,8 +167,8 @@ index a473c03b9d..856ff22b04 100644
|
||||
|
||||
+ public void stopPathfinding() { o(); } // Paper - OBFHELPER
|
||||
public void o() {
|
||||
this.pathfindFailures = 0; this.lastFailure = 0; // Paper - Pathfinding optimizations
|
||||
this.c = null;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PathEntity.java b/src/main/java/net/minecraft/server/PathEntity.java
|
||||
index f1d94420c8..5fdb601801 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathEntity.java
|
||||
|
Reference in New Issue
Block a user