From 3c75e1269d13683db0f8180b3fc31c20797072b7 Mon Sep 17 00:00:00 2001 From: Joseph B Date: Fri, 24 Feb 2023 16:18:07 -0500 Subject: [PATCH] Document RegisterParticleProvidersEvent's APIs (#9346) --- .../event/RegisterParticleProvidersEvent.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/net/minecraftforge/client/event/RegisterParticleProvidersEvent.java b/src/main/java/net/minecraftforge/client/event/RegisterParticleProvidersEvent.java index 974e39a65e..e64be904ba 100644 --- a/src/main/java/net/minecraftforge/client/event/RegisterParticleProvidersEvent.java +++ b/src/main/java/net/minecraftforge/client/event/RegisterParticleProvidersEvent.java @@ -38,11 +38,29 @@ public class RegisterParticleProvidersEvent extends Event implements IModBusEven this.particleEngine = particleEngine; } + /** + * Registers a ParticleProvider for a non-json-based ParticleType. + * These particles do not receive a list of texture sprites to use for rendering themselves. + * @param ParticleOptions used by the ParticleType and ParticleProvider. + * @param type ParticleType to register a ParticleProvider for. + * There must be no particle json with an ID matching this ParticleType, + * or a redundant texture list error will occur when particle jsons load. + * @param provider ParticleProvider responsible for providing that ParticleType's particles. + */ public void register(ParticleType type, ParticleProvider provider) { particleEngine.register(type, provider); } + /** + * Registers a ParticleProvider for a json-based ParticleType. + * Particle jsons define a list of texture sprites which the particle can use to render itself. + * @param ParticleOptions used by the ParticleType and ParticleProvider. + * @param type ParticleType to register a ParticleProvider for. + * There must be a particle json with an ID matching this ParticleType in the particles asset folder, + * or a missing texture list error will occur when particle jsons load. + * @param registration SpriteParticleRegistration responsible for providing that ParticleType's particles. + */ public void register(ParticleType type, ParticleEngine.SpriteParticleRegistration registration) { particleEngine.register(type, registration);