Code: Select all
-- Turn hanging sand into sandstone
default.register_decoration(
{
deco_type = "simple",
place_on = {"default:sand"},
sidelen = 16,
fill_ratio = 11.0,
decoration = {"default:sandstone"},
y_min = -31000,
y_max = 31000,
place_offset_y = -1,
flags = "all_ceilings,force_placement",
})
The sidelen I chose is arbitrary, I don't know which value would be the best (for performance).
This works surprisingly well. I don't know how good the performance of this is (no idea how to benchmark decorations).
Note that not all games would want this, of course. Some games don't consider the "floating sand" a problem, and some might even embrace it. In that case, you can ignore my trick. ;-)