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>
  • Field Details

  • Constructor Details

    • Absent

      public Absent(MemoryModuleType<Value> memory)
      Creates an instance of a Absent record class.
      Parameters:
      memory - the value for the memory record component
  • Method Details

    • condition

      public MemoryStatus condition()
      Specified by:
      condition in interface MemoryCondition<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 interface MemoryCondition<com.mojang.datafixers.kinds.Const.Mu<com.mojang.datafixers.util.Unit>,Value>
    • memory

      public MemoryModuleType<Value> memory()
      Returns the value of the memory record component.
      Specified by:
      memory in interface MemoryCondition<com.mojang.datafixers.kinds.Const.Mu<com.mojang.datafixers.util.Unit>,Value>
      Returns:
      the value of the memory record component
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.