类 EffectHolder

java.lang.Object
mod.chloeprime.aaaparticles.api.client.EffectHolder
所有已实现的接口:
Closeable, AutoCloseable

public final class EffectHolder extends Object implements Closeable
A lazy holder that defers the loading of effeks.
从以下版本开始:
2.0.0
  • 构造器详细资料

  • 方法详细资料

    • getMetadata

      @NotNull public @NotNull EffectMetadata 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

      public Optional<EffectDefinition> lazyGet()
      Get the loaded EffectDefinition if this effect has been loaded. This operation WILL NOT load the effek and its resources from memory.
      返回:
      the loaded EffectDefinition, or Optional.empty() if this effect has not been loaded or does not exist.
    • load

      Load and get the holder's corresponding EffectDefinition. This operation WILL load the effek and its resources from memory.
      返回:
      the loaded EffectDefinition, or Optional.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