Skip to main content

Module container

Module container 

Source
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.
result 🔒
simple 🔒

Structs§

CraftingContainer
A container for crafting grid items.
ResultContainer
A simple container for holding a single crafting result.
SimpleContainer
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 /clear semantics.
matching_item_count 🔒