mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 06:16:04 +00:00
Update to 1.19.1-pre1
This commit is contained in:
parent
392c553d56
commit
deef5d27c0
5 changed files with 20 additions and 6 deletions
|
@ -7,7 +7,7 @@ A collection of Rust crates primarily for creating Minecraft bots.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- The line below is automatically read and updated by the migrate script, so don't change it manually. -->
|
<!-- The line below is automatically read and updated by the migrate script, so don't change it manually. -->
|
||||||
*Currently supported Minecraft version: `22w24a`.*
|
*Currently supported Minecraft version: `1.19.1-pre1`.*
|
||||||
|
|
||||||
I named this Azalea because it sounds like a cool word and this is a cool library. This project was heavily inspired by PrismarineJS.
|
I named this Azalea because it sounds like a cool word and this is a cool library. This project was heavily inspired by PrismarineJS.
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ use crate::{
|
||||||
use num_derive::FromPrimitive;
|
use num_derive::FromPrimitive;
|
||||||
use num_traits::FromPrimitive;
|
use num_traits::FromPrimitive;
|
||||||
|
|
||||||
pub const PROTOCOL_VERSION: u32 = 1073741916;
|
pub const PROTOCOL_VERSION: u32 = 1073741917;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, FromPrimitive)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, FromPrimitive)]
|
||||||
pub enum ConnectionProtocol {
|
pub enum ConnectionProtocol {
|
||||||
|
|
|
@ -36,7 +36,7 @@ def set_version_id(version_id: str) -> None:
|
||||||
def get_protocol_version() -> str:
|
def get_protocol_version() -> str:
|
||||||
# azalea-protocol/src/packets/mod.rs
|
# azalea-protocol/src/packets/mod.rs
|
||||||
# pub const PROTOCOL_VERSION: u32 = 758;
|
# 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()
|
mod_rs = f.read().splitlines()
|
||||||
for line in mod_rs:
|
for line in mod_rs:
|
||||||
if line.strip().startswith('pub const PROTOCOL_VERSION'):
|
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:
|
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()
|
mod_rs = f.read().splitlines()
|
||||||
for i, line in enumerate(mod_rs):
|
for i, line in enumerate(mod_rs):
|
||||||
if line.strip().startswith('pub const PROTOCOL_VERSION'):
|
if line.strip().startswith('pub const PROTOCOL_VERSION'):
|
||||||
|
@ -56,5 +56,5 @@ def set_protocol_version(protocol_version: str) -> None:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
'Could not find protocol version in azalea-protocol/src/packets/mod.rs')
|
'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))
|
f.write('\n'.join(mod_rs))
|
||||||
|
|
|
@ -129,7 +129,13 @@ def get_fabric_api_versions():
|
||||||
fabric_api_versions_data_xml = ET.fromstring(
|
fabric_api_versions_data_xml = ET.fromstring(
|
||||||
fabric_api_versions_xml_text)
|
fabric_api_versions_xml_text)
|
||||||
fabric_api_versions = []
|
fabric_api_versions = []
|
||||||
for version_el in fabric_api_versions_data_xml.find('versioning').find('versions').findall('version'):
|
|
||||||
|
versioning_el = fabric_api_versions_data_xml.find('versioning')
|
||||||
|
assert versioning_el
|
||||||
|
versions_el = versioning_el.find('versions')
|
||||||
|
assert versions_el
|
||||||
|
|
||||||
|
for version_el in versions_el.findall('version'):
|
||||||
fabric_api_versions.append(version_el.text)
|
fabric_api_versions.append(version_el.text)
|
||||||
|
|
||||||
with open(get_dir_location('downloads/fabric_api_versions.json'), 'w') as f:
|
with open(get_dir_location('downloads/fabric_api_versions.json'), 'w') as f:
|
||||||
|
|
|
@ -9,6 +9,14 @@ import sys
|
||||||
|
|
||||||
lib.download.clear_version_cache()
|
lib.download.clear_version_cache()
|
||||||
|
|
||||||
|
if len(sys.argv) == 1:
|
||||||
|
print('\033[91mYou must provide a version to migrate to.\033[m')
|
||||||
|
version_manifest = lib.download.get_version_manifest()
|
||||||
|
newest_version = version_manifest['latest']['snapshot']
|
||||||
|
print(f'Hint: newest version is \033[1m{newest_version}\033[m')
|
||||||
|
exit()
|
||||||
|
|
||||||
|
|
||||||
old_version_id = lib.code.version.get_version_id()
|
old_version_id = lib.code.version.get_version_id()
|
||||||
old_mappings = lib.download.get_mappings_for_version(old_version_id)
|
old_mappings = lib.download.get_mappings_for_version(old_version_id)
|
||||||
old_burger_data = lib.extract.get_burger_data_for_version(old_version_id)
|
old_burger_data = lib.extract.get_burger_data_for_version(old_version_id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue