diff options
| author | mat <git@matdoes.dev> | 2026-03-02 18:53:36 -0530 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2026-03-02 19:23:44 -0500 |
| commit | 782db2e05cb9ea1b8dbd1ab7f5ff2eac29737fef (patch) | |
| tree | 2f420e585267098189c94ecae2dc886c4136216f /codegen/lib/code/packet.py | |
| parent | 8fd11c174d921a8085bb7e67ae62958e23d174cb (diff) | |
| download | azalea-drasl-782db2e05cb9ea1b8dbd1ab7f5ff2eac29737fef.tar.xz | |
disambiguate non-minecraft identifier namespaces in codegen
Diffstat (limited to 'codegen/lib/code/packet.py')
| -rw-r--r-- | codegen/lib/code/packet.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/codegen/lib/code/packet.py b/codegen/lib/code/packet.py index 50d01ce2..9ce5c137 100644 --- a/codegen/lib/code/packet.py +++ b/codegen/lib/code/packet.py @@ -1,4 +1,4 @@ -from lib.utils import to_snake_case, to_camel_case, get_dir_location +from lib.utils import identifier_to_path, to_snake_case, to_camel_case, get_dir_location from lib.code.utils import burger_type_to_rust_type, write_packet_file from lib.mappings import Mappings from typing import Optional @@ -120,7 +120,7 @@ def packet_direction_report_to_packet_names(report): name_to_id = {} for identifier, packet in report.items(): packet_id = packet["protocol_id"] - name_to_id[identifier.split(":")[-1]] = packet_id + name_to_id[identifier_to_path(identifier)] = packet_id names_sorted = [name for name in sorted(name_to_id, key=lambda x: name_to_id[x])] return names_sorted |
