Detecting the World Surface in any seed
Hi! I'm designing a data pack that spawns a structure at 0,0 but I want to make sure it won't spawn under water, underground or in a tree, how should I go about writing the commands for this? Right now I'm using an armor stand that falls from y200 and it detects if there's not air below it then spawns the structure. I'm not that happy with it because it often is too slow because of the fall time.
Any suggestions?