Fixed save_checkpoint() and restore_checkpoint() functions

This commit is contained in:
BuildTools 2021-03-09 11:41:23 +01:00
parent 7bf7cb57d3
commit 17828b760a

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) {