Fix tooltip details

This commit is contained in:
Sollace 2024-05-23 17:36:57 +01:00
parent 1ecb28e511
commit 14084e270b
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB
2 changed files with 3 additions and 3 deletions

View file

@ -51,9 +51,9 @@ public interface EffectUtils {
}
static Text formatModifierChange(String modifierName, float change, boolean isDetrimental) {
return Text.translatable("attribute.modifier." + (change > 0 ? "plus" : "take") + ".addition",
return Text.literal(" ").append(Text.translatable("attribute.modifier." + (change > 0 ? "plus" : "take") + ".0",
ItemStack.MODIFIER_FORMAT.format(Math.abs(change)),
Text.translatable(modifierName)
).formatted((isDetrimental ? change : -change) < 0 ? Formatting.DARK_GREEN : Formatting.RED);
).formatted((isDetrimental ? change : -change) < 0 ? Formatting.DARK_GREEN : Formatting.RED));
}
}

View file

@ -737,7 +737,7 @@
"affinity.unicopia.bad": "Bad",
"affinity.unicopia.neutral": "Neutral",
"affinity.unicopia.when_cast": "When Cast:",
"affinity.unicopia.corruption": " %s%.2f Corruption",
"affinity.unicopia.corruption": "Corruption",
"gui.unicopia.trait.label": "Element of %s",
"gui.unicopia.trait.group": "\n %s",