I'm helping out a friend with a mining mod not all that different from Red_Guy's. Both servers use an incredibly inefficient system for bombs, which basically clears out a hollow sphere in a given radius of 4x4 blocks. They all repeatedly clear out the bricks around the area in a larger and larger radius until you're left with a hollow sphere. This takes 4n3 brick placements and deletions.
Instead of doing that, the only logical way of doing it is to first clear out all of the bricks in the blast radius and then construct the hollow sphere all as one, which would only take 12n2 operations, a significant improvement.
Is there any way to construct the sphere of what would be 4x4 cubes, without having to rely on O(n3) loops or algorithms?