diff options
Diffstat (limited to 'azalea')
| -rw-r--r-- | azalea/benches/pathfinder.rs | 2 | ||||
| -rw-r--r-- | azalea/examples/testbot/killaura.rs | 6 | ||||
| -rw-r--r-- | azalea/src/pathfinder/tests.rs | 1 |
3 files changed, 4 insertions, 5 deletions
diff --git a/azalea/benches/pathfinder.rs b/azalea/benches/pathfinder.rs index 48736cef..aff6c00c 100644 --- a/azalea/benches/pathfinder.rs +++ b/azalea/benches/pathfinder.rs @@ -47,7 +47,7 @@ fn generate_bedrock_world( azalea_registry::Block::Bedrock.into(), chunks.min_y, ); - if rng.gen_bool(0.5) { + if rng.random_bool(0.5) { chunk.set_block_state( &ChunkBlockPos::new(x, 2, z), azalea_registry::Block::Bedrock.into(), diff --git a/azalea/examples/testbot/killaura.rs b/azalea/examples/testbot/killaura.rs index 586d90b2..093495ea 100644 --- a/azalea/examples/testbot/killaura.rs +++ b/azalea/examples/testbot/killaura.rs @@ -2,7 +2,7 @@ use azalea::{ ecs::prelude::*, entity::{Dead, LocalEntity, Position, metadata::AbstractMonster}, prelude::*, - world::{InstanceName, MinecraftEntityId}, + world::InstanceName, }; use crate::State; @@ -21,12 +21,12 @@ pub fn tick(bot: Client, state: State) -> anyhow::Result<()> { { let mut ecs = bot.ecs.lock(); let mut query = ecs - .query_filtered::<(&MinecraftEntityId, &Position, &InstanceName), ( + .query_filtered::<(Entity, &Position, &InstanceName), ( With<AbstractMonster>, Without<LocalEntity>, Without<Dead>, )>(); - for (&entity_id, position, instance_name) in query.iter(&ecs) { + for (entity_id, position, instance_name) in query.iter(&ecs) { if instance_name != &bot_instance_name { continue; } diff --git a/azalea/src/pathfinder/tests.rs b/azalea/src/pathfinder/tests.rs index 782899e8..8458a982 100644 --- a/azalea/src/pathfinder/tests.rs +++ b/azalea/src/pathfinder/tests.rs @@ -1,4 +1,3 @@ - use std::{ collections::HashSet, sync::Arc, |
