tutorial:particles
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| tutorial:particles [2021/09/09 20:49] – external edit 127.0.0.1 | tutorial:particles [2026/01/13 21:37] (current) – cassiancc | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| + | ~~REDIRECT> | ||
| + | |||
| ====== Adding Particles ====== | ====== Adding Particles ====== | ||
| Particles are textures used for special events and additional VFX. They are used on explosions, torches, dripping water and more! | Particles are textures used for special events and additional VFX. They are used on explosions, torches, dripping water and more! | ||
| Line 12: | Line 15: | ||
| // instance of our particle | // instance of our particle | ||
| - | public static final DefaultParticleType | + | public static final SimpleParticleType |
| @Override | @Override | ||
| public void onInitialize() { | public void onInitialize() { | ||
| - | Registry.register(Registry.PARTICLE_TYPE, | + | Registry.register(Registries.PARTICLE_TYPE, |
| } | } | ||
| Line 29: | Line 32: | ||
| @Override | @Override | ||
| public void onInitializeClient() { | public void onInitializeClient() { | ||
| - | /* Adds our particle textures to vanilla' | ||
| - | * Modify the namespace and particle id accordingly. | ||
| - | | ||
| - | * This is only used if you plan to add your own textures for the particle. Otherwise, remove | ||
| - | ClientSpriteRegistryCallback.event(PlayerScreenHandler.BLOCK_ATLAS_TEXTURE).register(((atlasTexture, | ||
| - | registry.register(new Identifier(" | ||
| - | })); | ||
| | | ||
| /* Registers our particle client-side. | /* Registers our particle client-side. | ||
| Line 41: | Line 37: | ||
| * Second argument is the particle' | * Second argument is the particle' | ||
| * In this example, we'll use FlameParticle' | * In this example, we'll use FlameParticle' | ||
| - | ParticleFactoryRegistry.getInstance().register(ExampleMod.GREEN_FLAME, | + | ParticleFactoryRegistry.getInstance().register(ExampleMod.GREEN_FLAME, |
| } | } | ||
tutorial/particles.txt · Last modified: 2026/01/13 21:37 by cassiancc