aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/c_container_set_slot.rs
blob: 0c8ba767801730851fb858dee84bdbe114e3e3db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use azalea_buf::AzBuf;
use azalea_inventory::ItemStack;
use azalea_protocol_macros::ClientboundGamePacket;

#[derive(AzBuf, ClientboundGamePacket, Clone, Debug, PartialEq)]
pub struct ClientboundContainerSetSlot {
    #[var]
    pub container_id: i32,
    /// An identifier used by the server to track client inventory desyncs.
    #[var]
    pub state_id: u32,
    /// The slot index.
    ///
    /// See <https://minecraft.wiki/w/Java_Edition_protocol/Inventory>.
    pub slot: u16,
    pub item_stack: ItemStack,
}