Currently, the inventory system is very complicated and hard for users to understand. I propose the API be changed to return a Array<Slot> where Slot is a record following this general structure:
public record Slot(
int slotId,
ItemStackHelper item,
String map // InvMapId, ex. "main" or "container"
// Anything else needed? Reference to the inventory?
) {}
These records would be returned by any methods currently returning slot as an id.
Additionally, the "Map" naming referring to the section of the inventory is relatively poor. Perhaps we should consider different naming.
Currently, the inventory system is very complicated and hard for users to understand. I propose the API be changed to return a
Array<Slot>whereSlotis a record following this general structure:These records would be returned by any methods currently returning slot as an id.
Additionally, the "Map" naming referring to the section of the inventory is relatively poor. Perhaps we should consider different naming.