Class PathfinderRangedBowAttack
java.lang.Object
me.gamercoder215.mobchip.ai.goal.Pathfinder
me.gamercoder215.mobchip.ai.goal.PathfinderRangedBowAttack
- All Implemented Interfaces:
PathfinderInfo, Ranged, Repeated, SpeedModifier
public final class PathfinderRangedBowAttack
extends Pathfinder
implements SpeedModifier, Ranged, Repeated
Represents a Pathfinder for Any Ranged Monster to shoot arrows from a bow
-
Nested Class Summary
Nested classes/interfaces inherited from class Pathfinder
Pathfinder.PathfinderFlag -
Field Summary
Fields inherited from class Pathfinder
entityFields inherited from interface Ranged
DEFAULT_ATTACK_INTERVAL, DEFAULT_ATTACK_RANGE, DEFAULT_LOOK_RANGEFields inherited from interface SpeedModifier
DEFAULT_SPEED_MODIFIER -
Constructor Summary
ConstructorsConstructorDescriptionPathfinderRangedBowAttack(@NotNull ProjectileSource m, double speedMod) Constructs a PathfinderRangedBowAttack with the default attack range.PathfinderRangedBowAttack(@NotNull ProjectileSource m, double speedMod, float range) Constructs a PathfinderRangedBowAttack with the default interval.PathfinderRangedBowAttack(@NotNull ProjectileSource m, double speedMod, float range, int interval) Constructs a PathfinderRangedBowAttack. -
Method Summary
Modifier and TypeMethodDescription@NotNull Pathfinder.PathfinderFlag[]getFlags()Fetches an Array of Flags that this Pathfinder has.Returns the pathfinder's internal name.intGets the repeating interval, in ticksfloatgetRange()Gets the current Range.doubleGet the Speed Modifier of this Pathfinder.voidsetInterval(int interval) Sets the repeating interval, in ticksvoidsetRange(float range) Sets the current Range.voidsetSpeedModifier(double mod) Sets the Speed Modifier of this Pathfinder.Methods inherited from class Pathfinder
getEntityMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PathfinderInfo
getName
-
Constructor Details
-
PathfinderRangedBowAttack
Constructs a PathfinderRangedBowAttack with the default attack range.- Parameters:
m- Skeleton to usespeedMod- Speed Modifier while attacking
-
PathfinderRangedBowAttack
public PathfinderRangedBowAttack(@NotNull @NotNull ProjectileSource m, double speedMod, float range) Constructs a PathfinderRangedBowAttack with the default interval.- Parameters:
m- Skeleton to usespeedMod- Speed Modifier while attackingrange- Range of attack
-
PathfinderRangedBowAttack
public PathfinderRangedBowAttack(@NotNull @NotNull ProjectileSource m, double speedMod, float range, int interval) throws IllegalArgumentException Constructs a PathfinderRangedBowAttack.- Parameters:
m- Skeleton to usespeedMod- Speed Modifier while attackingrange- Range of attackinterval- Interval of attack, in ticks- Throws:
IllegalArgumentException- if interval is less than 0
-
-
Method Details
-
getRange
-
setRange
-
getSpeedModifier
public double getSpeedModifier()Description copied from interface:SpeedModifierGet the Speed Modifier of this Pathfinder.- Specified by:
getSpeedModifierin interfaceSpeedModifier- Returns:
- Speed Modifier
-
setSpeedModifier
public void setSpeedModifier(double mod) Description copied from interface:SpeedModifierSets the Speed Modifier of this Pathfinder.- Specified by:
setSpeedModifierin interfaceSpeedModifier- Parameters:
mod- Modifier to set
-
getInterval
public int getInterval()Description copied from interface:RepeatedGets the repeating interval, in ticks- Specified by:
getIntervalin interfaceRepeated- Returns:
- Interval
-
setInterval
public void setInterval(int interval) Description copied from interface:RepeatedSets the repeating interval, in ticks- Specified by:
setIntervalin interfaceRepeated- Parameters:
interval- Interval
-
getFlags
Description copied from class:PathfinderFetches an Array of Flags that this Pathfinder has.
- Specified by:
getFlagsin classPathfinder- Returns:
- Array of Pathfinder Flags
-
getInternalName
Description copied from interface:PathfinderInfoReturns the pathfinder's internal name. This may match the actual NMS name of the pathfinder, but it may not.- Specified by:
getInternalNamein interfacePathfinderInfo- Returns:
- Internal Name
-