mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 14:42:22 -07:00
More compile fixes
- Re-removes Bukkit#getServerName - This was (hopefully?) only added back for Timings v2. It should be kept in that scope. - Intend to let PlayerViewDistance API slip. Given the scope of the changes in this area it seems best to let this slip past initial release. It can be re-added when there is additional time to focus on it and the changed systems it relies on. If it is fixed prior to release this is implemented as a single shim patch that can be dropped.
This commit is contained in:
@@ -7,7 +7,7 @@ Implements Pathfinding API for mobs
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java b/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java
|
||||
new file mode 100644
|
||||
index 0000000000..ed3d86ddd3
|
||||
index 000000000..f68a07cb9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -96,11 +96,9 @@ index 0000000000..ed3d86ddd3
|
||||
+
|
||||
+ @Override
|
||||
+ public List<Location> getPoints() {
|
||||
+ int pathCount = path.getPathCount();
|
||||
+ List<Location> points = new ArrayList<>();
|
||||
+ PathPoint[] pathPoints = path.getPoints();
|
||||
+ for (int i = 0; i < pathCount; i++) {
|
||||
+ points.add(toLoc(pathPoints[i]));
|
||||
+ for (PathPoint point : path.getPoints()) {
|
||||
+ points.add(toLoc(point));
|
||||
+ }
|
||||
+ return points;
|
||||
+ }
|
||||
@@ -116,7 +114,7 @@ index 0000000000..ed3d86ddd3
|
||||
+ if (!path.hasNext()) {
|
||||
+ return null;
|
||||
+ }
|
||||
+ return toLoc(path.getPoints()[path.getNextIndex()]);
|
||||
+ return toLoc(path.getPoints().get(path.getNextIndex()));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@@ -125,7 +123,7 @@ index 0000000000..ed3d86ddd3
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
index 0586597e73..583f2c5ada 100644
|
||||
index 0586597e7..583f2c5ad 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 {
|
||||
@@ -172,7 +170,7 @@ index 0586597e73..583f2c5ada 100644
|
||||
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 d1cb802087..ec6b3a292a 100644
|
||||
index d1cb80208..c4cdd0965 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathEntity.java
|
||||
@@ -0,0 +0,0 @@ import javax.annotation.Nullable;
|
||||
@@ -186,6 +184,7 @@ index d1cb802087..ec6b3a292a 100644
|
||||
private PathPoint d;
|
||||
- private int e;
|
||||
+ private int e; public int getNextIndex() { return e; } // Paper - OBFHELPER
|
||||
+ public boolean hasNext() { return getNextIndex() < getPoints().size(); } // Paper
|
||||
|
||||
public PathEntity(List<PathPoint> list) {
|
||||
this.a = list;
|
||||
@@ -209,7 +208,7 @@ index d1cb802087..ec6b3a292a 100644
|
||||
|
||||
return new Vec3D((double) pathpoint.a, (double) pathpoint.b, (double) pathpoint.c);
|
||||
diff --git a/src/main/java/net/minecraft/server/PathPoint.java b/src/main/java/net/minecraft/server/PathPoint.java
|
||||
index 0f6e8c51e4..5d445e08a8 100644
|
||||
index 0f6e8c51e..5d445e08a 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathPoint.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathPoint.java
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
@@ -226,7 +225,7 @@ index 0f6e8c51e4..5d445e08a8 100644
|
||||
public int d = -1;
|
||||
public float e;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
index 5bf1cd06fa..53c2d154ed 100644
|
||||
index 5bf1cd06f..53c2d154e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.loot.LootTable;
|
||||
|
Reference in New Issue
Block a user