Package net.minecraft.entity.ai.brain
Class Memory<T>
- java.lang.Object
-
- net.minecraft.entity.ai.brain.Memory<T>
-
public class Memory<T> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private long
timeToLive
private T
value
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canExpire()
static <T> com.mojang.serialization.Codec<Memory<T>>
codec(com.mojang.serialization.Codec<T> p_234066_0_)
T
getValue()
boolean
hasExpired()
static <T> Memory<T>
of(T p_234068_0_)
static <T> Memory<T>
of(T p_234069_0_, long p_234069_1_)
void
tick()
java.lang.String
toString()
-
-
-
Field Detail
-
value
private final T value
-
timeToLive
private long timeToLive
-
-
Constructor Detail
-
Memory
public Memory(T p_i231551_1_, long p_i231551_2_)
-
-
Method Detail
-
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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
canExpire
public boolean canExpire()
-
codec
public static <T> com.mojang.serialization.Codec<Memory<T>> codec(com.mojang.serialization.Codec<T> p_234066_0_)
-
-