34 std::map<short, ProtocolCraft::Slot>
GetSlots()
const;
42 void SetContent(
const std::vector<ProtocolCraft::Slot>& slots_);
43#if PROTOCOL_VERSION < 755
46 int GetNextTransactionId();
47#elif PROTOCOL_VERSION > 755
56 std::map<short, ProtocolCraft::Slot>
slots;
59#if PROTOCOL_VERSION < 755
61 int next_transaction_id;
62#elif PROTOCOL_VERSION > 755
Mutex protected reference, will be locked until destroyed.
short GetFirstPlayerInventorySlot() const
static constexpr short INVENTORY_HOTBAR_START
static constexpr short INVENTORY_HEAD_ARMOR
void SetContent(const std::vector< ProtocolCraft::Slot > &slots_)
static constexpr short INVENTORY_LEGS_ARMOR
std::map< short, ProtocolCraft::Slot > GetSlots() const
static constexpr short INVENTORY_CRAFTING_INPUT_START
void SetSlot(const short index, const ProtocolCraft::Slot &slot)
static constexpr short INVENTORY_ARMOR_START
void SetStateId(const int state_id_)
ProtocolCraft::Slot GetSlot(const short index) const
std::shared_mutex window_mutex
std::map< short, ProtocolCraft::Slot > slots
InventoryType GetType() const
static constexpr short INVENTORY_CRAFTING_OUTPUT_INDEX
static constexpr short INVENTORY_STORAGE_START
Utilities::ScopeLockedWrapper< const std::map< short, ProtocolCraft::Slot >, std::shared_mutex, std::shared_lock > GetLockedSlots() const
Get a read-only locked version of all the slots.
static constexpr short PLAYER_INVENTORY_INDEX
static constexpr short INVENTORY_OFFHAND_INDEX
static constexpr short INVENTORY_CHEST_ARMOR
static constexpr short INVENTORY_FEET_ARMOR