I want to shoot an arrow named "GreenArrow" that constantly summons enderpearls named "GreenPearl". Those pearls should execute a command at armorstands within 1 block. That command is /setblock ~ ~-1 ~ wool 5.
To do this, I have 4 command blocks, and 2 dummy scoreboard objectives. the dummy objectives are as follows:
/scoreboard objectives add GreenArrow dummy
/scoreboard objectives add GreenPearl dummy
The 4 command blocks that are repeating and always active, are as such:
/scoreboard players set @e[type=arrow] GreenArrow 1 {CustomName:"GreenArrow"}
/execute @e[type=arrow,score_GreenArrow_min=1] ~ ~ ~ summon ender_pearl ~ ~ ~ {CustomName:"GreenPearl"}
/scoreboard players set @e[type=ender_pearl] GreenPearl 1 {CustomName:"GreenPearl"}
/execute @e[type=ender_pearl,score_GreenPearl_min=1] ~ ~ ~ execute @e[type=armor_stand,r=1] ~ ~ ~ setblock ~ ~-1 ~ wool 5
This works when the arrow us summoned using this command,
/summon arrow ~ ~80 ~ {CustomName:"GreenArrow"}
but not when shot by a player. I have tested with a arrow with the custom name in it's NBT data and when renamed in a anvil.
The arrow is shot just fine, but is not detected by the command blocks unless summoned as previously mentioned.
I do belive it has something to do with the way the arrow is shot, in creative mode or survival/adventure there is no difference. It seemes like the arrow looses it's NBT data after being fired from a bow. There were no issues with this before the CustomName was added.
Are anyone here able to assist?
/scoreboard players set @e[type=arrow] GreenArrow 1 {CustomName:"GreenArrow"}
so that command now looks like this:/scoreboard players set /entitydata@e[type=arrow] GreenArrow 1 {CustomName:"GreenArrow"}
. I am not familiar with this command, and not sure how to properly use it.