From be4f13c36c281f086602092098522b3f25fc0680 Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 17 Feb 2024 14:43:42 -0600 Subject: upgrade deps, bevy 0.13 --- azalea/src/nearest_entity.rs | 6 +++--- azalea/src/pathfinder/world.rs | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'azalea/src') diff --git a/azalea/src/nearest_entity.rs b/azalea/src/nearest_entity.rs index 38c9886e..363c8fb0 100644 --- a/azalea/src/nearest_entity.rs +++ b/azalea/src/nearest_entity.rs @@ -2,7 +2,7 @@ use azalea_entity::Position; use azalea_world::{InstanceName, MinecraftEntityId}; use bevy_ecs::{ prelude::Entity, - query::{ReadOnlyWorldQuery, With}, + query::{QueryFilter, With}, system::{Query, SystemParam}, }; @@ -44,7 +44,7 @@ use bevy_ecs::{ #[derive(SystemParam)] pub struct EntityFinder<'w, 's, F = ()> where - F: ReadOnlyWorldQuery + 'static, + F: QueryFilter + 'static, { all_entities: Query<'w, 's, (&'static Position, &'static InstanceName), With>, @@ -59,7 +59,7 @@ where impl<'w, 's, 'a, F> EntityFinder<'w, 's, F> where - F: ReadOnlyWorldQuery + 'static, + F: QueryFilter + 'static, { /// Gets the nearest entity to the given position and world instance name. /// This method will return `None` if there are no entities within range. If diff --git a/azalea/src/pathfinder/world.rs b/azalea/src/pathfinder/world.rs index a5a273fb..d3c94a52 100644 --- a/azalea/src/pathfinder/world.rs +++ b/azalea/src/pathfinder/world.rs @@ -157,9 +157,7 @@ impl CachedWorld { } let world = self.world_lock.read(); - let Some(chunk) = world.chunks.get(&chunk_pos) else { - return None; - }; + let chunk = world.chunks.get(&chunk_pos)?; let chunk = chunk.read(); let sections: Vec = chunk -- cgit v1.2.3