Created
September 9, 2018 15:32
-
-
Save aikar/7f1ceb079d3bfbd5557a8d2cf8c4d9e6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.destroystokyo.paper.entity; | |
import org.bukkit.Location; | |
import org.bukkit.entity.LivingEntity; | |
import org.bukkit.entity.Mob; | |
import java.util.List; | |
public interface Pathfinder <T extends Mob> { | |
/** | |
* | |
* @return The entity that is controlled by this pathfinder | |
*/ | |
T getEntity(); | |
boolean hasDestination(); | |
Location getCurrentDestination(); | |
Location calculateDestination(Location loc); | |
Location calculateDestination(LivingEntity target); | |
default boolean setDestination(Location loc) { | |
return setDestination(loc, 1); | |
} | |
boolean setDestination(Location loc, double speed); | |
default boolean setDestination(LivingEntity target) { | |
return setDestination(target, 1); | |
} | |
boolean setDestination(LivingEntity target, double speed); | |
List<Location> getPathPoints(); | |
Integer getCurrentPointIndex(); | |
Location getNextPathPoint(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment