diff --git a/Cargo.lock b/Cargo.lock index 3fe71ccb..7eb551fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -215,7 +215,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "azalea" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "anyhow", "azalea-auth", @@ -255,7 +255,7 @@ dependencies = [ [[package]] name = "azalea-auth" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "azalea-buf", "azalea-crypto", @@ -275,7 +275,7 @@ dependencies = [ [[package]] name = "azalea-block" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "azalea-block-macros", "azalea-buf", @@ -284,7 +284,7 @@ dependencies = [ [[package]] name = "azalea-block-macros" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "proc-macro2", "quote", @@ -293,7 +293,7 @@ dependencies = [ [[package]] name = "azalea-brigadier" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "azalea-buf", "azalea-chat", @@ -304,7 +304,7 @@ dependencies = [ [[package]] name = "azalea-buf" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "azalea-buf-macros", "byteorder", @@ -317,7 +317,7 @@ dependencies = [ [[package]] name = "azalea-buf-macros" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "proc-macro2", "quote", @@ -326,7 +326,7 @@ dependencies = [ [[package]] name = "azalea-chat" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "azalea-buf", "azalea-language", @@ -339,7 +339,7 @@ dependencies = [ [[package]] name = "azalea-client" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "anyhow", "async-compat", @@ -376,7 +376,7 @@ dependencies = [ [[package]] name = "azalea-core" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "azalea-buf", "azalea-chat", @@ -392,7 +392,7 @@ dependencies = [ [[package]] name = "azalea-crypto" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "aes", "azalea-buf", @@ -409,7 +409,7 @@ dependencies = [ [[package]] name = "azalea-entity" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "azalea-block", "azalea-buf", @@ -432,7 +432,7 @@ dependencies = [ [[package]] name = "azalea-inventory" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "azalea-buf", "azalea-chat", @@ -447,7 +447,7 @@ dependencies = [ [[package]] name = "azalea-inventory-macros" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "proc-macro2", "quote", @@ -456,7 +456,7 @@ dependencies = [ [[package]] name = "azalea-language" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "compact_str", "serde", @@ -465,7 +465,7 @@ dependencies = [ [[package]] name = "azalea-physics" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "azalea-block", "azalea-core", @@ -483,7 +483,7 @@ dependencies = [ [[package]] name = "azalea-protocol" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "anyhow", "async-recursion", @@ -519,7 +519,7 @@ dependencies = [ [[package]] name = "azalea-protocol-macros" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "proc-macro2", "quote", @@ -528,7 +528,7 @@ dependencies = [ [[package]] name = "azalea-registry" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "azalea-buf", "azalea-registry-macros", @@ -538,7 +538,7 @@ dependencies = [ [[package]] name = "azalea-registry-macros" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "quote", "syn", @@ -546,7 +546,7 @@ dependencies = [ [[package]] name = "azalea-world" -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" dependencies = [ "azalea-block", "azalea-buf", diff --git a/Cargo.toml b/Cargo.toml index 9e6e3711..055db3fc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ resolver = "2" # --- Workspace Settings --- [workspace.package] -version = "0.12.0+mc1.21.6-pre2" +version = "0.12.0+mc1.21.6-rc1" edition = "2024" license = "MIT" repository = "https://github.com/azalea-rs/azalea" diff --git a/README.md b/README.md index a275fc05..97186b07 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ A collection of Rust crates for making Minecraft bots, clients, and tools. -_Currently supported Minecraft version: `1.21.6-pre2`._ +_Currently supported Minecraft version: `1.21.6-rc1`._ > [!WARNING] > Azalea is still unfinished, though most crates are in a useable state. diff --git a/azalea-block/src/generated.rs b/azalea-block/src/generated.rs index 98de92c8..c3ef7510 100644 --- a/azalea-block/src/generated.rs +++ b/azalea-block/src/generated.rs @@ -2,7 +2,7 @@ use std::fmt::Debug; use azalea_block_macros::make_block_states; -use crate::{BlockTrait, BlockBehavior, BlockState, BlockStates, Property}; +use crate::{BlockBehavior, BlockState, BlockStates, BlockTrait, Property}; make_block_states! { Properties => { diff --git a/azalea-entity/src/mining.rs b/azalea-entity/src/mining.rs index fbe7f525..8b572935 100644 --- a/azalea-entity/src/mining.rs +++ b/azalea-entity/src/mining.rs @@ -1,4 +1,4 @@ -use azalea_block::{BlockTrait, BlockBehavior}; +use azalea_block::{BlockBehavior, BlockTrait}; use azalea_core::tier::get_item_tier; use azalea_registry as registry; diff --git a/azalea-language/src/en_us.json b/azalea-language/src/en_us.json index b9482b2d..32f997bf 100644 --- a/azalea-language/src/en_us.json +++ b/azalea-language/src/en_us.json @@ -6149,6 +6149,7 @@ "soundCategory.neutral": "Friendly Mobs", "soundCategory.player": "Players", "soundCategory.record": "Jukebox/Note Blocks", + "soundCategory.ui": "UI", "soundCategory.voice": "Voice/Speech", "soundCategory.weather": "Weather", "spectatorMenu.close": "Close Menu", diff --git a/azalea-protocol/src/packets/game/c_commands.rs b/azalea-protocol/src/packets/game/c_commands.rs index ae9ee803..7eeff658 100644 --- a/azalea-protocol/src/packets/game/c_commands.rs +++ b/azalea-protocol/src/packets/game/c_commands.rs @@ -18,6 +18,7 @@ pub struct BrigadierNodeStub { pub children: Vec, pub redirect_node: Option, pub node_type: NodeType, + pub is_restricted: bool, } #[derive(Debug, Clone, Eq)] @@ -92,7 +93,7 @@ pub enum BrigadierString { } // see ArgumentTypeInfos.java -#[derive(Debug, Clone, AzBuf, PartialEq)] +#[derive(Debug, Clone, PartialEq, AzBuf)] pub enum BrigadierParser { Bool, Float(BrigadierNumber), @@ -149,6 +150,7 @@ pub enum BrigadierParser { LootTable, LootPredicate, LootModifier, + Dialog, Uuid, } @@ -184,9 +186,9 @@ impl AzaleaWrite for EntityParser { impl AzaleaRead for BrigadierNodeStub { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result { let flags = FixedBitSet::<8>::azalea_read(buf)?; - if flags.index(5) || flags.index(6) || flags.index(7) { + if flags.index(6) || flags.index(7) { warn!( - "The flags from a Brigadier node are over 31. This is a bug, BrigadierParser probably needs updating.", + "The flags from a Brigadier node are over 63. This is a bug, BrigadierParser probably needs updating.", ); } @@ -194,6 +196,7 @@ impl AzaleaRead for BrigadierNodeStub { let is_executable = flags.index(2); let has_redirect = flags.index(3); let has_suggestions_type = flags.index(4); + let is_restricted = flags.index(5); let children = Vec::::azalea_read_var(buf)?; let redirect_node = if has_redirect { @@ -211,7 +214,7 @@ impl AzaleaRead for BrigadierNodeStub { } else { None }; - let node = BrigadierNodeStub { + Ok(BrigadierNodeStub { is_executable, children, redirect_node, @@ -220,25 +223,28 @@ impl AzaleaRead for BrigadierNodeStub { parser, suggestions_type, }, - }; - return Ok(node); + is_restricted, + }) } // literal node else if node_type == 1 { let name = String::azalea_read(buf)?; - return Ok(BrigadierNodeStub { + Ok(BrigadierNodeStub { is_executable, children, redirect_node, node_type: NodeType::Literal { name }, - }); + is_restricted, + }) + } else { + Ok(BrigadierNodeStub { + is_executable, + children, + redirect_node, + node_type: NodeType::Root, + is_restricted, + }) } - Ok(BrigadierNodeStub { - is_executable, - children, - redirect_node, - node_type: NodeType::Root, - }) } } @@ -337,6 +343,7 @@ mod tests { children: vec![1, 2], redirect_node: None, node_type: NodeType::Root, + is_restricted: false, }; let mut buf = Vec::new(); data.azalea_write(&mut buf).unwrap(); @@ -354,6 +361,7 @@ mod tests { node_type: NodeType::Literal { name: "String".to_string(), }, + is_restricted: false, }; let mut buf = Vec::new(); data.azalea_write(&mut buf).unwrap(); @@ -373,6 +381,7 @@ mod tests { parser: BrigadierParser::Vec3, suggestions_type: Some(ResourceLocation::new("minecraft:test_suggestion")), }, + is_restricted: false, }; let mut buf = Vec::new(); data.azalea_write(&mut buf).unwrap(); diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index 31097ba5..8279a173 100644 --- a/azalea-protocol/src/packets/mod.rs +++ b/azalea-protocol/src/packets/mod.rs @@ -11,8 +11,8 @@ use azalea_buf::{AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError}; use crate::read::ReadPacketError; -pub const PROTOCOL_VERSION: i32 = 1073742077; -pub const VERSION_NAME: &str = "1.21.6-pre2"; +pub const PROTOCOL_VERSION: i32 = 1073742080; +pub const VERSION_NAME: &str = "1.21.6-rc1"; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum ConnectionProtocol { @@ -101,4 +101,4 @@ impl AzaleaWrite for ClientIntention { fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> { (*self as i32).azalea_write_var(buf) } -} \ No newline at end of file +} diff --git a/azalea-registry/src/lib.rs b/azalea-registry/src/lib.rs index 7d2c5f02..8607426d 100644 --- a/azalea-registry/src/lib.rs +++ b/azalea-registry/src/lib.rs @@ -6401,6 +6401,7 @@ enum TriggerKind { ThrownItemPickedUpByEntity => "minecraft:thrown_item_picked_up_by_entity", ThrownItemPickedUpByPlayer => "minecraft:thrown_item_picked_up_by_player", PlayerInteractedWithEntity => "minecraft:player_interacted_with_entity", + PlayerShearedEquipment => "minecraft:player_sheared_equipment", StartedRiding => "minecraft:started_riding", LightningStrike => "minecraft:lightning_strike", UsingItem => "minecraft:using_item", diff --git a/azalea/src/pathfinder/tests.rs b/azalea/src/pathfinder/tests.rs index 782899e8..8458a982 100644 --- a/azalea/src/pathfinder/tests.rs +++ b/azalea/src/pathfinder/tests.rs @@ -1,4 +1,3 @@ - use std::{ collections::HashSet, sync::Arc, diff --git a/codegen/lib/extract.py b/codegen/lib/extract.py index a0653aac..57ece9f2 100644 --- a/codegen/lib/extract.py +++ b/codegen/lib/extract.py @@ -190,7 +190,7 @@ fabric_version={fabric_api_version} if "[Server thread/INFO] (pumpkin_extractor) Done" in data: print("Pumpkin extractor done") break - if data == b"": + if data == "": break p.terminate()