Depending on the stage, dirt blocks may be replaced with wool, sand, or ice blocks. The only legal stage that uses a different block type is Yoshi's Story.
Steve can mine dirt on the legal stages Battlefield, Small Battlefield, Final Destination, Yoshi's Story (platforms).