Sharpness enchantment.level.20 => Sharpness 20/XX
Without the patch:

With the patch:

These stub mods should be loaded with LangPatch itself.
This mod supports a limited configuration of enchantment level and potion effect level formatting through language files.
enchantment.level.x & potion.potency.x:
Modify the templates for enchantment levels and potion effect levels, respectively.
"%s"langpatch.conf.enchantment.default.type & langpatch.conf.potion.default.type:
Modify the format of enchantment levels and potion effect levels, respectively.
| Value | Format | Example |
|---|---|---|
simplified, chinese, zh_normal |
Lowercase Chinese numerals | 一百二十三 |
traditional, zh_upper |
Uppercase Chinese numerals (traditional) | 壹佰貳拾叄 |
numeral, number, numeric, arabic, default |
Arabic numerals (default) | 123 |
roman |
Roman numerals | CXXIII |
skip, ignore |
No change (e.g., for only replacing other text) | — |
langpatch.conf.enchantment.override & langpatch.conf.potion.override:
Whether to override existing translations. Acceptable values are "true" or "false".
"true", existing translations will be replaced. See the implementation of the "pure arabic numeral" pack above.LangPatch, as is named, allows developers to make dynamic changes to in-game translations without directly modifying lang files.
To introduce LangPatch API as a dependency:
repositories {
// Our new maven
maven { url 'https://mvn.7c7.icu' }
}
dependencies {
compileOnly "xland.mcmod:enchlevel-langpatch:3.1.0"
}
Online javadoc can be found here.
Conversation