Class MemoryKey<T>

java.lang.Object
org.bukkit.entity.memory.MemoryKey<T>
Type Parameters:
T - the class type of the memory value
All Implemented Interfaces:
Keyed, Keyed

public final class MemoryKey<T> extends Object implements Keyed
Represents a key used for accessing memory values of a LivingEntity.
  • Field Details

    • ADMIRING_DISABLED

      public static final MemoryKey<Boolean> ADMIRING_DISABLED
    • ADMIRING_ITEM

      public static final MemoryKey<Boolean> ADMIRING_ITEM
    • ANGRY_AT

      public static final MemoryKey<UUID> ANGRY_AT
    • ATE_RECENTLY

      public static final MemoryKey<Boolean> ATE_RECENTLY
    • ATTACK_COOLING_DOWN

      public static final MemoryKey<Boolean> ATTACK_COOLING_DOWN
    • CANT_REACH_WALK_TARGET_SINCE

      public static final MemoryKey<Long> CANT_REACH_WALK_TARGET_SINCE
    • DANCING

      public static final MemoryKey<Boolean> DANCING
    • DANGER_DETECTED_RECENTLY

      public static final MemoryKey<Boolean> DANGER_DETECTED_RECENTLY
    • DISABLE_WALK_TO_ADMIRE_ITEM

      public static final MemoryKey<Boolean> DISABLE_WALK_TO_ADMIRE_ITEM
    • GAZE_COOLDOWN_TICKS

      public static final MemoryKey<Integer> GAZE_COOLDOWN_TICKS
    • GOLEM_DETECTED_RECENTLY

      public static final MemoryKey<Boolean> GOLEM_DETECTED_RECENTLY
    • HAS_HUNTING_COOLDOWN

      public static final MemoryKey<Boolean> HAS_HUNTING_COOLDOWN
    • HEARD_BELL_TIME

      public static final MemoryKey<Long> HEARD_BELL_TIME
    • HIDING_PLACE

      public static final MemoryKey<Location> HIDING_PLACE
    • HOME

      public static final MemoryKey<Location> HOME
    • HUNTED_RECENTLY

      public static final MemoryKey<Boolean> HUNTED_RECENTLY
    • IS_PANICKING

      public static final MemoryKey<Boolean> IS_PANICKING
    • IS_TEMPTED

      public static final MemoryKey<Boolean> IS_TEMPTED
    • ITEM_PICKUP_COOLDOWN_TICKS

      public static final MemoryKey<Integer> ITEM_PICKUP_COOLDOWN_TICKS
    • JOB_SITE

      public static final MemoryKey<Location> JOB_SITE
    • LAST_SLEPT

      public static final MemoryKey<Long> LAST_SLEPT
    • LAST_WOKEN

      public static final MemoryKey<Long> LAST_WOKEN
    • LAST_WORKED_AT_POI

      public static final MemoryKey<Long> LAST_WORKED_AT_POI
    • LIKED_NOTEBLOCK_POSITION

      public static final MemoryKey<Location> LIKED_NOTEBLOCK_POSITION
    • LIKED_NOTEBLOCK_COOLDOWN_TICKS

      public static final MemoryKey<Integer> LIKED_NOTEBLOCK_COOLDOWN_TICKS
    • LIKED_PLAYER

      public static final MemoryKey<UUID> LIKED_PLAYER
    • LONG_JUMP_COOLING_DOWN

      public static final MemoryKey<Integer> LONG_JUMP_COOLING_DOWN
    • LONG_JUMP_MID_JUMP

      public static final MemoryKey<Boolean> LONG_JUMP_MID_JUMP
    • MEETING_POINT

      public static final MemoryKey<Location> MEETING_POINT
    • PACIFIED

      public static final MemoryKey<Boolean> PACIFIED
    • PLAY_DEAD_TICKS

      public static final MemoryKey<Integer> PLAY_DEAD_TICKS
    • POTENTIAL_JOB_SITE

      public static final MemoryKey<Location> POTENTIAL_JOB_SITE
    • RAM_COOLDOWN_TICKS

      public static final MemoryKey<Integer> RAM_COOLDOWN_TICKS
    • SNIFFER_DIGGING

      public static final MemoryKey<Boolean> SNIFFER_DIGGING
    • SNIFFER_HAPPY

      public static final MemoryKey<Boolean> SNIFFER_HAPPY
    • TEMPTATION_COOLDOWN_TICKS

      public static final MemoryKey<Integer> TEMPTATION_COOLDOWN_TICKS
    • TIME_TRYING_TO_REACH_ADMIRE_ITEM

      public static final MemoryKey<Integer> TIME_TRYING_TO_REACH_ADMIRE_ITEM
    • TRANSPORT_ITEMS_COOLDOWN_TICKS

      public static final MemoryKey<Integer> TRANSPORT_ITEMS_COOLDOWN_TICKS
    • UNIVERSAL_ANGER

      public static final MemoryKey<Boolean> UNIVERSAL_ANGER
    • VISIBLE_ADULT_HOGLIN_COUNT

      public static final MemoryKey<Integer> VISIBLE_ADULT_HOGLIN_COUNT
    • VISIBLE_ADULT_PIGLIN_COUNT

      public static final MemoryKey<Integer> VISIBLE_ADULT_PIGLIN_COUNT
    • SNIFFER_EXPLORED_POSITIONS

      @Deprecated public static final MemoryKey<Location> SNIFFER_EXPLORED_POSITIONS
      Deprecated.
      this constant uses the wrong generic type, the sniffer now stores different positions from possibly different worlds. Use the relevant methods in Sniffer directly for now.
  • Method Details

    • getKey

      @NotNull public @NotNull NamespacedKey getKey()
      Description copied from interface: Keyed
      Return the namespaced identifier for this object.
      Specified by:
      getKey in interface Keyed
      Returns:
      this object's key
    • getMemoryClass

      @NotNull public @NotNull Class<T> getMemoryClass()
      Gets the class of values associated with this memory.
      Returns:
      the class of value objects
    • getByKey

      @Nullable public static @Nullable MemoryKey<?> getByKey(@NotNull @NotNull NamespacedKey namespacedKey)
      Returns a MemoryKey by a NamespacedKey.
      Parameters:
      namespacedKey - the NamespacedKey referencing a MemoryKey
      Returns:
      the MemoryKey or null when no MemoryKey is available under that key
    • values

      @NotNull public static @NotNull Set<MemoryKey<?>> values()
      Returns the set of all MemoryKeys.
      Returns:
      the memoryKeys