aboutsummaryrefslogtreecommitdiff
path: root/azalea-inventory/src
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-inventory/src')
-rw-r--r--azalea-inventory/src/operations.rs18
-rw-r--r--azalea-inventory/src/slot.rs5
2 files changed, 14 insertions, 9 deletions
diff --git a/azalea-inventory/src/operations.rs b/azalea-inventory/src/operations.rs
index 97ae1e60..fc42e498 100644
--- a/azalea-inventory/src/operations.rs
+++ b/azalea-inventory/src/operations.rs
@@ -27,11 +27,13 @@ pub enum ClickOperation {
#[derive(Debug, Clone)]
pub enum PickupClick {
- /// Left mouse click. Note that in the protocol, None is represented as
- /// -999.
+ /// Left mouse click.
+ ///
+ /// Note that in the protocol, None is represented as -999.
Left { slot: Option<u16> },
- /// Right mouse click. Note that in the protocol, None is represented as
- /// -999.
+ /// Right mouse click.
+ ///
+ /// Note that in the protocol, None is represented as -999.
Right { slot: Option<u16> },
/// Drop cursor stack.
LeftOutside,
@@ -134,11 +136,13 @@ impl From<QuickCraftStatus> for QuickCraftStatusKind {
}
}
-/// Double click
+/// Double click.
#[derive(Debug, Clone)]
pub struct PickupAllClick {
- /// The slot that we're double clicking on. It should be empty or at least
- /// not pickup-able (since the carried item is used as the filter).
+ /// The slot that we're double clicking on.
+ ///
+ /// It should be empty or at least not pickup-able (since the carried item
+ /// is used as the filter).
pub slot: u16,
/// Impossible in vanilla clients.
pub reversed: bool,
diff --git a/azalea-inventory/src/slot.rs b/azalea-inventory/src/slot.rs
index 2d4202e8..d19ab177 100644
--- a/azalea-inventory/src/slot.rs
+++ b/azalea-inventory/src/slot.rs
@@ -146,8 +146,9 @@ impl Serialize for ItemStack {
}
}
-/// An item in an inventory, with a count and NBT. Usually you want
-/// [`ItemStack`] or [`azalea_registry::Item`] instead.
+/// An item in an inventory, with a count and a set of data components.
+///
+/// Usually you want [`ItemStack`] or [`azalea_registry::Item`] instead.
#[derive(Debug, Clone, PartialEq, Serialize)]
pub struct ItemStackData {
#[serde(rename = "id")]