For no reason whatsoever, I decided to make a pig spawner farm. A very simple design and no tutorial needed. A transparent block should be used above the pistons where the grass gets retracted to keep it grass. There may be other small possible optimizations, but from what I can tell this is at least better than the rest. This will work as far back as 1.7 when string could float freely (no support). Blah, blah, blah, build/use/alter as you want.
Example of generating: youtu.be/cVvB53sWETg
![](https://s2.save4k.ru/pic/3KqSE-KGS1M/maxresdefault.jpg)