1

[Solved] 1.9 Command for testing held item not working

RageLokiCat's Avatar RageLokiCat10/15/15 5:53 pm
10/18/2015 11:07 pm
RageLokiCat's Avatar RageLokiCat
/scoreboard players set @a spawnerPick 1 {SelectedItem:{id:golden_pickaxe,tag:{ench:[id:33,lvl:1]}}}

Does not find me, despite my holding a gold pick with sick touch.
Posted by RageLokiCat's Avatar
RageLokiCat
Level 21 : Expert Pony
20

Create an account or sign in to comment.

10

1
10/18/2015 1:43 pm
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
maybe add Count:1 between id and tag keys
1
10/18/2015 1:37 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
I actually think I may have dealt with something like this before. If I remember correctly, the problem was that there was a second data tag on the tool that for some reason was required in the testfor (it was RepairCost if I remember correctly). It was only on the item because it was obtained with an anvil, rather than with a command.

Try this: hold f3 and hit the 'h' button. This should bring up more data about the items when you hover your mouse over it in your inventory. If it says there is only 1 tag, then I don't really know what's wrong. If it says two, then you've probably got the extra tag. If this is the case, I'd suggest going into mcedit and looking at the data structure of the item. Whatever tag you're missing, put it in.
1
10/18/2015 11:07 pm
Level 21 : Expert Pony
RageLokiCat
RageLokiCat's Avatar
That was it, apparently. Very odd. Well, thank you for your help!
1
10/17/2015 9:25 pm
Level 21 : Expert Pony
RageLokiCat
RageLokiCat's Avatar
It might be worth adding, if I take out ,tag:{ench:[{id:33,lvl:1}]} entirely, it does work, but when I add it back it doesn't. Also, I've tried taking ench: out of tag: but that doesn't help.
1
10/16/2015 11:36 am
Level 21 : Expert Pony
RageLokiCat
RageLokiCat's Avatar
SquidMannnMake it as ench:[{}] instead of ench:[] if that doesnt work use ench:{}


I tried every possible combination of brackets at ench but nothing changed.
1
10/15/2015 9:16 pm
Level 19 : Journeyman Robot
SquidMannn
SquidMannn's Avatar
Make it as ench:[{}] instead of ench:[] if that doesnt work use ench:{}
1
10/15/2015 8:34 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
Typically I put quotes around item names, as well as the minecraft: prefix. I'm not sure if that matters or not, but for some reason I've always done that. Also, remember that each enchantment in the list needs it's own set of brackets {}, even if there is only 1.

Try out this code, see if it works:/scoreboard players set @a spawnerPick 1 {SelectedItem:{id:"minecraft:golden_pickaxe",tag:{ench:[{id:33,lvl:1}]}}}
1
10/15/2015 9:08 pm
Level 21 : Expert Pony
RageLokiCat
RageLokiCat's Avatar
I updated my code to be that, but it still doesn't work, same error.
1
10/15/2015 6:19 pm
Level 19 : Journeyman Robot
SquidMannn
SquidMannn's Avatar
What output in the command block are you getting?
1
10/15/2015 8:16 pm
Level 21 : Expert Pony
RageLokiCat
RageLokiCat's Avatar
Sorry, I didn't put it in because I didn't think it was necessary.
[20:15:38] The dataTag does not match for Lunar_Octave

It's singleplayer, but for a sever if that means anything.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome