Stat getter

A stat getter representation, used by statbars and holosphere sorting to extract different types of stats for a module, improvement or an an entire item. Doesn't take care of the actual display of the stat.

Sum stat getter

A stat getter that sums the values of the stats in the given array.

Format:
typetetra:sum
stats
array[
Stat getter
]

Stats from all getters in this array will be summed.

offsetoptionalnumber

Can be set to offset the sum by some amount. Only added to the final sum if the sum is not 0.

Multiply stat getter

A stat getter that multiplies the values of the stats in the given array.

Format:
typetetra:multiply
stats
array[
Stat getter
]

Stats from all getters in this array will be multiplied.

factoroptionalnumber

Can be set to multiply the product by a fixed amount.

And stat getter

A stat getter that "should show" when all given stat getters also "should show". Typically used in boolean cases, like when determining if an indicator should show. Returns 1 if shown, otherwise 0.

Format:
typetetra:and
stats
array[
Stat getter
]

All getters in this should show for the parent getter to show.

Or stat getter

A stat getter that "should show" if any of the given stat getters "should show". Typically used in boolean cases, like when determining if an indicator should show. Returns 1 if shown, otherwise 0.

Format:
typetetra:or
stats
array[
Stat getter
]

If any of the getters in this array shows then the parent will show as well.

Attribute stat getter

A stat getter that returns the value of the given attribute.

Format:
typetetra:attribute
attributestring

Identifier for an attribute to get the value of. A list of vanilla attributes can be found here: https://minecraft.wiki/w/Attribute, tetra attributes can be found on the tetra wiki.

ignoreBaseoptionalboolean

Set to true to ignore the base value of the attribute. Many vanilla attributes has a base value, e.g. attack damage has a base value of 2.0. This flag is good to set for showing attributes for a part of an item, like in the holosphere.

ignoreBonusesoptionalboolean

Set to true to ignore bonuses from item effects, e.g. the speed bonus from the counterweight effect.

Effect level stat getter

A stat getter that returns level of the given effect.

Format:
typetetra:effect_level
effectstring

Identifier for the item effect to get the level of.

Effect efficiency stat getter

A stat getter that returns efficiency of the given effect.

Format:
typetetra:effect_efficiency
effectstring

Identifier for the item effect to get the efficiency of.

Enchantment stat getter

A stat getter that returns the level of the given enchantment

Format:
typetetra:enchantment
enchantmentResource location

Identifier for the enchantment to get the level of. A full list of enchantments can be found here: https://minecraft.wiki/w/Enchanting#Summary_of_enchantments (click the enchantments in the list to see it's identifier).