Skip to main content

Detect an item, remove it, then give another item?

Comments

2 comments

  • Will Osborne

    Hello I see that you would like to know how to pick up a item then turn it into something else.

    e.g, rotten_flesh = diamond

    you will need to execute the following commands in a loop:

    /tag @a[nbt={Inventory:[{id:"minecraft:<item ID>"}]}] add <item ID>

    for named ones

    /execute as @a[nbt={Inventory:[{id:"minecraft:<item ID>",tag:{display:{Name:"{\"text\":\"<item name>\"}"}}}]}]

    after the item has been found use this

    https://www.digminecraft.com/game_commands/replaceitem_command.php

    to find all the command tags

    0
  • Will Osborne

    also conditions aren't needed

    make sure the command block has the following:

    Type: Repeat

    Redstone: Always Active

    0

Please sign in to leave a comment.