Skip to main content

BlockTintSources

Trait BlockTintSources 

pub trait BlockTintSources {
    // Required method
    fn register(&mut self, layers: Vec<TintLayer>, blocks: Vec<String>);
}
Expand description

The block tint registry register_block_tint_sources hands out: NeoForge’s RegisterColorHandlersEvent.BlockTintSources.

Required Methods§

fn register(&mut self, layers: Vec<TintLayer>, blocks: Vec<String>)

register(sources, blocks...), vanilla’s BlockColors.register: layers[i] colours the faces of blocks whose tintindex is i, and a face whose index is past the list is not tinted. Blocks are ids, a mod’s (mymod:cable) or vanilla’s (minecraft:oak_leaves); a later registration for a block replaces the earlier one, vanilla’s own included.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§