Record Class MemoryCondition.Absent<Value>
java.lang.Object
java.lang.Record
net.minecraft.world.entity.ai.behavior.declarative.MemoryCondition.Absent<Value>
- All Implemented Interfaces:
MemoryCondition<com.mojang.datafixers.kinds.Const.Mu<com.mojang.datafixers.util.Unit>,
Value>
- Enclosing interface:
MemoryCondition<F extends com.mojang.datafixers.kinds.K1,
Value>
public static record MemoryCondition.Absent<Value>(MemoryModuleType<Value> memory)
extends Record
implements MemoryCondition<com.mojang.datafixers.kinds.Const.Mu<com.mojang.datafixers.util.Unit>,Value>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.world.entity.ai.behavior.declarative.MemoryCondition
MemoryCondition.Absent<Value>, MemoryCondition.Present<Value>, MemoryCondition.Registered<Value>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MemoryModuleType<Value>
The field for thememory
record component. -
Constructor Summary
ConstructorDescriptionAbsent
(MemoryModuleType<Value> memory) Creates an instance of aAbsent
record class. -
Method Summary
Modifier and TypeMethodDescriptionMemoryAccessor<com.mojang.datafixers.kinds.Const.Mu<com.mojang.datafixers.util.Unit>,
Value> createAccessor
(Brain<?> p_259727_, Optional<Value> p_260359_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.memory()
Returns the value of thememory
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
memory
The field for thememory
record component.
-
-
Constructor Details
-
Absent
Creates an instance of aAbsent
record class.- Parameters:
memory
- the value for thememory
record component
-
-
Method Details
-
condition
- Specified by:
condition
in interfaceMemoryCondition<com.mojang.datafixers.kinds.Const.Mu<com.mojang.datafixers.util.Unit>,
Value>
-
createAccessor
public MemoryAccessor<com.mojang.datafixers.kinds.Const.Mu<com.mojang.datafixers.util.Unit>,Value> createAccessor(Brain<?> p_259727_, Optional<Value> p_260359_) - Specified by:
createAccessor
in interfaceMemoryCondition<com.mojang.datafixers.kinds.Const.Mu<com.mojang.datafixers.util.Unit>,
Value>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
memory
Returns the value of thememory
record component.- Specified by:
memory
in interfaceMemoryCondition<com.mojang.datafixers.kinds.Const.Mu<com.mojang.datafixers.util.Unit>,
Value> - Returns:
- the value of the
memory
record component
-