aboutsummaryrefslogtreecommitdiff
path: root/azalea/src/container.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea/src/container.rs')
-rw-r--r--azalea/src/container.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/azalea/src/container.rs b/azalea/src/container.rs
index 8b46994e..b4c98415 100644
--- a/azalea/src/container.rs
+++ b/azalea/src/container.rs
@@ -156,13 +156,13 @@ impl Client {
///
/// To open a container in the world, use [`Client::open_container_at`].
pub fn get_inventory(&self) -> ContainerHandleRef {
- self.query_self::<&Inventory, _>(|inv| ContainerHandleRef::new(inv.id, self.clone()))
+ ContainerHandleRef::new(self.component::<Inventory>().id, self.clone())
}
/// Get the item in the bot's hotbar that is currently being held in its
/// main hand.
pub fn get_held_item(&self) -> ItemStack {
- self.query_self::<&Inventory, _>(|inv| inv.held_item().clone())
+ self.component::<Inventory>().held_item().clone()
}
}