Class TargetMemory

java.lang.Object
com.hypixel.hytale.builtin.npccombatactionevaluator.memory.TargetMemory
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class TargetMemory extends Object implements Component<EntityStore>
A short term memory used by NPCs in combat to keep track of known targets to act upon.
  • Constructor Details

    • TargetMemory

      public TargetMemory(float rememberFor)
  • Method Details

    • getComponentType

      public static ComponentType<EntityStore, TargetMemory> getComponentType()
    • getKnownFriendlies

      @Nonnull public it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap getKnownFriendlies()
    • getKnownFriendliesList

      @Nonnull public List<Ref<EntityStore>> getKnownFriendliesList()
    • getKnownHostiles

      @Nonnull public it.unimi.dsi.fastutil.ints.Int2FloatOpenHashMap getKnownHostiles()
    • getKnownHostilesList

      @Nonnull public List<Ref<EntityStore>> getKnownHostilesList()
    • getRememberFor

      public float getRememberFor()
    • getClosestHostile

      @Nullable public Ref<EntityStore> getClosestHostile()
    • setClosestHostile

      public void setClosestHostile(@Nullable Ref<EntityStore> ref)
    • clone

      @Nonnull public Component<EntityStore> clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.