diff options
| author | mat <github@matdoes.dev> | 2022-07-06 18:52:24 -0500 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-07-06 18:52:24 -0500 |
| commit | 048792f83cae75d98f77eb7a699652e5a6f8f2f9 (patch) | |
| tree | 742b083e8340f5fcc6001d34c4b903f34c03d274 /codegen/lib/code | |
| parent | f9e42fa3d8ae96936fe8f38777128c983f3deea4 (diff) | |
| download | azalea-drasl-048792f83cae75d98f77eb7a699652e5a6f8f2f9.tar.xz | |
Fix bugs with migration
Diffstat (limited to 'codegen/lib/code')
| -rw-r--r-- | codegen/lib/code/packet.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py index 186f59e6..59632270 100644 --- a/codegen/lib/code/packet.py +++ b/codegen/lib/code/packet.py @@ -110,7 +110,8 @@ def set_packets(packet_ids: list[int], packet_class_names: list[str], direction: packet_ids, packet_class_names = [list(x) for x in zip( *sorted(zip(packet_ids, packet_class_names), key=lambda pair: pair[0]))] # type: ignore - mod_rs_dir = f'../azalea-protocol/src/packets/{state}/mod.rs' + mod_rs_dir = get_dir_location( + f'../azalea-protocol/src/packets/{state}/mod.rs') with open(mod_rs_dir, 'r') as f: mod_rs = f.read().splitlines() new_mod_rs = [] @@ -164,7 +165,8 @@ def set_packets(packet_ids: list[int], packet_class_names: list[str], direction: def get_packets(direction: str, state: str): - mod_rs_dir = f'../azalea-protocol/src/packets/{state}/mod.rs' + mod_rs_dir = get_dir_location( + f'../azalea-protocol/src/packets/{state}/mod.rs') with open(mod_rs_dir, 'r') as f: mod_rs = f.read().splitlines() |
