2

Detecting Items with Exact names on an item

TheCoolBuilder15 7/16/19 1:29 pm
2.4k
7/16/2019 2:50 pm
Hey guys, how do I input a command that can detect a certain item with a custom name?

Any help is great!
Posted by
TheCoolBuilder15
Level 1 : New Miner
0

  Have something to say?

JoinSign in

3

TheCoolBuilder15
07/16/2019 2:50 pm
Level 1 : New Miner
I figured it out nvm
1
TheCoolBuilder15
07/16/2019 2:50 pm
Level 1 : New Miner
@p[nbt={Inventory:[{id:"minecraft:brown_dye",Count:6b,tag:{display:{Name:"[{\"text\":\"Stuffy Stuffed Leather\"}]"}}},{id:"minecraft:string",Count:5b}]}]
1
Undwa8
07/16/2019 2:04 pm
Level 13 : Journeyman Lemon
You have to set some scoreboard commands.

First, something that detects if you have the item in main-hand, and sets the score to 1 if yes otherwise it sets it to 0.
And a second command to set the custom name, working the same way.
Then you place two repeating command blocks that will test if each conditions are met, then place an AND logic gate between them and place your output at the end of the gate.

I don't exactly know the commands, I only know that you can test a score with something like /testfor <player/selector>[score_<name of score>=1] but I'm not sure. Take a look at the Minecraft Wiki page about scoreboards if you want to have better info than mine...
1

Welcome