diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2023-07-09 19:11:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-09 19:11:29 -0500 |
| commit | d1afd02aa84e7b4450c1607277f078eb2a0f1bf3 (patch) | |
| tree | efea9bb7ef7f2064f7c963fd88f394fecec6231b /azalea-world | |
| parent | ea8a8fccb6eb39c97f6cb69e11db5f7d0886172e (diff) | |
| download | azalea-drasl-d1afd02aa84e7b4450c1607277f078eb2a0f1bf3.tar.xz | |
Update to Bevy 0.11 (#94)
* update to bevy 0.11
* clippy
---------
Co-authored-by: mat <git@matdoes.dev>
Diffstat (limited to 'azalea-world')
| -rw-r--r-- | azalea-world/Cargo.toml | 14 | ||||
| -rw-r--r-- | azalea-world/src/entity/info.rs | 47 |
2 files changed, 31 insertions, 30 deletions
diff --git a/azalea-world/Cargo.toml b/azalea-world/Cargo.toml index b2c1aa5c..9f3ea8ee 100644 --- a/azalea-world/Cargo.toml +++ b/azalea-world/Cargo.toml @@ -18,16 +18,16 @@ azalea-core = { path = "../azalea-core", version = "^0.7.0", features = [ azalea-inventory = { version = "0.7.0", path = "../azalea-inventory" } azalea-nbt = { path = "../azalea-nbt", version = "^0.7.0" } azalea-registry = { path = "../azalea-registry", version = "^0.7.0" } -bevy_app = "0.10.0" -bevy_ecs = "0.10.0" +bevy_app = "0.11.0" +bevy_ecs = "0.11.0" derive_more = { version = "0.99.17", features = ["deref", "deref_mut"] } -enum-as-inner = "0.5.1" -log = "0.4.17" +enum-as-inner = "0.6.0" +log = "0.4.19" nohash-hasher = "0.2.0" -once_cell = "1.16.0" +once_cell = "1.18.0" parking_lot = "^0.12.1" -thiserror = "1.0.34" -uuid = "1.1.2" +thiserror = "1.0.43" +uuid = "1.4.0" [profile.release] lto = true diff --git a/azalea-world/src/entity/info.rs b/azalea-world/src/entity/info.rs index 525b57fa..03b72f94 100644 --- a/azalea-world/src/entity/info.rs +++ b/azalea-world/src/entity/info.rs @@ -9,12 +9,12 @@ use crate::{ update_entity_by_id_index, update_uuid_index, InstanceContainer, PartialInstance, }; use azalea_core::ChunkPos; -use bevy_app::{App, CoreSet, Plugin}; +use bevy_app::{App, Plugin, PostUpdate, PreUpdate, Update}; use bevy_ecs::{ component::Component, entity::Entity, query::{Added, Changed, With, Without}, - schedule::{IntoSystemConfig, IntoSystemConfigs, SystemSet}, + schedule::{IntoSystemConfigs, SystemSet}, system::{Commands, EntityCommand, Query, Res, ResMut, Resource}, world::{EntityMut, World}, }; @@ -51,32 +51,33 @@ impl Plugin for EntityPlugin { // added to indexes during update (done by this plugin) // modified during update // despawned post-update (done by this plugin) - app.add_system( - remove_despawned_entities_from_indexes - .in_base_set(CoreSet::PreUpdate) - .in_set(EntityUpdateSet::Deindex), + app.add_systems( + PreUpdate, + remove_despawned_entities_from_indexes.in_set(EntityUpdateSet::Deindex), ) .add_systems( - (deduplicate_entities, deduplicate_local_entities) - .in_base_set(CoreSet::PostUpdate) - .in_set(EntityUpdateSet::Deduplicate), + PostUpdate, + (deduplicate_entities, deduplicate_local_entities).in_set(EntityUpdateSet::Deduplicate), ) .add_systems( + Update, ( - update_entity_chunk_positions, - update_uuid_index, - update_entity_by_id_index, - ) - .in_set(EntityUpdateSet::Index), + ( + update_entity_chunk_positions, + update_uuid_index, + update_entity_by_id_index, + ) + .in_set(EntityUpdateSet::Index), + ( + add_updates_received, + debug_new_entity, + debug_detect_updates_received_on_local_entities, + add_dead, + update_bounding_box, + clamp_look_direction, + ), + ), ) - .add_systems(( - add_updates_received, - debug_new_entity, - debug_detect_updates_received_on_local_entities, - add_dead, - update_bounding_box, - clamp_look_direction, - )) .init_resource::<EntityInfos>(); } } @@ -152,7 +153,7 @@ pub struct RelativeEntityUpdate { pub update: Box<dyn FnOnce(&mut EntityMut) + Send + Sync>, } impl EntityCommand for RelativeEntityUpdate { - fn write(self, entity: Entity, world: &mut World) { + fn apply(self, entity: Entity, world: &mut World) { let partial_entity_infos = &mut self.partial_world.write().entity_infos; let mut entity_mut = world.entity_mut(entity); |
