Added checkpoint function but as they don't seem to work they're inaccessible

master
blackfur 2021-02-11 17:52:13 +01:00
parent 2ff3b36fa5
commit 587d0e6a99
1 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,7 @@ use std::io::BufReader;
#[cfg(test)]
mod tests {
use crate::{create, Vec3};
use std::thread::sleep;
#[test]
fn it_works() {
@ -86,6 +87,14 @@ impl Minecraft {
pub fn get_height(&mut self, pos:Vec3) -> u8 {
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");
}
fn restore_checkpoint(&mut self) {
self.conn.send("world.checkpoint.restore");
}
}
pub fn create(adress:&str) -> Minecraft {