mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Document RegisterParticleProvidersEvent's APIs (#9346)
This commit is contained in:
1 parent
121120aee1
commit
3c75e1269d
1 file changed
+18
@@ -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 <T> 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 <T extends ParticleOptions> void register(ParticleType<T> type, ParticleProvider<T> 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 <T> 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 <code>particles</code> 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 <T extends ParticleOptions> void register(ParticleType<T> type, ParticleEngine.SpriteParticleRegistration<T> registration)
|
||||
{
|
||||
particleEngine.register(type, registration);
|
||||
|
||||
Reference in new issue
Block a user