#JEI Item Lore / Tooltip / Descriptions

15 messages · Page 1 of 1 (latest)

proven barn
#

I have a custom item made with KubeJS and want to give it a description (item lore) in JEI that will show when hovering over it

If possible, I'd also like to be able to make multiple variations of the item show up with different nbt lore in JEI

I've been unsuccessful on both accounts and have had issues reloading JEI- the wiki would suggest I just need to F3+T yet that doesn't work usually for me, sometimes a combo of that and or reloading/rejoining world will work, but I'm sticking to a full restart for my sanity as at least that is about as much of a guarantee I can get, even if it takes an age (I've been struggling for nearly 3h to get this to work now 🥲 )

rare novaBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

proven barn
#

fairly sure that none of these have worked

JEIEvents.information(event => {
     event.addItem('kubejs:incomplete_ammo', ['Line 1', 'Line 2'])
     event.addItem('kubejs:incomplete_ammo', {display:{Lore:['{"text":"Ammo: 2a","color":"gray","italic":false}']}} )
     event.addItem('kubejs:incomplete_ammo', `{display:{Lore:['{"text":"Ammo: 2b","color":"gray","italic":false}']}}` )
  })

JEIEvents.addItems(event => {
 event.add(Item.of('kubejs:incomplete_ammo', {display:{Lore:['{"text":"Ammo: 1a","color":"gray","italic":false}']}} ))
    event.add(Item.of('kubejs:incomplete_ammo', `{display:{Lore:['{"text":"Ammo: 1b","color":"gray","italic":false}']}}` ))
});```
haughty pollen
#

I added this in the item registry itself, by putting .tooltip in the item

#

For colors and stuff, you can put the color code, same as the .displayName showed above

#

theres a site with everything you need about color codes and text formating

#

@proven barn

proven barn
#

Sort of like how enchanted books or potions are the same item with dif nbt in Jei, is it not possible to do the same with item lore?

proven barn
#

through extensive testing I'm noticing that JEI allows me to add items with custom names but not custom descriptions, likely needs name to differ for a variant to display else it writes it off as already existing

#

also client scripts (for JEI) seem to need f3+t and then /reload both to work

#

sweet, that worked