aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/client_impl/interact.rs
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-12-28 04:31:29 -0600
committerGitHub <noreply@github.com>2025-12-28 04:31:29 -0600
commit20c7e27250148f62bab9e7b99e4f0cd6deb82325 (patch)
tree163b312ef4dc72c5c23be923f8ca17cdf2a7278c /azalea/src/client_impl/interact.rs
parent7ab3b8924f64f7eadb6b8928b6fae73cb06e4c2f (diff)
downloadazalea-drasl-20c7e27250148f62bab9e7b99e4f0cd6deb82325.tar.xz
Change Client::component to return a reference (#298)
* change Client::component to return a reference * write docs * merge main * remove unused parking_lot feature
Diffstat (limited to 'azalea/src/client_impl/interact.rs')
-rw-r--r--azalea/src/client_impl/interact.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea/src/client_impl/interact.rs b/azalea/src/client_impl/interact.rs
index 6ff93549..8a9cf475 100644
--- a/azalea/src/client_impl/interact.rs
+++ b/azalea/src/client_impl/interact.rs
@@ -15,7 +15,7 @@ impl Client {
/// Note that this may trigger anticheats as it doesn't take into account
/// whether you're actually looking at the block.
pub fn block_interact(&self, position: BlockPos) {
- self.ecs.lock().write_message(StartUseItemEvent {
+ self.ecs.write().write_message(StartUseItemEvent {
entity: self.entity,
hand: InteractionHand::MainHand,
force_block: Some(position),
@@ -28,7 +28,7 @@ impl Client {
/// behavior isn't desired, consider using [`Client::start_use_item`]
/// instead.
pub fn entity_interact(&self, entity: Entity) {
- self.ecs.lock().trigger(EntityInteractEvent {
+ self.ecs.write().trigger(EntityInteractEvent {
client: self.entity,
target: entity,
location: None,
@@ -43,7 +43,7 @@ impl Client {
/// If we're looking at a block or entity, then it will be clicked. Also see
/// [`Client::block_interact`] and [`Client::entity_interact`].
pub fn start_use_item(&self) {
- self.ecs.lock().write_message(StartUseItemEvent {
+ self.ecs.write().write_message(StartUseItemEvent {
entity: self.entity,
hand: InteractionHand::MainHand,
force_block: None,