TransWikia.com

Minecraft 1.12.2 How to /clear item that have a specific enchant and name

Arqade Asked by Aceshun on June 7, 2021

I’ve seen examples of how to clear items with specific name or enchants but not both.

This is what I have so far:

/clear @p minecraft:paper 0 1 {tag:{ench:[{id:16s,lvl:1s}]}},{display:{name:"custom name"}}

output: data tag parsing failed: trailing data found at: {tag:{ench:[{id:16s,lvl:1s}]}},<–[here]

One Answer

I’m expanding your command and pointing out all the errors in it:

/clear @p minecraft:paper 0 1
{ 
    tag:{  # “tag” should not be used in /clear command
        ench:[
            {
                id:16s,
                lvl:1s
            }
        ]
    }
}, # this extra “}” closes the final tag before you get to the display section.
{
    display:{
        name:"custom name" # “Name” misspelled as “name”
    }
}

So in summary:

  • Don’t use tag in the /clear command.
  • Make sure you are balancing your brackets. You used one too many }s.
  • The name tag is misspelled. Correct tag is Name.

Fixed command:

/clear @p minecraft:paper 0 1
{
    ench:[
        {
            id:16s,
            lvl:1s
        }
    ],
    display:{
        Name:"custom name"
    }
}

Answered by ExpertCoder14 on June 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP