FabricParticleTypes

public final class FabricParticleTypes

Methods for creating particle types, both simple and using an existing attribute factory.

Usage:

public static final DefaultParticleType SIMPLE_TEST_PARTICLE = FabricParticleTypes.simple();
public static final DefaultParticleType CUSTOM_TEST_PARTICLE = FabricParticleTypes.simple();

{@literal @}Override
public void onInitialize() {
    Registry.register(Registry.PARTICLE_TYPE, new Identifier("testmod", "simple"), SIMPLE_TEST_PARTICLE);
    Registry.register(Registry.PARTICLE_TYPE, new Identifier("testmod", "custom"), CUSTOM_TEST_PARTICLE);
}}

See also

ParticleModClient

in the fabric example mods for a more complete usage.

Functions

complex
Link copied to clipboard
static ParticleType<Tcomplex<T extends ParticleEffect>(ParticleEffect.Factory<T> factory)
Creates a new particle type with a custom factory for packet/data serialization.
static ParticleType<Tcomplex<T extends ParticleEffect>(boolean alwaysSpawn, ParticleEffect.Factory<T> factory)
Creates a new particle type with a custom factory for packet/data serialization.
simple
Link copied to clipboard
static DefaultParticleType simple()
Creates a new, default particle type for the given id.
static DefaultParticleType simple(boolean alwaysSpawn)
Creates a new, default particle type for the given id.

Sources

jvm source
Link copied to clipboard