Cloth Config API (Fabric/Forge/NeoForge)

Cloth Config API (Fabric/Forge/NeoForge)

168M Downloads

Annotation to replace "Value: x" with custom translation keys for IntegerSliderEntry's

KingContaria opened this issue ยท 0 comments

commented

Hi,
I'd love for there to be some way to annotate an integer option so that it looks for a translation key for the current value to replace the default "Value: x" with.
For example:

@ConfigEntry.Slider.CustomValueTranslations
public int cooldown;

with this in the language file:

"text.autoconfig.modid.option.cooldown.@Slider.CustomValueTranslations.0": "OFF" 

would replace the "Value: 0" text on the slider with "OFF".

You could also use this to append more info like this:

"text.autoconfig.modid.option.cooldown.@Slider.CustomValueTranslations.1": "Value: 1 (Fastest)"