pub struct Minecraft { /* private fields */ }
Expand description
Struct containing functions and a Connection struct.
Implementations§
Source§impl Minecraft
§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
impl Minecraft
§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
Sourcepub fn post_to_chat(&mut self, msg: &str)
pub fn post_to_chat(&mut self, msg: &str)
Post a message to the chat
Sourcepub fn get_block_with_data(&mut self, pos: &TileVec3) -> Vec<u8> ⓘ
pub fn get_block_with_data(&mut self, pos: &TileVec3) -> Vec<u8> ⓘ
Get the block with data at a specific position
Sourcepub fn get_blocks(&mut self, pos1: &TileVec3, pos2: &TileVec3) -> Vec<u8> ⓘ
pub fn get_blocks(&mut self, pos1: &TileVec3, pos2: &TileVec3) -> Vec<u8> ⓘ
Get a array of blocks contained in the specified area
Sourcepub fn get_blocks_with_data(
&mut self,
pos1: &TileVec3,
pos2: &TileVec3,
) -> Vec<Vec<u8>>
pub fn get_blocks_with_data( &mut self, pos1: &TileVec3, pos2: &TileVec3, ) -> Vec<Vec<u8>>
Get a array of blocks with their data contained in the specified area
Sourcepub fn set_block(&mut self, pos: &TileVec3, blocktype: u8, blockdata: u8)
pub fn set_block(&mut self, pos: &TileVec3, blocktype: u8, blockdata: u8)
Set a block at a specific position
Sourcepub fn set_blocks(
&mut self,
pos1: &TileVec3,
pos2: &TileVec3,
blocktype: u8,
blockdata: u8,
)
pub fn set_blocks( &mut self, pos1: &TileVec3, pos2: &TileVec3, blocktype: u8, blockdata: u8, )
Fill the specified area with the a block
Sourcepub fn get_height(&mut self, pos: &TileVec3) -> i8
pub fn get_height(&mut self, pos: &TileVec3) -> i8
Get the highest point at the specified position
Sourcepub fn save_checkpoint(&mut self)
pub fn save_checkpoint(&mut self)
Save the current world state as a checkpoint
Sourcepub fn restore_checkpoint(&mut self)
pub fn restore_checkpoint(&mut self)
Restore a previously saved world state
Sourcepub fn setting(&mut self, setting: &str, status: bool)
pub fn setting(&mut self, setting: &str, status: bool)
Set a world setting to true or false. Available settings: “world_immutable”, “nametags_visible”
Sourcepub fn get_player_entity_ids(&mut self) -> Vec<u16>
pub fn get_player_entity_ids(&mut self) -> Vec<u16>
Get a list of entity ids for all online players
Sourcepub fn player(&mut self) -> Player<'_>
pub fn player(&mut self) -> Player<'_>
Get a instance of the Player struct containing player related functions