If you mine all the blocks that are stacked in a spot then once they're all gone put any block in that spot and you will get one of whatever that stack was. Example: Mine the whole stacked block of emerald. Place a cobblestone where it was. Mine that cobble. Get Emerald.