How to NOT use an item in my off-hand
There is a question on this website on how to use an item in your off-hand. How to use an item in my off-hand?
Thanks for the explanation there.
My question however is how to NOT use this item. Running around in the dark with a lamp in my off-hand, sometimes the lamp is placed on right click, and I don't have a pickaxe or something to break it to retrieve it.
Is there a way to prevent off-hand items being placed when there is no right-click function or an empty right hand?
Solution 1:
Sorry but the only sure method is "just don't do it." Either make sure the object in your off-hand isn't easily used by right-clicking or don't right-click anywhere where it would result in using it.
For example, if you carry a lantern, whenever you right-click, aim at an invalid location, somewhere where your lantern won't attach - empty air, a wall block with no blocks underneath or above, a top of a non-full block on which it can't be placed. Remembering about doing so is quite tricky.
Solution 2:
I often have an arbitrary normal block in my offhand, like cobblestone, when I go mining or other things where I might have to pillar up or fill in spaces. Whenever I eat, I either stand at a wall and look at it or look at the ground or look in a direction where there's no block to target within my reach. That way you can't place it. This of course does not work with e.g. enderpearls.