For Fabric (and maybe Forge in the future)
Note for Fabric users: This mod requires the Fabric API
Issue Tracker
Dedicated Interaction Key creates a new key binding for interacting with blocks/mobs so right-clicking doesn't do too many things. By default, the new interaction key is set to 'R', but it may be configured via the controls settings in the options menu.
In regular non-modded Minecraft, right-clicking does multiple things depending on what you're aiming at:
A. Interact with a mob (e.g. trading with villagers, riding horses, etc.)
B. Interact with a block (e.g. opening chests, sleeping on a bed, etc.)
C. Use your held item (e.g. eating an apple, placing a block down, etc.)
What DIK does is move A and B to a new "interaction key" so that right-clicking only does C. This can help with avoiding accidental usage of blocks or mobs (e.g. opening a chest when you meant to eat food you're holding).
Will DIK work if I join a server without DIK? Will DIK on a server work for clients without DIK?
Server w/ DIK + client w/ DIK = DIK will work normally
Server w/ DIK + client w/o DIK = The client will not be affected and can play normally
Server w/o DIK + client w/ DIK = DIK will automatically be disabled on the client. Both the interaction key and the right mouse button will revert to non-modded Minecraft behavior.
Why does right-clicking on cows/pigs/etc. with wheat/carrots/etc. not feed them?
If you've read DIK's description above, you might think feeding animals falls under C (using your held item), but Minecraft actually considers it to be A (interacting with a mob). Meaning you'll need to use the new interaction key to feed animals.
What Minecraft considers to be "interacting with a mob" and "using a held item" can differ depending on the item you're using (it's just how Minecraft is programmed).
Without DIK (Vanilla)
With DIK