An inferno that destroyed or damaged nearly two dozen buildings in a city in upstate New York was sparked by an amateur bladesmith who apparently was trying to imitate something he saw on TV, officials said.