From 12a9c8ce65b58f0c600fd7b9fc5d454ce228b420 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 14 Mar 2023 16:33:03 -0500 Subject: 1.19.4 (#57) * 23w03a * 23w04a * 23w05a * 23w06a * fix * 23w07a mojang broke their json data generator so some stuff is missing * didn't mean to commit that file here * 1.19.4-pre2 * fix * 1.19.4-pre3 * fix * how did these packets get here * 1.19.4-pre4 * 1.19.4-rc1 * 1.19.4-rc2 * 1.19.4-rc3 * merge main * remove debugging code * 1.19.4 --- codegen/lib/code/utils.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'codegen/lib/code/utils.py') diff --git a/codegen/lib/code/utils.py b/codegen/lib/code/utils.py index fe4aca7f..aaa166ff 100755 --- a/codegen/lib/code/utils.py +++ b/codegen/lib/code/utils.py @@ -97,8 +97,12 @@ def burger_type_to_rust_type(burger_type, field_name: Optional[str] = None, inst print('hm', enum_name) else: - enum_name = mappings.get_field_type( - obfuscated_class_name, enum_field) + try: + enum_name = mappings.get_field_type( + obfuscated_class_name, enum_field) + except: + enum_name = mappings.get_class(obfuscated_class_name) + print(f'failed getting {obfuscated_class_name}.{enum_field} but continuing with {enum_name} anyways') print('enum_name', enum_name) enum_obfuscated_name = mappings.get_class_from_deobfuscated_name( enum_name) -- cgit v1.2.3