aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib/code/blocks.py
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2024-04-23 10:34:50 -0500
committerGitHub <noreply@github.com>2024-04-23 10:34:50 -0500
commit1d80f531b74bc3b31023753acb81b35efcdadd73 (patch)
tree675635c7c41fbb456e3e0dd7b9f09c7211d356f0 /codegen/lib/code/blocks.py
parent0ddad8bd9c7c0e8846aec8bc90c95416418c9a63 (diff)
downloadazalea-drasl-1d80f531b74bc3b31023753acb81b35efcdadd73.tar.xz
1.20.5 (#127)
* 23w51b * make recalculate_near_end_of_path public so other plugins can do .after(recalculate_near_end_of_path) * update to 24w03a i think * start implementing 24w13a * registries work (but a lot of packets are still broken) * fix recipes and commands packets * i love codecs :D i am not going insane :D mojang's java is very readable :D * item components are "implemented" meowmeowmeowmeowmeowmeowmeowmeowmeowmeowmeowmeowmeowmeowmeowmeowmeowmeow * update to 1.20.5-pre3 * fix all the broken packets and clippy (mojang please don't do an update like this again or i will murder someone) * 1.20.5-rc1 * fix failing tests * 1.20.5
Diffstat (limited to 'codegen/lib/code/blocks.py')
-rwxr-xr-xcodegen/lib/code/blocks.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/codegen/lib/code/blocks.py b/codegen/lib/code/blocks.py
index f96b1116..64347849 100755
--- a/codegen/lib/code/blocks.py
+++ b/codegen/lib/code/blocks.py
@@ -41,7 +41,7 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, pixlyzer_block_dat
if property_burger is None:
print(
- 'Warning: The reports have states for a block, but Burger doesn\'t!', block_data_burger)
+ f'Warning: The reports have states for a block, but Burger doesn\'t! (missing "{property_name}")', block_data_burger)
property_struct_name = get_property_struct_name(
property_burger, block_data_burger, property_variants, mappings)
@@ -90,7 +90,7 @@ def generate_blocks(blocks_burger: dict, blocks_report: dict, pixlyzer_block_dat
for block_id in ordered_blocks:
block_data_burger = blocks_burger[block_id]
block_data_report = blocks_report['minecraft:' + block_id]
- block_data_pixlyzer = pixlyzer_block_datas[f'minecraft:{block_id}']
+ block_data_pixlyzer = pixlyzer_block_datas.get(f'minecraft:{block_id}', {})
block_properties = block_data_burger.get('states', [])
block_properties_burger = block_data_burger.get('states', [])
@@ -202,6 +202,10 @@ def get_property_struct_name(property: Optional[dict], block_data_burger: dict,
return 'ChestType'
if property_variants == ['compare', 'subtract']:
return 'ComparatorType'
+ if property_variants == ['inactive', 'waiting_for_players', 'active', 'waiting_for_reward_ejection', 'ejecting_reward', 'cooldown']:
+ return 'TrialSpawnerState'
+ if property_variants == ['inactive', 'active', 'unlocking', 'ejecting']:
+ return 'VaultState'
if 'harp' in property_variants and 'didgeridoo' in property_variants:
return 'Sound'