aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-06-14 20:33:22 -1030
committermat <git@matdoes.dev>2025-06-14 20:33:22 -1030
commit5e81d85d7e8eeca1b6c86ea028353d7c55361961 (patch)
tree1cf36f406444811ca39b38af0d874d0ae2351368 /azalea/examples
parenta2606569bb79867d07a075bcf7b05730e4264d72 (diff)
downloadazalea-drasl-5e81d85d7e8eeca1b6c86ea028353d7c55361961.tar.xz
add note about current_thread to azalea readme
Diffstat (limited to 'azalea/examples')
-rw-r--r--azalea/examples/echo.rs2
-rw-r--r--azalea/examples/nearest_entity.rs2
-rw-r--r--azalea/examples/steal.rs2
-rw-r--r--azalea/examples/testbot/main.rs4
-rw-r--r--azalea/examples/todo/craft_dig_straight_down.rs5
-rw-r--r--azalea/examples/todo/mine_a_chunk.rs2
-rw-r--r--azalea/examples/todo/pvp.rs10
7 files changed, 12 insertions, 15 deletions
diff --git a/azalea/examples/echo.rs b/azalea/examples/echo.rs
index 80b0cb15..09c3d5d3 100644
--- a/azalea/examples/echo.rs
+++ b/azalea/examples/echo.rs
@@ -2,7 +2,7 @@
use azalea::prelude::*;
-#[tokio::main]
+#[tokio::main(flavor = "current_thread")]
async fn main() {
let account = Account::offline("bot");
// or let account = Account::microsoft("email").await.unwrap();
diff --git a/azalea/examples/nearest_entity.rs b/azalea/examples/nearest_entity.rs
index 2e6973cf..8774829e 100644
--- a/azalea/examples/nearest_entity.rs
+++ b/azalea/examples/nearest_entity.rs
@@ -12,7 +12,7 @@ use bevy_ecs::{
system::Query,
};
-#[tokio::main]
+#[tokio::main(flavor = "current_thread")]
async fn main() {
let account = Account::offline("bot");
diff --git a/azalea/examples/steal.rs b/azalea/examples/steal.rs
index 899c2568..87a1561b 100644
--- a/azalea/examples/steal.rs
+++ b/azalea/examples/steal.rs
@@ -6,7 +6,7 @@ use azalea::{BlockPos, pathfinder::goals::RadiusGoal, prelude::*};
use azalea_inventory::{ItemStack, operations::QuickMoveClick};
use parking_lot::Mutex;
-#[tokio::main]
+#[tokio::main(flavor = "current_thread")]
async fn main() {
let account = Account::offline("bot");
// or let bot = Account::microsoft("email").await.unwrap();
diff --git a/azalea/examples/testbot/main.rs b/azalea/examples/testbot/main.rs
index 8a35a281..8fb96411 100644
--- a/azalea/examples/testbot/main.rs
+++ b/azalea/examples/testbot/main.rs
@@ -20,8 +20,6 @@
//! only have this on if the bot has operator permissions, otherwise it'll
//! just spam the server console unnecessarily.
-#![feature(trivial_bounds)]
-
mod commands;
pub mod killaura;
@@ -34,7 +32,7 @@ use azalea::{
use commands::{CommandSource, register_commands};
use parking_lot::Mutex;
-#[tokio::main]
+#[tokio::main(flavor = "current_thread")]
async fn main() {
let args = parse_args();
diff --git a/azalea/examples/todo/craft_dig_straight_down.rs b/azalea/examples/todo/craft_dig_straight_down.rs
index 0dc8e16d..bf312331 100644
--- a/azalea/examples/todo/craft_dig_straight_down.rs
+++ b/azalea/examples/todo/craft_dig_straight_down.rs
@@ -1,7 +1,6 @@
use std::sync::Arc;
-use azalea::pathfinder;
-use azalea::prelude::*;
+use azalea::{pathfinder, prelude::*};
use parking_lot::Mutex;
#[derive(Default, Clone, Component)]
@@ -9,7 +8,7 @@ struct State {
pub started: Arc<Mutex<bool>>,
}
-#[tokio::main]
+#[tokio::main(flavor = "current_thread")]
async fn main() {
let account = Account::offline("bot");
// or let bot = Account::microsoft("email").await;
diff --git a/azalea/examples/todo/mine_a_chunk.rs b/azalea/examples/todo/mine_a_chunk.rs
index 0c439f26..eb7fafd4 100644
--- a/azalea/examples/todo/mine_a_chunk.rs
+++ b/azalea/examples/todo/mine_a_chunk.rs
@@ -1,6 +1,6 @@
use azalea::{prelude::*, swarm::prelude::*};
-#[tokio::main]
+#[tokio::main(flavor = "current_thread")]
async fn main() {
let mut accounts = Vec::new();
let mut states = Vec::new();
diff --git a/azalea/examples/todo/pvp.rs b/azalea/examples/todo/pvp.rs
index fb5a768d..0639d86b 100644
--- a/azalea/examples/todo/pvp.rs
+++ b/azalea/examples/todo/pvp.rs
@@ -1,11 +1,11 @@
use std::time::Duration;
-use azalea::ecs::query::With;
-use azalea::entity::metadata::Player;
-use azalea::{pathfinder, Account, Client, Event, GameProfileComponent};
-use azalea::{prelude::*, swarm::prelude::*};
+use azalea::{
+ Account, Client, Event, GameProfileComponent, ecs::query::With, entity::metadata::Player,
+ pathfinder, prelude::*, swarm::prelude::*,
+};
-#[tokio::main]
+#[tokio::main(flavor = "current_thread")]
async fn main() {
let mut accounts = Vec::new();
let mut states = Vec::new();