aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/swarm
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/src/swarm
parentb762575db61cf775d603e11eb2bd27ae13bdc4e9 (diff)
downloadazalea-drasl-6b0fe5bf638079d535e70c3c91e78fe35a5d2a2f.tar.xz
group imports with rustfmt
Diffstat (limited to 'azalea/src/swarm')
-rw-r--r--azalea/src/swarm/chat.rs13
-rw-r--r--azalea/src/swarm/mod.rs3
2 files changed, 9 insertions, 7 deletions
diff --git a/azalea/src/swarm/chat.rs b/azalea/src/swarm/chat.rs
index 7425293b..cf01c60b 100644
--- a/azalea/src/swarm/chat.rs
+++ b/azalea/src/swarm/chat.rs
@@ -13,18 +13,19 @@
// in Swarm that's set to the smallest index of all the bots, and we remove all
// messages from the queue that are before that index.
+use std::collections::VecDeque;
+
+use azalea_client::chat::{ChatPacket, ChatReceivedEvent};
+use bevy_app::{App, Plugin, Update};
+use bevy_ecs::prelude::Event;
+
+use super::{Swarm, SwarmEvent};
use crate::ecs::{
component::Component,
event::{EventReader, EventWriter},
schedule::IntoSystemConfigs,
system::{Commands, Query, Res, ResMut, Resource},
};
-use azalea_client::chat::{ChatPacket, ChatReceivedEvent};
-use bevy_app::{App, Plugin, Update};
-use bevy_ecs::prelude::Event;
-use std::collections::VecDeque;
-
-use super::{Swarm, SwarmEvent};
#[derive(Clone)]
pub struct SwarmChatPlugin;
diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs
index 451d887c..8c2d23f6 100644
--- a/azalea/src/swarm/mod.rs
+++ b/azalea/src/swarm/mod.rs
@@ -4,6 +4,8 @@ mod chat;
mod events;
pub mod prelude;
+use std::{collections::HashMap, future::Future, net::SocketAddr, sync::Arc, time::Duration};
+
use azalea_client::{
chat::ChatPacket, start_ecs_runner, Account, Client, DefaultPlugins, Event, JoinError,
StartClientOpts,
@@ -14,7 +16,6 @@ use bevy_app::{App, PluginGroup, PluginGroupBuilder, Plugins};
use bevy_ecs::{component::Component, entity::Entity, system::Resource, world::World};
use futures::future::{join_all, BoxFuture};
use parking_lot::{Mutex, RwLock};
-use std::{collections::HashMap, future::Future, net::SocketAddr, sync::Arc, time::Duration};
use tokio::sync::mpsc;
use tracing::error;