(Question): How would you make a tooltip hidden except for when you press shift/ctrl/alt? #163
-
Although I've not any knowledge of Java, the existence of these functions seems to indicate that this is possible. This would be incredibly useful for providing item info on-the-fly (I don't really like the JEI information approach; I feel it's not immediately obvious that you find info in JEI and for me it just looks ugly), but I can't figure out how to do this. Is it something to do with the unexplained
For that matter, what does the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
In order of your questions:
tooltip.addAdvanced('thermal:latex_bucket', (item, advanced, text) => {
if(tooltip.isShiftDown()) {
text.add(0, Text.of('Hello'))
}
})
Hope I could answer all of your questions ^^ |
Beta Was this translation helpful? Give feedback.
In order of your questions:
event.isShift()
etc. inside your tooltip handler, kind of like thisadvanced
stands for "advanced tooltips", i.e. whether the user has F3+H activateditem
is the item stack itself, so you can for example get the item's nbt and such for the tooltip as wellHope I could answer all of your questions ^^