getextPointIndex was not needing to be boxed/nullable

This commit is contained in:
Aikar 2018-09-09 14:36:51 -04:00
parent 16efbae731
commit 05edb779e0
No known key found for this signature in database
GPG Key ID: 401ADFC9891FAAFE
2 changed files with 7 additions and 8 deletions

View File

@ -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> From: Aikar <aikar@aikar.co>
Date: Sun, 9 Sep 2018 12:39:06 -0400 Date: Sun, 9 Sep 2018 12:39:06 -0400
Subject: [PATCH] Mob Pathfinding API 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 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 new file mode 100644
index 000000000..27b6bb696 index 000000000..78230bd28
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java +++ b/src/main/java/com/destroystokyo/paper/entity/Pathfinder.java
@@ -0,0 +1,168 @@ @@ -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 + * @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. + * 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 + * @return The next location in the path points the entity is trying to reach, or null if there is no next point

View File

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