diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2023-07-09 19:11:29 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-09 19:11:29 -0500 |
| commit | d1afd02aa84e7b4450c1607277f078eb2a0f1bf3 (patch) | |
| tree | efea9bb7ef7f2064f7c963fd88f394fecec6231b /azalea-client/src/interact.rs | |
| parent | ea8a8fccb6eb39c97f6cb69e11db5f7d0886172e (diff) | |
| download | azalea-drasl-d1afd02aa84e7b4450c1607277f078eb2a0f1bf3.tar.xz | |
Update to Bevy 0.11 (#94)
* update to bevy 0.11
* clippy
---------
Co-authored-by: mat <git@matdoes.dev>
Diffstat (limited to 'azalea-client/src/interact.rs')
| -rw-r--r-- | azalea-client/src/interact.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/azalea-client/src/interact.rs b/azalea-client/src/interact.rs index c389f2f3..45b845f9 100644 --- a/azalea-client/src/interact.rs +++ b/azalea-client/src/interact.rs @@ -11,12 +11,13 @@ use azalea_world::{ entity::{clamp_look_direction, view_vector, EyeHeight, LookDirection, Position, WorldName}, Instance, InstanceContainer, }; -use bevy_app::{App, Plugin}; +use bevy_app::{App, Plugin, Update}; use bevy_ecs::{ component::Component, entity::Entity, event::EventReader, - schedule::{IntoSystemConfig, IntoSystemConfigs}, + prelude::Event, + schedule::IntoSystemConfigs, system::{Commands, Query, Res}, }; use derive_more::{Deref, DerefMut}; @@ -33,6 +34,7 @@ pub struct InteractPlugin; impl Plugin for InteractPlugin { fn build(&self, app: &mut App) { app.add_event::<BlockInteractEvent>().add_systems( + Update, ( update_hit_result_component.after(clamp_look_direction), handle_block_interact_event, @@ -61,6 +63,7 @@ impl Client { /// Right click a block. The behavior of this depends on the target block, /// and it'll either place the block you're holding in your hand or use the /// block you clicked (like toggling a lever). +#[derive(Event)] pub struct BlockInteractEvent { /// The local player entity that's opening the container. pub entity: Entity, |
