Since such a printer is incapable of determining whether or not this gcode represents a legislatively-restricted item and then blocking its production, then that machine becomes illegal to sell in New York. Easy-peasy. It just takes a quick vote or two and the stroke of a pen, and it is done.
You're probably thinking something like "But that doesn't work at all," and I agree. But sometimes legislators just don't care that they've thrown out the baby along with the bathwater.