diff options
Diffstat (limited to 'azalea/examples')
| -rw-r--r-- | azalea/examples/testbot.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/azalea/examples/testbot.rs b/azalea/examples/testbot.rs index 14800e9c..630ddf00 100644 --- a/azalea/examples/testbot.rs +++ b/azalea/examples/testbot.rs @@ -11,6 +11,7 @@ use azalea::pathfinder::goals::BlockPosGoal; use azalea::protocol::packets::game::ClientboundGamePacket; use azalea::{prelude::*, swarm::prelude::*, BlockPos, GameProfileComponent, WalkDirection}; use azalea::{Account, Client, Event}; +use azalea_client::SprintDirection; use azalea_core::Vec3; use azalea_world::{InstanceName, MinecraftEntityId}; use std::time::Duration; @@ -145,6 +146,9 @@ async fn handle(mut bot: Client, event: Event, _state: State) -> anyhow::Result< "walk" => { bot.walk(WalkDirection::Forward); } + "sprint" => { + bot.sprint(SprintDirection::Forward); + } "stop" => { bot.set_jumping(false); bot.walk(WalkDirection::None); |
