item/block tooltips?
ElectroBot opened this issue ยท 5 comments
Any way we could add tooltips to items/blocks? Would be quite useful if a recipe were disable, but attainable another way?
Apologies for the late reply. I guess I don't understand why chat component is being requested in relation to NEI/JEI/REI as I'm pretty sure you could just use the lore to show whatever text you wanted onto an item. (See the lore in advanced recipes) I may still be misunderstanding the ask though as I don't have a modded server that can also run plugins, so I have no way to verify the behavior of those mods.
If you're just looking to add lore to an item, then all you need to do is add the following to the item:
@lore <red>Banned Item
If you need more specific help, please feel free to stop by discord and I'd be more than willing to help debug any issues or configure recipes.
The text "This is a great sword!"
https://www.spigotmc.org/threads/tut-item-tooltips-with-the-chatcomponent-api.65964/
Thanks
I'm not quite sure I understand the ask here. Can you be more specific or perhaps provide an example of what you're looking for?
I do need to revisit the chatcomponent api, but I'm not sure how you'd want this to work. The chat component api is for for chat messages to allow hover/links/etc. The only real usage of this within RecipeManager would be through the @message
flag. Is that what you were thinking of or did you have another use case in mind?
I only used that as an example citing the picture (did a few google searches and that one came up frequently).
The actual use case that I would think would be useable to myself and others would be to see the tooltip in NEI/JEI/REI/etc. under the item name (like below) and on the item if the player had it or was hovering over it in a inventory. This would be quite useful for server admins to have "This item is banned" (as a reason why not craftable) or "This item can be purchased from shop".
If this is already doable with another plugin (I couldn't find one after a bit of searching) then the name would be appreciated.