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 Pathfinder
Pathfinder.PathfinderFlag -
Field Summary
Fields inherited from class Pathfinder
entityFields inherited from interface 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 TypeMethodDescription@NotNull MaterialgetBlock()Gets the Material to remove.@NotNull Pathfinder.PathfinderFlag[]getFlags()Fetches an Array of Flags that this Pathfinder has.Returns the pathfinder's internal name.doubleGet the Speed Modifier of this Pathfinder.intGets the vertical search range for looking for the specified Material.voidSets the Material to remove.voidSets the Block to remove.voidsetSpeedModifier(double mod) Sets the Speed Modifier of this Pathfinder.voidsetVerticalSearchRange(int verticalSearchRange) Sets the vertical search range for looking for the specified Material.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
-
PathfinderRemoveBlock
-
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: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
-
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: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
-