aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pers/gwyog/gtneioreplugin/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/pers/gwyog/gtneioreplugin/plugin')
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginAsteroidStat.java20
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java34
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginSmallOreStat.java50
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginVeinStat.java57
4 files changed, 63 insertions, 98 deletions
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginAsteroidStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginAsteroidStat.java
index f06e3ae1d9..027d4fa035 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginAsteroidStat.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginAsteroidStat.java
@@ -56,13 +56,13 @@ public class PluginAsteroidStat extends PluginBase {
public void drawExtras(int recipe) {
CachedAsteroidStatRecipe crecipe = (CachedAsteroidStatRecipe) this.arecipes.get(recipe);
OreLayerWrapper oreLayer = GTOreLayerHelper.mapOreLayerWrapper.get(crecipe.veinName);
- GuiDraw.drawString(I18n.format("gui.nei.veinName") + ": " + I18n.format(oreLayer.veinName), 2, 18, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.asteroidPrimary") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.primaryMeta)), 2, 31, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.asteroidSecondary") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.secondaryMeta)), 2, 44, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.asteroidBetween") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.betweenMeta)), 2, 57, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.asteroidSporadic") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.sporadicMeta)), 2, 70, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.worldNames") + ": " + getWorldNameTranslated(oreLayer.genEndAsteroid, oreLayer.genGCAsteroid), 2, 83, 0x404040, false);
- GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + I18n.format("gtnop." + oreLayer.veinName) + I18n.format("gtnop.ore.asteroid.name"), 2, 18, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.asteroidPrimary") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.primaryMeta)), 2, 31, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.asteroidSecondary") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.secondaryMeta)), 2, 44, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.asteroidBetween") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.betweenMeta)), 2, 57, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.asteroidSporadic") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.sporadicMeta)), 2, 70, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": " + getWorldNameTranslated(oreLayer.genEndAsteroid, oreLayer.genGCAsteroid), 2, 83, 0x404040, false);
+ GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
}
public String getWorldNameTranslated(boolean genEndAsteroid, boolean genGCAsteroid) {
@@ -70,12 +70,12 @@ public class PluginAsteroidStat extends PluginBase {
if (genEndAsteroid) {
if (!worldNameTranslatedAsteroid.isEmpty())
worldNameTranslatedAsteroid += ", ";
- worldNameTranslatedAsteroid += I18n.format("world.end.name");
+ worldNameTranslatedAsteroid += I18n.format("gtnop.world.end.name");
}
if (genGCAsteroid) {
if (!worldNameTranslatedAsteroid.isEmpty())
worldNameTranslatedAsteroid += ", ";
- worldNameTranslatedAsteroid += I18n.format("world.asteroid.name");
+ worldNameTranslatedAsteroid += I18n.format("gtnop.world.asteroid.name");
}
return worldNameTranslatedAsteroid;
}
@@ -130,6 +130,6 @@ public class PluginAsteroidStat extends PluginBase {
@Override
public String getRecipeName() {
- return I18n.format("gui.asteroidStat.name");
+ return I18n.format("gtnop.gui.asteroidStat.name");
}
}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java
index e225ea0944..789e4babf1 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java
@@ -39,6 +39,40 @@ public class PluginBase extends TemplateRecipeHandler {
return "gt.blockores." + index + ".name";
}
+ public String getBiomeTranslated(String unlocalizedBiome) {
+ return unlocalizedBiome.equals("None")? I18n.format("gtnop.biome.none.name"): unlocalizedBiome;
+ }
+
+ public String getWorldNameTranslated(boolean genOverworld, boolean genNether, boolean genEnd, boolean genMoon, boolean genMars) {
+ String worldNameTranslated = "";
+ if (genOverworld) {
+ if (!worldNameTranslated.isEmpty())
+ worldNameTranslated += ", ";
+ worldNameTranslated += I18n.format("gtnop.world.overworld.name");
+ }
+ if (genNether) {
+ if (!worldNameTranslated.isEmpty())
+ worldNameTranslated += ", ";
+ worldNameTranslated += I18n.format("gtnop.world.nether.name");
+ }
+ if (genEnd) {
+ if (!worldNameTranslated.isEmpty())
+ worldNameTranslated += ", ";
+ worldNameTranslated += I18n.format("gtnop.world.end.name");
+ }
+ if (genMoon) {
+ if (!worldNameTranslated.isEmpty())
+ worldNameTranslated += ", ";
+ worldNameTranslated += I18n.format("gtnop.world.moon.name");
+ }
+ if (genMars) {
+ if (!worldNameTranslated.isEmpty())
+ worldNameTranslated += ", ";
+ worldNameTranslated += I18n.format("gtnop.world.mars.name");
+ }
+ return worldNameTranslated;
+ }
+
public int getGuiWidth() {
return 166;
}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginSmallOreStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginSmallOreStat.java
index b8432c7c93..c0e784d3d3 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginSmallOreStat.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginSmallOreStat.java
@@ -62,53 +62,19 @@ public class PluginSmallOreStat extends PluginBase {
public void drawExtras(int recipe) {
CachedSmallOreRecipe crecipe = (CachedSmallOreRecipe) this.arecipes.get(recipe);
SmallOreWrapper smallOre = GTSmallOreHelper.mapSmallOreWrapper.get(crecipe.oreGenName);
- GuiDraw.drawString(I18n.format("gui.nei.oreName") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName((short)(smallOre.oreMeta+16000))), 2, 18, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.genHeight") + ": " + smallOre.worldGenHeightRange, 2, 31, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.amount") + ": " + smallOre.amountPerChunk, 2, 44, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.worldNames") + ": " + getWorldNameTranslated(smallOre.genOverworld, smallOre.genNether, smallOre.genEnd, smallOre.genMoon, smallOre.genMars), 2, 57, 0x404040, false);
- if (GTSmallOreHelper.restrictBiomeSupport) GuiDraw.drawString(I18n.format("gui.nei.restrictBiome") + ": " + getBiomeTranslated(smallOre.restrictBiome), 2, 70, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.chanceDrops") + ": ", 2, 83+getRestrictBiomeOffset(), 0x404040, false);
- GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
- }
-
- public String getBiomeTranslated(String unlocalizedBiome) {
- return unlocalizedBiome.equals("None")? I18n.format("biome.none.name"): unlocalizedBiome;
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.oreName") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName((short)(smallOre.oreMeta+16000))), 2, 18, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.genHeight") + ": " + smallOre.worldGenHeightRange, 2, 31, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.amount") + ": " + smallOre.amountPerChunk, 2, 44, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": " + getWorldNameTranslated(smallOre.genOverworld, smallOre.genNether, smallOre.genEnd, smallOre.genMoon, smallOre.genMars), 2, 57, 0x404040, false);
+ if (GTSmallOreHelper.restrictBiomeSupport) GuiDraw.drawString(I18n.format("gtnop.gui.nei.restrictBiome") + ": " + getBiomeTranslated(smallOre.restrictBiome), 2, 70, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.chanceDrops") + ": ", 2, 83+getRestrictBiomeOffset(), 0x404040, false);
+ GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
}
public int getRestrictBiomeOffset() {
return GTSmallOreHelper.restrictBiomeSupport? 0: -13;
}
- public String getWorldNameTranslated(boolean genOverworld, boolean genNether, boolean genEnd, boolean genMoon, boolean genMars) {
- String worldNameTranslated = "";
- if (genOverworld) {
- if (!worldNameTranslated.isEmpty())
- worldNameTranslated += ", ";
- worldNameTranslated += I18n.format("world.overworld.name");
- }
- if (genNether) {
- if (!worldNameTranslated.isEmpty())
- worldNameTranslated += ", ";
- worldNameTranslated += I18n.format("world.nether.name");
- }
- if (genEnd) {
- if (!worldNameTranslated.isEmpty())
- worldNameTranslated += ", ";
- worldNameTranslated += I18n.format("world.end.name");
- }
- if (genMoon) {
- if (!worldNameTranslated.isEmpty())
- worldNameTranslated += ", ";
- worldNameTranslated += I18n.format("world.moon.name");
- }
- if (genMars) {
- if (!worldNameTranslated.isEmpty())
- worldNameTranslated += ", ";
- worldNameTranslated += I18n.format("world.mars.name");
- }
- return worldNameTranslated;
- }
-
@Override
public void loadCraftingRecipes(String outputId, Object... results) {
if (outputId.equals(getOutputId()))
@@ -164,6 +130,6 @@ public class PluginSmallOreStat extends PluginBase {
@Override
public String getRecipeName() {
- return I18n.format("gui.smallOreStat.name");
+ return I18n.format("gtnop.gui.smallOreStat.name");
}
}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginVeinStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginVeinStat.java
index a2a78b0d35..285382303c 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginVeinStat.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginVeinStat.java
@@ -92,7 +92,6 @@ public class PluginVeinStat extends PluginBase {
}
short baseMeta = (short)(stack.getItemDamage() % 1000);
for (OreLayerWrapper worldGen: GTOreLayerHelper.mapOreLayerWrapper.values()) {
- System.out.println(worldGen.primaryMeta + "," + worldGen.secondaryMeta + "," + worldGen.betweenMeta + "," + worldGen.sporadicMeta);
if (worldGen.primaryMeta == baseMeta || worldGen.secondaryMeta == baseMeta || worldGen.betweenMeta == baseMeta || worldGen.sporadicMeta == baseMeta) {
List<ItemStack> stackListPrimary = new ArrayList<ItemStack>();
List<ItemStack> stackListSecondary = new ArrayList<ItemStack>();
@@ -116,50 +115,16 @@ public class PluginVeinStat extends PluginBase {
public void drawExtras(int recipe) {
CachedVeinStatRecipe crecipe = (CachedVeinStatRecipe) this.arecipes.get(recipe);
OreLayerWrapper oreLayer = GTOreLayerHelper.mapOreLayerWrapper.get(crecipe.veinName);
- GuiDraw.drawString(I18n.format("gui.nei.veinName") + ": " + I18n.format(oreLayer.veinName), 2, 18, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.primaryOre") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.primaryMeta)), 2, 31, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.secondaryOre") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.secondaryMeta)), 2, 44, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.betweenOre") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.betweenMeta)), 2, 57, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.sporadicOre") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.sporadicMeta)), 2, 70, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.genHeight") + ": " + oreLayer.worldGenHeightRange, 2, 83, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.weightedChance") + ": " + oreLayer.weightedChance, 2, 96, 0x404040, false);
- GuiDraw.drawString(I18n.format("gui.nei.worldNames") + ": " + getWorldNameTranslated(oreLayer.genOverworld, oreLayer.genNether, oreLayer.genEnd, oreLayer.genMoon, oreLayer.genMars), 2, 109, 0x404040, false);
- if (GTOreLayerHelper.restrictBiomeSupport) GuiDraw.drawString(I18n.format("gui.nei.restrictBiome") + ": " + getBiomeTranslated(oreLayer.restrictBiome), 2, 122, 0x404040, false);
- GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
- }
-
- public String getBiomeTranslated(String unlocalizedBiome) {
- return unlocalizedBiome.equals("None")? I18n.format("biome.none.name"): unlocalizedBiome;
- }
-
- public String getWorldNameTranslated(boolean genOverworld, boolean genNether, boolean genEnd, boolean genMoon, boolean genMars) {
- String worldNameTranslated = "";
- if (genOverworld) {
- if (!worldNameTranslated.isEmpty())
- worldNameTranslated += ", ";
- worldNameTranslated += I18n.format("world.overworld.name");
- }
- if (genNether) {
- if (!worldNameTranslated.isEmpty())
- worldNameTranslated += ", ";
- worldNameTranslated += I18n.format("world.nether.name");
- }
- if (genEnd) {
- if (!worldNameTranslated.isEmpty())
- worldNameTranslated += ", ";
- worldNameTranslated += I18n.format("world.end.name");
- }
- if (genMoon) {
- if (!worldNameTranslated.isEmpty())
- worldNameTranslated += ", ";
- worldNameTranslated += I18n.format("world.moon.name");
- }
- if (genMars) {
- if (!worldNameTranslated.isEmpty())
- worldNameTranslated += ", ";
- worldNameTranslated += I18n.format("world.mars.name");
- }
- return worldNameTranslated;
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + I18n.format("gtnop." + oreLayer.veinName) + I18n.format("gtnop.ore.vein.name"), 2, 18, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.primaryOre") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.primaryMeta)), 2, 31, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.secondaryOre") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.secondaryMeta)), 2, 44, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.betweenOre") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.betweenMeta)), 2, 57, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.sporadicOre") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.sporadicMeta)), 2, 70, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.genHeight") + ": " + oreLayer.worldGenHeightRange, 2, 83, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.weightedChance") + ": " + oreLayer.weightedChance, 2, 96, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": " + getWorldNameTranslated(oreLayer.genOverworld, oreLayer.genNether, oreLayer.genEnd, oreLayer.genMoon, oreLayer.genMars), 2, 109, 0x404040, false);
+ if (GTOreLayerHelper.restrictBiomeSupport) GuiDraw.drawString(I18n.format("gtnop.gui.nei.restrictBiome") + ": " + getBiomeTranslated(oreLayer.restrictBiome), 2, 122, 0x404040, false);
+ GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
}
@Override
@@ -169,7 +134,7 @@ public class PluginVeinStat extends PluginBase {
@Override
public String getRecipeName() {
- return I18n.format("gui.veinStat.name");
+ return I18n.format("gtnop.gui.veinStat.name");
}
}