Snowballs and Armor Stands in post-1.11 [duplicate]
So I was trying to make grenades and I used an armor stand tracking command set I found here How would I make something spawn when and where a snowball hits something? (MrLemon's answer) and it has an issue for me. After converting the commands from pre-1.11 to post-1.11 format (e.g. Snowball to minecraft:snowball) the armor stands won't leave and once the /summon tnt command goes off, I get a huge row of explosions along the trajectory of the snowball. I tried something like
execute @e[type=snowball] ~ ~ ~ summon armor_stand ~ ~ ~ {NoGravity:1b,CustomName:"SnowballMarker",Marker:1b,Invisible:1b}
testfor @e[type=armor_stand,CustomName:"SnowballMarker",Marker:1b,Invisible:1b] {inTile:Air}
kill @e[type=armor_stand,CustomName:"SnowballMarker",Marker:1b,Invisible:1b,inTile:Air]
First command summons an armor stand at the snowballs location.
Second command tests if the stand is in the air(at least that was the plan)
Third command kills said airborne armor stands.
If anyone can make a post-1.11 friendly version of MrLemon's command, I'd greatly appreciate it.
Also, please show the arrangement of the commands in their command blocks, crazy things can happen.
Here are the exact commands but updated:
/scoreboard players add @e[type=snowball] snowballTime 1
/execute @e[type=snowball,score_snowballTime=1] ~ ~ ~ summon armor_stand ~ ~ ~ {NoGravity:1b,CustomName:"SnowballMarker",Marker:1b,Invisible:1b}
/execute @e[type=snowball,score_snowballTime_min=2] ~ ~ ~ tp @e[type=armor_stand,name=SnowballMarker,c=1] @e[type=snowball,r=1]
/scoreboard players set @e[type=armor_stand,name=SnowballMarker] hasSnowball 0
/execute @e[type=snowball] ~ ~ ~ scoreboard players set @e[type=armor_stand,name=SnowballMarker,r=1] hasSnowball 1
/execute @e[type=armor_stand,name=SnowballMarker,score_hasSnowball=0] ~ ~ ~ summon tnt ~ ~ ~ {Fuse:0}
/kill @e[type=armor_stand,name=SnowballMarker,score_hasSnowball=0]
The results in 1.12.2:
Here is the same solution but it uses scoreboard tags instead of objectives. This means you don't have to setup the objectives.
execute @e[type=snowball,tag=!Grenade] ~ ~ ~ summon armor_stand ~ ~ ~ {NoGravity:1b,CustomName:"SnowballMarker",Marker:1b,Invisible:1b}
scoreboard players tag @e[type=snowball] add Grenade
execute @e[tag=Grenade] ~ ~ ~ tp @e[name=SnowballMarker,c=1] @e[tag=Grenade,r=1]
scoreboard players tag @e[name=SnowballMarker] remove hasSnowball
execute @e[tag=Grenade] ~ ~ ~ scoreboard players tag @e[name=SnowballMarker,r=1] add hasSnowball
execute @e[name=SnowballMarker,tag=!hasSnowball] ~ ~ ~ summon tnt ~ ~ ~ {Fuse:0}
kill @e[name=SnowballMarker,tag=!hasSnowball]