mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 04:02:06 -07:00
Expand Pathfinding API with more options
This commit is contained in:
@@ -157,6 +157,48 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ boolean moveTo(@NotNull PathResult path, double speed);
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if this pathfinder allows passing through closed doors.
|
||||
+ *
|
||||
+ * @return if this pathfinder allows passing through closed doors
|
||||
+ */
|
||||
+ boolean canOpenDoors();
|
||||
+
|
||||
+ /**
|
||||
+ * Allows this pathfinder to pass through closed doors, or not
|
||||
+ *
|
||||
+ * @param canOpenDoors if the mob can pass through closed doors, or not
|
||||
+ */
|
||||
+ void setCanOpenDoors(boolean canOpenDoors);
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if this pathfinder allows passing through open doors.
|
||||
+ *
|
||||
+ * @return if this pathfinder allows passing through open doors
|
||||
+ */
|
||||
+ boolean canPassDoors();
|
||||
+
|
||||
+ /**
|
||||
+ * Allows this pathfinder to pass through open doors, or not
|
||||
+ *
|
||||
+ * @param canPassDoors if the mob can pass through open doors, or not
|
||||
+ */
|
||||
+ void setCanPassDoors(boolean canPassDoors);
|
||||
+
|
||||
+ /**
|
||||
+ * Checks if this pathfinder assumes that the mob can float
|
||||
+ *
|
||||
+ * @return if this pathfinder assumes that the mob can float
|
||||
+ */
|
||||
+ boolean canFloat();
|
||||
+
|
||||
+ /**
|
||||
+ * Makes this pathfinder assume that the mob can float, or not
|
||||
+ *
|
||||
+ * @param canFloat if the mob can float, or not
|
||||
+ */
|
||||
+ void setCanFloat(boolean canFloat);
|
||||
+
|
||||
+ /**
|
||||
+ * Represents the result of a pathfinding calculation
|
||||
+ */
|
||||
+ interface PathResult {
|
||||
|
Reference in New Issue
Block a user