Struct mcpi_api::Minecraft [−][src]
pub struct Minecraft { /* fields omitted */ }
Struct containing functions and a Connection struct.
Implementations
impl Minecraft
[src]
impl Minecraft
[src]Panics
All functions implemented on the Minecraft struct might panic if the API is not running anymore or packages fail to send. This might change in a 0.2.0 version of this crate
pub fn post_to_chat(&mut self, msg: &str)
[src]
Post a message to the chat
pub fn get_block(&mut self, pos: &TileVec3) -> u8
[src]
Get the block at a specific position
pub fn get_block_with_data(&mut self, pos: &TileVec3) -> Vec<u8>
[src]
Get the block with data at a specific position
pub fn get_blocks(&mut self, pos1: &TileVec3, pos2: &TileVec3) -> Vec<u8>
[src]
Get a array of blocks contained in the specified area
pub fn get_blocks_with_data(
&mut self,
pos1: &TileVec3,
pos2: &TileVec3
) -> Vec<Vec<u8>>
[src]
&mut self,
pos1: &TileVec3,
pos2: &TileVec3
) -> Vec<Vec<u8>>
Get a array of blocks with their data contained in the specified area
pub fn set_block(&mut self, pos: &TileVec3, blocktype: u8, blockdata: u8)
[src]
Set a block at a specific position
pub fn set_blocks(
&mut self,
pos1: &TileVec3,
pos2: &TileVec3,
blocktype: u8,
blockdata: u8
)
[src]
&mut self,
pos1: &TileVec3,
pos2: &TileVec3,
blocktype: u8,
blockdata: u8
)
Fill the specified area with the a block
pub fn get_height(&mut self, pos: &TileVec3) -> i8
[src]
Get the highest point at the specified position
pub fn save_checkpoint(&mut self)
[src]
Save the current world state as a checkpoint
pub fn restore_checkpoint(&mut self)
[src]
Restore a previously saved world state
pub fn setting(&mut self, setting: &str, status: bool)
[src]
Set a world setting to true or false. Available settings: “world_immutable”, “nametags_visible”
pub fn get_player_entity_ids(&mut self) -> Vec<u16>
[src]
Get a list of entity ids for all online players
pub fn player(&mut self) -> Player<'_>
[src]
Get a instance of the Player struct containing player related functions
pub fn entity(&mut self) -> Entity<'_>
[src]
Auto Trait Implementations
impl RefUnwindSafe for Minecraft
impl RefUnwindSafe for Minecraft
impl UnwindSafe for Minecraft
impl UnwindSafe for Minecraft