aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pers
diff options
context:
space:
mode:
authorLOKKO12 <33183715+LOKKO12@users.noreply.github.com>2018-01-22 18:56:12 +0100
committerLOKKO12 <33183715+LOKKO12@users.noreply.github.com>2018-01-22 18:56:12 +0100
commit9066c13deea8a77c3e4828b4fcddf7cf0a096a74 (patch)
treea0f4ac442e59b1056b260d03e0c17b771470fae7 /src/main/java/pers
parent2bfa55842458c092acb599fd4876a74386680b0f (diff)
downloadGT5-Unofficial-9066c13deea8a77c3e4828b4fcddf7cf0a096a74.tar.gz
GT5-Unofficial-9066c13deea8a77c3e4828b4fcddf7cf0a096a74.tar.bz2
GT5-Unofficial-9066c13deea8a77c3e4828b4fcddf7cf0a096a74.zip
- removed GT6 support
- removed IE support - removed biome specific vein support - removed ShowAll button due to Memory Issures - fixed %material - try to read out config without modifying it - added Coustom Vein renamer
Diffstat (limited to 'src/main/java/pers')
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java19
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java29
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java28
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5AsteroidStat.java29
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java3
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5IEVeinStat.java133
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java4
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java111
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech6/PluginGT6Base.java35
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech6/PluginGT6BedrockOreStat.java113
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech6/PluginGT6SmallOreStat.java138
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech6/PluginGT6VeinStat.java157
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/DimensionHelper.java81
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT5CFGHelper.java109
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreLayerHelper.java109
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT5OreSmallHelper.java11
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreBedrockHelper.java36
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreLayerHelper.java59
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GT6OreSmallHelper.java87
19 files changed, 301 insertions, 990 deletions
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java b/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java
index 76132661c4..fd0e6710b5 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java
@@ -5,19 +5,15 @@ import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
import cpw.mods.fml.relauncher.Side;
-import pers.gwyog.gtneioreplugin.util.GT6OreLayerHelper;
-import pers.gwyog.gtneioreplugin.util.GT6OreSmallHelper;
import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper;
import pers.gwyog.gtneioreplugin.util.GT5OreSmallHelper;
-import pers.gwyog.gtneioreplugin.util.GT6OreBedrockHelper;
@Mod(modid = GTNEIOrePlugin.MODID, name = GTNEIOrePlugin.NAME, version = GTNEIOrePlugin.VERSION, dependencies = "required-after:gregtech;required-after:NotEnoughItems")
public class GTNEIOrePlugin {
public static final String MODID = "gtneioreplugin";
- public static final String NAME = "GT NEI Ore Plugin";
- public static final String VERSION = "1.0.4";
+ public static final String NAME = "GT NEI Ore Plugin GT:NH Mod";
+ public static final String VERSION = "1.0.4-GTNH";
- // default is GT5, however it will be "GT6" when GT6 is installed
public static String GTVersion = "GT5";
@Mod.Instance(MODID)
@@ -26,20 +22,9 @@ public class GTNEIOrePlugin {
@EventHandler
public void onLoadComplete(FMLLoadCompleteEvent event) {
if (event.getSide() == Side.CLIENT) {
- try {
- Class clazzGT6API = Class.forName("gregapi.GT_API");
- GTVersion = "GT6";
- } catch (ClassNotFoundException e) {}
- if (GTVersion.equals("GT5")) {
new GT5OreLayerHelper();
new GT5OreSmallHelper();
}
- else {
- new GT6OreLayerHelper();
- new GT6OreSmallHelper();
- new GT6OreBedrockHelper();
- }
}
- }
}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java
index 76cd9c4d18..d2cc0933d0 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java
@@ -4,13 +4,9 @@ import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI;
import cpw.mods.fml.common.Loader;
import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
-import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5AsteroidStat;
-import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5IEVeinStat;
+//import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5AsteroidStat;
import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5SmallOreStat;
import pers.gwyog.gtneioreplugin.plugin.gregtech5.PluginGT5VeinStat;
-import pers.gwyog.gtneioreplugin.plugin.gregtech6.PluginGT6BedrockOreStat;
-import pers.gwyog.gtneioreplugin.plugin.gregtech6.PluginGT6SmallOreStat;
-import pers.gwyog.gtneioreplugin.plugin.gregtech6.PluginGT6VeinStat;
import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper;
public class NEIPluginConfig implements IConfigureNEI {
@@ -29,31 +25,14 @@ public class NEIPluginConfig implements IConfigureNEI {
public void loadConfig() {
if (GTNEIOrePlugin.GTVersion.equals("GT5")) {
PluginGT5VeinStat pluginVeinStat = new PluginGT5VeinStat();
- PluginGT5AsteroidStat pluginAsteriodStat = new PluginGT5AsteroidStat();
+ //PluginGT5AsteroidStat pluginAsteriodStat = new PluginGT5AsteroidStat();
PluginGT5SmallOreStat pluginSmallOreStat = new PluginGT5SmallOreStat();
API.registerRecipeHandler(pluginVeinStat);
API.registerUsageHandler(pluginVeinStat);
- API.registerRecipeHandler(pluginAsteriodStat);
- API.registerUsageHandler(pluginAsteriodStat);
+ //API.registerRecipeHandler(pluginAsteriodStat);
+ //API.registerUsageHandler(pluginAsteriodStat);
API.registerRecipeHandler(pluginSmallOreStat);
API.registerUsageHandler(pluginSmallOreStat);
- if (GT5OreLayerHelper.immersiveEngineeringSupport) {
- PluginGT5IEVeinStat pluginIEVeinStat = new PluginGT5IEVeinStat();
- API.registerRecipeHandler(pluginIEVeinStat);
- API.registerUsageHandler(pluginIEVeinStat);
}
}
- else {
- PluginGT6VeinStat pluginGT6VeinStat = new PluginGT6VeinStat();
- PluginGT6SmallOreStat pluginGT6SmallOreStat = new PluginGT6SmallOreStat();
- PluginGT6BedrockOreStat pluginGT6BedrockOreStat = new PluginGT6BedrockOreStat();
- API.registerRecipeHandler(pluginGT6VeinStat);
- API.registerUsageHandler(pluginGT6VeinStat);
- API.registerRecipeHandler(pluginGT6SmallOreStat);
- API.registerUsageHandler(pluginGT6SmallOreStat);
- API.registerRecipeHandler(pluginGT6BedrockOreStat);
- API.registerUsageHandler(pluginGT6BedrockOreStat);
- }
}
-
-}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java
index a554cf5f46..11b1b925f2 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java
@@ -34,38 +34,14 @@ public class PluginBase extends TemplateRecipeHandler {
public String getOutputId() {
return null;
}
-
- 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) {
+
+ public String getWorldNameTranslated(boolean genOverworld) {
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;
}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5AsteroidStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5AsteroidStat.java
index 48e51a5367..b6c676dc70 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5AsteroidStat.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5AsteroidStat.java
@@ -1,4 +1,4 @@
-package pers.gwyog.gtneioreplugin.plugin.gregtech5;
+/*package pers.gwyog.gtneioreplugin.plugin.gregtech5;
import java.awt.Rectangle;
import java.util.ArrayList;
@@ -57,10 +57,10 @@ public class PluginGT5AsteroidStat extends PluginGT5Base {
CachedAsteroidStatRecipe crecipe = (CachedAsteroidStatRecipe) this.arecipes.get(recipe);
OreLayerWrapper oreLayer = GT5OreLayerHelper.mapOreLayerWrapper.get(crecipe.veinName);
GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedAsteroidName(oreLayer.veinName), 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.asteroidPrimary") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.Meta[0])), 2, 31, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.asteroidSecondary") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.Meta[1])), 2, 44, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.asteroidBetween") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.Meta[2])), 2, 57, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.asteroidSporadic") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.Meta[3])), 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);
}
@@ -94,10 +94,10 @@ public class PluginGT5AsteroidStat extends PluginGT5Base {
for (String veinName: GT5OreLayerHelper.mapOreLayerWrapper.keySet()) {
oreLayerWrapper = GT5OreLayerHelper.mapOreLayerWrapper.get(veinName);
if (oreLayerWrapper.genEndAsteroid || oreLayerWrapper.genGCAsteroid) {
- ItemStack stackPrimary = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.primaryMeta+2000);
- ItemStack stackSecondary = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.secondaryMeta+2000);
- ItemStack stackBetween = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.betweenMeta+2000);
- ItemStack stackSporadic = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.sporadicMeta+2000);
+ ItemStack stackPrimary = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.Meta[0]+2000);
+ ItemStack stackSecondary = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.Meta[1]+2000);
+ ItemStack stackBetween = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.Meta[2]+2000);
+ ItemStack stackSporadic = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.Meta[3]+2000);
this.arecipes.add(new CachedAsteroidStatRecipe(veinName, stackPrimary, stackSecondary, stackBetween, stackSporadic));
}
}
@@ -115,12 +115,12 @@ public class PluginGT5AsteroidStat extends PluginGT5Base {
}
short baseMeta = (short)(stack.getItemDamage() % 1000);
for (OreLayerWrapper worldGen: GT5OreLayerHelper.mapOreLayerWrapper.values()) {
- if (worldGen.primaryMeta == baseMeta || worldGen.secondaryMeta == baseMeta || worldGen.betweenMeta == baseMeta || worldGen.sporadicMeta == baseMeta) {
+ if (worldGen.Meta[0] == baseMeta || worldGen.Meta[1] == baseMeta || worldGen.Meta[2] == baseMeta || worldGen.Meta[3] == baseMeta) {
if (worldGen.genEndAsteroid || worldGen.genGCAsteroid) {
- ItemStack stackPrimary = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.primaryMeta+2000);
- ItemStack stackSecondary = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.secondaryMeta+2000);
- ItemStack stackBetween = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.betweenMeta+2000);
- ItemStack stackSporadic = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.sporadicMeta+2000);
+ ItemStack stackPrimary = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.Meta[0]+2000);
+ ItemStack stackSecondary = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.Meta[1]+2000);
+ ItemStack stackBetween = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.Meta[2]+2000);
+ ItemStack stackSporadic = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.Meta[3]+2000);
this.arecipes.add(new CachedAsteroidStatRecipe(worldGen.veinName, stackPrimary, stackSecondary, stackBetween, stackSporadic));
}
}
@@ -140,3 +140,4 @@ public class PluginGT5AsteroidStat extends PluginGT5Base {
return I18n.format("gtnop.gui.asteroidStat.name");
}
}
+*/ \ No newline at end of file
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java
index a61a8bb977..1a251ef514 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5Base.java
@@ -5,6 +5,7 @@ import java.awt.Rectangle;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.recipe.TemplateRecipeHandler;
import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect;
+import gregtech.api.enums.Materials;
import gregtech.api.util.GT_LanguageManager;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.EnumChatFormatting;
@@ -23,7 +24,7 @@ public class PluginGT5Base extends PluginBase {
}
public String getGTOreLocalizedName(short index) {
- return GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(index));
+ return Materials.getLocalizedNameForItem(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(index)), index%1000);
}
public String getGTOreUnlocalizedName(short index) {
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5IEVeinStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5IEVeinStat.java
deleted file mode 100644
index 1d73ae5519..0000000000
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5IEVeinStat.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package pers.gwyog.gtneioreplugin.plugin.gregtech5;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import codechicken.lib.gui.GuiDraw;
-import codechicken.nei.PositionedStack;
-import codechicken.nei.recipe.TemplateRecipeHandler.CachedRecipe;
-import gregtech.api.GregTech_API;
-import gregtech.api.util.GT_LanguageManager;
-import net.minecraft.client.resources.I18n;
-import net.minecraft.item.ItemStack;
-import net.minecraft.util.EnumChatFormatting;
-import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper;
-import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper.OreLayerWrapper;
-
-public class PluginGT5IEVeinStat extends PluginGT5Base {
-
- public class CachedIEVeinStatRecipe extends CachedRecipe {
- public String veinName;
- public PositionedStack positionedStackPrimary;
- public PositionedStack positionedStackSecondary;
- public PositionedStack positionedStackBetween;
- public PositionedStack positionedStackSporadic;
-
- public CachedIEVeinStatRecipe(String veinName, ItemStack stackListPrimary, ItemStack stackListSecondary,
- ItemStack stackListBetween, ItemStack stackListSporadic) {
- this.veinName = veinName;
- positionedStackPrimary = new PositionedStack(stackListPrimary, 2, 0);
- positionedStackSecondary = new PositionedStack(stackListSecondary, 22, 0);
- positionedStackBetween = new PositionedStack(stackListBetween, 42, 0);
- positionedStackSporadic = new PositionedStack(stackListSporadic, 62, 0);
- }
-
- @Override
- public List<PositionedStack> getIngredients() {
- List<PositionedStack> ingredientsList = new ArrayList<PositionedStack>();
- ingredientsList.add(positionedStackPrimary);
- ingredientsList.add(positionedStackSecondary);
- ingredientsList.add(positionedStackBetween);
- ingredientsList.add(positionedStackSporadic);
- return ingredientsList;
- }
-
- @Override
- public PositionedStack getResult() {
- return null;
- }
-
- }
-
- @Override
- public void drawExtras(int recipe) {
- CachedIEVeinStatRecipe crecipe = (CachedIEVeinStatRecipe) this.arecipes.get(recipe);
- OreLayerWrapper oreLayer = GT5OreLayerHelper.mapOreLayerWrapper.get(crecipe.veinName);
- int stringLength1 = GuiDraw.getStringWidth(I18n.format("gtnop.gui.nei.weightedChance") + ": ");
- int stringLength2 = GuiDraw.getStringWidth("40%");
- int beginXCoord = (stringLength1+stringLength2)/2;
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedVeinName(oreLayer.veinName), 2, 18, 0x404040, false);
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.ieVeinComponent") + ": ", 2, 31, 0x404040, false);
- GuiDraw.drawStringR("40.00%", beginXCoord+5, 44, 0x404040, false);
- GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.primaryMeta)), 2+stringLength1, 44, 0x404040, false);
- GuiDraw.drawStringR("40.00%", beginXCoord+5, 57, 0x404040, false);
- GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.secondaryMeta)), 2+stringLength1, 57, 0x404040, false);
- GuiDraw.drawStringR("15.00%", beginXCoord+5, 70, 0x404040, false);
- GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.betweenMeta)), 2+stringLength1, 70, 0x404040, false);
- GuiDraw.drawStringR("5.00%", beginXCoord+5, 83, 0x404040, false);
- GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.sporadicMeta)), 2+stringLength1, 83, 0x404040, false);
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.weightedChance") + ": " + oreLayer.weightedIEChance, 2, 96, 0x404040, false);
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.fromMod") + ": " + "Immersive Engineering", 2, 109, 0x404040, false);
- GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
- }
-
- public String getLocalizedVeinName(String unlocalizedName) {
- if (unlocalizedName.startsWith("ore.mix.custom."))
- return I18n.format("gtnop.ore.custom.name") + I18n.format("gtnop.ore.vein.name") + unlocalizedName.substring(15);
- else
- return I18n.format("gtnop." + unlocalizedName) + I18n.format("gtnop.ore.vein.name");
- }
-
- @Override
- public void loadCraftingRecipes(String outputId, Object... results) {
- if (outputId.equals(getOutputId())) {
- OreLayerWrapper oreLayerWrapper;
- for (String veinName: GT5OreLayerHelper.mapOreLayerWrapper.keySet()) {
- oreLayerWrapper = GT5OreLayerHelper.mapOreLayerWrapper.get(veinName);
- if (oreLayerWrapper.genIEVein) {
- ItemStack stackPrimary = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.primaryMeta);
- ItemStack stackSecondary = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.secondaryMeta);
- ItemStack stackBetween = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.betweenMeta);
- ItemStack stackSporadic = new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.sporadicMeta);
- this.arecipes.add(new CachedIEVeinStatRecipe(veinName, stackPrimary, stackSecondary, stackBetween, stackSporadic));
- }
- }
- }
- else
- super.loadCraftingRecipes(outputId, results);
- }
-
- @Override
- public void loadCraftingRecipes(ItemStack stack) {
- if (stack.getUnlocalizedName().startsWith("gt.blockores")) {
- if (stack.getItemDamage()>16000) {
- super.loadCraftingRecipes(stack);
- return;
- }
- short baseMeta = (short)(stack.getItemDamage() % 1000);
- for (OreLayerWrapper worldGen: GT5OreLayerHelper.mapOreLayerWrapper.values()) {
- if (worldGen.primaryMeta == baseMeta || worldGen.secondaryMeta == baseMeta || worldGen.betweenMeta == baseMeta || worldGen.sporadicMeta == baseMeta) {
- if (worldGen.genIEVein) {
- ItemStack stackPrimary = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.primaryMeta);
- ItemStack stackSecondary = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.secondaryMeta);
- ItemStack stackBetween = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.betweenMeta);
- ItemStack stackSporadic = new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.sporadicMeta);
- this.arecipes.add(new CachedIEVeinStatRecipe(worldGen.veinName, stackPrimary, stackSecondary, stackBetween, stackSporadic));
- }
- }
- }
- }
- else
- super.loadCraftingRecipes(stack);
- }
-
- @Override
- public String getOutputId() {
- return "GTOrePluginIEVeinCompat";
- }
-
- @Override
- public String getRecipeName() {
- return I18n.format("gtnop.gui.ieVeinStat.name");
- }
-}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java
index f1ddce6629..66ede68225 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5SmallOreStat.java
@@ -64,8 +64,8 @@ public class PluginGT5SmallOreStat extends PluginGT5Base {
GuiDraw.drawString(I18n.format("gtnop.gui.nei.oreName") + ": " + getGTOreLocalizedName((short)(oreSmall.oreMeta+16000)), 2, 18, 0x404040, false);
GuiDraw.drawString(I18n.format("gtnop.gui.nei.genHeight") + ": " + oreSmall.worldGenHeightRange, 2, 31, 0x404040, false);
GuiDraw.drawString(I18n.format("gtnop.gui.nei.amount") + ": " + oreSmall.amountPerChunk, 2, 44, 0x404040, false);
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": " + getWorldNameTranslated(oreSmall.genOverworld, oreSmall.genNether, oreSmall.genEnd, oreSmall.genMoon, oreSmall.genMars), 2, 57, 0x404040, false);
- if (GT5OreSmallHelper.restrictBiomeSupport) GuiDraw.drawString(I18n.format("gtnop.gui.nei.restrictBiome") + ": " + getBiomeTranslated(oreSmall.restrictBiome), 2, 70, 0x404040, false);
+ // GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": " + getWorldNameTranslated(oreSmall.genOverworld, oreSmall.genNether, oreSmall.genEnd, oreSmall.genMoon, oreSmall.genMars), 2, 57, 0x404040, false);
+ // if (GT5OreSmallHelper.restrictBiomeSupport) GuiDraw.drawString(I18n.format("gtnop.gui.nei.restrictBiome") + ": " + getBiomeTranslated(oreSmall.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);
}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java
index fd9eb314ad..fd17e810b9 100644
--- a/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/gregtech5/PluginGT5VeinStat.java
@@ -1,16 +1,19 @@
package pers.gwyog.gtneioreplugin.plugin.gregtech5;
import java.awt.Rectangle;
+import java.io.File;
+import java.io.IOException;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
-
-import org.apache.http.impl.conn.tsccm.ConnPoolByRoute;
+import java.util.Set;
import codechicken.lib.gui.GuiDraw;
import codechicken.nei.PositionedStack;
import codechicken.nei.recipe.TemplateRecipeHandler;
import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect;
import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
import gregtech.api.util.GT_LanguageManager;
import gregtech.common.GT_Worldgen_GT_Ore_Layer;
import net.minecraft.client.gui.Gui;
@@ -18,6 +21,8 @@ import net.minecraft.client.resources.I18n;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
+import pers.gwyog.gtneioreplugin.util.DimensionHelper;
+import pers.gwyog.gtneioreplugin.util.GT5CFGHelper;
import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper;
import pers.gwyog.gtneioreplugin.util.GT5OreLayerHelper.OreLayerWrapper;
@@ -71,10 +76,10 @@ public class PluginGT5VeinStat extends PluginGT5Base {
List<ItemStack> stackListBetween = new ArrayList<ItemStack>();
List<ItemStack> stackListSporadic = new ArrayList<ItemStack>();
for (int i=0;i<7;i++) {
- stackListPrimary.add(new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.primaryMeta+i*1000));
- stackListSecondary.add(new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.secondaryMeta+i*1000));
- stackListBetween.add(new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.betweenMeta+i*1000));
- stackListSporadic.add(new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.sporadicMeta+i*1000));
+ stackListPrimary.add(new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.Meta[0]+i*1000));
+ stackListSecondary.add(new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.Meta[1]+i*1000));
+ stackListBetween.add(new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.Meta[2]+i*1000));
+ stackListSporadic.add(new ItemStack(GregTech_API.sBlockOres1, 1, oreLayerWrapper.Meta[3]+i*1000));
}
this.arecipes.add(new CachedVeinStatRecipe(veinName, stackListPrimary, stackListSecondary, stackListBetween, stackListSporadic));
}
@@ -92,16 +97,16 @@ public class PluginGT5VeinStat extends PluginGT5Base {
}
short baseMeta = (short)(stack.getItemDamage() % 1000);
for (OreLayerWrapper worldGen: GT5OreLayerHelper.mapOreLayerWrapper.values()) {
- if (worldGen.primaryMeta == baseMeta || worldGen.secondaryMeta == baseMeta || worldGen.betweenMeta == baseMeta || worldGen.sporadicMeta == baseMeta) {
+ if (worldGen.Meta[0] == baseMeta || worldGen.Meta[1] == baseMeta || worldGen.Meta[2] == baseMeta || worldGen.Meta[3] == baseMeta) {
List<ItemStack> stackListPrimary = new ArrayList<ItemStack>();
List<ItemStack> stackListSecondary = new ArrayList<ItemStack>();
List<ItemStack> stackListBetween = new ArrayList<ItemStack>();
List<ItemStack> stackListSporadic = new ArrayList<ItemStack>();
for (int i=0;i<getMaximumMaterialIndex(baseMeta, false);i++) {
- stackListPrimary.add(new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.primaryMeta+i*1000));
- stackListSecondary.add(new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.secondaryMeta+i*1000));
- stackListBetween.add(new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.betweenMeta+i*1000));
- stackListSporadic.add(new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.sporadicMeta+i*1000));
+ stackListPrimary.add(new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.Meta[0]+i*1000));
+ stackListSecondary.add(new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.Meta[1]+i*1000));
+ stackListBetween.add(new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.Meta[2]+i*1000));
+ stackListSporadic.add(new ItemStack(GregTech_API.sBlockOres1, 1, worldGen.Meta[3]+i*1000));
}
this.arecipes.add(new CachedVeinStatRecipe(worldGen.veinName, stackListPrimary, stackListSecondary, stackListBetween, stackListSporadic));
}
@@ -110,58 +115,72 @@ public class PluginGT5VeinStat extends PluginGT5Base {
else
super.loadCraftingRecipes(stack);
}
-
+
@Override
public void drawExtras(int recipe) {
CachedVeinStatRecipe crecipe = (CachedVeinStatRecipe) this.arecipes.get(recipe);
OreLayerWrapper oreLayer = GT5OreLayerHelper.mapOreLayerWrapper.get(crecipe.veinName);
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedVeinName(oreLayer.veinName), 2, 18, 0x404040, false);
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.primaryOre") + ": " + getGTOreLocalizedName(oreLayer.primaryMeta), 2, 31, 0x404040, false);
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.secondaryOre") + ": " + getGTOreLocalizedName(oreLayer.secondaryMeta), 2, 44, 0x404040, false);
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.betweenOre") + ": " + getGTOreLocalizedName(oreLayer.betweenMeta), 2, 57, 0x404040, false);
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.sporadicOre") + ": " + getGTOreLocalizedName(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.worldNames") + ": " + getWorldNameTranslated(oreLayer.genOverworld, oreLayer.genNether, oreLayer.genEnd, oreLayer.genMoon, oreLayer.genMars), 2, 96, 0x404040, false);
- GuiDraw.drawString(I18n.format("gtnop.gui.nei.weightedChance") + ": " + getWeightedChance(oreLayer.randomWeight, oreLayer.genOverworld, oreLayer.genNether, oreLayer.genEnd, oreLayer.genMoon, oreLayer.genMars), 2, 109, 0x404040, false);
- if (GT5OreLayerHelper.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);
+
+ if (getLocalizedVeinName(oreLayer).length()>20) {
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedVeinName(oreLayer).substring(0, 20), 2, 20, 0x404040, false);
+ if (getLocalizedVeinName(oreLayer).length()>40) {
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedVeinName(oreLayer).substring(20, 40), 2, 30, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedVeinName(oreLayer).substring(40, getLocalizedVeinName(oreLayer).length()), 2, 40, 0x404040, false);
+ }
+ else
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedVeinName(oreLayer).substring(20, getLocalizedVeinName(oreLayer).length()), 2, 30, 0x404040, false);
+ }
+ else
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedVeinName(oreLayer), 2, 20, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.primaryOre") + ": " + getGTOreLocalizedName(oreLayer.Meta[0]), 2, 50, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.secondaryOre") + ": " + getGTOreLocalizedName(oreLayer.Meta[1]), 2, 60, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.betweenOre") + ": " + getGTOreLocalizedName(oreLayer.Meta[2]), 2, 70, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.sporadicOre") + ": " + getGTOreLocalizedName(oreLayer.Meta[3]), 2, 80, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.genHeight") + ": " + oreLayer.worldGenHeightRange, 2, 90, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": ", 2, 100, 0x404040, false);
+ GuiDraw.drawString(I18n.format("") + getDims(oreLayer), 2, 110, 0x404040, false);
+ // GuiDraw.drawString(I18n.format("gtnop.gui.nei.weightedChance") + ": " + getWeightedChance(oreLayer), 2, 122, 0x404040, false);
+ //if (GT5OreLayerHelper.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);
}
- public String getLocalizedVeinName(String unlocalizedName) {
+ public String getLocalizedVeinName(OreLayerWrapper oreLayer) {
+
+ String unlocalizedName = oreLayer.veinName;
if (unlocalizedName.startsWith("ore.mix.custom."))
- return I18n.format("gtnop.ore.custom.name") + I18n.format("gtnop.ore.vein.name") + unlocalizedName.substring(15);
+ return I18n.format(coustomVeinRenamer(oreLayer));//I18n.format("gtnop.ore.custom.name") + I18n.format("gtnop.ore.vein.name") + unlocalizedName.substring(15);
else
return I18n.format("gtnop." + unlocalizedName) + I18n.format("gtnop.ore.vein.name");
}
- public String getWeightedChance(int randomWeight, boolean genOverworld, boolean genNether, boolean genEnd, boolean genMoon, boolean genMars) {
+ public String coustomVeinRenamer(OreLayerWrapper oreLayer) {
+ Set<String> s = new HashSet<String>();
+