Skip to content

Commit

Permalink
Add debug to NavigatorParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Dec 10, 2016
1 parent a7bf1c2 commit 093337a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/main/java/net/citizensnpcs/api/ai/NavigatorParameters.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class NavigatorParameters implements Cloneable {
private boolean avoidWater;
private float baseSpeed = 1F;
private List<NavigatorCallback> callbacks = Lists.newArrayListWithExpectedSize(3);
private boolean debug;
private AttackStrategy defaultStrategy;
private double distanceMargin = 2F;
private List<BlockExaminer> examiners = Lists.newArrayList();
Expand Down Expand Up @@ -191,6 +192,26 @@ public NavigatorParameters clone() {
}
}

/**
* Returns whether this path will be debugged. Path debugging happens by repeatedly setting the next destination
* block to a client-sided flower.
*
* @return Whether the path is debugging
*/
public boolean debug() {
return this.debug;
}

/**
* Sets whether the path should be debugged.
*
* @see #debug()
*/
public NavigatorParameters debug(boolean debug) {
this.debug = debug;
return this;
}

/**
* Returns the configured <em>default</em> attack strategy, which tries to perform the most Minecraft-like attack on
* the target.
Expand Down

0 comments on commit 093337a

Please sign in to comment.