类 MemoryKey<T>
java.lang.Object
org.bukkit.entity.memory.MemoryKey<T>
- 类型参数:
T- the class type of the memory value
- 所有已实现的接口:
Keyed,RegistryAware
Represents a key used for accessing memory values of a
LivingEntity.-
字段概要
字段修饰符和类型字段说明 -
方法概要
修饰符和类型方法说明getByKey(@NotNull NamespacedKey namespacedKey) Returns aMemoryKeyby aNamespacedKey.getKey()已过时。Gets the key of this instance if it is registered otherwise returnsnull.Gets the key of this instance if it is registered otherwise throws an error.Gets the class of values associated with this memory.booleanReturns whether this instance is register in a registry and therefore has a key or not.values()Returns the set of all MemoryKeys.
-
字段详细资料
-
HOME
-
POTENTIAL_JOB_SITE
-
JOB_SITE
-
MEETING_POINT
-
GOLEM_DETECTED_RECENTLY
-
LAST_SLEPT
-
LAST_WOKEN
-
LAST_WORKED_AT_POI
-
UNIVERSAL_ANGER
-
ANGRY_AT
-
ADMIRING_ITEM
-
ADMIRING_DISABLED
-
HUNTED_RECENTLY
-
PLAY_DEAD_TICKS
-
TEMPTATION_COOLDOWN_TICKS
-
IS_TEMPTED
-
LONG_JUMP_COOLING_DOWN
-
HAS_HUNTING_COOLDOWN
-
RAM_COOLDOWN_TICKS
-
LIKED_PLAYER
-
LIKED_NOTEBLOCK_POSITION
-
LIKED_NOTEBLOCK_COOLDOWN_TICKS
-
ITEM_PICKUP_COOLDOWN_TICKS
-
SNIFFER_EXPLORED_POSITIONS
-
-
方法详细资料
-
getKeyOrThrow
从接口复制的说明:RegistryAwareGets the key of this instance if it is registered otherwise throws an error.
This is a convenience method and plugins should always checkRegistryAware.isRegistered()before using this method.- 指定者:
getKeyOrThrow在接口中RegistryAware- 返回:
- the key with which this instance is registered.
- 另请参阅:
-
getKeyOrNull
从接口复制的说明:RegistryAwareGets the key of this instance if it is registered otherwise returnsnull.- 指定者:
getKeyOrNull在接口中RegistryAware- 返回:
- the key with which this instance is registered or
nullif not registered. - 另请参阅:
-
isRegistered
public boolean isRegistered()从接口复制的说明:RegistryAwareReturns whether this instance is register in a registry and therefore has a key or not.- 指定者:
isRegistered在接口中RegistryAware- 返回:
- true, if this instance is registered. Otherwise, false.
- 另请参阅:
-
getKey
已过时。A key might not always be present, usegetKeyOrThrow()instead.返回用于此对象的命名空间标识符.原文:Return the namespaced identifier for this object.
-
getMemoryClass
Gets the class of values associated with this memory.- 返回:
- the class of value objects
-
getByKey
Returns aMemoryKeyby aNamespacedKey.- 参数:
namespacedKey- theNamespacedKeyreferencing aMemoryKey- 返回:
- the
MemoryKeyor null when noMemoryKeyis available under that key
-
values
Returns the set of all MemoryKeys.- 返回:
- the memoryKeys
-
getKeyOrThrow()instead.