Record Class MemoryCondition.Present<Value>
java.lang.Object
java.lang.Record
net.minecraft.world.entity.ai.behavior.declarative.MemoryCondition.Present<Value>
- All Implemented Interfaces:
- MemoryCondition<com.mojang.datafixers.kinds.IdF.Mu,- Value> 
- Enclosing interface:
- MemoryCondition<F extends com.mojang.datafixers.kinds.K1,- Value> 
public static record MemoryCondition.Present<Value>(MemoryModuleType<Value> memory)
extends Record
implements MemoryCondition<com.mojang.datafixers.kinds.IdF.Mu,Value> 
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.world.entity.ai.behavior.declarative.MemoryConditionMemoryCondition.Absent<Value>, MemoryCondition.Present<Value>, MemoryCondition.Registered<Value>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final MemoryModuleType<Value>The field for thememoryrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionPresent(MemoryModuleType<Value> memory) Creates an instance of aPresentrecord class.
- 
Method SummaryModifier and TypeMethodDescriptionMemoryAccessor<com.mojang.datafixers.kinds.IdF.Mu,Value> createAccessor(Brain<?> p_259253_, Optional<Value> p_260268_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.memory()Returns the value of thememoryrecord component.final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
memoryThe field for thememoryrecord component.
 
- 
- 
Constructor Details- 
PresentCreates an instance of aPresentrecord class.- Parameters:
- memory- the value for the- memoryrecord component
 
 
- 
- 
Method Details- 
condition- Specified by:
- conditionin interface- MemoryCondition<com.mojang.datafixers.kinds.IdF.Mu,- Value> 
 
- 
createAccessorpublic MemoryAccessor<com.mojang.datafixers.kinds.IdF.Mu,Value> createAccessor(Brain<?> p_259253_, Optional<Value> p_260268_) - Specified by:
- createAccessorin interface- MemoryCondition<com.mojang.datafixers.kinds.IdF.Mu,- Value> 
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
memoryReturns the value of thememoryrecord component.- Specified by:
- memoryin interface- MemoryCondition<com.mojang.datafixers.kinds.IdF.Mu,- Value> 
- Returns:
- the value of the memoryrecord component
 
 
-