Expand description
Container trait for anything that holds items.
Containers are the base abstraction for anything that can hold items, including player inventories, chests, barrels, furnaces, etc.
ModulesΒ§
- crafting π
- Crafting containers and related types.
- helper π
- NBT loading shared by containers.
- result π
- simple π
StructsΒ§
- Crafting
Container - A container for crafting grid items.
- Result
Container - A simple container for holding a single crafting result.
- Simple
Container - A Simple Container
ConstantsΒ§
- DEFAULT_
DISTANCE_ BUFFER - Extra reach allowed when validating containers and menus.
TraitsΒ§
- Container
- Something that contains items.
I also use container interchangeably with inventory as they mean approximately the same thing.
But inventory could also refer to the playerβs inventory.
Example:
crate::player::player_inventory::PlayerInventory,crate::inventory::container::SimpleContainer
FunctionsΒ§
- calculate_
redstone_ signal_ from_ container - Calculates the redstone comparator signal strength (0-15) from a container.
- clear_
or_ πcount_ matching_ stack - Removes or counts matching items in one stack using vanilla
/clearsemantics. - load_
all_ items - Loads the
Itemslist intoitems, skipping entries that fail to decode or whose slot is out of range. - matching_
item_ πcount