diff --git a/src/main/java/noppes/npcs/attribute/ItemAttributeHelper.java b/src/main/java/noppes/npcs/attribute/ItemAttributeHelper.java index bebcf1ab6..97dbfc7ce 100644 --- a/src/main/java/noppes/npcs/attribute/ItemAttributeHelper.java +++ b/src/main/java/noppes/npcs/attribute/ItemAttributeHelper.java @@ -231,7 +231,7 @@ public class ItemAttributeHelper { double value = magicTag.getDouble(key); Magic magic = MagicController.getInstance().getMagic(magicId); if (magic != null) { - String magicDisplayName = magic.getDisplayName(); + String magicDisplayName = magic.getDisplayName() + " " + EnumChatFormatting.GRAY + getMagicAppendix(magicKey); // Format using the magic attribute's definition and the magic's display name. String line = formatAttributeLine(def, section, value, magicDisplayName); switch (section) { @@ -257,9 +257,22 @@ public class ItemAttributeHelper { } } + @SideOnly(Side.CLIENT) + private static String getMagicAppendix(String type){ + switch(type){ + case ModAttributes.MAGIC_DEFENSE_KEY: + return StatCollector.translateToLocal("rpgcore:attribute.defense"); + case ModAttributes.MAGIC_RESISTANCE_KEY: + return StatCollector.translateToLocal("rpgcore:attribute.resistance"); + default: + return StatCollector.translateToLocal("rpgcore:attribute.damage"); + } + } + /** * Returns a translated attribute name. */ + @SideOnly(Side.CLIENT) private static String getTranslatedAttributeName(String key, AttributeDefinition def) { String translation = null; if (key.contains(":")) { diff --git a/src/main/resources/assets/customnpcs/lang/en_US.lang b/src/main/resources/assets/customnpcs/lang/en_US.lang index 89cf51a8a..2e442b1aa 100644 --- a/src/main/resources/assets/customnpcs/lang/en_US.lang +++ b/src/main/resources/assets/customnpcs/lang/en_US.lang @@ -1332,4 +1332,7 @@ profile.individual=Individual rpgcore:tooltip=Hold %key% to view attributes rpgcore:attribute.damage=Damage -rpgcore:attribute.neutral=Neutral +rpgcore:attribute.defense=Defense +rpgcore:attribute.resistance=Resistance +rpgcore:attribute.neutral=Neutral Damage +