From 17828b760ac0de7c22e2d1ab97cc83dcc27bfec9 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Tue, 9 Mar 2021 11:41:23 +0100 Subject: [PATCH] Fixed save_checkpoint() and restore_checkpoint() functions --- src/lib.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f7337e6..b83758f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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::().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) {