From 719379a8a76ab0685f2bd14bebe2f0cd1e97f06b Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 7 Mar 2023 14:14:36 -0600 Subject: Bevy 0.10 (#79) * replace 0.9.1 with 0.10.0 * start migrating to bevy .10 * well it compiles * doesn't immediately panic * remove unused imports * fmt * delete azalea-ecs * make RelativeEntityUpdate an EntityCommand * fix a doc test * explain what FixedUpdate does --- codegen/lib/code/entity.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'codegen/lib') diff --git a/codegen/lib/code/entity.py b/codegen/lib/code/entity.py index 250b7e70..e3e88edf 100644 --- a/codegen/lib/code/entity.py +++ b/codegen/lib/code/entity.py @@ -46,7 +46,7 @@ use super::{EntityDataItem, EntityDataValue, OptionalUnsignedInt, Pose, Rotation use azalea_block::BlockState; use azalea_chat::FormattedText; use azalea_core::{BlockPos, Direction, Particle, Slot}; -use azalea_ecs::{bundle::Bundle, component::Component}; +use bevy_ecs::{bundle::Bundle, component::Component}; use derive_more::{Deref, DerefMut}; use thiserror::Error; use uuid::Uuid; @@ -183,7 +183,7 @@ impl From for UpdateMetadataError { # impl Allay { # pub fn apply_metadata( - # entity: &mut azalea_ecs::system::EntityCommands, + # entity: &mut bevy_ecs::system::EntityCommands, # d: EntityDataItem, # ) -> Result<(), UpdateMetadataError> { # match d.index { @@ -196,7 +196,7 @@ impl From for UpdateMetadataError { # } code.append(f'impl {struct_name} {{') code.append( - f' pub fn apply_metadata(entity: &mut azalea_ecs::system::EntityCommands, d: EntityDataItem) -> Result<(), UpdateMetadataError> {{') + f' pub fn apply_metadata(entity: &mut bevy_ecs::system::EntityCommands, d: EntityDataItem) -> Result<(), UpdateMetadataError> {{') code.append(f' match d.index {{') parent_last_index = -1 @@ -400,7 +400,7 @@ impl From for UpdateMetadataError { # and now make the main apply_metadata # pub fn apply_metadata( - # entity: &mut azalea_ecs::system::EntityCommands, + # entity: &mut bevy_ecs::system::EntityCommands, # items: Vec, # ) -> Result<(), UpdateMetadataError> { # if entity.contains::() { @@ -414,7 +414,7 @@ impl From for UpdateMetadataError { # } code.append( f'''pub fn apply_metadata( - entity: &mut azalea_ecs::system::EntityCommands, + entity: &mut bevy_ecs::system::EntityCommands, entity_kind: azalea_registry::EntityKind, items: Vec, ) -> Result<(), UpdateMetadataError> {{ @@ -436,7 +436,7 @@ impl From for UpdateMetadataError { code.append('}') code.append('') - # pub fn apply_default_metadata(entity: &mut azalea_ecs::system::EntityCommands, kind: azalea_registry::EntityKind) { + # pub fn apply_default_metadata(entity: &mut bevy_ecs::system::EntityCommands, kind: azalea_registry::EntityKind) { # match kind { # azalea_registry::EntityKind::AreaEffectCloud => { # entity.insert(AreaEffectCloudMetadataBundle::default()); @@ -444,7 +444,7 @@ impl From for UpdateMetadataError { # } # } code.append( - 'pub fn apply_default_metadata(entity: &mut azalea_ecs::system::EntityCommands, kind: azalea_registry::EntityKind) {') + 'pub fn apply_default_metadata(entity: &mut bevy_ecs::system::EntityCommands, kind: azalea_registry::EntityKind) {') code.append(' match kind {') for entity_id in burger_entity_data: if entity_id.startswith('~'): -- cgit v1.2.3