Enum Class MemoryStatus
- All Implemented Interfaces:
Serializable
,Comparable<MemoryStatus>
,Constable
A memory can have three states in a brain:
- Value Present
- Value Absent
- Registered
A Memory being present means that a value is stored in the brain with its type. For example, EntityMemory.NOT_ADMIRING
would have either a true
or false
value present.
A Memory being absent means that a value is not stored in the brain. For example, EntityMemory.NOT_ADMIRING
would have no value present.
A Memory being registered means that the memory is present in the Minecraft Registry, and is supported by the mob type. All native memories, such as the ones listed in this class, are all registered in the Minecraft Registry by default, but can be unregistered at any time. However, custom memories are not registered in the Minecraft Registry, and thus, would not be able to be present in the brain.
Additionally, not all mobs support the same memory, making them unregistered when applicable. Passive Mobs do not have EntityMemory.ANGRY_AT
registered in their Brain, and Wardens are the only ones with EntityMemory.DISTURBANCE_LOCATION
registered.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionRepresents a Memory that is not present in the brain.Represents a Memory that is in the brain with an assigned value.Represents a Memory that is registered within the Minecraft Registry. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryStatus
Returns the enum constant of this class with the specified name.static MemoryStatus[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRESENT
Represents a Memory that is in the brain with an assigned value. -
ABSENT
Represents a Memory that is not present in the brain. -
REGISTERED
Represents a Memory that is registered within the Minecraft Registry. In usual cases with Vanilla Memories, they are all registered.
If the Mob Type does not support the memory type (e.g. Passive Mobs don't have
EntityMemory.ANGRY_AT
registered), it will still return this enum.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-