Package net.minecraft.entity.ai.brain
Class Memory<T>
java.lang.Object
net.minecraft.entity.ai.brain.Memory<T>
public class Memory<T> extends Object
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description static <T> com.mojang.serialization.Codec<Memory<T>>createCodec(com.mojang.serialization.Codec<T> codec)TgetValue()booleanisExpired()booleanisTimed()static <T> Memory<T>permanent(T value)Creates a memory without an expiry time.voidtick()static <T> Memory<T>timed(T value, long expiry)Creates a memory that has an expiry time.StringtoString()
-
Field Details
-
value
-
expiry
private long expiry
-
-
Constructor Details
-
Memory
-
-
Method Details
-
tick
public void tick() -
permanent
Creates a memory without an expiry time. -
timed
Creates a memory that has an expiry time. -
getValue
-
isExpired
public boolean isExpired() -
toString
-
isTimed
public boolean isTimed() -
createCodec
public static <T> com.mojang.serialization.Codec<Memory<T>> createCodec(com.mojang.serialization.Codec<T> codec)
-