Fixed save_checkpoint() and restore_checkpoint() functions

master
BuildTools 2021-03-09 11:41:23 +01:00
parent 0c2970515d
commit 9e53ee25d3
1 changed files with 4 additions and 10 deletions

View File

@ -22,12 +22,6 @@ mod tests {
z: 10
};
mc.post_to_chat("Test");
println!("{}",mc.get_block(position1));
println!("{:?}",mc.get_block_with_data(position1));
mc.set_block(position1,18,1);
mc.set_blocks(position1,position2,18,1);
println!("{}",mc.get_height(position1));
mc.setting("world_immutable", false);
}
}
@ -89,12 +83,12 @@ impl Minecraft {
self.conn.send_receive(&format!("world.getHeight({},{})", pos.x,pos.z)).parse::<u8>().unwrap()
}
fn save_checkpoint(&mut self) {
self.conn.send("world.checkpoint.save");
pub fn save_checkpoint(&mut self) {
self.conn.send("world.checkpoint.save()");
}
fn restore_checkpoint(&mut self) {
self.conn.send("world.checkpoint.restore");
pub fn restore_checkpoint(&mut self) {
self.conn.send("world.checkpoint.restore()");
}
pub fn setting(&mut self, setting:&str, status:bool) {