aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2024-10-26 05:29:26 +0000
committermat <git@matdoes.dev>2024-10-26 05:29:26 +0000
commit6b0fe5bf638079d535e70c3c91e78fe35a5d2a2f (patch)
tree3b65d2984a0cffbe5acb3d44d7e3b8b145c32f95 /azalea/examples
parentb762575db61cf775d603e11eb2bd27ae13bdc4e9 (diff)
downloadazalea-drasl-6b0fe5bf638079d535e70c3c91e78fe35a5d2a2f.tar.xz
group imports with rustfmt
Diffstat (limited to 'azalea/examples')
-rw-r--r--azalea/examples/steal.rs3
-rw-r--r--azalea/examples/testbot/commands/movement.rs3
-rw-r--r--azalea/examples/testbot/main.rs11
3 files changed, 9 insertions, 8 deletions
diff --git a/azalea/examples/steal.rs b/azalea/examples/steal.rs
index c6ab4639..b0586f19 100644
--- a/azalea/examples/steal.rs
+++ b/azalea/examples/steal.rs
@@ -1,10 +1,11 @@
//! Steal all the diamonds from all the nearby chests.
+use std::sync::Arc;
+
use azalea::{prelude::*, BlockPos};
use azalea_inventory::operations::QuickMoveClick;
use azalea_inventory::ItemSlot;
use parking_lot::Mutex;
-use std::sync::Arc;
#[tokio::main]
async fn main() {
diff --git a/azalea/examples/testbot/commands/movement.rs b/azalea/examples/testbot/commands/movement.rs
index 4957533f..3c66fefa 100644
--- a/azalea/examples/testbot/commands/movement.rs
+++ b/azalea/examples/testbot/commands/movement.rs
@@ -9,9 +9,8 @@ use azalea::{
};
use parking_lot::Mutex;
-use crate::BotTask;
-
use super::{CommandSource, Ctx};
+use crate::BotTask;
pub fn register(commands: &mut CommandDispatcher<Mutex<CommandSource>>) {
commands.register(
diff --git a/azalea/examples/testbot/main.rs b/azalea/examples/testbot/main.rs
index 6795e6cf..e7d68d5e 100644
--- a/azalea/examples/testbot/main.rs
+++ b/azalea/examples/testbot/main.rs
@@ -14,17 +14,17 @@
mod commands;
pub mod killaura;
-use azalea::pathfinder::PathfinderDebugParticles;
-use azalea::ClientInformation;
+use std::sync::Arc;
+use std::time::Duration;
use azalea::brigadier::command_dispatcher::CommandDispatcher;
use azalea::ecs::prelude::*;
+use azalea::pathfinder::PathfinderDebugParticles;
use azalea::prelude::*;
use azalea::swarm::prelude::*;
+use azalea::ClientInformation;
use commands::{register_commands, CommandSource};
use parking_lot::Mutex;
-use std::sync::Arc;
-use std::time::Duration;
const USERNAME: &str = "azalea";
const ADDRESS: &str = "localhost";
@@ -38,10 +38,11 @@ const PATHFINDER_DEBUG_PARTICLES: bool = false;
#[tokio::main]
async fn main() {
{
- use parking_lot::deadlock;
use std::thread;
use std::time::Duration;
+ use parking_lot::deadlock;
+
// Create a background thread which checks for deadlocks every 10s
thread::spawn(move || loop {
thread::sleep(Duration::from_secs(10));