class

Rosegold::ContainerMenu

Inherits Rosegold::Menu / Reference / Object

Shared base for all container menus (everything except PlayerMenu). Provides slot access, state sync, close, and default validation/shift-click. Subclasses only need to define named accessors and override behavior that differs.

Constructors

new(client : Client, id : UInt8, title : Chat, container_size : Int32)
Source

Instance methods

[](index : Int32) : Rosegold::Slot

Slot access

Source
[]=(index : Int32, slot : Rosegold::Slot)
Source
allow_modification?(slot_index : Int32) : Bool
Source
close
Source
container_size
Source
container_slots
Source
get_slot_max_stack_size(slot_index : Int32, item_slot : Rosegold::Slot) : Int32
Source
handle_close
Source
hotbar_slot_index(hotbar_nr : Int32) : Int32
Source
hotbar_window_slots
Source
inventory_slots
Source
may_pickup?(slot_index : Int32) : Bool
Source
may_place?(slot_index : Int32, item_slot : Rosegold::Slot) : Bool

Slot validation

Source
offhand_slot_index

Slot group accessors

Source
player_inventory_start

Player inventory start offset within this menu

Source
quick_move_stack(slot_index : Int32) : Rosegold::Slot

Shift-click routing (each menu subclass defines where items move)

Source
total_slots
Source