Class MemorySlot<T>

java.lang.Object
net.minecraft.world.entity.ai.memory.MemorySlot<T>

public class MemorySlot<T> extends Object
  • Field Details

    • NEVER_EXPIRE

      private static final long NEVER_EXPIRE
      See Also:
    • value

      private @Nullable T value
    • timeToLive

      private long timeToLive
  • Constructor Details

    • MemorySlot

      private MemorySlot(@Nullable T value, long timeToLive)
  • Method Details

    • tick

      public void tick()
    • create

      public static <T> MemorySlot<T> create()
    • set

      public void set(T value, long timeToLive)
    • set

      public void set(T value)
    • clear

      public void clear()
    • hasValue

      public boolean hasValue()
    • value

      public @Nullable T value()
    • canExpire

      public boolean canExpire()
    • hasExpired

      public boolean hasExpired()
    • timeToLive

      public long timeToLive()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • visit

      public void visit(MemoryModuleType<T> type, Brain.Visitor visitor)