mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
rename start_ecs to start_ecs_runner
This commit is contained in:
parent
622042fd41
commit
659b6a1175
4 changed files with 12 additions and 9 deletions
|
@ -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<Mutex<World>>,
|
||||
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<()>,
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue