diff options
| author | mat <git@matdoes.dev> | 2025-12-18 20:47:37 -0400 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-12-18 20:47:37 -0400 |
| commit | 7c468692c7adf6c9a4796aa8010f20ced4618327 (patch) | |
| tree | 65e257ecb47641b2bf10e69722943f13101ed373 /codegen/lib/code/entity.py | |
| parent | 1d82ed842de6622d6e6c48c1c6a3c9289bcffedd (diff) | |
| download | azalea-drasl-7c468692c7adf6c9a4796aa8010f20ced4618327.tar.xz | |
smaller metadata.rs by avoiding duplication in default impls
Diffstat (limited to 'codegen/lib/code/entity.py')
| -rw-r--r-- | codegen/lib/code/entity.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/codegen/lib/code/entity.py b/codegen/lib/code/entity.py index f6ca7c7b..75ca72e5 100644 --- a/codegen/lib/code/entity.py +++ b/codegen/lib/code/entity.py @@ -4,9 +4,7 @@ from typing import Optional import re METADATA_RS_DIR = get_dir_location("../azalea-entity/src/metadata.rs") - DATA_RS_DIR = get_dir_location("../azalea-entity/src/data.rs") - DIMENSIONS_RS_DIR = get_dir_location("../azalea-entity/src/dimensions.rs") @@ -513,13 +511,7 @@ impl From<EntityDataValue> for UpdateMetadataError { this_entity_parent_ids[1] if len(this_entity_parent_ids) > 1 else None ) if this_entity_parent_id: - bundle_struct_name = ( - upper_first_letter(to_camel_case(this_entity_parent_id.lstrip("~"))) - + "MetadataBundle" - ) - code.append(f" parent: {bundle_struct_name} {{") - generate_fields(this_entity_parent_id) - code.append(" },") + code.append(" parent: Default::default(),") for index, name_or_bitfield in get_entity_metadata_names( this_entity_id, burger_entity_metadata, mappings |
