Rosegold::ContainerHandle
Inherits Reference / Object
User-facing handle for interacting with an open container. Wraps a Menu and provides intent-level operations (withdraw, deposit) as well as item-level operations (pickup, put_down, move, swap). Auto-closes via ensure when used with a block.
Constructors
Instance methods
Transfer items from player inventory to container via shift-click. Returns the number of items actually transferred.
Find the first slot matching spec in the container.
Find the first slot matching spec in the player inventory.
Pick up items from a slot into the cursor. Uses left-click for full stack, right-click for half.
Put down items from cursor into a slot. Left-click places all, right-click places one.
Shift-click a slot (moves items between container and player inventory).
Swap a slot with a hotbar slot (number keys 1-9).