Package me.gamercoder215.mobchip.ai.goal
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 me.gamercoder215.mobchip.ai.goal.Pathfinder
Pathfinder.PathfinderFlag
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Default amount of ticks it takes to break a doorFields inherited from class me.gamercoder215.mobchip.ai.goal.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 TypeMethodDescriptionint
Gets the amount of ticks it takes to break a door.Sets the Condition of this Conditional Pathfinder.getFlags()
Fetches an Array of Flags that this Pathfinder has.Returns the NMS Internal Name.void
setBreakTime
(int time) Sets the amount of ticks it takes to break a door.void
setCondition
(@NotNull Predicate<Difficulty> condition) Sets the Condition of this Conditional 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
-
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:Conditional
Sets the Condition of this Conditional Pathfinder.- Specified by:
getCondition
in 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:Conditional
Sets the Condition of this Conditional Pathfinder.- Specified by:
setCondition
in interfaceConditional<Difficulty>
- Parameters:
condition
- Condition to set
-
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
-