3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-16 11:30:06 +01:00

getextPointIndex was not needing to be boxed/nullable

Dieser Commit ist enthalten in:
Aikar 2018-09-09 14:36:51 -04:00
Ursprung 16efbae731
Commit 05edb779e0
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE
2 geänderte Dateien mit 7 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From a9c06c0f1eecb397249a9e0c8881bf848e9168f3 Mon Sep 17 00:00:00 2001
From ff4b1d675da0e4955bae805d7ed579f3e8fb9238 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 9 Sep 2018 12:39:06 -0400
Subject: [PATCH] Mob Pathfinding API
@ -11,7 +11,7 @@ the location.
diff --git a/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java b/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java
new file mode 100644
index 000000000..27b6bb696
index 000000000..78230bd28
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java
@@ -0,0 +1,168 @@
@ -175,7 +175,7 @@ index 000000000..27b6bb696
+ * @return Returns the index of the current point along the points returned in {@link #getPoints()} the entity
+ * is trying to reach, or null if we are done with this pathfinding.
+ */
+ @Nullable Integer getNextPointIndex();
+ int getNextPointIndex();
+
+ /**
+ * @return The next location in the path points the entity is trying to reach, or null if there is no next point

Datei anzeigen

@ -1,4 +1,4 @@
From 9fbd992b34f5bd07d4390a00ab7e02a0520f22b6 Mon Sep 17 00:00:00 2001
From 02345434a6ac0af81af23b6dc346d6e1efb0c2ee Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 9 Sep 2018 13:30:00 -0400
Subject: [PATCH] Mob Pathfinding API
@ -7,10 +7,10 @@ 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..5062594d62
index 0000000000..d166bcdd28
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java
@@ -0,0 +1,115 @@
@@ -0,0 +1,114 @@
+package com.destroystokyo.paper.entity;
+
+import net.minecraft.server.EntityInsentient;
@ -106,9 +106,8 @@ index 0000000000..5062594d62
+ return points;
+ }
+
+ @Nullable
+ @Override
+ public Integer getNextPointIndex() {
+ public int getNextPointIndex() {
+ return path.getNextIndex();
+ }
+