A man has been given a community order after police discovered a huge cache of weapons at his Yorkshire home.