Class TargetSelector
java.lang.Object
net.minestom.server.entity.ai.TargetSelector
- Direct Known Subclasses:
ClosestEntityTarget, LastEntityDamagerTarget
The target selector is called each time the entity receives an "attack" instruction
without having a target.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionFinds the target.Gets the entity linked to this target selector.
-
Field Details
-
entityCreature
-
-
Constructor Details
-
TargetSelector
-
-
Method Details
-
findTarget
Finds the target.Returning null means that this target selector didn't find any entity, the next
TargetSelectorwill be called until the end of the list or an entity is found.- Returns:
- the target, null if not any
-
getEntityCreature
Gets the entity linked to this target selector.- Returns:
- the entity
-