Package me.gamercoder215.mobchip.ai.goal
Class PathfinderRemoveBlock
java.lang.Object
me.gamercoder215.mobchip.ai.goal.Pathfinder
me.gamercoder215.mobchip.ai.goal.PathfinderRemoveBlock
- All Implemented Interfaces:
PathfinderInfo
,SpeedModifier
Represents a Pathfinder for a Creature to remove a block
-
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.SpeedModifier
DEFAULT_SPEED_MODIFIER
-
Constructor Summary
ConstructorsConstructorDescriptionPathfinderRemoveBlock
(@NotNull Creature c, @NotNull Material remove) Constructs a PathfinderRemoveBlockPathfinderRemoveBlock
(@NotNull Creature c, @NotNull Material remove, double speedMod) Constructs a PathfinderRemoveBlock with a vertical search range of 1.PathfinderRemoveBlock
(@NotNull Creature c, @NotNull Material remove, double speedMod, int verticalSearchRange) Constructs a PathfinderRemoveBlock.PathfinderRemoveBlock
(@NotNull Creature c, @NotNull Block remove) Constructs a PathfinderRemoveBlock.PathfinderRemoveBlock
(@NotNull Creature c, @NotNull Block remove, double speedMod) Constructs a PathfinderRemoveBlock with a vertical search range of 1.PathfinderRemoveBlock
(@NotNull Creature c, @NotNull Block remove, double speedMod, int verticalSearchRange) Constructs a PathfinderRemoveBlock. -
Method Summary
Modifier and TypeMethodDescriptiongetBlock()
Gets the Material to remove.getFlags()
Fetches an Array of Flags that this Pathfinder has.Returns the NMS Internal Name.double
Get the Speed Modifier of this Pathfinder.int
Gets the vertical search range for looking for the specified Material.void
Sets the Material to remove.void
Sets the Block to remove.void
setSpeedModifier
(double mod) Sets the Speed Modifier of this Pathfinder.void
setVerticalSearchRange
(int verticalSearchRange) Sets the vertical search range for looking for the specified Material.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
-
PathfinderRemoveBlock
Constructs a PathfinderRemoveBlock.- Parameters:
c
- Creature to useremove
- Block to remove
-
PathfinderRemoveBlock
public PathfinderRemoveBlock(@NotNull @NotNull Creature c, @NotNull @NotNull Block remove, double speedMod) Constructs a PathfinderRemoveBlock with a vertical search range of 1.- Parameters:
c
- Creature to useremove
- Block to removespeedMod
- Speed Modifier while moving- Throws:
IllegalArgumentException
- if block data is null
-
PathfinderRemoveBlock
public PathfinderRemoveBlock(@NotNull @NotNull Creature c, @NotNull @NotNull Block remove, double speedMod, int verticalSearchRange) Constructs a PathfinderRemoveBlock.- Parameters:
c
- Creature to useremove
- Block to removespeedMod
- Speed Modifier while movingverticalSearchRange
- Vertical search range- Throws:
IllegalArgumentException
- if block is null, differing worlds, or range is not positive
-
PathfinderRemoveBlock
public PathfinderRemoveBlock(@NotNull @NotNull Creature c, @NotNull @NotNull Material remove) throws IllegalArgumentException Constructs a PathfinderRemoveBlock- Parameters:
c
- Creature to useremove
- Material to remove- Throws:
IllegalArgumentException
- if block is null or differing worlds
-
PathfinderRemoveBlock
public PathfinderRemoveBlock(@NotNull @NotNull Creature c, @NotNull @NotNull Material remove, double speedMod) throws IllegalArgumentException Constructs a PathfinderRemoveBlock with a vertical search range of 1.- Parameters:
c
- Creature to useremove
- Material to removespeedMod
- Speed Modifier while moving- Throws:
IllegalArgumentException
- if material is null
-
PathfinderRemoveBlock
public PathfinderRemoveBlock(@NotNull @NotNull Creature c, @NotNull @NotNull Material remove, double speedMod, int verticalSearchRange) throws IllegalArgumentException Constructs a PathfinderRemoveBlock.- Parameters:
c
- Creature to useremove
- Material to removespeedMod
- Speed Modifier while movingverticalSearchRange
- Vertical search range- Throws:
IllegalArgumentException
- if material is null or range is not positive
-
-
Method Details
-
getBlock
Gets the Material to remove.- Returns:
- Material to remove
-
setBlock
Sets the Block to remove.- Parameters:
remove
- Block to remove- Throws:
IllegalArgumentException
- if block is null or differing worlds
-
setBlock
Sets the Material to remove.- Parameters:
remove
- Material to remove- Throws:
IllegalArgumentException
- if block data is null- Since:
- 1.9.1
-
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
-
getVerticalSearchRange
public int getVerticalSearchRange()Gets the vertical search range for looking for the specified Material.- Returns:
- Vertical search range
- Since:
- 1.9.1
-
setVerticalSearchRange
public void setVerticalSearchRange(int verticalSearchRange) Sets the vertical search range for looking for the specified Material.- Parameters:
verticalSearchRange
- Vertical search range- Since:
- 1.9.1
-
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
-