Crate valence_inventory

Source
Expand description

§valence_inventory

The inventory system.

This module contains the systems and components needed to handle inventories. By default, clients will have a player inventory attached to them.

§Components

  • Inventory: The inventory component. This is the thing that holds items.
  • OpenInventory: The component that is attached to clients when they have an inventory open.

§Examples

An example system that will let you access all player’s inventories:

fn system(clients: Query<(&Client, &Inventory)>) {}

§See also

Examples related to inventories in the valence/examples/ directory:

  • building
  • chest

Modules§

player_inventory

Structs§

ClickSlotEvent
ClientInventoryState
Miscellaneous inventory data.
CreativeInventoryActionEvent
CursorItem
The item stack that the client thinks it’s holding under the mouse cursor.
DropItemStackEvent
HeldItem
Indicates which hotbar slot the player is currently holding.
Inventory
InventoryPlugin
InventorySettings
InventoryWindow
A helper to represent the inventory window that the player is currently viewing. Handles dispatching reads to the correct inventory.
InventoryWindowMut
A helper to represent the inventory window that the player is currently viewing. Handles dispatching reads/writes to the correct inventory.
OpenInventory
Used to indicate that the client with this component is currently viewing an inventory.
SlotChange
UpdateSelectedSlotEvent

Enums§

ClickMode
InventoryKind
PlayerAction