Local governments may not enact ordinances or regulations that may restrict or regulate normal agricultural practices within an agricultural preserve unless the restriction or regulation has a direct relationship to public health and safety. This section applies to the operation of vehicles and machinery for planting, maintaining, and harvesting crops and timber and for caring and feeding farm animals, to the type of farming, and to the design of farm structures, except for residences.