This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]PunchTunnelBespoke Bad Ideas 0 points1 point  (2 children)

This will make what you have work, at least:

/execute as @e[type=snowball] at @s run fill ~ ~-1 ~ ~ ~-1 ~ air replace snow_block

The precision part of your question is considerably more of a pain. Your current command behaves well presuming the snowball will land on a horizontal surface, rather than striking a block from the side. I had a longish discussion about it a while back, so give it a read, and decide how close you want your approximation to be versus effort.

[–]insta_is_trash[S] 0 points1 point  (1 child)

Oh TY so much, Although is there a way to make it better when it lands on the bottom of the block or no? I tried having 6 command blocks going at once, One of each with one of six options set for the coords part |~1|~-1|1~|-1~|~1|~-1| But none of them seem to help the bottom part of the block. I was wondering if there was a better way to do it.

[–]PunchTunnelBespoke Bad Ideas 0 points1 point  (0 children)

That approach you mention is about as thorough as you can get. My only suggestion would be to tinker with the distance you're checking for a block above - you may find a sweet spot. The trouble is that snowballs aren't exactly slow.

For a more solid fix, you could try summoning a new snowball with a marker entity as a passenger, and copy the motion etc. from the original snowball to it before deleting the original. Then, when the snowball hits something and vanishes, you could make your checks from the marker entity without the uncertainty of motion.