Minecraft wiki entry for Magma_Block, associated text: Mobs avoid magma blocks that are in the way. Most mobs do not spawn on magma blocks (exceptions are magma cubes, zombified piglin, ghasts, and squid).