From 659b6a1175298f4e2204c151e1fab0e18548f2ce Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 15 Sep 2023 17:00:52 -0500 Subject: rename start_ecs to start_ecs_runner --- azalea-client/src/client.rs | 6 +++--- azalea-client/src/lib.rs | 4 ++-- azalea/src/lib.rs | 3 ++- azalea/src/swarm/mod.rs | 8 +++++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs index 89e33dbc..f26fe6d8 100644 --- a/azalea-client/src/client.rs +++ b/azalea-client/src/client.rs @@ -230,7 +230,7 @@ impl Client { let mut app = App::new(); app.add_plugins(DefaultPlugins); - let ecs_lock = start_ecs(app, run_schedule_receiver, run_schedule_sender.clone()); + let ecs_lock = start_ecs_runner(app, run_schedule_receiver, run_schedule_sender.clone()); Self::start_client( ecs_lock, @@ -243,7 +243,7 @@ impl Client { } /// Create a [`Client`] when you already have the ECS made with - /// [`start_ecs`]. You'd usually want to use [`Self::join`] instead. + /// [`start_ecs_runner`]. You'd usually want to use [`Self::join`] instead. pub async fn start_client( ecs_lock: Arc>, account: &Account, @@ -634,7 +634,7 @@ impl Plugin for AzaleaPlugin { /// You can create your app with `App::new()`, but don't forget to add /// [`DefaultPlugins`]. #[doc(hidden)] -pub fn start_ecs( +pub fn start_ecs_runner( app: App, run_schedule_receiver: mpsc::UnboundedReceiver<()>, run_schedule_sender: mpsc::UnboundedSender<()>, diff --git a/azalea-client/src/lib.rs b/azalea-client/src/lib.rs index 942f683c..40544540 100644 --- a/azalea-client/src/lib.rs +++ b/azalea-client/src/lib.rs @@ -32,8 +32,8 @@ pub mod task_pool; pub use account::{Account, AccountOpts}; pub use client::{ - start_ecs, Client, ClientInformation, DefaultPlugins, JoinError, JoinedClientBundle, TabList, - TickBroadcast, + start_ecs_runner, Client, ClientInformation, DefaultPlugins, JoinError, JoinedClientBundle, + TabList, TickBroadcast, }; pub use events::Event; pub use local_player::{GameProfileComponent, LocalPlayer, SendPacketEvent}; diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs index 77e4ecf1..9e2cfb13 100644 --- a/azalea/src/lib.rs +++ b/azalea/src/lib.rs @@ -188,7 +188,8 @@ where // An event that causes the schedule to run. This is only used internally. let (run_schedule_sender, run_schedule_receiver) = mpsc::unbounded_channel(); - let ecs_lock = start_ecs(self.app, run_schedule_receiver, run_schedule_sender.clone()); + let ecs_lock = + start_ecs_runner(self.app, run_schedule_receiver, run_schedule_sender.clone()); let (bot, mut rx) = Client::start_client( ecs_lock, diff --git a/azalea/src/swarm/mod.rs b/azalea/src/swarm/mod.rs index 05f39388..f2d7e5b6 100644 --- a/azalea/src/swarm/mod.rs +++ b/azalea/src/swarm/mod.rs @@ -5,7 +5,7 @@ mod events; pub mod prelude; use azalea_client::{ - chat::ChatPacket, start_ecs, Account, Client, DefaultPlugins, Event, JoinError, + chat::ChatPacket, start_ecs_runner, Account, Client, DefaultPlugins, Event, JoinError, }; use azalea_protocol::{ connect::ConnectionError, @@ -319,7 +319,8 @@ where let (swarm_tx, mut swarm_rx) = mpsc::unbounded_channel(); let (run_schedule_sender, run_schedule_receiver) = mpsc::unbounded_channel(); - let ecs_lock = start_ecs(self.app, run_schedule_receiver, run_schedule_sender.clone()); + let ecs_lock = + start_ecs_runner(self.app, run_schedule_receiver, run_schedule_sender.clone()); let swarm = Swarm { ecs_lock: ecs_lock.clone(), @@ -515,7 +516,8 @@ impl Swarm { // rx is used to receive events from the bot // An event that causes the schedule to run. This is only used internally. // let (run_schedule_sender, run_schedule_receiver) = mpsc::unbounded_channel(); - // let ecs_lock = start_ecs(run_schedule_receiver, run_schedule_sender.clone()); + // let ecs_lock = start_ecs_runner(run_schedule_receiver, + // run_schedule_sender.clone()); let (bot, mut rx) = Client::start_client( self.ecs_lock.clone(), account, -- cgit v1.2.3