类 EffectDefinition

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

public class EffectDefinition extends Object implements Closeable
An effect wrapper with a registry name, the effect instance is mutable.
从以下版本开始:
1.0.0
  • 构造器详细资料

    • EffectDefinition

      public EffectDefinition(@NotNull @NotNull EffectMetadata metadata)
  • 方法详细资料

    • getId

      public net.minecraft.resources.ResourceLocation getId()
      Get the registry id of this effek.
      返回:
      the id representing this loaded effek in EffectRegistry
    • getMetadata

      public EffectMetadata getMetadata()
      Get the metadata of this effek.
      返回:
      metadata of this effek.
    • play

      public ParticleEmitter play()
      Create an anonymous emitter and play it.
      返回:
      the particle emitter, a wrapper of an int handle from the Effekseer native api.
    • play

      public ParticleEmitter play(net.minecraft.resources.ResourceLocation emitterName)
      Create a named emitter and play it. Created emitter can be retrieved by emitter name through getNamedEmitter(ParticleEmitter.Type, ResourceLocation).
      参数:
      emitterName - the name of the emitter.
      返回:
      the particle emitter, a wrapper of an int handle from the Effekseer native api.
    • play

      Get the registry id of this effek.
      参数:
      type - Type of this emitter.
      返回:
      the id representing this loaded effek in EffectRegistry
    • play

      public ParticleEmitter play(ParticleEmitter.Type type, net.minecraft.resources.ResourceLocation emitterName)
      Create a named emitter and play it. Created emitter can be retrieved by emitter name through getNamedEmitter(ParticleEmitter.Type, ResourceLocation).
      参数:
      type - Type of this emitter.
      emitterName - the name of the emitter.
      返回:
      the particle emitter, a wrapper of an int handle from the Effekseer native api.
    • getNamedEmitter

      public Optional<ParticleEmitter> getNamedEmitter(ParticleEmitter.Type type, net.minecraft.resources.ResourceLocation emitterName)
      Get an emitter through its name.
      参数:
      type - Type of this emitter.
      emitterName - the name of the emitter.
      返回:
      the particle emitter with the given emitter name. Empty if not exist.
    • getManager

      public EffekseerManager getManager(ParticleEmitter.Type type)
      Get the underlying effekseer manager of this effek.
      参数:
      type - Type of this emitter. Each particle type has its own manager.
      返回:
      the manager of this emitter type.
    • emitters

      public Stream<ParticleEmitter> emitters()
      Get all existing emitters of this effek. May contain some finished emitters pending to be cleaned.
      返回:
      all existing emitters of this effek.
    • emitters

      public Stream<ParticleEmitter> emitters(ParticleEmitter.Type type)
      Get all existing emitters of this effek of a given type. May contain some finished emitters pending to be cleaned.
      参数:
      type - Type of this emitter.
      返回:
      all existing emitters of this effek with the given type.
    • emitterContainers

      public Stream<Collection<ParticleEmitter>> emitterContainers()
      Get all existing emitters of this effek, both one-shot and named.
      返回:
      all existing emitters of this effek, both one-shot and named.
    • emitterContainers

      public Stream<Collection<ParticleEmitter>> emitterContainers(ParticleEmitter.Type type)
      Get all existing emitters of this effek under the given type, both one-shot and named.
      参数:
      type - Wanted emitter type.
      返回:
      all existing emitters of this effek under the given type, both one-shot and named.
    • getEffect

      public EffekseerEffect getEffect()
      Get the direct wrapper of the underlying Effekseer effect.
      返回:
      the effect that can be played directly.
      API Note:
      Do not keep reference of its return value. Actual effect may be updated upon resource pack reloads.
    • setEffect

      @Internal public EffectDefinition setEffect(EffekseerEffect effect)
    • managers

      @Deprecated(forRemoval=true, since="2.2.0") public Stream<EffekseerManager> managers()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      since 2.2.0, managers are single instanced. Use {globalManagers()} instead.
      Get all Effekseer managers of all emitter types.
      返回:
      all Effekseer managers of all emitter types.
    • globalManagers

      public static Collection<EffekseerManager> globalManagers()
      Get all Effekseer managers of all emitter types.
      返回:
      all Effekseer managers of all emitter types.
      从以下版本开始:
      2.2.0
    • draw

      @Internal public static void draw(ParticleEmitter.Type type, org.joml.Vector3f front, org.joml.Vector3f pos, int w, int h, float[] camera, float[] projection, float deltaFrames, float partialTicks, @Nullable @Nullable com.mojang.blaze3d.pipeline.RenderTarget background)
    • close

      public void close()
      Dispose this effek definition.
      指定者:
      close 在接口中 AutoCloseable
      指定者:
      close 在接口中 Closeable
    • shutdown

      @Internal public static void shutdown()