Skip to main content

ItemParticlesClientHost

Trait ItemParticlesClientHost 

pub trait ItemParticlesClientHost {
    // Provided method
    fn item_particle_options(
        &self,
        stack: &ItemStack,
    ) -> Option<ParticleOptions> { ... }
}
Expand description

Item particle model resolution on the client.

Provided Methods§

fn item_particle_options(&self, stack: &ItemStack) -> Option<ParticleOptions>

Resolve vanilla’s ItemParticleOption for this stack using the ground display context and seed 0, exactly like the game’s eating particles. Includes every resolved model layer’s particle sprite, respecting resource packs and stack component overrides. Returns None for an invalid stack or unavailable resources/provider. Available in Setup, Reloading and World. Resolve again after a resource reload; this read allocates the sprite list.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§