Interface ParticleFactoryRegistry


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

    Nested Classes
    Modifier and Type Interface Description
    static interface  ParticleFactoryRegistry.PendingParticleFactory<T extends net.minecraft.particle.ParticleEffect>
    A pending particle factory.
  • Method Summary

    Modifier and Type Method Description
    static ParticleFactoryRegistry getInstance()  
    <T extends net.minecraft.particle.ParticleEffect>
    void
    register​(net.minecraft.particle.ParticleType<T> type, ParticleFactoryRegistry.PendingParticleFactory<T> constructor)
    Registers a delayed factory for constructing particles of the given type.
    <T extends net.minecraft.particle.ParticleEffect>
    void
    register​(net.minecraft.particle.ParticleType<T> type, net.minecraft.client.particle.ParticleFactory<T> factory)
    Registers a factory for constructing particles of the given type.
  • Method Details

    • getInstance

      static ParticleFactoryRegistry getInstance()
    • register

      <T extends net.minecraft.particle.ParticleEffect> void register​(net.minecraft.particle.ParticleType<T> type, net.minecraft.client.particle.ParticleFactory<T> factory)
      Registers a factory for constructing particles of the given type.
    • register

      <T extends net.minecraft.particle.ParticleEffect> void register​(net.minecraft.particle.ParticleType<T> type, ParticleFactoryRegistry.PendingParticleFactory<T> constructor)
      Registers a delayed factory for constructing particles of the given type.

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

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