From 7c468692c7adf6c9a4796aa8010f20ced4618327 Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 18 Dec 2025 20:47:37 -0400 Subject: smaller metadata.rs by avoiding duplication in default impls --- codegen/lib/code/entity.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'codegen/lib/code/entity.py') 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 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 -- cgit v1.2.3