From 782db2e05cb9ea1b8dbd1ab7f5ff2eac29737fef Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 2 Mar 2026 18:53:36 -0530 Subject: disambiguate non-minecraft identifier namespaces in codegen --- codegen/lib/code/packet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'codegen/lib/code/packet.py') 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 -- cgit v1.2.3