~Are there any negative effects by adding this?
I think there are. Imagine that you went to mid to grab a lot of diamonds or gold or whatever to upgrade your generators with but someone follows you all the way to your island to kill you and he starts hitting you a lot and you know that you wont survive it without a golden apple, you're close to the moment you die with, for example, food in your hand and you want to upgrade the generator close before you die. Adding the feature not to be abled to open up the gen would cause that you're not abled to upgrade your generator before you died. Or imagine the moment you're running to the villager to buy some golden apples fast so you can survive the fight. But you have steak or any other item in your hand that moment so you're not abled to open the store and you die aswell.
This is why I said:
"It should be choosable what and when It should be disabled".
Not every person will be happy about this change, and many people will instead enjoy it, as usual. The thing could happen with bow, with food, with every item that needs to be triggered by right click of mouse, so there are a list of potentially "dangerous" items.
You're right, I won't mention them all, because if the block will be on EVERY single item, this kind of situation with "last upgrade" will not stand and many of players could feel frustraded. And this is why I specifically asked only for the FOOD items, since they're the most used by right-clicking them.
Want add bow? Some wands from SkyWars? I think it's not a problem, but it will became challenging to balance what and when. Ideally, I imagine that on every game I can check what should and what shouldn't trigger the generator, but I know this will put too much effort to implement rules and settings.
For me, the best general choice is one: food doesn't trigger it, and I'm able to check if I want this option or not. It will be cool to choose if I want not to trigger generators, villagers or BOTH.
I could accept also bow and wands. Other types of things could really mess up the game.
PS: when holding, I mean not only with your right hand, but also with the LEFT one (like sword + golden apple combo) In this case, when holding the Golden Apple on my LEFT arm and fighting with the RIGHT one, neither generators (nor villagers, if choosen) should be triggered: I'm in the "READY TO COMBAT" state. When I need to interact, SHIFT + CLICK should be the shortcut... And when I'm writing my thoughts right now, it will be cool instead of having "automatic switch" a manual one: I'm DECLARING that when in the "READY TO COMBAT" state, I don't want to trigger generators nor villagers. Like a SHIFT + F keyboard combination. Applying a fake effect, it should be possible to activate or deactivate it.