2

Detecting Items with Exact names on an item

TheCoolBuilder15's Avatar TheCoolBuilder157/16/19 1:29 pm
7/16/2019 2:50 pm
TheCoolBuilder15's Avatar TheCoolBuilder15
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's Avatar
TheCoolBuilder15
Level 1 : New Miner
0

Create an account or sign in to comment.

3

1
07/16/2019 2:50 pm
Level 1 : New Miner
TheCoolBuilder15
TheCoolBuilder15's Avatar
I figured it out nvm
1
07/16/2019 2:50 pm
Level 1 : New Miner
TheCoolBuilder15
TheCoolBuilder15's Avatar
@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 13 : Journeyman Lemon
Undwa8
Undwa8's Avatar
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

Website

© 2010 - 2024
www.planetminecraft.com

Welcome