aboutsummaryrefslogtreecommitdiff
path: root/codegen/lib/code/version.py
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-06-21 19:57:18 -0500
committermat <github@matdoes.dev>2022-06-21 19:57:18 -0500
commitdeef5d27c08daa709e5ebebc382aadff7450fca6 (patch)
treee7580639bf5c3c64d5b49bd5fc55c1236085c57d /codegen/lib/code/version.py
parent392c553d5688f3d5ad19c4a861c0239c914e3578 (diff)
downloadazalea-drasl-deef5d27c08daa709e5ebebc382aadff7450fca6.tar.xz
Update to 1.19.1-pre1
Diffstat (limited to 'codegen/lib/code/version.py')
-rw-r--r--codegen/lib/code/version.py6
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))