Skip to main content

FluidPart

Trait FluidPart 

pub trait FluidPart:
    Send
    + Sync
    + 'static {
    // Provided method
    fn fluid_rules(
        &self,
        level: &dyn LevelHost,
        event: &mut FluidRulesEvent<'_>,
    ) { ... }
}
Expand description

A mod world fluid’s part.

Provided Methods§

fn fluid_rules(&self, level: &dyn LevelHost, event: &mut FluidRulesEvent<'_>)

How a mod’s world fluid flows at pos, starting from what it declared (NeoForge’s BaseFlowingFluid and FluidType getters: getTickDelay, getDropOff, getSlopeFindDistance, canConvertToSource). fluid is the id it was declared with. Asked for every flow step and every cell a spread looks at: answer fast. An answer outside what WorldFluid accepts is brought back within it. Server-side. Side: server.

Trait Implementations§

§

impl Wire for Box<dyn FluidPart>

§

const MIN: usize = 8

Minimum encoded size, used to reject impossible collection lengths.
§

fn put(&self, out: &mut Writer)

Encodes this value, recording failures on the writer.
§

fn put_owned(self, out: &mut Writer)

Consumes owned data when a resource’s ownership must cross the boundary.
§

fn take(input: &mut Reader<'_>) -> Result<Box<dyn FluidPart>, WireError>

Decodes one value, leaving any following bytes for the caller.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§