类 MemoryKey<T>
java.lang.Object
org.bukkit.entity.memory.MemoryKey<T>
- 类型参数:
T- 记忆值的类类型
- 所有已实现的接口:
Keyed,RegistryAware
表示用于访问
LivingEntity记忆值的键。-
字段概要
字段修饰符和类型字段说明 -
方法概要
修饰符和类型方法说明getByKey(@NotNull NamespacedKey namespacedKey) getKey()已过时。获取此实例的键(如果已注册),否则返回null。获取此实例的键(如果已注册),否则抛出错误。获取与此记忆关联的值的类。boolean返回此实例是否注册在注册表中,因此是否具有键。values()返回所有MemoryKey的集合。
-
字段详细资料
-
HOME
-
POTENTIAL_JOB_SITE
-
JOB_SITE
-
MEETING_POINT
-
GOLEM_DETECTED_RECENTLY
-
DANGER_DETECTED_RECENTLY
-
LAST_SLEPT
-
LAST_WOKEN
-
LAST_WORKED_AT_POI
-
UNIVERSAL_ANGER
-
CHARGE_COOLDOWN_TICKS
-
ATTACK_TARGET_COOLDOWN
-
ANGRY_AT
-
ADMIRING_ITEM
-
ADMIRING_DISABLED
-
HUNTED_RECENTLY
-
PLAY_DEAD_TICKS
-
TEMPTATION_COOLDOWN_TICKS
-
GAZE_COOLDOWN_TICKS
-
IS_TEMPTED
-
LONG_JUMP_COOLING_DOWN
-
HAS_HUNTING_COOLDOWN
-
RAM_COOLDOWN_TICKS
-
IS_PANICKING
-
LIKED_PLAYER
-
LIKED_NOTEBLOCK_POSITION
-
LIKED_NOTEBLOCK_COOLDOWN_TICKS
-
ITEM_PICKUP_COOLDOWN_TICKS
-
-
方法详细资料
-
getKeyOrThrow
从接口复制的说明:RegistryAware获取此实例的键(如果已注册),否则抛出错误。
这是一个便捷方法,插件在使用此方法之前应始终检查RegistryAware.isRegistered()。原文:Gets the key of this instance if it is registered otherwise throws an error. This is a convenience method and plugins should always check
RegistryAware.isRegistered()before using this method.- 指定者:
getKeyOrThrow在接口中RegistryAware- 返回:
- 此实例注册时使用的键.
- 另请参阅:
-
getKeyOrNull
从接口复制的说明:RegistryAware获取此实例的键(如果已注册),否则返回null。原文:Gets the key of this instance if it is registered otherwise returns
null.- 指定者:
getKeyOrNull在接口中RegistryAware- 返回:
- 此实例注册时使用的键,如果未注册则返回
null. - 另请参阅:
-
isRegistered
public boolean isRegistered()从接口复制的说明:RegistryAware返回此实例是否注册在注册表中,因此是否具有键。原文:Returns whether this instance is register in a registry and therefore has a key or not.
- 指定者:
isRegistered在接口中RegistryAware- 返回:
- 如果此实例已注册则返回 true,否则返回 false.
- 另请参阅:
-
getKey
已过时。密钥可能并不总是存在,请使用getKeyOrThrow()代替。原文:返回用于此对象的命名空间标识符.
原文:Return the namespaced identifier for this object.
返回用于此对象的命名空间标识符.原文:Return the namespaced identifier for this object.
-
getMemoryClass
获取与此记忆关联的值的类。- 返回:
- 值对象的类
原文:Gets the class of values associated with this memory.
-
getByKey
- 参数:
namespacedKey- 引用MemoryKey的NamespacedKeynamespacedKey- theNamespacedKeyreferencing aMemoryKey- 返回:
MemoryKey,当该键下没有可用的MemoryKey时返回null原文:Returns a
MemoryKeyby aNamespacedKey.
-
values
返回所有MemoryKey的集合。- 返回:
- memoryKeys
原文:Returns the set of all MemoryKeys.
-
getKeyOrThrow()代替。