Better foreground block rendering

The performance of the foreground block rendering is better and light
blocks at the map borders were added