From b71a7af53ae2dba2b43c8efc855a4a3b853ebff2 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 3 Dec 2024 14:42:23 -0600 Subject: 1.21.4 (#189) * start updating to 1.21.4 * fix block codegen and stop using block data from burger * 1.21.4-rc1 * 1.21.4 --- azalea-protocol/src/packets/game/c_level_particles.rs | 10 ++++++---- azalea-protocol/src/packets/game/mod.rs | 4 +++- azalea-protocol/src/packets/game/s_pick_item.rs | 8 -------- azalea-protocol/src/packets/game/s_pick_item_from_block.rs | 8 ++++++++ azalea-protocol/src/packets/mod.rs | 4 ++-- azalea-protocol/src/read.rs | 2 +- 6 files changed, 20 insertions(+), 16 deletions(-) delete mode 100755 azalea-protocol/src/packets/game/s_pick_item.rs create mode 100755 azalea-protocol/src/packets/game/s_pick_item_from_block.rs (limited to 'azalea-protocol/src') diff --git a/azalea-protocol/src/packets/game/c_level_particles.rs b/azalea-protocol/src/packets/game/c_level_particles.rs index d700673c..ef50d0cd 100755 --- a/azalea-protocol/src/packets/game/c_level_particles.rs +++ b/azalea-protocol/src/packets/game/c_level_particles.rs @@ -5,6 +5,7 @@ use azalea_protocol_macros::ClientboundGamePacket; #[derive(Clone, Debug, AzBuf, ClientboundGamePacket)] pub struct ClientboundLevelParticles { pub override_limiter: bool, + pub always_show: bool, pub x: f64, pub y: f64, pub z: f64, @@ -27,13 +28,14 @@ mod tests { #[test] fn test_c_level_particles_packet() { let slice = &[ - 0, 64, 139, 10, 0, 0, 0, 0, 0, 192, 26, 0, 0, 0, 0, 0, 0, 64, 144, 58, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 13, 63, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 63, 128, 0, 0, + 0, 0, 64, 36, 19, 1, 192, 139, 224, 69, 64, 91, 192, 0, 0, 0, 0, 0, 63, 229, 66, 62, + 20, 132, 232, 141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 62, 25, 153, 154, 0, 0, 0, 70, + 1, 9, ][..]; let mut bytes = Cursor::new(slice); - let _packet = ClientboundLevelParticles::azalea_read(&mut bytes).unwrap(); + let packet = ClientboundLevelParticles::azalea_read(&mut bytes).unwrap(); + println!("{packet:?}"); assert_eq!(bytes.position(), slice.len() as u64); } } diff --git a/azalea-protocol/src/packets/game/mod.rs b/azalea-protocol/src/packets/game/mod.rs index 757dd27f..35c1a2fe 100755 --- a/azalea-protocol/src/packets/game/mod.rs +++ b/azalea-protocol/src/packets/game/mod.rs @@ -172,13 +172,15 @@ declare_state_packets!(GamePacket, move_player_status_only, move_vehicle, paddle_boat, - pick_item, + pick_item_from_block, + pick_item_from_entity, ping_request, place_recipe, player_abilities, player_action, player_command, player_input, + player_loaded, pong, recipe_book_change_settings, recipe_book_seen_recipe, diff --git a/azalea-protocol/src/packets/game/s_pick_item.rs b/azalea-protocol/src/packets/game/s_pick_item.rs deleted file mode 100755 index 289da6e7..00000000 --- a/azalea-protocol/src/packets/game/s_pick_item.rs +++ /dev/null @@ -1,8 +0,0 @@ -use azalea_buf::AzBuf; -use azalea_protocol_macros::ServerboundGamePacket; - -#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] -pub struct ServerboundPickItem { - #[var] - pub slot: u32, -} diff --git a/azalea-protocol/src/packets/game/s_pick_item_from_block.rs b/azalea-protocol/src/packets/game/s_pick_item_from_block.rs new file mode 100755 index 00000000..d923646b --- /dev/null +++ b/azalea-protocol/src/packets/game/s_pick_item_from_block.rs @@ -0,0 +1,8 @@ +use azalea_buf::AzBuf; +use azalea_protocol_macros::ServerboundGamePacket; + +#[derive(Clone, Debug, AzBuf, ServerboundGamePacket)] +pub struct ServerboundPickItemFromBlock { + #[var] + pub slot: u32, +} diff --git a/azalea-protocol/src/packets/mod.rs b/azalea-protocol/src/packets/mod.rs index 14ae7c71..24a1437c 100755 --- 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 = 768; -pub const VERSION_NAME: &str = "1.21.3"; +pub const PROTOCOL_VERSION: i32 = 769; +pub const VERSION_NAME: &str = "1.21.4"; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] pub enum ConnectionProtocol { diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index d75e3bad..3e333e52 100755 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -351,7 +351,7 @@ where } if log::log_enabled!(log::Level::Trace) { - const DO_NOT_CUT_OFF_PACKET_LOGS: bool = true; + const DO_NOT_CUT_OFF_PACKET_LOGS: bool = false; let buf_string: String = { if !DO_NOT_CUT_OFF_PACKET_LOGS && buf.len() > 500 { -- cgit v1.2.3