use std::borrow::Cow;
use crate::{Decode, Encode, ItemStack, Packet, VarInt};
#[derive(Clone, Debug, Encode, Decode, Packet)]
pub struct ClickSlotC2s<'a> {
pub window_id: u8,
pub state_id: VarInt,
pub slot_idx: i16,
pub button: i8,
pub mode: ClickMode,
pub slot_changes: Cow<'a, [SlotChange]>,
pub carried_item: ItemStack,
}
#[derive(Copy, Clone, Debug, PartialEq, Eq, Encode, Decode)]
pub enum ClickMode {
Click,
ShiftClick,
Hotbar,
CreativeMiddleClick,
DropKey,
Drag,
DoubleClick,
}
#[derive(Clone, Debug, Encode, Decode)]
pub struct SlotChange {
pub idx: i16,
pub stack: ItemStack,
}