Class DoNothingGoal
java.lang.Object
net.minestom.server.entity.ai.GoalSelector
net.minestom.server.entity.ai.goal.DoNothingGoal
-
Field Summary
Fields inherited from class net.minestom.server.entity.ai.GoalSelector
entityCreature
-
Constructor Summary
ConstructorDescriptionDoNothingGoal
(EntityCreature entityCreature, long time, float chance) Create a DoNothing goal -
Method Summary
Modifier and TypeMethodDescriptionvoid
end()
Ends thisGoalSelector
.boolean
Whether or not thisGoalSelector
should end.boolean
Whether or not thisGoalSelector
should start.void
start()
Starts thisGoalSelector
.void
tick
(long time) Called every tick when thisGoalSelector
is running.Methods inherited from class net.minestom.server.entity.ai.GoalSelector
findTarget, getAIGroup, getEntityCreature, setEntityCreature
-
Constructor Details
-
DoNothingGoal
Create a DoNothing goal- Parameters:
entityCreature
- the entitytime
- the time in milliseconds where nothing happenchance
- the chance to do nothing (0-1)
-
-
Method Details
-
end
public void end()Description copied from class:GoalSelector
Ends thisGoalSelector
.- Specified by:
end
in classGoalSelector
-
shouldEnd
public boolean shouldEnd()Description copied from class:GoalSelector
Whether or not thisGoalSelector
should end.- Specified by:
shouldEnd
in classGoalSelector
- Returns:
- true to end
-
shouldStart
public boolean shouldStart()Description copied from class:GoalSelector
Whether or not thisGoalSelector
should start.- Specified by:
shouldStart
in classGoalSelector
- Returns:
- true to start
-
start
public void start()Description copied from class:GoalSelector
Starts thisGoalSelector
.- Specified by:
start
in classGoalSelector
-
tick
public void tick(long time) Description copied from class:GoalSelector
Called every tick when thisGoalSelector
is running.- Specified by:
tick
in classGoalSelector
- Parameters:
time
- the time of the update in milliseconds
-