From bcefd0213db05b4c29c82a1031f4d6e838e1fc1f Mon Sep 17 00:00:00 2001 From: urisinger <60300761+urisinger@users.noreply.github.com> Date: Mon, 15 Sep 2025 07:51:50 +0300 Subject: Add functions for getting block properties as strings (#240) * add tests and fix * fix integer properties * refactor azalea-block-macros and improve apis --------- Co-authored-by: mat --- codegen/lib/code/blocks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'codegen') diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py index 550ccf83..9f783690 100644 --- a/codegen/lib/code/blocks.py +++ b/codegen/lib/code/blocks.py @@ -74,7 +74,9 @@ def generate_blocks( else: property_shape_code = f"{property_struct_name} {{\n" for variant in property_variants: - property_shape_code += f" {to_camel_case(variant)},\n" + property_shape_code += ( + f' {to_camel_case(variant)} = "{variant}",\n' + ) property_shape_code += " }" new_make_block_states_macro_code.append( -- cgit v1.2.3