Skip to content

Inventory System overhaul #5

@EastArctica

Description

@EastArctica

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions