Tooltip getter

Defines how the tooltip of a stat bar should display.

Default tooltip getter

The standard definition of a tooltip. The number of stats, formatters, and placeholders in the tooltip body has to match or we're gonna have a bad time.

Format:
typetetra:default
keystring

This key is used to look up the localization entry for the tooltip body, typically the key for the stat suffixed with ".tooltip".

stats
array[
Stat getter
]

The stats to display in the tooltip. The order of these stats will be the order they are displayed in the tooltip.

formatters
array[
Stat formatter
]

Formatters for each to the stats listed above, should match the order of the stats.

Example:
{
  "type": "tetra:default",
  "key": "tetra.stats.attack_damage.tooltip",
  "stats": [
    {
      "type": "tetra:sum",
      "stats": [
        {
          "type": "tetra:attribute",
          "attribute": "generic.attack_damage"
        },
        {
          "type": "tetra:sum",
          "stats": [
            {
              "type": "tetra:multiply",
              "stats": [
                {
                  "type": "tetra:enchantment",
                  "enchantment": "minecraft:sharpness"
                }
              ],
              "factor": 0.5
            }
          ],
          "offset": 0.5
        }
      ],
      "attribute": "generic.attack_damage"
    }
  ],
  "formatters": [
    {
      "type": "tetra:basic",
      "format": "double_decimal"
    }
  ]
}