aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib/code
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2023-03-07 14:14:36 -0600
committerGitHub <noreply@github.com>2023-03-07 14:14:36 -0600
commit719379a8a76ab0685f2bd14bebe2f0cd1e97f06b (patch)
treece5d6c62bc36fb1d1ec31083bc8e81a0109c12df /codegen/lib/code
parentbf4ff517890cad3ff4e36b4b78959504192e5374 (diff)
downloadazalea-drasl-719379a8a76ab0685f2bd14bebe2f0cd1e97f06b.tar.xz
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
Diffstat (limited to 'codegen/lib/code')
-rw-r--r--codegen/lib/code/entity.py14
1 files changed, 7 insertions, 7 deletions
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<EntityDataValue> 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<EntityDataValue> 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<EntityDataValue> 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<EntityDataItem>,
# ) -> Result<(), UpdateMetadataError> {
# if entity.contains::<Allay>() {
@@ -414,7 +414,7 @@ impl From<EntityDataValue> 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<EntityDataItem>,
) -> Result<(), UpdateMetadataError> {{
@@ -436,7 +436,7 @@ impl From<EntityDataValue> 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<EntityDataValue> 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('~'):