/give @p bow 1 0 {display:{Name:"Consecrated Bow",Lore:["When hit, the arrows heal allies and harm the undead"]},ench:[{id:51,lvl:1}]}
in slot 0, the below command is one of my hundreds of failed attempts.
/testfor @p {SelectedItemSlot:0,Inventory:[{Slot:0b,{id:261,Count:1,tag:{display:{Name:"Consecrated Bow",Lore:["When hit, the arrows heal allies and harm the undead"]},ench:[{id:51,lvl:1}]}}}}
Well I'm not sure about the tags themselves (I really don't know that much about them to be honest I'm sure if there's something else wrong with your command Skylinerw will come and tell you), the brackets are missing one square bracket at the end. Currently your command ends with }]}}}}, but it should be }]}}}]} (notice the square bracket, second from the end.)
Rollback Post to RevisionRollBack
I like to do redstone builds on my channel, and I can probably help you with your in game troubles.
Well I'm not sure about the tags themselves (I really don't know that much about them to be honest I'm sure if there's something else wrong with your command Skylinerw will come and tell you), the brackets are missing one square bracket at the end. Currently your command ends with }]}}}}, but it should be }]}}}]} (notice the square bracket, second from the end.)
[16:51:12] Data tag parsing failed: Unable to locate name/value separator for string: {id:261,Count:1,tag:{display:{Name:"Consecrated Bow",Lore:["When hit, the arrows heal allies and harm the undead"]},ench:[{id:51,lvl:1}]}}
/give @p bow 1 0 {display:{Name:"Consecrated Bow",Lore:["When hit, the arrows heal allies and harm the undead"]},ench:[{id:51,lvl:1}]}
in slot 0, the below command is one of my hundreds of failed attempts.
/testfor @p {SelectedItemSlot:0,Inventory:[{Slot:0b,{id:261,Count:1,tag:{display:{Name:"Consecrated Bow",Lore:["When hit, the arrows heal allies and harm the undead"]},ench:[{id:51,lvl:1}]}}}}
First thing to note is the ending brackets to not make it all the way against the left column. This indicates you have more opening brackets than closing. What you've done is used the "Slot" tag as the root of the item and opened a compound with no identifier afterwards. Tags "id", "Damage", "Count", "Slot", and "tag" belong at the same level. As Jmal has said, you also need to fix up the square bracket at the end to match the closing of the "Inventory" list tag.
For the latest snapshots, you must use the new alphabetical format for items instead of the numerical IDs. When testing for pre-existing items, you also have to include the modpack ("minecraft:"). Your fixed command:
/testfor @p {SelectedItemSlot:0,Inventory:[{id:minecraft:bow,Count:1b,Slot:0b,tag:{display:{Name:"Consecrated Bow",Lore:["When hit, the arrows heal allies and harm the undead"]},ench:[{id:51,lvl:1}]}}]}
/testfor @p {SelectedItemSlot:0,Inventory:[{Slot:0b,{id:261,Count:1,tag:{display:{Name:"Consecrated Bow",Lore:["When hit, the arrows heal allies and harm the undead"]},ench:[{id:51,lvl:1}]}}}}
I like to do redstone builds on my channel, and I can probably help you with your in game troubles.
[16:51:12] Data tag parsing failed: Unable to locate name/value separator for string: {id:261,Count:1,tag:{display:{Name:"Consecrated Bow",Lore:["When hit, the arrows heal allies and harm the undead"]},ench:[{id:51,lvl:1}]}}
Here is your command indented for debugging:
First thing to note is the ending brackets to not make it all the way against the left column. This indicates you have more opening brackets than closing. What you've done is used the "Slot" tag as the root of the item and opened a compound with no identifier afterwards. Tags "id", "Damage", "Count", "Slot", and "tag" belong at the same level. As Jmal has said, you also need to fix up the square bracket at the end to match the closing of the "Inventory" list tag.
For the latest snapshots, you must use the new alphabetical format for items instead of the numerical IDs. When testing for pre-existing items, you also have to include the modpack ("minecraft:"). Your fixed command:
Condensed:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/