Class RegisterParticleGroupsEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.client.event.RegisterParticleGroupsEvent
- All Implemented Interfaces:
IModBusEvent
public class RegisterParticleGroupsEvent
extends net.neoforged.bus.api.Event
implements IModBusEvent
Fired for registering additional particle group factories.
This is used when creating particle groups for particles in ParticleEngine.
This event is fired on the mod-specific event bus, only on the logical client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<ParticleRenderType, Function<ParticleEngine, ParticleGroup<?>>> private final List<ParticleRenderType> -
Constructor Summary
ConstructorsConstructorDescriptionRegisterParticleGroupsEvent(Map<ParticleRenderType, Function<ParticleEngine, ParticleGroup<?>>> particleGroupFactories, List<ParticleRenderType> particleRenderOrder) -
Method Summary
Modifier and TypeMethodDescriptionvoidregister(ParticleRenderType group, Function<ParticleEngine, ParticleGroup<?>> factory) Registers a factory function for the given particle group.
-
Field Details
-
particleGroupFactories
private final Map<ParticleRenderType,Function<ParticleEngine, particleGroupFactoriesParticleGroup<?>>> -
particleRenderOrder
-
-
Constructor Details
-
RegisterParticleGroupsEvent
@Internal public RegisterParticleGroupsEvent(Map<ParticleRenderType, Function<ParticleEngine, ParticleGroup<?>>> particleGroupFactories, List<ParticleRenderType> particleRenderOrder)
-
-
Method Details
-
register
Registers a factory function for the given particle group.- Parameters:
group- The particle group to register for.factory- A factory function used to create theParticleGroup.- Throws:
IllegalArgumentException- when a factory has already been registered forgroup.
-