SpoutDev/Spout — pull request #1909 by DDoSQc (2012-06-07 16:27:34+00:00)
Title: Prevent cascading populators...

...which would cause 100% RAM and CPU usage (and often server crashes and "out of heap space exceptions").

This would happen when a populator/decorator would overflow on another chunk (think of a tree, on the edge of a chunk, some leaves could end up on the neighboring chunk), and cause this chunk to be loaded and populated, and possibly overflowing too, causing an infinite chain.

This PR adds an observer check before unforced population, making sure the chunk is being observed, so that cascading will stop when players can't see the to-be-populated chunks anymore.

Also, some random formatting, which I have no idea where it came from... The actual change is at line 823.

Signed-off-by: Aleksi Sapon