Skip to main content

ItemsServerHost

Trait ItemsServerHost 

pub trait ItemsServerHost {
    // Provided method
    fn dispense_default(
        &mut self,
        dimension: &str,
        pos: [i32; 3],
        facing: Direction,
        stack: ItemStack,
    ) -> Result<Option<ItemStack>, StackWriteError> { ... }
}
Expand description

The server host’s methods of the items area, implemented by the game and reached through ServerHost.

Provided Methods§

fn dispense_default( &mut self, dimension: &str, pos: [i32; 3], facing: Direction, stack: ItemStack, ) -> Result<Option<ItemStack>, StackWriteError>

Side: server. Drop one item as DefaultDispenseItemBehavior does. For a dispenser hook: return this remainder in its answer with CLICK; the caller plays the answer’s event and smoke once. A client, another dimension or an unloaded chunk keeps the input stack unchanged.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§