In California, peace officers can no longer sleep with prison inmates. In Kentucky, feral hogs can’t return to the wild. And in Illinois, culinary students can legally drink alcohol -- but only if they agree to spit it out.

State legislatures enacted more than 29,000 laws in 2012, and 400 of them went into effect at the stroke of midnight on Jan. 1, according to the National Conference of State Legislatures. From the outside at least, many of the news laws look pretty weird.

They all have their back stories, of course. Take that Illinois drinking law, catchily dubbed “Academic Sip and Spit.” State colleges and culinary schools pushed hard for the law, which allows students aged 18 to 21 to taste (but not swallow) drinks during class, according to the State Journal-Register. They say it will make Illinois’ culinary programs more competitive with those in states like California and New York -- the bill was even signed at Chicago’s Kendall College, which boasts large hospitality and culinary programs.

Other unusual laws that appeared on the books this New Year's:

Of course, these hardly compare to some of the strange laws that took effect last New Year's: Utah controversially outlawed happy hours, and Illinois made it legal for bikers and motorcyclists to roll through red lights.