Class PathfinderBreakDoor
java.lang.Object
me.gamercoder215.mobchip.ai.goal.Pathfinder
me.gamercoder215.mobchip.ai.goal.PathfinderBreakDoor
- All Implemented Interfaces:
Conditional<Difficulty>, PathfinderInfo
Represents a Pathfinder that has a Mob break a door
-
Nested Class Summary
Nested classes/interfaces inherited from class Pathfinder
Pathfinder.PathfinderFlag -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault amount of ticks it takes to break a doorFields inherited from class Pathfinder
entity -
Constructor Summary
ConstructorsConstructorDescriptionPathfinderBreakDoor(@NotNull Mob m, int breakTime, Predicate<Difficulty> validDiffs) Constructs a PathfinderBreakDoor with a predicate.PathfinderBreakDoor(@NotNull Mob m, int breakTime, Difficulty... validDifficulties) Constructs a PathfinderBreakDoor.PathfinderBreakDoor(@NotNull Mob m, Difficulty... validDifficulties) Constructs a PathfinderBreakDoor with the default break time. -
Method Summary
Modifier and TypeMethodDescriptionintGets the amount of ticks it takes to break a door.@NotNull Predicate<Difficulty> Sets the Condition of this Conditional Pathfinder.@NotNull Pathfinder.PathfinderFlag[]getFlags()Fetches an Array of Flags that this Pathfinder has.Returns the pathfinder's internal name.voidsetBreakTime(int time) Sets the amount of ticks it takes to break a door.voidsetCondition(@NotNull Predicate<Difficulty> condition) Sets the Condition of this Conditional 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
-
Field Details
-
DEFAULT_DOOR_BREAK_TIME
public static final int DEFAULT_DOOR_BREAK_TIMEDefault amount of ticks it takes to break a door- See Also:
-
-
Constructor Details
-
PathfinderBreakDoor
Constructs a PathfinderBreakDoor with the default break time.- Parameters:
m- Mob to usevalidDifficulties- Difficulties that this Pathfinder will work on
-
PathfinderBreakDoor
public PathfinderBreakDoor(@NotNull @NotNull Mob m, int breakTime, Difficulty... validDifficulties) throws IllegalArgumentException Constructs a PathfinderBreakDoor.- Parameters:
m- Mob to usebreakTime- How many ticks it takes to break a doorvalidDifficulties- Difficulties that this Pathfinder will work on- Throws:
IllegalArgumentException- if time is less than or equal to 0
-
PathfinderBreakDoor
public PathfinderBreakDoor(@NotNull @NotNull Mob m, int breakTime, Predicate<Difficulty> validDiffs) throws IllegalArgumentException Constructs a PathfinderBreakDoor with a predicate.- Parameters:
m- Mob to usebreakTime- How many ticks it takes to break a doorvalidDiffs- Predicate that determines if the Pathfinder should work on a given difficulty- Throws:
IllegalArgumentException- if time is less than or equal to 0
-
-
Method Details
-
getBreakTime
public int getBreakTime()Gets the amount of ticks it takes to break a door.- Returns:
- Amount of ticks it takes
-
getCondition
Description copied from interface:ConditionalSets the Condition of this Conditional Pathfinder.- Specified by:
getConditionin interfaceConditional<Difficulty>- Returns:
- Predicate of Condition
-
setBreakTime
Sets the amount of ticks it takes to break a door.- Parameters:
time- Amount of ticks to set- Throws:
IllegalArgumentException- if time is less than or equal to 0
-
setCondition
Description copied from interface:ConditionalSets the Condition of this Conditional Pathfinder.- Specified by:
setConditionin interfaceConditional<Difficulty>- Parameters:
condition- Condition to set
-
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
-