So I am close to my right click detection project about this thing:
If the command blocks detects a cactus green in the slot 0 in your inventory, an invisible armor stand will be teleported to you and if you right click the cactus green, the dye will transfer to the armor stand. Now the problem is, how do you detect the armor stand that has a cactus green called Poison Dust? Cause if it were able to detect the armor stand with the dye, it would give poison to all entities 10 blocks from the source.
So how would I do it? I tried this but won't just work:
Assuming that the armor stand's custom name is Detector1 and I also don't know how to detect the dye's damage. Please help!
Rollback Post to RevisionRollBack
I have returned after all these years and I'm internally dying inside whenever I think about the posts I've done prior to this current year. Just don't look at them.
So I am close to my right click detection project about this thing:
If the command blocks detects a cactus green in the slot 0 in your inventory, an invisible armor stand will be teleported to you and if you right click the cactus green, the dye will transfer to the armor stand. Now the problem is, how do you detect the armor stand that has a cactus green called Poison Dust? Cause if it were able to detect the armor stand with the dye, it would give poison to all entities 10 blocks from the source.
So how would I do it? I tried this but won't just work:
/testfor @e[type=ArmorStand,name=Detector1] {HandItems:[{id:dye}]}
Note:
Assuming that the armor stand's custom name is Detector1 and I also don't know how to detect the dye's damage. Please help!
I have returned after all these years and I'm internally dying inside whenever I think about the posts I've done prior to this current year. Just don't look at them.
Minecraft is forever eternal...
Using scoreboard tag is more reliable than /testfor,
/scoreboard players tag @e[type=ArmorStand,name=Detector1] add Activated {HandItems:[{id:dye,Damage:2,Count:1,tag:{display:{Name:"Poison Dust"}}},{}]}
Then use
/execute @e[tag=Activated] ~ ~ ~ /effect @e[r_min=1,r=10] minecraft:poison 20 1
Hope that helped!
Written by AboookhTheMaster,
Feel free to ask anything.
----|Have a nice day!|----
That is not working because you need to use the full id
What AboookhTheMaster said won't work either, if you're going to detect nbt, you can't shorten stuff:
Feel free to ask *almost* anything.
I 've just used the MCstacker to create the nbt tags.
But if you replace it with the numerical id it will also work (tested with the /summon falling sand) and probably will work here too.
Written by AboookhTheMaster,
Feel free to ask anything.
----|Have a nice day!|----