X

NOTICE

Are you sure you want to report this?

A feedback area designed for scripting and mods suggestions and feedback. Please note bug reports and support issues will be removed.

7

Changing {Inventory} tag structure

3 Comments

Post a new comment:

Please sign in to leave a comment.

  • 0
    FVbico 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
    dopDtopZ 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
    RELapis 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.