1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00
azalea/codegen/lib/code/blocks.py
2022-05-28 18:28:35 -05:00

20 lines
532 B
Python

from lib.utils import get_dir_location
BLOCKS_RS_DIR = get_dir_location('../azalea-block/src/blocks.rs')
def generate_blocks(blocks: dict):
with open(BLOCKS_RS_DIR, 'r') as f:
existing_code = f.read().splitlines()
new_make_block_states_macro_code = []
new_make_block_states_macro_code.append('make_block_states! {')
properties = {}
for block_name, block_data in blocks.items():
block_properties = block_data['properties']
properties.update(block_properties)
print(properties)