Forumskeyboard_arrow_right Help keyboard_arrow_right Java Edition

Create Forum Thread
2

Detecting Items with Exact names on an item

2 emeralds3 replies56 views
created 07/16/2019 1:29 pm by TheCoolBuilder15
last reply 07/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 avatar
TheCoolBuilder15
Level 1 : New Miner
0

comment Login or register to post a reply.

3 replies

1
07/16/2019 2:50 pm
Level 1 : New Miner
TheCoolBuilder15
I figured it out nvm
1
07/16/2019 2:50 pm
Level 1 : New Miner
TheCoolBuilder15
@p[nbt={Inventory:[{id:"minecraft:brown_dye",Count:6b,tag:{display:{Name:"[{\"text\":\"Stuffy Stuffed Leather\"}]"}}},{id:"minecraft:string",Count:5b}]}]
1
07/16/2019 2:04 pm
Level 7 : Apprentice Llama
DrEnderman211
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...

Planet Minecraft

Browse

Site

© 2010 - 2019
planetminecraft.com

Welcome