From 37f9f1c6feda676be30bef31291eaed2a5fc82ce Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 2 Oct 2022 14:52:48 -0500 Subject: add jumping --- bot/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bot/src/main.rs') diff --git a/bot/src/main.rs b/bot/src/main.rs index 379b3af3..9b2eea1f 100644 --- a/bot/src/main.rs +++ b/bot/src/main.rs @@ -18,12 +18,16 @@ async fn handle_event(event: Event, mut bot: Client) -> anyhow::Result<()> { match event { Event::Login => { // tokio::time::sleep(std::time::Duration::from_secs(1)).await; - bot.walk(MoveDirection::Forward); + // bot.walk(MoveDirection::Forward); + // loop { // tokio::time::sleep(std::time::Duration::from_secs(2)).await; // } // bot.walk(MoveDirection::None); } + Event::GameTick => { + bot.set_jumping(true); + } Event::Packet(_packet) => {} _ => {} } -- cgit v1.2.3