aboutsummaryrefslogtreecommitdiff
path: root/codegen
diff options
context:
space:
mode:
authorurisinger <60300761+urisinger@users.noreply.github.com>2025-09-15 07:51:50 +0300
committerGitHub <noreply@github.com>2025-09-14 23:51:50 -0500
commitbcefd0213db05b4c29c82a1031f4d6e838e1fc1f (patch)
tree563797281982fbcced3491e8b3096448903fddc9 /codegen
parent3a58a39563a596e3b08ad41e93070c84e205bddb (diff)
downloadazalea-drasl-bcefd0213db05b4c29c82a1031f4d6e838e1fc1f.tar.xz
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 <git@matdoes.dev>
Diffstat (limited to 'codegen')
-rw-r--r--codegen/lib/code/blocks.py4
1 files changed, 3 insertions, 1 deletions
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(