diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2022-07-29 04:56:21 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-29 04:56:21 +0000 |
| commit | aadf2de3cb751d563e743599a7fb345c08010f5a (patch) | |
| tree | aec2a9485c5057f1c148b87e23ee07a7a6b4978b /codegen/lib/code/version.py | |
| parent | 3e43fc6c502573f9d48d801087e72cded37a30b8 (diff) | |
| parent | 2211021105a7ce0ce9fcbc18f3b4f03b0f991a10 (diff) | |
| download | azalea-drasl-aadf2de3cb751d563e743599a7fb345c08010f5a.tar.xz | |
Merge pull request #8 from mat-1/1.19.1
Support 1.19.1. Signing stuff isn't implemented but auth isn't even in Azalea yet so that's fine.
Diffstat (limited to 'codegen/lib/code/version.py')
| -rw-r--r-- | codegen/lib/code/version.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/codegen/lib/code/version.py b/codegen/lib/code/version.py index 511d30d1..13d9472d 100644 --- a/codegen/lib/code/version.py +++ b/codegen/lib/code/version.py @@ -36,7 +36,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; - with open('../azalea-protocol/src/packets/mod.rs', 'r') as f: + with open(get_dir_location('../azalea-protocol/src/packets/mod.rs'), 'r') as f: mod_rs = f.read().splitlines() for line in mod_rs: if line.strip().startswith('pub const PROTOCOL_VERSION'): @@ -46,7 +46,7 @@ def get_protocol_version() -> str: def set_protocol_version(protocol_version: str) -> None: - with open('../azalea-protocol/src/packets/mod.rs', 'r') as f: + with open(get_dir_location('../azalea-protocol/src/packets/mod.rs'), 'r') as f: mod_rs = f.read().splitlines() for i, line in enumerate(mod_rs): if line.strip().startswith('pub const PROTOCOL_VERSION'): @@ -56,5 +56,5 @@ def set_protocol_version(protocol_version: str) -> None: raise Exception( 'Could not find protocol version in azalea-protocol/src/packets/mod.rs') - with open('../azalea-protocol/src/packets/mod.rs', 'w') as f: + with open(get_dir_location('../azalea-protocol/src/packets/mod.rs'), 'w') as f: f.write('\n'.join(mod_rs)) |
