diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2026-03-24 11:15:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-24 11:15:56 -0500 |
| commit | eeaf1435e81d9cbd8daa0efa22029c1f259a64b5 (patch) | |
| tree | 3486e26d5409708370e4e259d240fb77c6e1e439 /azalea-client | |
| parent | 41a9ae6aaff77646c08c64ac1334a8cc6081c24f (diff) | |
| download | azalea-drasl-eeaf1435e81d9cbd8daa0efa22029c1f259a64b5.tar.xz | |
26.1 (#316)
* start updating to 26.1
* start updating to 26.1-snapshot-6
* 26.1-snapshot-6
* 26.1-snapshot-10
* 26.1-rc-1
* fix tests
* 26.1-rc-2 and sort default components
* 26.1
* update changelog
Diffstat (limited to 'azalea-client')
| -rw-r--r-- | azalea-client/src/plugins/attack.rs | 11 | ||||
| -rw-r--r-- | azalea-client/src/plugins/interact/mod.rs | 22 | ||||
| -rw-r--r-- | azalea-client/src/plugins/packet/game/mod.rs | 10 | ||||
| -rw-r--r-- | azalea-client/src/test_utils/simulation.rs | 1 |
4 files changed, 22 insertions, 22 deletions
diff --git a/azalea-client/src/plugins/attack.rs b/azalea-client/src/plugins/attack.rs index 41ce114d..4cafc9f8 100644 --- a/azalea-client/src/plugins/attack.rs +++ b/azalea-client/src/plugins/attack.rs @@ -1,10 +1,9 @@ use azalea_core::{game_type::GameMode, tick::GameTick}; use azalea_entity::{ - Attributes, Crouching, Physics, indexing::EntityIdIndex, metadata::Sprinting, - update_bounding_box, + Attributes, Physics, indexing::EntityIdIndex, metadata::Sprinting, update_bounding_box, }; use azalea_physics::PhysicsSystems; -use azalea_protocol::packets::game::s_interact::{self, ServerboundInteract}; +use azalea_protocol::packets::game::ServerboundAttack; use bevy_app::{App, Plugin, Update}; use bevy_ecs::prelude::*; use derive_more::{Deref, DerefMut}; @@ -59,7 +58,6 @@ pub fn handle_attack_queued( &mut Sprinting, &AttackQueued, &LocalGameMode, - &Crouching, &EntityIdIndex, )>, ) { @@ -70,7 +68,6 @@ pub fn handle_attack_queued( mut sprinting, attack_queued, game_mode, - crouching, entity_id_index, ) in &mut query { @@ -84,10 +81,8 @@ pub fn handle_attack_queued( commands.trigger(SendGamePacketEvent::new( client_entity, - ServerboundInteract { + ServerboundAttack { entity_id: target_entity_id, - action: s_interact::ActionType::Attack, - using_secondary_action: **crouching, }, )); commands.trigger(SwingArmEvent { diff --git a/azalea-client/src/plugins/interact/mod.rs b/azalea-client/src/plugins/interact/mod.rs index 04986de7..0eb43818 100644 --- a/azalea-client/src/plugins/interact/mod.rs +++ b/azalea-client/src/plugins/interact/mod.rs @@ -4,6 +4,7 @@ use std::collections::HashMap; use azalea_block::BlockState; use azalea_core::{ + delta::LpVec3, direction::Direction, game_type::GameMode, hit_result::{BlockHitResult, HitResult}, @@ -25,10 +26,8 @@ use azalea_physics::{ local_player::PhysicsState, }; use azalea_protocol::packets::game::{ - ServerboundInteract, ServerboundUseItem, - s_interact::{self, InteractionHand}, - s_swing::ServerboundSwing, - s_use_item_on::ServerboundUseItemOn, + ServerboundInteract, ServerboundUseItem, s_interact::InteractionHand, + s_swing::ServerboundSwing, s_use_item_on::ServerboundUseItemOn, }; use azalea_world::World; use bevy_app::{App, Plugin, Update}; @@ -350,12 +349,10 @@ pub fn handle_entity_interact( } }; - let mut interact = ServerboundInteract { + let interact = ServerboundInteract { entity_id, - action: s_interact::ActionType::InteractAt { - location, - hand: InteractionHand::MainHand, - }, + hand: InteractionHand::MainHand, + location: LpVec3::from(location), using_secondary_action: physics_state.trying_to_crouch, }; commands.trigger(SendGamePacketEvent::new(trigger.client, interact.clone())); @@ -364,11 +361,8 @@ pub fn handle_entity_interact( // in certain cases when interacting with armor stands let consumes_action = false; if !consumes_action { - // but yes, most of the time vanilla really does send two interact packets like - // this - interact.action = s_interact::ActionType::Interact { - hand: InteractionHand::MainHand, - }; + // but yes, most of the time vanilla really does send two identical interact + // packets like this commands.trigger(SendGamePacketEvent::new(trigger.client, interact)); } } diff --git a/azalea-client/src/plugins/packet/game/mod.rs b/azalea-client/src/plugins/packet/game/mod.rs index ecc1bc2f..f1bff086 100644 --- a/azalea-client/src/plugins/packet/game/mod.rs +++ b/azalea-client/src/plugins/packet/game/mod.rs @@ -197,6 +197,8 @@ pub fn process_packet(ecs: &mut World, player: Entity, packet: &ClientboundGameP debug_entity_value, debug_event, game_test_highlight_pos, + low_disk_space_warning, + game_rule_values, ] ); } @@ -1644,6 +1646,14 @@ impl GamePacketHandler<'_> { pub fn game_test_highlight_pos(&mut self, p: &ClientboundGameTestHighlightPos) { debug!("Got game test highlight pos packet {p:?}"); } + + pub fn low_disk_space_warning(&mut self, p: &ClientboundLowDiskSpaceWarning) { + debug!("Got low disk space warning packet {p:?}"); + } + + pub fn game_rule_values(&mut self, p: &ClientboundGameRuleValues) { + debug!("Got game rule values packet {p:?}"); + } } struct MoveEntity { diff --git a/azalea-client/src/test_utils/simulation.rs b/azalea-client/src/test_utils/simulation.rs index 6af7ba59..561a4986 100644 --- a/azalea-client/src/test_utils/simulation.rs +++ b/azalea-client/src/test_utils/simulation.rs @@ -389,6 +389,7 @@ pub fn make_basic_empty_chunk( for _ in 0..section_count { sections.push(Section { block_count: 0, + fluid_count: 0, states: PalettedContainer::<BlockState>::new(), biomes: PalettedContainer::<Biome>::new(), }); |
