Wiki 9Minecraft Wiki 9Minecraft

Add Conditional Tooltip Lines Based on Game State

Java EditionModGuides 4FAQ 10Related mods 48
DownloadData Tip Mod

Get the files on 9Minecraft

Contents (3)
  1. Use Conditions to Show Context-Specific Text
  2. Available Conditions
  3. Test in Different Locations

Use Conditions to Show Context-Specific Text

Display different tooltip content depending on where you are or what's happening:

`json

{

"match": "minecraft:golden_apple",

"lines": [

{

"text": "Golden Apple"

},

{

"text": "Restores health in Nether",

"condition": {

"type": "dimension",

"value": "minecraft:the_nether"

}

},

{

"text": "Less effective here",

"condition": {

"type": "biome",

"value": "minecraft:desert"

}

}

]

}

`

Available Conditions

Common condition types include dimension, biome, weather, player hunger level, and NBT data matching. Lines only appear when their condition is true.

Test in Different Locations

Reload your resource pack. Travel to different dimensions and biomes, then hover over the item to see the conditional text appear and disappear based on your current game state.

More guides for this mod