Skip to main content

CauldronFluidContents

Trait CauldronFluidContents 

pub trait CauldronFluidContents {
    // Required method
    fn register(
        &mut self,
        block: BlockKey,
        fluid: FluidKey,
        total: u32,
        level: Option<&str>,
    );
}
Expand description

Registrar of the fluid a cauldron block holds (register_cauldron_fluid_content), as NeoForge’s RegisterCauldronFluidContentEvent.

Required Methods§

fn register( &mut self, block: BlockKey, fluid: FluidKey, total: u32, level: Option<&str>, )

block holds total millibuckets of fluid when full. level names the block’s integer level property, whose greatest value is the number of levels the cauldron fills by; none means the cauldron is only ever full, as a lava cauldron. Each level holds total ÷ the number of levels, so total must divide evenly by it. Totals must be in 1..=i32::MAX, the fluid capability amount range. The property must contain every canonical integer from 1 through its maximum (and may include 0).

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§