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 me.gamercoder215.mobchip.ai.SpeedModifier
DEFAULT_SPEED_MODIFIER
-
Method Summary
Modifier and TypeMethodDescriptiondefault EntityNavigation
addPoint
(int x, int y, int z) Adds a Point from coordinatesAdds a Point at the given indexdefault EntityNavigation
Adds a Point at the given indexdefault EntityNavigation
Adds a Point at the given indexAdds a Pointdefault EntityNavigation
Adds a Point from Locationdefault EntityNavigation
Adds a Point from an EntityConstructs a NavigationPath.int
getRange()
Fetches the maximum range of this Navigation.Deprecated.Called automatically by the internal EntityControllerremovePoint
(int index) Removes a Pointdefault EntityNavigation
removePoint
(int x, int y, int z) Removes a Point from coordinatesremovePoint
(@NotNull Position point) Removes a Pointdefault EntityNavigation
removePoint
(@NotNull Location point) Removes a Point from LocationsetRange
(int range) Sets the maximum range of this Navigation.Methods inherited from interface me.gamercoder215.mobchip.ai.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
-