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
    • timeToLive

      private long timeToLive
  • Constructor Details

    • Memory

      public Memory(T p_i231551_1_, long p_i231551_2_)
  • Method Details

    • tick

      public void tick()
    • of

      public static <T> Memory<T> of(T p_234068_0_)
    • of

      public static <T> Memory<T> of(T p_234069_0_, long p_234069_1_)
    • getValue

      public T getValue()
    • hasExpired

      public boolean hasExpired()
    • toString

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

      public boolean canExpire()
    • codec

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