Interface ParticleProviderRegistry


@NonExtendable public interface ParticleProviderRegistry
Registry for adding particle providers on the client for particle types created using FabricParticleTypes (or otherwise).
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    ParticleProviderRegistry.PendingParticleProvider<T extends net.minecraft.core.particles.ParticleOptions>
    A pending particle provider.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    <T extends net.minecraft.core.particles.ParticleOptions>
    void
    register(net.minecraft.core.particles.ParticleType<T> type, ParticleProviderRegistry.PendingParticleProvider<T> constructor)
    Registers a delayed provider for constructing particles of the given type.
    <T extends net.minecraft.core.particles.ParticleOptions>
    void
    register(net.minecraft.core.particles.ParticleType<T> type, net.minecraft.client.particle.ParticleProvider<T> provider)
    Registers a provider for constructing particles of the given type.
  • Method Details

    • getInstance

      static ParticleProviderRegistry getInstance()
    • register

      <T extends net.minecraft.core.particles.ParticleOptions> void register(net.minecraft.core.particles.ParticleType<T> type, net.minecraft.client.particle.ParticleProvider<T> provider)
      Registers a provider for constructing particles of the given type.
    • register

      <T extends net.minecraft.core.particles.ParticleOptions> void register(net.minecraft.core.particles.ParticleType<T> type, ParticleProviderRegistry.PendingParticleProvider<T> constructor)
      Registers a delayed provider for constructing particles of the given type.

      The provider method will be called with a sprite set to use for that particle when it comes time.

      Particle sprites will be loaded from domain:/particles/particle_name.json as per vanilla minecraft behavior.