mirror of
https://github.com/GTNewHorizons/Hardcore-Ender-Expansion.git
synced 2026-10-25 20:22:31 +00:00
Add localization for Compendium titles and point amount(optional) (#36)
This commit is contained in:
1 parent
6360fe137d
commit
8b478caef3
4 files changed
+16
-3
No files matched your search
@@ -15,6 +15,7 @@ import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -547,8 +548,8 @@ public class GuiEnderCompendium extends GuiScreen implements ITooltipRenderer {
|
||||
drawTexturedModalRect(d - 16, height - d - 8, 0, 25, 24, 24);
|
||||
drawTexturedModalRect(width - d - 8, height - d - 8, 25, 25, 24, 24);
|
||||
|
||||
String title = ModCommonProxy.hardcoreEnderbacon ? "Hardcore Bacon Expansion - Bacon Compendium"
|
||||
: "Hardcore Ender Expansion - Ender Compendium";
|
||||
String title = ModCommonProxy.hardcoreEnderbacon ? I18n.format("ec.title.main.bacon")
|
||||
: I18n.format("ec.title.main");
|
||||
fontRendererObj.drawString(title, (width >> 1) - (fontRendererObj.getStringWidth(title) >> 1), 14, 0x404040);
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
@@ -565,7 +566,11 @@ public class GuiEnderCompendium extends GuiScreen implements ITooltipRenderer {
|
||||
renderItem.renderItemIntoGUI(fontRendererObj, mc.getTextureManager(), knowledgeFragmentIS, x + 3, y + 1);
|
||||
|
||||
String pointAmount = String.valueOf(compendiumData.getPoints());
|
||||
fontRendererObj.drawString(pointAmount, x + 50 - fontRendererObj.getStringWidth(pointAmount), y + 6, 0x404040);
|
||||
String pointAmountText = StatCollector.canTranslate("ec.pointAmount")
|
||||
? I18n.format("ec.pointAmount", pointAmount)
|
||||
: pointAmount;
|
||||
fontRendererObj
|
||||
.drawString(pointAmountText, x + 50 - fontRendererObj.getStringWidth(pointAmountText), y + 6, 0x404040);
|
||||
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
ec.title.main=Hardcore Ender Expansion - Ender Compendium
|
||||
ec.title.main.bacon=Hardcore Bacon Expansion - Bacon Compendium
|
||||
|
||||
ec.title.stronghold=Stronghold
|
||||
ec.title.dragonLair=Dragon Lair
|
||||
ec.title.endstoneBlob=Endstone Blob
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
ec.title.main=Hardcore Ender Expansion - Ender Compendium
|
||||
ec.title.main.bacon=Hardcore Bacon Expansion - Bacon Compendium
|
||||
|
||||
ec.title.stronghold=Крепость
|
||||
ec.title.dragonLair=Логово Дракона
|
||||
ec.title.endstoneBlob=Эндер-остров
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
# Update by Athloniux for v1.8.6
|
||||
# Thanks to Yoooo And Rudis From NGACraft
|
||||
# Proofread by Kiwi233
|
||||
ec.title.main=Hardcore Ender Expansion - Ender Compendium
|
||||
ec.title.main.bacon=Hardcore Bacon Expansion - Bacon Compendium
|
||||
|
||||
ec.title.stronghold=要塞
|
||||
ec.title.dragonLair=龙巢
|
||||
|
||||
Reference in new issue
Block a user