The block blacklist does a good job of preventing the server from getting stuck in BFS, but modded blocks could cause runaways. (This happened in a server I help run - a ship was connected to a seafloor made of salt blocks by another mods Kelp. Attempting to assemble the ship without removing the kelp crashed the server)
This PR adds a maxShipBlocks config value, which allows the BFS function to quit if there are too many blocks, preventing a server crash/slowdown.
I'm not sure what a good default value should be - right now, it's 64^3. As is, the limit is just number-of-blocks, but it could be modified to limit the bounding box instead (keep track of the farthest blocks found in BFS, and limit with that instead)
The block blacklist does a good job of preventing the server from getting stuck in BFS, but modded blocks could cause runaways. (This happened in a server I help run - a ship was connected to a seafloor made of salt blocks by another mods Kelp. Attempting to assemble the ship without removing the kelp crashed the server)
This PR adds a maxShipBlocks config value, which allows the BFS function to quit if there are too many blocks, preventing a server crash/slowdown.
I'm not sure what a good default value should be - right now, it's 64^3. As is, the limit is just number-of-blocks, but it could be modified to limit the bounding box instead (keep track of the farthest blocks found in BFS, and limit with that instead)