类 EffectHolder
java.lang.Object
mod.chloeprime.aaaparticles.api.client.EffectHolder
- 所有已实现的接口:
Closeable, AutoCloseable
-
构造器概要
构造器构造器说明EffectHolder(@NotNull EffectMetadata metadata, Supplier<@Nullable EffectDefinition> rawGetter) -
方法概要
修饰符和类型方法说明voidclose()Dispose this holder and its loaded effek from memory.longGet the last timestamp when this effect was loaded, in milliseconds.@NotNull EffectMetadataGet the metadata of this effek.booleanGet whether the effek under this holder has been loaded.lazyGet()Get the loadedEffectDefinitionif this effect has been loaded.load()Load and get the holder's correspondingEffectDefinition.voidunload()Unload the loaded effek from memory.
-
构造器详细资料
-
EffectHolder
public EffectHolder(@NotNull @NotNull EffectMetadata metadata, Supplier<@Nullable EffectDefinition> rawGetter)
-
-
方法详细资料
-
getMetadata
Get the metadata of this effek.- 返回:
- metadata of this effek.
-
isPresent
public boolean isPresent()Get whether the effek under this holder has been loaded.- 返回:
- whether this holder is already resolved (loaded).
-
lazyGet
Get the loadedEffectDefinitionif this effect has been loaded. This operation WILL NOT load the effek and its resources from memory.- 返回:
- the loaded
EffectDefinition, orOptional.empty()if this effect has not been loaded or does not exist.
-
load
Load and get the holder's correspondingEffectDefinition. This operation WILL load the effek and its resources from memory.- 返回:
- the loaded
EffectDefinition, orOptional.empty()if this effect does not exist. - 另请参阅:
-
getLastUsed
public long getLastUsed()Get the last timestamp when this effect was loaded, in milliseconds.- 返回:
- the last timestamp when this effect was loaded, in milliseconds
-
unload
public void unload()Unload the loaded effek from memory. This holder can be loaded again later after this method has been called. -
close
public void close()Dispose this holder and its loaded effek from memory. Call to this method will make this holder no longer loadable anymore.- 指定者:
close在接口中AutoCloseable- 指定者:
close在接口中Closeable
-