Replace old hardcoded spell book text with translation keys, fixes #368
This commit is contained in:
@@ -13,6 +13,7 @@ import net.minecraft.client.Minecraft;
|
|||||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
@@ -67,22 +68,18 @@ public class GuiSpellBook extends GuiScreen {
|
|||||||
0x777777);
|
0x777777);
|
||||||
}
|
}
|
||||||
|
|
||||||
//this.fontRenderer.drawString("-------------------", xPos + 17, yPos + 35, 0);
|
// Novice is usually white but this doesn't show up
|
||||||
|
String tier = I18n.format("gui.ebwizardry:spell_book.tier", spell.getTier() == Tier.NOVICE ?
|
||||||
|
"\u00A77" + spell.getTier().getDisplayName() : spell.getTier().getDisplayNameWithFormatting());
|
||||||
|
this.fontRenderer.drawString(tier, xPos + 17, yPos + 45, 0);
|
||||||
|
|
||||||
if(spell.getTier() == Tier.NOVICE){
|
String element = I18n.format("gui.ebwizardry:spell_book.tier", spell.getElement().getFormattingCode() + spell.getElement().getDisplayName());
|
||||||
// Novice is usually white but this doesn't show up.
|
if(!discovered) element = I18n.format("gui.ebwizardry:spell_book.tier_undiscovered");
|
||||||
this.fontRenderer.drawString("Tier: \u00A77" + Tier.NOVICE.getDisplayName(), xPos + 17, yPos + 45, 0);
|
|
||||||
}else{
|
|
||||||
this.fontRenderer.drawString("Tier: " + spell.getTier().getDisplayNameWithFormatting(), xPos + 17, yPos + 45, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
String element = "Element: " + spell.getElement().getFormattingCode() + spell.getElement().getDisplayName();
|
|
||||||
if(!discovered) element = "Element: ?";
|
|
||||||
this.fontRenderer.drawString(element, xPos + 17, yPos + 57, 0);
|
this.fontRenderer.drawString(element, xPos + 17, yPos + 57, 0);
|
||||||
|
|
||||||
String manaCost = "Mana Cost: " + spell.getCost();
|
String manaCost = I18n.format("gui.ebwizardry:spell_book.mana_cost", spell.getCost());
|
||||||
if(spell.isContinuous) manaCost = "Mana Cost: " + spell.getCost() + "/second";
|
if(spell.isContinuous) manaCost = I18n.format("gui.ebwizardry:spell_book.mana_cost_continuous", spell.getCost());
|
||||||
if(!discovered) manaCost = "Mana Cost: ?";
|
if(!discovered) manaCost = I18n.format("gui.ebwizardry:spell_book.mana_cost_undiscovered");
|
||||||
this.fontRenderer.drawString(manaCost, xPos + 17, yPos + 69, 0);
|
this.fontRenderer.drawString(manaCost, xPos + 17, yPos + 69, 0);
|
||||||
|
|
||||||
if(discovered){
|
if(discovered){
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#PARSE_ESCAPES
|
# PARSE_ESCAPES
|
||||||
tile.ebwizardry\:arcane_workbench.name=Arcane Workbench
|
tile.ebwizardry\:arcane_workbench.name=Arcane Workbench
|
||||||
tile.ebwizardry\:crystal_ore.name=Crystal Ore
|
tile.ebwizardry\:crystal_ore.name=Crystal Ore
|
||||||
tile.ebwizardry\:petrified_stone.name=Petrified Stone
|
tile.ebwizardry\:petrified_stone.name=Petrified Stone
|
||||||
@@ -498,6 +498,13 @@ advancement.ebwizardry\:enchant_scroll.desc=Craft a blank scroll and enchant it
|
|||||||
|
|
||||||
handbook.toast.title=New Handbook Section Unlocked!
|
handbook.toast.title=New Handbook Section Unlocked!
|
||||||
|
|
||||||
|
gui.ebwizardry\:spell_book.tier=Tier: %s
|
||||||
|
gui.ebwizardry\:spell_book.element=Element: %s
|
||||||
|
gui.ebwizardry\:spell_book.element_undiscovered=Element: ?
|
||||||
|
gui.ebwizardry\:spell_book.mana_cost=Mana Cost: %s
|
||||||
|
gui.ebwizardry\:spell_book.mana_cost_continuous=Mana Cost: %s/second
|
||||||
|
gui.ebwizardry\:spell_book.mana_cost_undiscovered=Mana Cost: ?
|
||||||
|
|
||||||
container.ebwizardry\:arcane_workbench=Arcane Workbench
|
container.ebwizardry\:arcane_workbench=Arcane Workbench
|
||||||
container.ebwizardry\:arcane_workbench.apply=Apply
|
container.ebwizardry\:arcane_workbench.apply=Apply
|
||||||
container.ebwizardry\:arcane_workbench.mana=Mana\:
|
container.ebwizardry\:arcane_workbench.mana=Mana\:
|
||||||
|
|||||||
@@ -498,6 +498,13 @@ advancement.ebwizardry\:enchant_scroll.desc=Craft a blank scroll and enchant it
|
|||||||
|
|
||||||
handbook.toast.title=New Handbook Section Unlocked!
|
handbook.toast.title=New Handbook Section Unlocked!
|
||||||
|
|
||||||
|
gui.ebwizardry\:spell_book.tier=Tier: %s
|
||||||
|
gui.ebwizardry\:spell_book.element=Element: %s
|
||||||
|
gui.ebwizardry\:spell_book.element_undiscovered=Element: ?
|
||||||
|
gui.ebwizardry\:spell_book.mana_cost=Mana Cost: %s
|
||||||
|
gui.ebwizardry\:spell_book.mana_cost_continuous=Mana Cost: %s/second
|
||||||
|
gui.ebwizardry\:spell_book.mana_cost_undiscovered=Mana Cost: ?
|
||||||
|
|
||||||
container.ebwizardry\:arcane_workbench=Arcane Workbench
|
container.ebwizardry\:arcane_workbench=Arcane Workbench
|
||||||
container.ebwizardry\:arcane_workbench.apply=Apply
|
container.ebwizardry\:arcane_workbench.apply=Apply
|
||||||
container.ebwizardry\:arcane_workbench.mana=Mana\:
|
container.ebwizardry\:arcane_workbench.mana=Mana\:
|
||||||
|
|||||||
Reference in New Issue
Block a user