Add generalised roman numerals for player levels

This commit is contained in:
Sollace 2023-05-21 13:52:09 +01:00
parent 79b5fbc8dd
commit f6bca2bfa3
3 changed files with 4 additions and 1 deletions

View file

@ -61,6 +61,9 @@ dependencies {
modApi "com.sollace:fabwork:${project.fabwork_version}"
include "com.sollace:fabwork:${project.fabwork_version}"
compileOnly files('lib/Romanizer-1.0.0.jar')
include files('lib/Romanizer-1.0.0.jar')
modCompileOnly "com.terraformersmc:modmenu:${project.modmenu_version}"
modCompileOnly "dev.emi:trinkets:${project.trinkets_version}"

BIN
lib/Romanizer-1.0.0.jar Normal file

Binary file not shown.

View file

@ -143,7 +143,7 @@ public class SpellbookProfilePageContent extends DrawableHelper implements Spell
font.draw(matrices, "Mana", -font.getWidth("Mana") / 2, y, SpellbookScreen.TITLE_COLOR);
font.draw(matrices, manaString, -font.getWidth(manaString) / 2, y += font.fontHeight, SpellbookScreen.TITLE_COLOR);
Text levelString = I18n.hasTranslation("enchantment.level." + (currentLevel + 1)) ? Text.translatable("enchantment.level." + (currentLevel + 1)) : Text.literal(currentLevel >= 999 ? ">999" : "" + (currentLevel + 1));
Text levelString = Text.literal(Romanizer.romanize(currentLevel + 1));
matrices.translate(-font.getWidth(levelString), -35, 0);
matrices.scale(2F, 2F, 1);