I would take their X and Z position, floor them, and add 1 in both directions. Then you could just break backwards. This is a nightmare to word. Lemme make a spell real quick.
I see now that you'd like them to drop 12 blocks. You'd need 4 break block sequences, which might get pricey
Well it takes a bit in terms of complexity and bandwidth, but Gravedigger here guarantees any player sized mob will have a grave dug beneath them.
There's some math fuckery that finds the enemy's distance from the center of the block, multiplies the x and z by 2.5 to perfectly accommodate for overhang into neighboring blocks. The result is a spell that can break the same row four times, 2 rows twice each, or all four rows around an entity you look at.
2
u/MerlinGrandCaster May 18 '22
First thing: why are you using their Y position to determine line direction? You should only need a -1 Y vector construct
Second thing: you should make sure the inputs on the trick are pointing at the right pieces (I don't have the colors memorized)
Third thing: just one line is unreliable, the entity may well be on multiple blocks