Ok. I answer on both questions and if you do not understand that i can explain that in my stream today^^"
first blub01:
That way you explained it would might work but then you could place a wall in the middle of nowhere and place a little bit of water next to it and you have the same result. So trixing out the dam would be relative easily. Also you always then have to go a pattern. If that does not fit into the World/Looks not nice then the player sucks...
The problem which you did not understand a damm can be modular. The detection of the blocks is not the problem. The problem is to detect how the damm/dam is build. Ok you could place a wall and then you have it but if you want to look it nice or not a straight wall it is no longer possible. Because the pattern does no longer match.
I hope you understand that part at least. And i agree your way would work but it is way to easy to trix it ok. You can easily change the surface of a world and and and.
Now to spawnX:
Quick answer: Compact Watermills or Advanced Generators Ocean generator does that. (Without the weather effect).
Long answer:
Yeah i like that idea also but that again is easy to trix out too. Because you can build easily a cage with that inside. I think even with my idea it would not prevent that trick.
There is two ways to find out how much of an area has water:
First: A area which you check: xyz radius and you check every block in it (even if they are not connectey to the actual block) and search for your block.
And the second idea is the spreading system:
You search for the blocks that soround the core block. If they match the block you search for the blocks that soround him. And that over and over again until you found everything you searched for.
And with that you can detect only blocks that are the same and not blocks that are behind others
like this: (x= gold, y = cobble, z = core block)
you search for gold:
xxxz
xzxz
xxxz
zzzz
xxxz
you only find 8 out of the 11 gold blocks with that system so you can prevent trixing it out ^^" At least the basic tricks fall away^^"