Class CombatTargetCollector
java.lang.Object
com.hypixel.hytale.builtin.npccombatactionevaluator.corecomponents.CombatTargetCollector
- All Implemented Interfaces:
ISensorEntityCollector,RoleStateChange
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleprivate Roleprivate TargetMemoryprivate static final ComponentType<EntityStore, TransformComponent> Fields inherited from interface com.hypixel.hytale.server.npc.corecomponents.ISensorEntityCollector
DEFAULT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()voidcollectMatching(Ref<EntityStore> ref, Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) voidcollectNonMatching(Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) voidinit(Ref<EntityStore> ref, Role role, ComponentAccessor<EntityStore> componentAccessor) voidregisterWithSupport(Role role) booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.hypixel.hytale.server.npc.instructions.RoleStateChange
loaded, motionControllerChanged, removed, spawned, teleported, unloaded
-
Field Details
-
TRANSFORM_COMPONENT_TYPE
-
role
-
targetMemory
-
closestHostileDistanceSquared
private double closestHostileDistanceSquared
-
-
Constructor Details
-
CombatTargetCollector
public CombatTargetCollector()
-
-
Method Details
-
registerWithSupport
- Specified by:
registerWithSupportin interfaceRoleStateChange
-
init
public void init(@Nonnull Ref<EntityStore> ref, @Nonnull Role role, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
initin interfaceISensorEntityCollector
-
collectMatching
public void collectMatching(@Nonnull Ref<EntityStore> ref, @Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
collectMatchingin interfaceISensorEntityCollector
-
collectNonMatching
public void collectNonMatching(@Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
collectNonMatchingin interfaceISensorEntityCollector
-
terminateOnFirstMatch
public boolean terminateOnFirstMatch()- Specified by:
terminateOnFirstMatchin interfaceISensorEntityCollector
-
cleanup
public void cleanup()- Specified by:
cleanupin interfaceISensorEntityCollector
-