diff options
| author | mat <github@matdoes.dev> | 2022-05-27 01:37:52 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-05-27 01:37:52 -0500 |
| commit | 86cc2a9b7c85b0cb412fa8cbe2ab6b9a7ae5fcfc (patch) | |
| tree | 5aec2f2d326fc9a832fe153b312323d06310cad4 /codegen/newpacket.py | |
| parent | 68ab3d65247c02d469d77e5702f57e46f690965b (diff) | |
| download | azalea-drasl-86cc2a9b7c85b0cb412fa8cbe2ab6b9a7ae5fcfc.tar.xz | |
codegen/extract.py
Preparation for azalea-block
Diffstat (limited to 'codegen/newpacket.py')
| -rw-r--r-- | codegen/newpacket.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/codegen/newpacket.py b/codegen/newpacket.py index 2e4c77d7..52d6a2b4 100644 --- a/codegen/newpacket.py +++ b/codegen/newpacket.py @@ -1,17 +1,19 @@ -from lib import download, code # type: ignore +import lib.code.packet +import lib.code.utils +import lib.download +import lib.extract import sys -import os -mappings = download.get_mappings_for_version('1.18.2') -burger_data = download.get_burger_data_for_version('1.18.2') +mappings = lib.download.get_mappings_for_version('1.18.2') +burger_data = lib.extract.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) +lib.code.packet.generate_packet(burger_packets_data, mappings, + packet_id, direction, state) -code.fmt() +lib.code.utils.fmt() print('Done!') |
