Trait BlockStatesServerHost
pub trait BlockStatesServerHost {
// Provided methods
fn set_block_property(
&mut self,
pos: [i32; 3],
key: &str,
value: &str,
) -> bool { ... }
fn set_block_property_with(
&mut self,
pos: [i32; 3],
key: &str,
value: &str,
flags: i32,
) -> bool { ... }
}Expand description
The server host’s methods of the block_states area, implemented by the game and reached through ServerHost.
Provided Methods§
fn set_block_property(&mut self, pos: [i32; 3], key: &str, value: &str) -> bool
fn set_block_property(&mut self, pos: [i32; 3], key: &str, value: &str) -> bool
Side: server.
Sets property key of the block at pos to value, as a furnace’s
tick sets its lit (Level.setBlock with UPDATE_ALL: neighbours
and clients are told); true when the block changed, false when the
block has no such property or value, or the property already has
value (as Level.setBlock for an unchanged state). The block
entity stays.
fn set_block_property_with(
&mut self,
pos: [i32; 3],
key: &str,
value: &str,
flags: i32,
) -> bool
fn set_block_property_with( &mut self, pos: [i32; 3], key: &str, value: &str, flags: i32, ) -> bool
Side: server.
native_set_block_property with Level.setBlock’s flags, as a
brewing stand’s tick sets its bottles with flags::UPDATE_CLIENTS.
Players get the write when UPDATE_CLIENTS is set; false when this
window isn’t a server, and in each case native_set_block_property
returns false.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".