diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2023-03-14 16:33:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-14 16:33:03 -0500 |
| commit | 12a9c8ce65b58f0c600fd7b9fc5d454ce228b420 (patch) | |
| tree | 9bada4164ea12fa533d413c0c7090f4779b519f1 /codegen/lib/code/utils.py | |
| parent | b792e21d1c2b7dba04d88dba479ed451104a6514 (diff) | |
| download | azalea-drasl-12a9c8ce65b58f0c600fd7b9fc5d454ce228b420.tar.xz | |
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
Diffstat (limited to 'codegen/lib/code/utils.py')
| -rwxr-xr-x | codegen/lib/code/utils.py | 8 |
1 files changed, 6 insertions, 2 deletions
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) |
