diff --git a/src/main/java/electroblob/wizardry/CommonProxy.java b/src/main/java/electroblob/wizardry/CommonProxy.java index d01c6a9b..36178e21 100644 --- a/src/main/java/electroblob/wizardry/CommonProxy.java +++ b/src/main/java/electroblob/wizardry/CommonProxy.java @@ -100,9 +100,9 @@ public class CommonProxy { return ((ItemSpectralBow)WizardryItems.spectral_bow).getDefaultDurabilityForDisplay(stack); } - /** Like {@link CommonProxy#addMultiLineDescription(List, String, Style)}, but style defaults to light grey. */ - public void addMultiLineDescription(List tooltip, String key){ - this.addMultiLineDescription(tooltip, key, new Style().setColor(TextFormatting.GRAY)); + /** Like {@link CommonProxy#addMultiLineDescription(List, String, Style, Object...)}, but style defaults to light grey. */ + public void addMultiLineDescription(List tooltip, String key, Object... args){ + this.addMultiLineDescription(tooltip, key, new Style().setColor(TextFormatting.GRAY), args); } /** @@ -113,7 +113,7 @@ public class CommonProxy { * @param key The translation key for the description * @param style A style to apply */ - public void addMultiLineDescription(List tooltip, String key, Style style){} + public void addMultiLineDescription(List tooltip, String key, Style style, Object... args){} // SECTION Packet Handlers // =============================================================================================================== diff --git a/src/main/java/electroblob/wizardry/client/ClientProxy.java b/src/main/java/electroblob/wizardry/client/ClientProxy.java index 40b7b180..c2527b74 100644 --- a/src/main/java/electroblob/wizardry/client/ClientProxy.java +++ b/src/main/java/electroblob/wizardry/client/ClientProxy.java @@ -107,7 +107,7 @@ public class ClientProxy extends CommonProxy { // Armour Model public static final ModelBiped WIZARD_ARMOUR_MODEL = new ModelWizardArmour(0.75f); - /** The wrap width for standard multi-line descriptions (see {@link ClientProxy#addMultiLineDescription(List, String, Style)}). */ + /** The wrap width for standard multi-line descriptions (see {@link ClientProxy#addMultiLineDescription(List, String, Style, Object...)}). */ private static final int TOOLTIP_WRAP_WIDTH = 140; // SECTION Registry @@ -287,8 +287,8 @@ public class ClientProxy extends CommonProxy { } @Override - public void addMultiLineDescription(List tooltip, String key, Style style){ - String description = style.getFormattingCode() + I18n.format(key); + public void addMultiLineDescription(List tooltip, String key, Style style, Object... args){ + String description = style.getFormattingCode() + I18n.format(key, args); tooltip.addAll(Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(description, TOOLTIP_WRAP_WIDTH)); } diff --git a/src/main/java/electroblob/wizardry/item/ItemArcaneTome.java b/src/main/java/electroblob/wizardry/item/ItemArcaneTome.java index 3e40abd8..c710e5d0 100644 --- a/src/main/java/electroblob/wizardry/item/ItemArcaneTome.java +++ b/src/main/java/electroblob/wizardry/item/ItemArcaneTome.java @@ -61,11 +61,10 @@ public class ItemArcaneTome extends Item { Tier tier = Tier.values()[stack.getItemDamage()]; Tier tier2 = Tier.values()[stack.getItemDamage() - 1]; + tooltip.add(tier.getDisplayNameWithFormatting()); - tooltip.add("\u00A77" + net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":arcane_tome.desc1", - tier2.getDisplayNameWithFormatting())); - tooltip.add("\u00A77" + net.minecraft.client.resources.I18n.format("item." + Wizardry.MODID + ":arcane_tome.desc2", - tier.getDisplayNameWithFormatting() + "\u00A77")); + Wizardry.proxy.addMultiLineDescription(tooltip, "item." + this.getRegistryName() + ".desc", + tier2.getDisplayNameWithFormatting() + "\u00A77", tier.getDisplayNameWithFormatting() + "\u00A77"); } } diff --git a/src/main/resources/assets/ebwizardry/lang/en_gb.lang b/src/main/resources/assets/ebwizardry/lang/en_gb.lang index 271d5662..be772016 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_gb.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_gb.lang @@ -44,8 +44,7 @@ item.ebwizardry\:spell_book.name=Spell Book item.ebwizardry\:spell_book.apply_to_wizard=Replaced %1$s's spell %2$s with %3$s item.ebwizardry\:arcane_tome.name=Tome of Arcana -item.ebwizardry\:arcane_tome.desc1=Upgrades any %1$s -item.ebwizardry\:arcane_tome.desc2=wand to %1$s tier +item.ebwizardry\:arcane_tome.desc=Upgrades any %1$s wand with sufficient progression to %2$s tier item.ebwizardry\:wizard_handbook.name=The Wizard's Handbook item.ebwizardry\:wizard_handbook.desc=by %1$s diff --git a/src/main/resources/assets/ebwizardry/lang/en_us.lang b/src/main/resources/assets/ebwizardry/lang/en_us.lang index cd320381..3bee6703 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_us.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_us.lang @@ -44,8 +44,7 @@ item.ebwizardry\:spell_book.name=Spell Book item.ebwizardry\:spell_book.apply_to_wizard=Replaced %1$s's spell %2$s with %3$s item.ebwizardry\:arcane_tome.name=Tome of Arcana -item.ebwizardry\:arcane_tome.desc1=Upgrades any %1$s -item.ebwizardry\:arcane_tome.desc2=wand to %1$s tier +item.ebwizardry\:arcane_tome.desc=Upgrades any %1$s wand with sufficient progression to %2$s tier item.ebwizardry\:wizard_handbook.name=The Wizard's Handbook item.ebwizardry\:wizard_handbook.desc=by %1$s