类 EffectRegistry
java.lang.Object
mod.chloeprime.aaaparticles.api.client.EffectRegistry
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidClear all playing effek emitters.static Collection<Map.Entry<net.minecraft.resources.Identifier, EffectHolder>> entries()Get all effeks that has been scanned by the effek asset loader.static voidforEach(BiConsumer<net.minecraft.resources.Identifier, EffectHolder> action) static voidgc()Release less recently used effeks when system is under high memory usage.static @Nullable EffectHolderget(net.minecraft.resources.Identifier id) Get the effek holder with the given id.static @Nullable net.minecraft.resources.IdentifiergetKey(EffectDefinition def) Get the id of the given loaded effek.static @Nullable net.minecraft.resources.IdentifiergetKey(EffectHolder def) Get the id of the given effek holder.static CompletableFuture<@NotNull EffectDefinition> load(net.minecraft.resources.Identifier id) Load the effek with the given id.static CompletableFuture<Optional<EffectDefinition>> tryLoad(net.minecraft.resources.Identifier id) Try to load the effek with the given id.
-
构造器详细资料
-
EffectRegistry
public EffectRegistry()
-
-
方法详细资料
-
get
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
Get the id of the given effek holder.- 参数:
def- the effek holder- 返回:
- the effek id.
- 从以下版本开始:
- 2.0.0 Effeks are lazily loaded.
-
getKey
Get the id of the given loaded effek.- 参数:
def- the loaded effek definition- 从以下版本开始:
- 2.0.0
-
entries
Get all effeks that has been scanned by the effek asset loader. -
clearAllPlaying
public static void clearAllPlaying()Clear all playing effek emitters. -
forEach
-
gc
public static void gc()Release less recently used effeks when system is under high memory usage. This mod is called automatically regularly.
-