[][src]Struct terraria_protocol::packets::PlayerInventorySlot

pub struct PlayerInventorySlot {
    pub player_id: u8,
    pub slot_id: i16,
    pub stack: i16,
    pub prefix: u8,
    pub item_netid: i16,
}

Player inventory slot.

Direction: Server <-> Client (Sync).

Fields

player_id: u8slot_id: i16stack: i16prefix: u8item_netid: i16

Implementations

impl PlayerInventorySlot[src]

pub fn slot_location(&self) -> SlotLocation[src]

The slot location depends on the value of slot_id:

  • 0 - 58 = Inventory
  • 59 - 78 = Armor
  • 79 - 88 = Dye
  • 89 - 93 MiscEquips
  • 94 - 98 = MiscDyes
  • 99 - 138 = Piggy bank
  • 139 - 178 = Safe
  • 179 = Trash
  • 180 - 219 = Defender's Forge
  • 220 - 259 = Void Vault

Trait Implementations

impl Debug for PlayerInventorySlot[src]

impl PacketBody for PlayerInventorySlot[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.