diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2022-06-20 06:22:16 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-20 06:22:16 +0000 |
| commit | a1484f66290517b6c36f2e82c92613f23d2c4935 (patch) | |
| tree | f0a590ef6deac0c23c932773354fc4f75903953a /codegen/genblocks.py | |
| parent | e2553bbaf2a550f4941b924e703a922345a1389f (diff) | |
| parent | 405a00c0d1908a4b3fbd8e6684c77dfb178ac55d (diff) | |
| download | azalea-drasl-a1484f66290517b6c36f2e82c92613f23d2c4935.tar.xz | |
Merge branch 'main' into 1.19.1
Diffstat (limited to 'codegen/genblocks.py')
| -rw-r--r-- | codegen/genblocks.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/codegen/genblocks.py b/codegen/genblocks.py new file mode 100644 index 00000000..9e35f7f3 --- /dev/null +++ b/codegen/genblocks.py @@ -0,0 +1,28 @@ +import lib.code.version +import lib.code.packet +import lib.code.blocks +import lib.code.utils +import lib.download +import lib.extract +import lib.utils +import sys +import os + +version_id = lib.code.version.get_version_id() + +lib.download.get_burger() +lib.download.get_client_jar(version_id) + +print('Generating data with burger') +os.system( + f'cd {lib.utils.get_dir_location("downloads/Burger")} && python munch.py ../client-{version_id}.jar --output ../burger-{version_id}.json --toppings blockstates' +) +print('Ok') + +mappings = lib.download.get_mappings_for_version(version_id) +block_states_burger = lib.extract.get_block_states_burger(version_id) +ordered_blocks = lib.extract.get_ordered_blocks_burger(version_id) +block_states_report = lib.extract.get_block_states_report(version_id) + +lib.code.blocks.generate_blocks( + block_states_burger, block_states_report, ordered_blocks, mappings) |
