Trait ParticleProvider
pub trait ParticleProvider:
Send
+ Sync
+ 'static {
// Required method
fn tick(&self, particle: &mut ModParticle);
}Expand description
A mod’s particle provider: NeoForge’s ParticleProvider, held by the game for every particle
of its type. Particles of a type share one provider, so per-particle data lives in
ModParticle::state, not in the provider.
A tick has no Host and no level: the engine ticks particles inside the render crate, which
reaches no gameplay. A provider that needs the world reads it in a hook and keeps what it read.
Required Methods§
fn tick(&self, particle: &mut ModParticle)
fn tick(&self, particle: &mut ModParticle)
Particle.tick: advance particle by one tick. The game has set previous and age
already and expires the particle once age passes lifetime; the tick sets position,
frame, size, rgba, lifetime and removed. A number that is not finite expires the
particle.
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".