'Shift Tooltips' misleading if sneak key has been remapped
luke-bravenboer opened this issue ยท 3 comments
The documentation here describes the 'item.addShiftTooltip()' function that can add a tooltip to an item which should only show up specifically when holding "shift".
I was going to raise an issue saying that they don't appear at all, until I tried pressing my sneak key, which I've changed the keybinding for- and noticed they do indeed work, just not as expected if the sneak key has been remapped.
It would be more sensible if these 'shift tooltips' actually appeared when the shift key is held as advertised, rather than the sneak key. This is how Thermal Expansion's tooltips work, which is much more intuitive. As it stands, if I want to make players aware that these tooltips exist, I'd have to have a message that says "Hold Sneak for details", rather than "Hold Shift for details" (which is less sensible & less consistent with other mods).
(If you don't agree, perhaps consider deprecating & renaming the function instead? Or at least explaining this nuance in the documentation.)
Versions:
- Minecraft: 1.12.2
- Forge: 2705
- Crafttweaker: 1.12-4.1.8
Hardcoding the tooltip as Shift has its own issues, probably much the same reasons you aren't using Shift for Sneak. Unfortunately, if you made the "tooltip key" a keybind, it would naturally conflict with the usual Sneak binding. :-(
I don't have a strong opinion whether it should be hardcoded as Shift or (as now) tagged onto the Sneak function, but regardless it should be a mindful (and documented) choice. At the moment, I can't think of a third option.
For full transparency, I went into COFH Core and looked at what they do for shift tool tips, and did that.
Using shift for extra info has been around for ages, long enough that if anyone had a serious issue with it, there would be a solution to it...
The reason I'm not using shift for sneak is simply because I prefer sprint to be on shift. Quite unrelated to this :) (And as jared said, if there were actually problems with hard-coding shift as the tooltip modifier, it wouldn't be such a standard amongst other mods!)
Thanks for implementing this change so quickly, I've got some scripts to tweak!