diff options
| author | mat <git@matdoes.dev> | 2023-12-02 15:49:54 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-12-02 15:49:54 -0600 |
| commit | 34a40270108e51014e0884c3b6b6619ba42c17dc (patch) | |
| tree | 4c5db9c4520402f8b17b7ab331c5e999299ade90 /codegen | |
| parent | 1903dabe2cece2eab4a595b09636342aed260406 (diff) | |
| download | azalea-drasl-34a40270108e51014e0884c3b6b6619ba42c17dc.tar.xz | |
change protocol_version to an i32
Diffstat (limited to 'codegen')
| -rwxr-xr-x | codegen/lib/code/version.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/codegen/lib/code/version.py b/codegen/lib/code/version.py index 35779af6..6365d6cf 100755 --- a/codegen/lib/code/version.py +++ b/codegen/lib/code/version.py @@ -35,7 +35,7 @@ def set_version_id(version_id: str) -> None: def get_protocol_version() -> str: # azalea-protocol/src/packets/mod.rs - # pub const PROTOCOL_VERSION: u32 = 758; + # pub const PROTOCOL_VERSION: i32 = 758; with open(get_dir_location('../azalea-protocol/src/packets/mod.rs'), 'r') as f: mod_rs = f.read().splitlines() for line in mod_rs: @@ -50,7 +50,7 @@ def set_protocol_version(protocol_version: str) -> None: mod_rs = f.read().splitlines() for i, line in enumerate(mod_rs): if line.strip().startswith('pub const PROTOCOL_VERSION'): - mod_rs[i] = f'pub const PROTOCOL_VERSION: u32 = {protocol_version};' + mod_rs[i] = f'pub const PROTOCOL_VERSION: i32 = {protocol_version};' break else: raise Exception( |
