A mod to add tooltip and jei information to items with a datapack
You can find examples below, the same examples are available in the example_datapack
folder.
NBT filtering only works for tooltips, in JEI the item only uses that data to show.
The json text can for example be generated with the help of minecraftjson.com or minecraft.tools
{
"items": [
"minecraft:diamond",
{
"item": "minecraft:coal",
"nbt": {
"display": {
"Name": "{\"text\":\"Compact Coal\"}"
}
}
}
],
"tooltips": [
{"text":"This ", "extra": [{"text":"is an","underlined":true},{"text":" Example ","color":"green"},{"text":"Tooltip","bold":true,"color":"green"}]},
["",{"text":"This "},{"text":"is another ","italic":true,"color":"red"},{"text":"way to ","strikethrough":true},{"keybind":"key.attack"},{"text":" do it","bold":true,"underlined":true,"color":"dark_green"}],
{"translate":"item.minecraft.diamond","bold":true},
"No special style also works",
"§4Legacy coloring §aalso works"
]
}
{
"items": [
"minecraft:diamond",
{
"item": "minecraft:coal",
"nbt": {
"display": {
"Name": "{\"text\":\"Compact Coal\"}"
}
}
}
],
"infos": [
{"text":"This ", "extra": [{"text":"is an","underlined":true},{"text":" Example ","color":"green"},{"text":"Tooltip","bold":true,"color":"green"}]},
["",{"text":"This "},{"text":"is another ","italic":true,"color":"red"},{"text":"way to ","strikethrough":true},{"keybind":"key.attack"},{"text":" do it","bold":true,"underlined":true,"color":"dark_green"}],
{"translate":"item.minecraft.diamond","bold":true},
"No special style also works",
"§4Legacy coloring §aalso works"
]
}