local traps = {
   {'desertsandstonebrick', 'Trap Desert Sandstone Brick', 'default_desert_sandstone_brick.png', 'default:desert_sandstone_brick'},
   {'sandstonebrick', 'Trap Sandstone Brick', 'default_sandstone_brick.png', 'default:sandstonebrick'},
   {'stonebrick', 'Trap Stone Brick', 'default_stone_brick.png', 'default:stonebrick'},
   {'cobble', 'Trap Cobblestone', 'default_cobble.png', 'default:cobble'},
   {'mossycobble', 'Trap Mossy Cobblestone', 'default_mossycobble.png', 'default:mossycobble'},
   {'ice', 'Trap Ice', 'default_ice.png', 'default:ice'}
}

for i in ipairs (traps) do
   local name = traps[i][1]
   local desc = traps[i][2]
   local text = traps[i][3]
   local reci = traps[i][4]

   minetest.register_node('epic:'..name, {
      description = desc,
      drawtype = 'glasslike_framed',
      tiles = {text},
      walkable = false,
      groups = {cracky = 2, traps=1},
      paramtype = 'light',
   })

   minetest.register_craft({
      output = 'epic:'..name,
      recipe = {{'default:mese_crystal_fragment', reci}}
   })

end
