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§
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 - Default distance buffer for container interaction range checks.
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. - matching_
item_ 🔒count