1 unstable release

0.2.0-alpha.1+mc.1.20.1 Aug 11, 2023

#1329 in Game dev

Download history 1/week @ 2024-02-19 15/week @ 2024-02-26 25/week @ 2024-03-11 21/week @ 2024-04-01 102/week @ 2024-04-15 2/week @ 2024-04-22

125 downloads per month

MIT license

310KB
7K SLoC

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:

# use bevy_ecs::prelude::*;
# use valence_inventory::*;
# use valence_server::client::Client;
fn system(clients: Query<(&Client, &Inventory)>) {}

See also

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

  • building
  • chest

Dependencies

~16–25MB
~446K SLoC