类 EffectRegistry

java.lang.Object
mod.chloeprime.aaaparticles.api.client.EffectRegistry

public class EffectRegistry extends Object
AAAParticles Effect Registry.
从以下版本开始:
1.0.0
  • 构造器详细资料

    • EffectRegistry

      public EffectRegistry()
  • 方法详细资料

    • get

      @Nullable public static @Nullable EffectHolder get(net.minecraft.resources.Identifier id)
      Get the effek holder with the given id.
      参数:
      id - the wanted id of the returned effek.
      返回:
      the effek holder.
      从以下版本开始:
      2.0.0 Effeks are lazily loaded.
    • load

      public static CompletableFuture<@NotNull EffectDefinition> load(net.minecraft.resources.Identifier id)
      Load the effek with the given id. The returned future only completes when the effek is loaded and not null, otherwise it will complete exceptionally with an exception.
      参数:
      id - the wanted id of the returned effek.
      返回:
      The future of loading progress.
      从以下版本开始:
      2.1.0
    • tryLoad

      public static CompletableFuture<Optional<EffectDefinition>> tryLoad(net.minecraft.resources.Identifier id)
      Try to load the effek with the given id. The returned future will always complete normally when the effek is loaded, even when the load result is non-exist(null).
      参数:
      id - the wanted id of the returned effek.
      返回:
      The future of loading progress.
      从以下版本开始:
      2.1.0
    • getKey

      @Nullable public static @Nullable net.minecraft.resources.Identifier getKey(EffectHolder def)
      Get the id of the given effek holder.
      参数:
      def - the effek holder
      返回:
      the effek id.
      从以下版本开始:
      2.0.0 Effeks are lazily loaded.
    • getKey

      @Nullable public static @Nullable net.minecraft.resources.Identifier getKey(EffectDefinition def)
      Get the id of the given loaded effek.
      参数:
      def - the loaded effek definition
      从以下版本开始:
      2.0.0
    • entries

      public static Collection<Map.Entry<net.minecraft.resources.Identifier, EffectHolder>> entries()
      Get all effeks that has been scanned by the effek asset loader.
    • clearAllPlaying

      public static void clearAllPlaying()
      Clear all playing effek emitters.
    • forEach

      public static void forEach(BiConsumer<net.minecraft.resources.Identifier, EffectHolder> action)
    • gc

      public static void gc()
      Release less recently used effeks when system is under high memory usage. This mod is called automatically regularly.