1

How can I make it so when a snowball hits snow the snow disappears? I am in 1.13.2 and trying to make a snowball spleef game.

/execute at @e[type=snowball,tag=ground] run fill ~ ~ ~ ~ ~ ~ snow replace air

I have tried that but it doesnt work. It may have something to do with 1.13.2.

  • 1
    What does "it does not work" mean? Does it do nothing, does it give an error message, does it blow up your house? Also, what have you tried to solve your issue? Any research, any other attempts, any plans? – Fabian Röling Jan 14 at 4:45
1

What's wrong with your command?

You're trying to use a tag called "ground". Tags are things you can add to entities or players. Entities don't spawn with specific tags. You need add a tag to something or spawn something with a tag using the Tags:[] nbt.

What I would do

You could execute all of the snowballs and summon armor stands that destroy blocks after a few ticks (so the snowball doesn't fall through the blocks). Then kill the armor stands. My setup can be replicated by this command:

summon minecraft:falling_block ~ ~1 ~ {BlockState:{Name:"stone"}, Time:1, Passengers:[{id:"falling_block", Time:1, BlockState:{Name:"redstone_block"}, Passengers:[{id:"falling_block", Time:1, BlockState:{Name:"activator_rail"}, Passengers:[{id:"command_block_minecart", Command:"gamerule commandBlockOutput false"},{id:command_block_minecart,Command:"scoreboard objectives add time dummy"},{id:command_block_minecart,Command:"setblock ~ ~3 ~ repeating_command_block[facing=up]{auto:1, Command:\"execute at @e[type=minecraft:snowball] run summon minecraft:armor_stand ~ ~ ~ {Marker:1,Invisible:1,NoGravity:1, Tags:[tag1]}\"}"},{id:command_block_minecart,Command:"setblock ~ ~3 ~1 repeating_command_block[facing=up]{auto:1, Command:\"scoreboard players add @e[type=minecraft:armor_stand] time 1\"}"},{id:command_block_minecart,Command:"setblock ~1 ~3 ~1 repeating_command_block[facing=up]{auto:1, Command:\"kill @e[type=minecraft:armor_stand,tag=tag1, scores={time=3}]\"}"},{id:command_block_minecart,Command:"setblock ~1 ~3 ~ repeating_command_block[facing=up]{auto:1, Command:\"execute at @e[tag=tag1, scores={time=2}] run fill ~1 ~1 ~1 ~-1 ~-1 ~-1 air replace minecraft:snow_block\"}"},{id:command_block_minecart,Command:"setblock ~ ~ ~1 command_block{Command:\"fill ~ ~-3 ~-1 ~ ~ ~ air\"}"},{id:command_block_minecart,Command:"setblock ~ ~-1 ~1 redstone_block"},{id:command_block_minecart,Command:"kill @e[type=command_block_minecart,distance=..1]"}]}]}]}
0
/execute as @e[type=snowball] at @s if block ~ ~-1 ~ snow_block run setblock ~ ~-1 ~ air

in repeating command block will replace snow blocks under snowballs with air.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.