Skip to main content

BlockEntitiesHost

Trait BlockEntitiesHost 

pub trait BlockEntitiesHost {
    // Provided method
    fn block_entity(
        &self,
        level: LevelRef,
        pos: [i32; 3],
    ) -> Option<BlockEntityRef> { ... }
}
Expand description

The host’s methods both sides share of the block_entities area, implemented by the game and reached through Host.

Provided Methods§

fn block_entity(&self, level: LevelRef, pos: [i32; 3]) -> Option<BlockEntityRef>

Side: both. Find a block entity in a loaded chunk of an open level, or on a client in the level it shows. An entity taken out for its tick cannot be read in that tick.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§