diff options
Diffstat (limited to 'azalea/examples')
| -rw-r--r-- | azalea/examples/echo.rs | 3 | ||||
| -rw-r--r-- | azalea/examples/nearest_entity.rs | 4 | ||||
| -rw-r--r-- | azalea/examples/steal.rs | 3 | ||||
| -rw-r--r-- | azalea/examples/testbot/main.rs | 3 | ||||
| -rw-r--r-- | azalea/examples/todo/craft_dig_straight_down.rs | 3 | ||||
| -rw-r--r-- | azalea/examples/todo/mine_a_chunk.rs | 3 | ||||
| -rw-r--r-- | azalea/examples/todo/pvp.rs | 3 |
7 files changed, 8 insertions, 14 deletions
diff --git a/azalea/examples/echo.rs b/azalea/examples/echo.rs index a2219008..ed013a66 100644 --- a/azalea/examples/echo.rs +++ b/azalea/examples/echo.rs @@ -3,7 +3,7 @@ use azalea::prelude::*; #[tokio::main] -async fn main() { +async fn main() -> AppExit { let account = Account::offline("bot"); // or let account = Account::microsoft("email").await.unwrap(); @@ -11,7 +11,6 @@ async fn main() { .set_handler(handle) .start(account, "localhost") .await - .unwrap(); } #[derive(Default, Clone, Component)] diff --git a/azalea/examples/nearest_entity.rs b/azalea/examples/nearest_entity.rs index 19223589..a0385917 100644 --- a/azalea/examples/nearest_entity.rs +++ b/azalea/examples/nearest_entity.rs @@ -2,6 +2,7 @@ use azalea::{ ClientBuilder, bot::{Bot, LookAtEvent}, nearest_entity::EntityFinder, + prelude::*, }; use azalea_client::Account; use azalea_core::tick::GameTick; @@ -18,14 +19,13 @@ use bevy_ecs::{ }; #[tokio::main] -async fn main() { +async fn main() -> AppExit { let account = Account::offline("bot"); ClientBuilder::new() .add_plugins(LookAtStuffPlugin) .start(account, "localhost") .await - .unwrap(); } pub struct LookAtStuffPlugin; diff --git a/azalea/examples/steal.rs b/azalea/examples/steal.rs index c928545f..99254d51 100644 --- a/azalea/examples/steal.rs +++ b/azalea/examples/steal.rs @@ -8,7 +8,7 @@ use azalea_registry::builtin::{BlockKind, ItemKind}; use parking_lot::Mutex; #[tokio::main] -async fn main() { +async fn main() -> AppExit { let account = Account::offline("bot"); // or let bot = Account::microsoft("email").await.unwrap(); @@ -16,7 +16,6 @@ async fn main() { .set_handler(handle) .start(account, "localhost") .await - .unwrap(); } #[derive(Default, Clone, Component)] diff --git a/azalea/examples/testbot/main.rs b/azalea/examples/testbot/main.rs index 6adb782c..2c282f07 100644 --- a/azalea/examples/testbot/main.rs +++ b/azalea/examples/testbot/main.rs @@ -33,7 +33,7 @@ use commands::{CommandSource, register_commands}; use parking_lot::Mutex; #[tokio::main] -async fn main() { +async fn main() -> AppExit { let args = parse_args(); thread::spawn(deadlock_detection_thread); @@ -65,7 +65,6 @@ async fn main() { }) .start(join_address) .await - .unwrap(); } /// Runs a loop that checks for deadlocks every 10 seconds. diff --git a/azalea/examples/todo/craft_dig_straight_down.rs b/azalea/examples/todo/craft_dig_straight_down.rs index 0d9961d4..a76c1ffe 100644 --- a/azalea/examples/todo/craft_dig_straight_down.rs +++ b/azalea/examples/todo/craft_dig_straight_down.rs @@ -9,7 +9,7 @@ struct State { } #[tokio::main] -async fn main() { +async fn main() -> AppExit { let account = Account::offline("bot"); // or let bot = Account::microsoft("email").await; @@ -17,7 +17,6 @@ async fn main() { .set_handler(handle) .start(account, "localhost") .await - .unwrap(); } async fn handle(bot: Client, event: Event, state: State) -> anyhow::Result<()> { diff --git a/azalea/examples/todo/mine_a_chunk.rs b/azalea/examples/todo/mine_a_chunk.rs index 0c439f26..6f6606f4 100644 --- a/azalea/examples/todo/mine_a_chunk.rs +++ b/azalea/examples/todo/mine_a_chunk.rs @@ -1,7 +1,7 @@ use azalea::{prelude::*, swarm::prelude::*}; #[tokio::main] -async fn main() { +async fn main() -> AppExit { let mut accounts = Vec::new(); let mut states = Vec::new(); @@ -16,7 +16,6 @@ async fn main() { .set_swarm_handler(swarm_handle) .start("localhost") .await - .unwrap(); } #[derive(Default, Clone, Component)] diff --git a/azalea/examples/todo/pvp.rs b/azalea/examples/todo/pvp.rs index d85278e8..9121444c 100644 --- a/azalea/examples/todo/pvp.rs +++ b/azalea/examples/todo/pvp.rs @@ -6,7 +6,7 @@ use azalea::{ }; #[tokio::main] -async fn main() { +async fn main() -> AppExit { let mut accounts = Vec::new(); let mut states = Vec::new(); @@ -22,7 +22,6 @@ async fn main() { .join_delay(Duration::from_millis(1000)) .start("localhost") .await - .unwrap(); } #[derive(Component, Default, Clone)] |
