Sign in
Skip to main content

Discuss Minecraft's scripting and modding capabilities, including APIs, tools, customization, automation, and creator workflows. Share ideas and feedback on how players and creators can extend and customize Minecraft.

7

Changing {Inventory} tag structure

3 Comments

Post a new comment:

Please sign in to leave a comment.

Sorted by oldest
  • 0
    Registered User commented
    Comment actions Permalink

    "Inventory:[Slot1:{id:"minecraft:stone",Count:1b},Slot4:{id:"minecraft:dirt",Count:2b}}" this is invalid NBT (lists objects can't have names)

    What I'd suggest instead is this:

    Inventory:{<slot as used in the replaceitem command>:{<item data without the slot tag>}}
    for example:
    Inventory:{weapon.offhand:{id:"minecraft:stone",Count:1b}}

  • 0
    Registered User commented
    Comment actions Permalink

    I really looking for this change, Im making a datapack with custom crafting table and it was a PAIN to make it.

  • 0
    Registered User commented
    Comment actions Permalink

    I wouldn't suggest removing the Slot tag, as currently you can do Inventory[{id:"minecraft:stone"].Slot to figure out the slot number, but I do understand the annoyance of the array index vs the Slot id.