Class ExpirableValue<T>
java.lang.Object
net.minecraft.world.entity.ai.memory.ExpirableValue<T>
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static <T> com.mojang.serialization.Codec<ExpirableValue<T>>
codec(com.mojang.serialization.Codec<T> p_26305_)
long
getValue()
boolean
static <T> ExpirableValue<T>
of(T p_26310_)
static <T> ExpirableValue<T>
of(T p_26312_, long p_26313_)
void
tick()
toString()
-
Field Details
-
value
-
timeToLive
private long timeToLive
-
-
Constructor Details
-
ExpirableValue
-
-
Method Details
-
tick
public void tick() -
of
-
of
-
getTimeToLive
public long getTimeToLive() -
getValue
-
hasExpired
public boolean hasExpired() -
toString
-
canExpire
public boolean canExpire() -
codec
public static <T> com.mojang.serialization.Codec<ExpirableValue<T>> codec(com.mojang.serialization.Codec<T> p_26305_)
-