@ Mythran
in the entity's properties window, you have a list of flags
such as transparent, nofog, nofilter etc.
you also have a flag called "polygon".
If you click this flag for static entities, they will behave 'as blocks do'.
I don't know if this is what you want, could be a misunderstanding,
but it involves no programming. just a single flag

it is actually the same as some users already said