is_transparent returns 1 for every unknown block because that's an easy way to make them ignore lighting, however, this makes cave render useless with a map containing unknown ores. The definition is_known_transparent checks whether a block is transparent and is known. This is a workaround, a proper fix would be to have unknown blocks be neither transparent nor solid. Or make them both. But don't prefer one of the two.