Class ParticleRendererRegistry

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

public final class ParticleRendererRegistry 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 textureSheet)
    Gets the identifier for the given ParticleRenderType.
    static @Nullable net.minecraft.client.particle.ParticleRenderType
    getParticleTextureSheet(net.minecraft.resources.Identifier id)
    Gets the ParticleRenderType registered with the given identifier.
    static void
    register(net.minecraft.client.particle.ParticleRenderType textureSheet, 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 java.lang.Object

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

    • register

      public static void register(net.minecraft.client.particle.ParticleRenderType textureSheet, Function<net.minecraft.client.particle.ParticleEngine,net.minecraft.client.particle.ParticleGroup<?>> function)
      Registers a ParticleGroup factory for the given ParticleRenderType.
      Parameters:
      textureSheet - the texture sheet
      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 texture sheet will be rendered before the second texture sheet.

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

      Parameters:
      first - the texture sheet to render first
      second - the texture sheet 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 texture sheet will be rendered before the second texture sheet.

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

      Parameters:
      first - the texture sheet to render first
      second - the texture sheet 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 texture sheet will be rendered before the second texture sheet.

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

      Parameters:
      first - the texture sheet to render first
      second - the texture sheet 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 texture sheet will be rendered before the second texture sheet.

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

      Parameters:
      first - the texture sheet to render first
      second - the texture sheet to render second
    • getParticleTextureSheet

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

      public static net.minecraft.resources.Identifier getId(net.minecraft.client.particle.ParticleRenderType textureSheet)
      Gets the identifier for the given ParticleRenderType.
      Parameters:
      textureSheet - the texture sheet
      Returns:
      the identifier