#[non_exhaustive]pub enum CreativePacket {
Swing,
SetSlot {
slot: i16,
item: Option<Stack>,
},
}Expand description
One packet the 26.1 creative inventory screen sends (Outgoing::Creative): the server
trusts these stacks, so they are exactly what the real client sends.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Swing
swing (main hand): a stack was dropped.
SetSlot
set_creative_mode_slot: window 0 slot slot now holds item (slot -1: item is
dropped).
Implementations§
Source§impl CreativePacket
impl CreativePacket
Sourcepub fn to_v1_8(&self) -> Option<SetCreativeSlot>
pub fn to_v1_8(&self) -> Option<SetCreativeSlot>
The 1.8 creative_inventory_action (None for CreativePacket::Swing).
Sourcepub fn to_v1_16_5(&self) -> Option<SetCreativeSlot>
pub fn to_v1_16_5(&self) -> Option<SetCreativeSlot>
The 1.16.5 creative_inventory_action (None for CreativePacket::Swing).
Sourcepub fn to_v1_12_2(&self) -> Option<SetCreativeSlot>
pub fn to_v1_12_2(&self) -> Option<SetCreativeSlot>
The 1.12.2 creative_inventory_action (None for CreativePacket::Swing).
Source§impl CreativePacket
impl CreativePacket
Sourcepub fn to_v26_1(&self) -> ServerboundPlayPacket
pub fn to_v26_1(&self) -> ServerboundPlayPacket
The 26.1 serverbound packet: swing (main hand) or set_creative_mode_slot (the
stack in the untrusted layout, components in type id order).
Source§impl CreativePacket
impl CreativePacket
Sourcepub fn to_v26_2(&self) -> ServerboundPlayPacket
pub fn to_v26_2(&self) -> ServerboundPlayPacket
The 26.2 serverbound packet: swing (main hand) or set_creative_mode_slot.
Source§impl CreativePacket
impl CreativePacket
Sourcepub fn to_v26_3(&self) -> Option<ServerboundPlayPacket>
pub fn to_v26_3(&self) -> Option<ServerboundPlayPacket>
The 26.3 serverbound packet: set_creative_mode_slot (None for
CreativePacket::Swing: 26.3 has no swing packet, and a 26.3 inventory never
returns one).