1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 23:44:38 +00:00

1.21.6-rc1

This commit is contained in:
mat 2025-06-15 12:56:09 -07:00
commit 6155473234
11 changed files with 54 additions and 44 deletions

42
Cargo.lock generated
View file

@ -215,7 +215,7 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
[[package]] [[package]]
name = "azalea" name = "azalea"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"azalea-auth", "azalea-auth",
@ -255,7 +255,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-auth" name = "azalea-auth"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"azalea-buf", "azalea-buf",
"azalea-crypto", "azalea-crypto",
@ -275,7 +275,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-block" name = "azalea-block"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"azalea-block-macros", "azalea-block-macros",
"azalea-buf", "azalea-buf",
@ -284,7 +284,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-block-macros" name = "azalea-block-macros"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -293,7 +293,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-brigadier" name = "azalea-brigadier"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"azalea-buf", "azalea-buf",
"azalea-chat", "azalea-chat",
@ -304,7 +304,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-buf" name = "azalea-buf"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"azalea-buf-macros", "azalea-buf-macros",
"byteorder", "byteorder",
@ -317,7 +317,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-buf-macros" name = "azalea-buf-macros"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -326,7 +326,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-chat" name = "azalea-chat"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"azalea-buf", "azalea-buf",
"azalea-language", "azalea-language",
@ -339,7 +339,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-client" name = "azalea-client"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-compat", "async-compat",
@ -376,7 +376,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-core" name = "azalea-core"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"azalea-buf", "azalea-buf",
"azalea-chat", "azalea-chat",
@ -392,7 +392,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-crypto" name = "azalea-crypto"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"aes", "aes",
"azalea-buf", "azalea-buf",
@ -409,7 +409,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-entity" name = "azalea-entity"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"azalea-block", "azalea-block",
"azalea-buf", "azalea-buf",
@ -432,7 +432,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-inventory" name = "azalea-inventory"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"azalea-buf", "azalea-buf",
"azalea-chat", "azalea-chat",
@ -447,7 +447,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-inventory-macros" name = "azalea-inventory-macros"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -456,7 +456,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-language" name = "azalea-language"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"compact_str", "compact_str",
"serde", "serde",
@ -465,7 +465,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-physics" name = "azalea-physics"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"azalea-block", "azalea-block",
"azalea-core", "azalea-core",
@ -483,7 +483,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-protocol" name = "azalea-protocol"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-recursion", "async-recursion",
@ -519,7 +519,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-protocol-macros" name = "azalea-protocol-macros"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -528,7 +528,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-registry" name = "azalea-registry"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"azalea-buf", "azalea-buf",
"azalea-registry-macros", "azalea-registry-macros",
@ -538,7 +538,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-registry-macros" name = "azalea-registry-macros"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"quote", "quote",
"syn", "syn",
@ -546,7 +546,7 @@ dependencies = [
[[package]] [[package]]
name = "azalea-world" name = "azalea-world"
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
dependencies = [ dependencies = [
"azalea-block", "azalea-block",
"azalea-buf", "azalea-buf",

View file

@ -22,7 +22,7 @@ resolver = "2"
# --- Workspace Settings --- # --- Workspace Settings ---
[workspace.package] [workspace.package]
version = "0.12.0+mc1.21.6-pre2" version = "0.12.0+mc1.21.6-rc1"
edition = "2024" edition = "2024"
license = "MIT" license = "MIT"
repository = "https://github.com/azalea-rs/azalea" repository = "https://github.com/azalea-rs/azalea"

View file

@ -10,7 +10,7 @@ A collection of Rust crates for making Minecraft bots, clients, and tools.
<!-- 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: `1.21.6-pre2`._ _Currently supported Minecraft version: `1.21.6-rc1`._
> [!WARNING] > [!WARNING]
> Azalea is still unfinished, though most crates are in a useable state. > Azalea is still unfinished, though most crates are in a useable state.

View file

@ -2,7 +2,7 @@ use std::fmt::Debug;
use azalea_block_macros::make_block_states; use azalea_block_macros::make_block_states;
use crate::{BlockTrait, BlockBehavior, BlockState, BlockStates, Property}; use crate::{BlockBehavior, BlockState, BlockStates, BlockTrait, Property};
make_block_states! { make_block_states! {
Properties => { Properties => {

View file

@ -1,4 +1,4 @@
use azalea_block::{BlockTrait, BlockBehavior}; use azalea_block::{BlockBehavior, BlockTrait};
use azalea_core::tier::get_item_tier; use azalea_core::tier::get_item_tier;
use azalea_registry as registry; use azalea_registry as registry;

View file

@ -6149,6 +6149,7 @@
"soundCategory.neutral": "Friendly Mobs", "soundCategory.neutral": "Friendly Mobs",
"soundCategory.player": "Players", "soundCategory.player": "Players",
"soundCategory.record": "Jukebox/Note Blocks", "soundCategory.record": "Jukebox/Note Blocks",
"soundCategory.ui": "UI",
"soundCategory.voice": "Voice/Speech", "soundCategory.voice": "Voice/Speech",
"soundCategory.weather": "Weather", "soundCategory.weather": "Weather",
"spectatorMenu.close": "Close Menu", "spectatorMenu.close": "Close Menu",

View file

@ -18,6 +18,7 @@ pub struct BrigadierNodeStub {
pub children: Vec<u32>, pub children: Vec<u32>,
pub redirect_node: Option<u32>, pub redirect_node: Option<u32>,
pub node_type: NodeType, pub node_type: NodeType,
pub is_restricted: bool,
} }
#[derive(Debug, Clone, Eq)] #[derive(Debug, Clone, Eq)]
@ -92,7 +93,7 @@ pub enum BrigadierString {
} }
// see ArgumentTypeInfos.java // see ArgumentTypeInfos.java
#[derive(Debug, Clone, AzBuf, PartialEq)] #[derive(Debug, Clone, PartialEq, AzBuf)]
pub enum BrigadierParser { pub enum BrigadierParser {
Bool, Bool,
Float(BrigadierNumber<f32>), Float(BrigadierNumber<f32>),
@ -149,6 +150,7 @@ pub enum BrigadierParser {
LootTable, LootTable,
LootPredicate, LootPredicate,
LootModifier, LootModifier,
Dialog,
Uuid, Uuid,
} }
@ -184,9 +186,9 @@ impl AzaleaWrite for EntityParser {
impl AzaleaRead for BrigadierNodeStub { impl AzaleaRead for BrigadierNodeStub {
fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> { fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
let flags = FixedBitSet::<8>::azalea_read(buf)?; 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!( 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 is_executable = flags.index(2);
let has_redirect = flags.index(3); let has_redirect = flags.index(3);
let has_suggestions_type = flags.index(4); let has_suggestions_type = flags.index(4);
let is_restricted = flags.index(5);
let children = Vec::<u32>::azalea_read_var(buf)?; let children = Vec::<u32>::azalea_read_var(buf)?;
let redirect_node = if has_redirect { let redirect_node = if has_redirect {
@ -211,7 +214,7 @@ impl AzaleaRead for BrigadierNodeStub {
} else { } else {
None None
}; };
let node = BrigadierNodeStub { Ok(BrigadierNodeStub {
is_executable, is_executable,
children, children,
redirect_node, redirect_node,
@ -220,25 +223,28 @@ impl AzaleaRead for BrigadierNodeStub {
parser, parser,
suggestions_type, suggestions_type,
}, },
}; is_restricted,
return Ok(node); })
} }
// literal node // literal node
else if node_type == 1 { else if node_type == 1 {
let name = String::azalea_read(buf)?; let name = String::azalea_read(buf)?;
return Ok(BrigadierNodeStub { Ok(BrigadierNodeStub {
is_executable, is_executable,
children, children,
redirect_node, redirect_node,
node_type: NodeType::Literal { name }, 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], children: vec![1, 2],
redirect_node: None, redirect_node: None,
node_type: NodeType::Root, node_type: NodeType::Root,
is_restricted: false,
}; };
let mut buf = Vec::new(); let mut buf = Vec::new();
data.azalea_write(&mut buf).unwrap(); data.azalea_write(&mut buf).unwrap();
@ -354,6 +361,7 @@ mod tests {
node_type: NodeType::Literal { node_type: NodeType::Literal {
name: "String".to_string(), name: "String".to_string(),
}, },
is_restricted: false,
}; };
let mut buf = Vec::new(); let mut buf = Vec::new();
data.azalea_write(&mut buf).unwrap(); data.azalea_write(&mut buf).unwrap();
@ -373,6 +381,7 @@ mod tests {
parser: BrigadierParser::Vec3, parser: BrigadierParser::Vec3,
suggestions_type: Some(ResourceLocation::new("minecraft:test_suggestion")), suggestions_type: Some(ResourceLocation::new("minecraft:test_suggestion")),
}, },
is_restricted: false,
}; };
let mut buf = Vec::new(); let mut buf = Vec::new();
data.azalea_write(&mut buf).unwrap(); data.azalea_write(&mut buf).unwrap();

View file

@ -11,8 +11,8 @@ use azalea_buf::{AzaleaReadVar, AzaleaWrite, AzaleaWriteVar, BufReadError};
use crate::read::ReadPacketError; use crate::read::ReadPacketError;
pub const PROTOCOL_VERSION: i32 = 1073742077; pub const PROTOCOL_VERSION: i32 = 1073742080;
pub const VERSION_NAME: &str = "1.21.6-pre2"; pub const VERSION_NAME: &str = "1.21.6-rc1";
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum ConnectionProtocol { pub enum ConnectionProtocol {
@ -101,4 +101,4 @@ impl AzaleaWrite for ClientIntention {
fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> { fn azalea_write(&self, buf: &mut impl Write) -> io::Result<()> {
(*self as i32).azalea_write_var(buf) (*self as i32).azalea_write_var(buf)
} }
} }

View file

@ -6401,6 +6401,7 @@ enum TriggerKind {
ThrownItemPickedUpByEntity => "minecraft:thrown_item_picked_up_by_entity", ThrownItemPickedUpByEntity => "minecraft:thrown_item_picked_up_by_entity",
ThrownItemPickedUpByPlayer => "minecraft:thrown_item_picked_up_by_player", ThrownItemPickedUpByPlayer => "minecraft:thrown_item_picked_up_by_player",
PlayerInteractedWithEntity => "minecraft:player_interacted_with_entity", PlayerInteractedWithEntity => "minecraft:player_interacted_with_entity",
PlayerShearedEquipment => "minecraft:player_sheared_equipment",
StartedRiding => "minecraft:started_riding", StartedRiding => "minecraft:started_riding",
LightningStrike => "minecraft:lightning_strike", LightningStrike => "minecraft:lightning_strike",
UsingItem => "minecraft:using_item", UsingItem => "minecraft:using_item",

View file

@ -1,4 +1,3 @@
use std::{ use std::{
collections::HashSet, collections::HashSet,
sync::Arc, sync::Arc,

View file

@ -190,7 +190,7 @@ fabric_version={fabric_api_version}
if "[Server thread/INFO] (pumpkin_extractor) Done" in data: if "[Server thread/INFO] (pumpkin_extractor) Done" in data:
print("Pumpkin extractor done") print("Pumpkin extractor done")
break break
if data == b"": if data == "":
break break
p.terminate() p.terminate()