aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/container.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-10-21 01:34:18 -0500
committermat <git@matdoes.dev>2023-10-21 01:34:18 -0500
commit252958bb90751b0d278b1a478193b046edcfabe2 (patch)
tree6d7e4c17fe54d84c603029d6ce1f133aab4563cd /azalea/src/container.rs
parent97ec9f7c7dcb02e7d7447a5fe877386528b8159e (diff)
downloadazalea-drasl-252958bb90751b0d278b1a478193b046edcfabe2.tar.xz
async_fn_in_trait stabilized
Diffstat (limited to 'azalea/src/container.rs')
-rw-r--r--azalea/src/container.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/azalea/src/container.rs b/azalea/src/container.rs
index 34f86715..221b80b9 100644
--- a/azalea/src/container.rs
+++ b/azalea/src/container.rs
@@ -10,6 +10,7 @@ use azalea_inventory::{operations::ClickOperation, ItemSlot, Menu};
use azalea_protocol::packets::game::ClientboundGamePacket;
use bevy_app::{App, Plugin, Update};
use bevy_ecs::{component::Component, prelude::EventReader, system::Commands};
+use futures_lite::Future;
use std::fmt::Debug;
use crate::bot::BotClientExt;
@@ -22,7 +23,10 @@ impl Plugin for ContainerPlugin {
}
pub trait ContainerClientExt {
- async fn open_container(&mut self, pos: BlockPos) -> Option<ContainerHandle>;
+ fn open_container(
+ &mut self,
+ pos: BlockPos,
+ ) -> impl Future<Output = Option<ContainerHandle>> + Send;
fn open_inventory(&mut self) -> Option<ContainerHandle>;
}