Class Memory<T>

java.lang.Object
net.minecraft.entity.ai.brain.Memory<T>

public class Memory<T>
extends Object
  • Field Details

    • value

      private final T value
    • expiry

      private long expiry
  • Constructor Details

    • Memory

      public Memory​(T value, long expiry)
  • Method Details

    • tick

      public void tick()
    • permanent

      public static <T> Memory<T> permanent​(T value)
      Creates a memory without an expiry time.
    • timed

      public static <T> Memory<T> timed​(T value, long expiry)
      Creates a memory that has an expiry time.
    • getValue

      public T getValue()
    • isExpired

      public boolean isExpired()
    • toString

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

      public boolean isTimed()
    • createCodec

      public static <T> com.mojang.serialization.Codec<Memory<T>> createCodec​(com.mojang.serialization.Codec<T> codec)