aboutsummaryrefslogtreecommitdiff
path: root/azalea/examples/testbot/killaura.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-12-28 04:31:29 -0600
committerGitHub <noreply@github.com>2025-12-28 04:31:29 -0600
commit20c7e27250148f62bab9e7b99e4f0cd6deb82325 (patch)
tree163b312ef4dc72c5c23be923f8ca17cdf2a7278c /azalea/examples/testbot/killaura.rs
parent7ab3b8924f64f7eadb6b8928b6fae73cb06e4c2f (diff)
downloadazalea-drasl-20c7e27250148f62bab9e7b99e4f0cd6deb82325.tar.xz
Change Client::component to return a reference (#298)
* change Client::component to return a reference * write docs * merge main * remove unused parking_lot feature
Diffstat (limited to 'azalea/examples/testbot/killaura.rs')
-rw-r--r--azalea/examples/testbot/killaura.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea/examples/testbot/killaura.rs b/azalea/examples/testbot/killaura.rs
index 093495ea..e3d9091c 100644
--- a/azalea/examples/testbot/killaura.rs
+++ b/azalea/examples/testbot/killaura.rs
@@ -17,9 +17,9 @@ pub fn tick(bot: Client, state: State) -> anyhow::Result<()> {
let mut nearest_entity = None;
let mut nearest_distance = f64::INFINITY;
let bot_position = bot.eye_position();
- let bot_instance_name = bot.component::<InstanceName>();
+ let bot_instance_name = bot.component::<InstanceName>().clone();
{
- let mut ecs = bot.ecs.lock();
+ let mut ecs = bot.ecs.write();
let mut query = ecs
.query_filtered::<(Entity, &Position, &InstanceName), (
With<AbstractMonster>,