Package me.gamercoder215.mobchip.ai.goal
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 me.gamercoder215.mobchip.ai.goal.Pathfinder
Pathfinder.PathfinderFlag
-
Field Summary
Fields inherited from class me.gamercoder215.mobchip.ai.goal.Pathfinder
entity
Fields inherited from interface me.gamercoder215.mobchip.ai.goal.Ranged
DEFAULT_ATTACK_INTERVAL, DEFAULT_ATTACK_RANGE, DEFAULT_LOOK_RANGE
Fields inherited from interface me.gamercoder215.mobchip.ai.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 TypeMethodDescriptiongetFlags()
Fetches an Array of Flags that this Pathfinder has.Returns the NMS Internal Name.int
Gets the repeating interval, in ticksfloat
getRange()
Gets the current Range.double
Get the Speed Modifier of this Pathfinder.void
setInterval
(int interval) Sets the repeating interval, in ticksvoid
setRange
(float range) Sets the current Range.void
setSpeedModifier
(double mod) Sets the Speed Modifier of this Pathfinder.Methods inherited from class me.gamercoder215.mobchip.ai.goal.Pathfinder
getEntity
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.gamercoder215.mobchip.ai.goal.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
public float getRange()Description copied from interface:Ranged
Gets the current Range. -
setRange
public void setRange(float range) Description copied from interface:Ranged
Sets the current Range. -
getSpeedModifier
public double getSpeedModifier()Description copied from interface:SpeedModifier
Get the Speed Modifier of this Pathfinder.- Specified by:
getSpeedModifier
in interfaceSpeedModifier
- Returns:
- Speed Modifier
-
setSpeedModifier
public void setSpeedModifier(double mod) Description copied from interface:SpeedModifier
Sets the Speed Modifier of this Pathfinder.- Specified by:
setSpeedModifier
in interfaceSpeedModifier
- Parameters:
mod
- Modifier to set
-
getInterval
public int getInterval()Description copied from interface:Repeated
Gets the repeating interval, in ticks- Specified by:
getInterval
in interfaceRepeated
- Returns:
- Interval
-
setInterval
public void setInterval(int interval) Description copied from interface:Repeated
Sets the repeating interval, in ticks- Specified by:
setInterval
in interfaceRepeated
- Parameters:
interval
- Interval
-
getFlags
Description copied from class:Pathfinder
Fetches an Array of Flags that this Pathfinder has.
- Specified by:
getFlags
in classPathfinder
- Returns:
- Array of Pathfinder Flags
-
getInternalName
Description copied from interface:PathfinderInfo
Returns the NMS Internal Name.- Specified by:
getInternalName
in interfacePathfinderInfo
- Returns:
- Internal Name
-