Interface EntityNavigation
- All Superinterfaces:
SpeedModifier
Represents Entity Navigation.
As opposed to the EntityController's movement methods, this type of movement is better for long distances and is easier to manage.
Navigation uses multiple "Nodes" (see Position), which are multiple locations to reach before having an end goal.
-
Field Summary
Fields inherited from interface SpeedModifier
DEFAULT_SPEED_MODIFIER -
Method Summary
Modifier and TypeMethodDescriptiondefault EntityNavigationaddPoint(int x, int y, int z) Adds a Point from coordinatesAdds a Point at the given indexdefault EntityNavigationAdds a Point at the given indexdefault EntityNavigationAdds a Point at the given indexAdds a Pointdefault EntityNavigationAdds a Point from Locationdefault EntityNavigationAdds a Point from an EntityConstructs a NavigationPath.intgetRange()Fetches the maximum range of this Navigation.Deprecated.Called automatically by the internal EntityControllerremovePoint(int index) Removes a Pointdefault EntityNavigationremovePoint(int x, int y, int z) Removes a Point from coordinatesremovePoint(@NotNull Position point) Removes a Pointdefault EntityNavigationremovePoint(@NotNull Location point) Removes a Point from LocationsetRange(int range) Sets the maximum range of this Navigation.Methods inherited from interface SpeedModifier
getSpeedModifier, setSpeedModifier
-
Method Details
-
recompute
Deprecated.Called automatically by the internal EntityControllerRecomputes this Entity's Path.- Returns:
- this class, for chaining
-
addPoint
Adds a Point- Parameters:
point- Position to add- Returns:
- this class, for chaining
-
addPoint
Adds a Point from Location- Parameters:
point- Location to add- Returns:
- this class, for chaining
-
addPoint
Adds a Point from coordinates- Parameters:
x- X coordy- Y coordz- Z coord- Returns:
- this class, for chaining
-
addPoint
Adds a Point from an Entity- Parameters:
en- Entity to add- Returns:
- this class, for chaining
-
addPoint
Adds a Point at the given index- Parameters:
index- index of pointpoint- Position point to add- Returns:
- this class, for chaining
-
addPoint
Adds a Point at the given index- Parameters:
index- index of pointpoint- Position point to add- Returns:
- this class, for chaining
-
addPoint
Adds a Point at the given index- Parameters:
index- index of pointen- Entity to use as a point- Returns:
- this class, for chaining
-
removePoint
Removes a Point- Parameters:
point- NavigationPoint to remove- Returns:
- this class, for chaining
-
removePoint
Removes a Point- Parameters:
index- Index of Point- Returns:
- this class, for chaining
-
removePoint
Removes a Point from Location- Parameters:
point- Location to remove- Returns:
- this class, for chaining
-
removePoint
Removes a Point from coordinates- Parameters:
x- X coordy- Y coordz- Z coord- Returns:
- this class, for chaining
-
setRange
Sets the maximum range of this Navigation.- Parameters:
range- Range of Navigation- Returns:
- this class, for chaining
-
getRange
int getRange()Fetches the maximum range of this Navigation.- Returns:
- Range of Navigation
-
buildPath
Constructs a NavigationPath.- Returns:
- Constructed NavigationPath
- Throws:
IllegalArgumentException- if the Path is empty
-