From eeaf1435e81d9cbd8daa0efa22029c1f259a64b5 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Tue, 24 Mar 2026 11:15:56 -0500 Subject: 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 --- azalea-client/src/plugins/interact/mod.rs | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'azalea-client/src/plugins/interact') 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)); } } -- cgit v1.2.3