diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2022-06-08 23:37:54 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-08 23:37:54 +0000 |
| commit | 601637bd48fcba826da01725430268f706181449 (patch) | |
| tree | 5b58723b931450d358d7e4387d87cc8e8b9166b2 /codegen/newpacket.py | |
| parent | ea7249fb77a8e07d232600081c9c3df5f698d70f (diff) | |
| parent | fb1d419a3d4207a293a1ad6001253192f1b4d12f (diff) | |
| download | azalea-drasl-601637bd48fcba826da01725430268f706181449.tar.xz | |
Merge pull request #7 from mat-1/1.19
1.19
Diffstat (limited to 'codegen/newpacket.py')
| -rw-r--r-- | codegen/newpacket.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/codegen/newpacket.py b/codegen/newpacket.py new file mode 100644 index 00000000..2e4c77d7 --- /dev/null +++ b/codegen/newpacket.py @@ -0,0 +1,17 @@ +from lib import download, code # type: ignore +import sys +import os + +mappings = download.get_mappings_for_version('1.18.2') +burger_data = download.get_burger_data_for_version('1.18.2') + +burger_packets_data = burger_data[0]['packets']['packet'] +packet_id, direction, state = int(sys.argv[1]), sys.argv[2], sys.argv[3] +print( + f'Generating code for packet id: {packet_id} with direction {direction} and state {state}') +code.packetcodegen.generate_packet(burger_packets_data, mappings, + packet_id, direction, state) + +code.fmt() + +print('Done!') |
