Class ParticleProviderRegistry
java.lang.Object
dev.architectury.registry.client.particle.ParticleProviderRegistry
A utility class for registering custom
ParticleProvider
s for particle types.
This class's methods should be invoked before ClientLifecycleEvent.CLIENT_SETUP
,
as doing so afterwards will result in the providers not being registered properly on Forge, causing crashes on startup.
Generally speaking, you should either listen to the registration of your particle type yourself and use either
register(ParticleType, ParticleProvider)
or register(ParticleType, DeferredParticleProvider)
to register the provider,
or use the helper methods register(RegistrySupplier, ParticleProvider)
and register(RegistrySupplier, DeferredParticleProvider)
,
which will automatically handle the listening for you.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
ParticleProviderRegistry.DeferredParticleProvider<T extends net.minecraft.core.particles.ParticleOptions>
static interface
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends net.minecraft.core.particles.ParticleOptions>
voidregister
(RegistrySupplier<? extends net.minecraft.core.particles.ParticleType<T>> supplier, ParticleProviderRegistry.DeferredParticleProvider<T> provider) static <T extends net.minecraft.core.particles.ParticleOptions>
voidregister
(RegistrySupplier<? extends net.minecraft.core.particles.ParticleType<T>> supplier, net.minecraft.client.particle.ParticleProvider<T> provider) static <T extends net.minecraft.core.particles.ParticleOptions>
voidregister
(net.minecraft.core.particles.ParticleType<T> type, ParticleProviderRegistry.DeferredParticleProvider<T> provider) static <T extends net.minecraft.core.particles.ParticleOptions>
voidregister
(net.minecraft.core.particles.ParticleType<T> type, net.minecraft.client.particle.ParticleProvider<T> provider)
-
Constructor Details
-
ParticleProviderRegistry
public ParticleProviderRegistry()
-
-
Method Details
-
register
public static <T extends net.minecraft.core.particles.ParticleOptions> void register(RegistrySupplier<? extends net.minecraft.core.particles.ParticleType<T>> supplier, net.minecraft.client.particle.ParticleProvider<T> provider) -
register
public static <T extends net.minecraft.core.particles.ParticleOptions> void register(RegistrySupplier<? extends net.minecraft.core.particles.ParticleType<T>> supplier, ParticleProviderRegistry.DeferredParticleProvider<T> provider) -
register
public static <T extends net.minecraft.core.particles.ParticleOptions> void register(net.minecraft.core.particles.ParticleType<T> type, net.minecraft.client.particle.ParticleProvider<T> provider) -
register
public static <T extends net.minecraft.core.particles.ParticleOptions> void register(net.minecraft.core.particles.ParticleType<T> type, ParticleProviderRegistry.DeferredParticleProvider<T> provider)
-