Could there be a way to prevent inserters taking items out of a particular entity? Ideally, it should be writable.
This is probably the simplest workaround to detect when an item is crafted, before an inserter can remove it. Otherwise, the inserter might remove the item before the Lua ontick event runs.
Block inserter extraction
Re: Block inserter extraction
I added a prototype flag for 0.17.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.