Class ParticleGroupRegistry

java.lang.Object
net.fabricmc.fabric.api.client.particle.v1.ParticleGroupRegistry

public final class ParticleGroupRegistry extends Object
A registry for custom ParticleGroups.
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.resources.Identifier
    getId(net.minecraft.client.particle.ParticleRenderType renderType)
    Gets the identifier for the given ParticleRenderType.
    static @Nullable net.minecraft.client.particle.ParticleRenderType
    getParticleRenderType(net.minecraft.resources.Identifier id)
    Gets the ParticleRenderType registered with the given identifier.
    static void
    register(net.minecraft.client.particle.ParticleRenderType renderType, Function<net.minecraft.client.particle.ParticleEngine, net.minecraft.client.particle.ParticleGroup<?>> function)
    Registers a ParticleGroup factory for the given ParticleRenderType.
    static void
    registerOrdering(net.minecraft.client.particle.ParticleRenderType first, net.minecraft.client.particle.ParticleRenderType second)
    Registers a rendering order between two ParticleRenderTypes.
    static void
    registerOrdering(net.minecraft.client.particle.ParticleRenderType first, net.minecraft.resources.Identifier second)
    Registers a rendering order between two ParticleRenderTypes.
    static void
    registerOrdering(net.minecraft.resources.Identifier first, net.minecraft.client.particle.ParticleRenderType second)
    Registers a rendering order between two ParticleRenderTypes.
    static void
    registerOrdering(net.minecraft.resources.Identifier first, net.minecraft.resources.Identifier second)
    Registers a rendering order between two ParticleRenderTypes.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • register

      public static void register(net.minecraft.client.particle.ParticleRenderType renderType, Function<net.minecraft.client.particle.ParticleEngine, net.minecraft.client.particle.ParticleGroup<?>> function)
      Registers a ParticleGroup factory for the given ParticleRenderType.
      Parameters:
      renderType - the render type
      function - the factory function
    • registerOrdering

      public static void registerOrdering(net.minecraft.client.particle.ParticleRenderType first, net.minecraft.resources.Identifier second)
      Registers a rendering order between two ParticleRenderTypes.

      The first render type will be rendered before the second render type.

      Note that the rendering order of vanilla render types is already defined by Minecraft, and you cannot change the order of vanilla render types with this method.

      Parameters:
      first - the render type to render first
      second - the render type to render second
    • registerOrdering

      public static void registerOrdering(net.minecraft.client.particle.ParticleRenderType first, net.minecraft.client.particle.ParticleRenderType second)
      Registers a rendering order between two ParticleRenderTypes.

      The first render type will be rendered before the second render type.

      Note that the rendering order of vanilla render types is already defined by Minecraft, and you cannot change the order of vanilla render types with this method.

      Parameters:
      first - the render type to render first
      second - the render type to render second
    • registerOrdering

      public static void registerOrdering(net.minecraft.resources.Identifier first, net.minecraft.client.particle.ParticleRenderType second)
      Registers a rendering order between two ParticleRenderTypes.

      The first render type will be rendered before the second render type.

      Note that the rendering order of vanilla render types is already defined by Minecraft, and you cannot change the order of vanilla render types with this method.

      Parameters:
      first - the render type to render first
      second - the render type to render second
    • registerOrdering

      public static void registerOrdering(net.minecraft.resources.Identifier first, net.minecraft.resources.Identifier second)
      Registers a rendering order between two ParticleRenderTypes.

      The first render type will be rendered before the second render type.

      Note that the rendering order of vanilla render types is already defined by Minecraft, and you cannot change the order of vanilla render types with this method.

      Parameters:
      first - the render type to render first
      second - the render type to render second
    • getParticleRenderType

      public static @Nullable net.minecraft.client.particle.ParticleRenderType getParticleRenderType(net.minecraft.resources.Identifier id)
      Gets the ParticleRenderType registered with the given identifier.
      Parameters:
      id - the identifier of the render type
      Returns:
      the render type, or null if none is registered with the given identifier
    • getId

      public static net.minecraft.resources.Identifier getId(net.minecraft.client.particle.ParticleRenderType renderType)
      Gets the identifier for the given ParticleRenderType.
      Parameters:
      renderType - the render type
      Returns:
      the identifier