aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorGWYOG <jjn1jjn2@163.com>2016-11-04 02:41:12 +0800
committerGWYOG <jjn1jjn2@163.com>2016-11-04 02:41:12 +0800
commitf01a9dda14179eda02171c5e48d9ff4f7fd0fd5f (patch)
treeebb30dfc2865b0ec434fe52a7785a2b31beb27e3 /src/main
parent25ca5d5b8cf8dc2adece8db5baccf6ec0640264e (diff)
downloadGT5-Unofficial-f01a9dda14179eda02171c5e48d9ff4f7fd0fd5f.tar.gz
GT5-Unofficial-f01a9dda14179eda02171c5e48d9ff4f7fd0fd5f.tar.bz2
GT5-Unofficial-f01a9dda14179eda02171c5e48d9ff4f7fd0fd5f.zip
Pre-release 1.0.0
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java29
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/event/ClientTickHandler.java19
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java32
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginAsteroidStat.java134
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java46
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginSmallOreStat.java165
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginVeinStat.java175
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GTOreLayerHelper.java98
-rw-r--r--src/main/java/pers/gwyog/gtneioreplugin/util/GTSmallOreHelper.java102
-rw-r--r--src/main/resources/assets/gtneioreplugin/lang/en_US.lang73
-rw-r--r--src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang72
-rw-r--r--src/main/resources/assets/gtneioreplugin/textures/gui/nei/guiBase.pngbin0 -> 1846 bytes
-rw-r--r--src/main/resources/mcmod.info16
13 files changed, 961 insertions, 0 deletions
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java b/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java
new file mode 100644
index 0000000000..fdf92404f8
--- /dev/null
+++ b/src/main/java/pers/gwyog/gtneioreplugin/GTNEIOrePlugin.java
@@ -0,0 +1,29 @@
+package pers.gwyog.gtneioreplugin;
+
+import cpw.mods.fml.common.FMLCommonHandler;
+import cpw.mods.fml.common.Mod;
+import cpw.mods.fml.common.Mod.EventHandler;
+import cpw.mods.fml.common.event.FMLInitializationEvent;
+import cpw.mods.fml.common.event.FMLServerStartingEvent;
+import cpw.mods.fml.relauncher.Side;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_OreDictUnificator;
+import net.minecraft.item.ItemStack;
+import pers.gwyog.gtneioreplugin.event.ClientTickHandler;
+
+@Mod(modid = GTNEIOrePlugin.MODID, name = GTNEIOrePlugin.NAME, version = GTNEIOrePlugin.VERSION, dependencies = "required-after:gregtech")
+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.0";
+
+ @Mod.Instance(MODID)
+ public static GTNEIOrePlugin instance;
+
+ @EventHandler
+ public void init(FMLInitializationEvent event) {
+ if (event.getSide() == Side.CLIENT)
+ FMLCommonHandler.instance().bus().register(new ClientTickHandler());
+ }
+
+}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/event/ClientTickHandler.java b/src/main/java/pers/gwyog/gtneioreplugin/event/ClientTickHandler.java
new file mode 100644
index 0000000000..cb83a4974d
--- /dev/null
+++ b/src/main/java/pers/gwyog/gtneioreplugin/event/ClientTickHandler.java
@@ -0,0 +1,19 @@
+package pers.gwyog.gtneioreplugin.event;
+
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent;
+import pers.gwyog.gtneioreplugin.util.GTOreLayerHelper;
+import pers.gwyog.gtneioreplugin.util.GTSmallOreHelper;
+
+public class ClientTickHandler {
+ public boolean hasInitialized = false;
+
+ @SubscribeEvent
+ public void onTick(ClientTickEvent event) {
+ if (!hasInitialized) {
+ new GTOreLayerHelper();
+ new GTSmallOreHelper();
+ hasInitialized = true;
+ }
+ }
+}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java
new file mode 100644
index 0000000000..a4813c746b
--- /dev/null
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/NEIPluginConfig.java
@@ -0,0 +1,32 @@
+package pers.gwyog.gtneioreplugin.plugin;
+
+import codechicken.nei.api.API;
+import codechicken.nei.api.IConfigureNEI;
+import pers.gwyog.gtneioreplugin.GTNEIOrePlugin;
+
+public class NEIPluginConfig implements IConfigureNEI {
+
+ @Override
+ public String getName() {
+ return "GregTech Ore Plugin";
+ }
+
+ @Override
+ public String getVersion() {
+ return GTNEIOrePlugin.VERSION;
+ }
+
+ @Override
+ public void loadConfig() {
+ PluginVeinStat pluginVeinStat = new PluginVeinStat();
+ PluginAsteroidStat pluginAsteriodStat = new PluginAsteroidStat();
+ PluginSmallOreStat pluginSmallOreStat = new PluginSmallOreStat();
+ API.registerRecipeHandler(pluginVeinStat);
+ API.registerUsageHandler(pluginVeinStat);
+ API.registerRecipeHandler(pluginAsteriodStat);
+ API.registerUsageHandler(pluginAsteriodStat);
+ API.registerRecipeHandler(pluginSmallOreStat);
+ API.registerUsageHandler(pluginSmallOreStat);
+ }
+
+}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginAsteroidStat.java b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginAsteroidStat.java
new file mode 100644
index 0000000000..1dc55c441f
--- /dev/null
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginAsteroidStat.java
@@ -0,0 +1,134 @@
+package pers.gwyog.gtneioreplugin.plugin;
+
+import java.awt.Rectangle;
+import java.util.ArrayList;
+import java.util.List;
+
+import codechicken.lib.gui.GuiDraw;
+import codechicken.nei.PositionedStack;
+import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect;
+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.plugin.PluginVeinStat.CachedVeinStatRecipe;
+import pers.gwyog.gtneioreplugin.util.GTOreLayerHelper;
+import pers.gwyog.gtneioreplugin.util.GTOreLayerHelper.OreLayerWrapper;
+
+public class PluginAsteroidStat extends PluginBase {
+
+ public class CachedAsteroidStatRecipe extends CachedRecipe {
+ public String veinName;
+ public PositionedStack positionedStackPrimary;
+ public PositionedStack positionedStackSecondary;
+ public PositionedStack positionedStackBetween;
+ public PositionedStack positionedStackSporadic;
+
+ public CachedAsteroidStatRecipe(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) {
+ 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);
+ }
+
+ public String getWorldNameTranslated(boolean genEndAsteroid, boolean genGCAsteroid) {
+ String worldNameTranslatedAsteroid = "";
+ if (genEndAsteroid) {
+ if (!worldNameTranslatedAsteroid.isEmpty())
+ worldNameTranslatedAsteroid += ", ";
+ worldNameTranslatedAsteroid += I18n.format("world.end.name");
+ }
+ if (genGCAsteroid) {
+ if (!worldNameTranslatedAsteroid.isEmpty())
+ worldNameTranslatedAsteroid += ", ";
+ worldNameTranslatedAsteroid += I18n.format("world.asteroid.name");
+ }
+ return worldNameTranslatedAsteroid;
+ }
+
+ @Override
+ public void loadCraftingRecipes(String outputId, Object... results) {
+ if (outputId.equals(getOutputId())) {
+ OreLayerWrapper oreLayerWrapper;
+ for (String veinName: GTOreLayerHelper.mapOreLayerWrapper.keySet()) {
+ oreLayerWrapper = GTOreLayerHelper.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);
+ this.arecipes.add(new CachedAsteroidStatRecipe(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: GTOreLayerHelper.mapOreLayerWrapper.values()) {
+ if (worldGen.primaryMeta == baseMeta || worldGen.secondaryMeta == baseMeta || worldGen.betweenMeta == baseMeta || worldGen.sporadicMeta == 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);
+ this.arecipes.add(new CachedAsteroidStatRecipe(worldGen.veinName, stackPrimary, stackSecondary, stackBetween, stackSporadic));
+ }
+ }
+ }
+ }
+ else
+ super.loadCraftingRecipes(stack);
+ }
+
+ @Override
+ public String getOutputId() {
+ return "GTOrePluginAsteroid";
+ }
+
+ @Override
+ public String getRecipeName() {
+ return I18n.format("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
new file mode 100644
index 0000000000..e225ea0944
--- /dev/null
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginBase.java
@@ -0,0 +1,46 @@
+package pers.gwyog.gtneioreplugin.plugin;
+
+import java.awt.Rectangle;
+
+import codechicken.lib.gui.GuiDraw;
+import codechicken.nei.recipe.TemplateRecipeHandler;
+import codechicken.nei.recipe.TemplateRecipeHandler.RecipeTransferRect;
+import net.minecraft.client.resources.I18n;
+import net.minecraft.util.EnumChatFormatting;
+
+public class PluginBase extends TemplateRecipeHandler {
+
+ @Override
+ public int recipiesPerPage() {
+ return 1;
+ }
+
+ @Override
+ public String getRecipeName() {
+ return null;
+ }
+
+ @Override
+ public String getGuiTexture() {
+ return "gtneioreplugin:textures/gui/nei/guiBase.png";
+ }
+
+ @Override
+ public void loadTransferRects() {
+ int stringLength = GuiDraw.getStringWidth(EnumChatFormatting.BOLD + I18n.format("gui.nei.seeAll"));
+ transferRects.add(new RecipeTransferRect(new Rectangle(getGuiWidth()-stringLength-3, 5, stringLength, 9), getOutputId()));
+ }
+
+ public String getOutputId() {
+ return null;
+ }
+
+ public String getGTOreUnlocalizedName(short index) {
+ return "gt.blockores." + index + ".name";
+ }
+
+ 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
new file mode 100644
index 0000000000..ba8c39babb
--- /dev/null
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginSmallOreStat.java
@@ -0,0 +1,165 @@
+package pers.gwyog.gtneioreplugin.plugin;
+
+import java.awt.Rectangle;
+import java.util.ArrayList;
+import java.util.List;
+
+import codechicken.lib.gui.GuiDraw;
+import codechicken.nei.PositionedStack;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.common.blocks.GT_Block_Ores_Abstract;
+import net.minecraft.client.resources.I18n;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.EnumChatFormatting;
+import pers.gwyog.gtneioreplugin.plugin.PluginAsteroidStat.CachedAsteroidStatRecipe;
+import pers.gwyog.gtneioreplugin.plugin.PluginVeinStat.CachedVeinStatRecipe;
+import pers.gwyog.gtneioreplugin.util.GTOreLayerHelper;
+import pers.gwyog.gtneioreplugin.util.GTSmallOreHelper;
+import pers.gwyog.gtneioreplugin.util.GTOreLayerHelper.OreLayerWrapper;
+import pers.gwyog.gtneioreplugin.util.GTSmallOreHelper.SmallOreWrapper;
+
+public class PluginSmallOreStat extends PluginBase {
+
+ public class CachedSmallOreRecipe extends CachedRecipe {
+ public String oreGenName;
+ public PositionedStack positionedStackSmallOre;
+ public PositionedStack positionedStackMaterialDust;
+ public List<PositionedStack> positionedDropStackList;
+
+ public CachedSmallOreRecipe(String oreGenName, List<ItemStack> stackList, List<ItemStack> materialDustStackList, List<ItemStack> dropStackList) {
+ this.oreGenName = oreGenName;
+ this.positionedStackSmallOre = new PositionedStack(stackList, 2, 0);
+ this.positionedStackMaterialDust = new PositionedStack(materialDustStackList, 43, 79);
+ List<PositionedStack> positionedDropStackList = new ArrayList<PositionedStack>();
+ int i = 1;
+ for (ItemStack stackDrop: dropStackList)
+ positionedDropStackList.add(new PositionedStack(stackDrop, 43+20*(i%4), 79+16*((i++)/4)));
+ this.positionedDropStackList = positionedDropStackList;
+ }
+
+ @Override
+ public List<PositionedStack> getIngredients() {
+ positionedStackSmallOre.setPermutationToRender((cycleticks / 20) % positionedStackSmallOre.items.length);
+ positionedStackMaterialDust.setPermutationToRender((cycleticks / 20) % positionedStackMaterialDust.items.length);
+ positionedDropStackList.add(positionedStackSmallOre);
+ positionedDropStackList.add(positionedStackMaterialDust);
+ return positionedDropStackList;
+
+ }
+
+ @Override
+ public PositionedStack getResult() {
+ return null;
+ }
+
+ }
+
+ @Override
+ 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);
+ GuiDraw.drawString(I18n.format("gui.nei.restrictBiome") + ": " + getBiomeTranslated(smallOre.restrictBiome), 2, 70, 0x404040, false);
+ GuiDraw.drawString(I18n.format("gui.nei.chanceDrops") + ": ", 2, 83, 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;
+ }
+
+ @Override
+ public void loadCraftingRecipes(String outputId, Object... results) {
+ if (outputId.equals(getOutputId()))
+ for (ItemStack stack: GTSmallOreHelper.smallOreList)
+ loadCraftingRecipes(stack);
+ 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 (SmallOreWrapper smallOreWorldGen: GTSmallOreHelper.mapSmallOreWrapper.values()) {
+ if (smallOreWorldGen.oreMeta == baseMeta) {
+ List<ItemStack> stackList = new ArrayList<ItemStack>();
+ for (int i=0;i<7;i++)
+ stackList.add(new ItemStack(GregTech_API.sBlockOres1, 1, smallOreWorldGen.oreMeta+16000+i*1000));
+ List<ItemStack> materialDustStackList = new ArrayList<ItemStack>();
+ for (int i=0;i<7;i++)
+ materialDustStackList.add(GT_OreDictUnificator.get(OrePrefixes.dust, GTSmallOreHelper.getDroppedDusts()[i], 1L));
+ this.arecipes.add(new CachedSmallOreRecipe(smallOreWorldGen.oreGenName, stackList, materialDustStackList, GTSmallOreHelper.mapOreMetaToOreDrops.get(baseMeta)));
+ }
+ }
+ }
+ else if (GTSmallOreHelper.mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {
+ short baseMeta = GTSmallOreHelper.mapOreDropUnlocalizedNameToOreMeta.get(stack.getUnlocalizedName());
+ for (String oreGenName: GTSmallOreHelper.mapSmallOreWrapper.keySet()) {
+ SmallOreWrapper smallOreWrapper = GTSmallOreHelper.mapSmallOreWrapper.get(oreGenName);
+ if (smallOreWrapper.oreMeta == baseMeta) {
+ List<ItemStack> stackList = new ArrayList<ItemStack>();
+ for (int i=0;i<7;i++)
+ stackList.add(new ItemStack(GregTech_API.sBlockOres1, 1, baseMeta+16000+i*1000));
+ List<ItemStack> materialDustStackList = new ArrayList<ItemStack>();
+ for (int i=0;i<7;i++)
+ materialDustStackList.add(GT_OreDictUnificator.get(OrePrefixes.dust, GTSmallOreHelper.getDroppedDusts()[i], 1L));
+ this.arecipes.add(new CachedSmallOreRecipe(GTSmallOreHelper.mapSmallOreWrapper.get(oreGenName).oreGenName, stackList, materialDustStackList, GTSmallOreHelper.mapOreMetaToOreDrops.get(baseMeta)));
+ }
+ }
+ }
+ else
+ super.loadCraftingRecipes(stack);
+ }
+
+ @Override
+ public String getOutputId() {
+ return "GTOrePluginSmallOre";
+ }
+
+ @Override
+ public String getRecipeName() {
+ return I18n.format("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
new file mode 100644
index 0000000000..f281b3b29e
--- /dev/null
+++ b/src/main/java/pers/gwyog/gtneioreplugin/plugin/PluginVeinStat.java
@@ -0,0 +1,175 @@
+package pers.gwyog.gtneioreplugin.plugin;
+
+import java.awt.Rectangle;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.http.impl.conn.tsccm.ConnPoolByRoute;
+
+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.util.GT_LanguageManager;
+import gregtech.common.GT_Worldgen_GT_Ore_Layer;
+import net.minecraft.client.gui.Gui;
+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.GTOreLayerHelper;
+import pers.gwyog.gtneioreplugin.util.GTOreLayerHelper.OreLayerWrapper;
+
+public class PluginVeinStat extends PluginBase {
+
+ public class CachedVeinStatRecipe extends CachedRecipe {
+ public String veinName;
+ public PositionedStack positionedStackPrimary;
+ public PositionedStack positionedStackSecondary;
+ public PositionedStack positionedStackBetween;
+ public PositionedStack positionedStackSporadic;
+
+ public CachedVeinStatRecipe(String veinName, List<ItemStack> stackListPrimary, List<ItemStack> stackListSecondary,
+ List<ItemStack> stackListBetween, List<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>();
+ positionedStackPrimary.setPermutationToRender((cycleticks / 20) % positionedStackPrimary.items.length);;
+ positionedStackSecondary.setPermutationToRender((3 + cycleticks / 20) % positionedStackPrimary.items.length);;
+ positionedStackBetween.setPermutationToRender((2 + cycleticks / 20) % positionedStackPrimary.items.length);;
+ positionedStackSporadic.setPermutationToRender((1 + cycleticks / 20) % positionedStackPrimary.items.length);;
+ ingredientsList.add(positionedStackPrimary);
+ ingredientsList.add(positionedStackSecondary);
+ ingredientsList.add(positionedStackBetween);
+ ingredientsList.add(positionedStackSporadic);
+ return ingredientsList;
+ }
+
+ @Override
+ public PositionedStack getResult() {
+ return null;
+ }
+
+ }
+
+ @Override
+ public void loadCraftingRecipes(String outputId, Object... results) {
+ if (outputId.equals(getOutputId())) {
+ OreLayerWrapper oreLayerWrapper;
+ for (String veinName: GTOreLayerHelper.mapOreLayerWrapper.keySet()) {
+ oreLayerWrapper = GTOreLayerHelper.mapOreLayerWrapper.get(veinName);
+ 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<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));
+ }
+ this.arecipes.add(new CachedVeinStatRecipe(veinName, stackListPrimary, stackListSecondary, stackListBetween, stackListSporadic));
+ }
+ }
+ 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: 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>();
+ 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, 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));
+ }
+ this.arecipes.add(new CachedVeinStatRecipe(worldGen.veinName, stackListPrimary, stackListSecondary, stackListBetween, stackListSporadic));
+ }
+ }
+ }
+ else
+ super.loadCraftingRecipes(stack);
+ }
+
+ @Override
+ 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);
+ 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;
+ }
+
+ @Override
+ public String getOutputId() {
+ return "GTOrePluginVein";
+ }
+
+ @Override
+ public String getRecipeName() {
+ return I18n.format("gui.veinStat.name");
+ }
+
+}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GTOreLayerHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GTOreLayerHelper.java
new file mode 100644
index 0000000000..e6f9541e9f
--- /dev/null
+++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GTOreLayerHelper.java
@@ -0,0 +1,98 @@
+package pers.gwyog.gtneioreplugin.util;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import gregtech.common.GT_Worldgen_GT_Ore_Layer;
+import net.minecraft.client.resources.I18n;
+import net.minecraft.item.ItemStack;
+import sun.awt.windows.WWindowPeer;
+
+public class GTOreLayerHelper {
+ public static boolean endAsteroidSupport = false;
+ public static boolean gcBasicSupport = false;
+ public static boolean gcAsteroidSupport = false;
+ public static HashMap<String, OreLayerWrapper> mapOreLayerWrapper = new HashMap<String, OreLayerWrapper>();
+ public static List<List<Short>> listVein = new ArrayList<List<Short>>();
+ public static List<List<Short>> listAsteroid = new ArrayList<List<Short>>();
+
+ public GTOreLayerHelper() {
+ checkExtraSupport();
+ for (GT_Worldgen_GT_Ore_Layer tWorldGen: GT_Worldgen_GT_Ore_Layer.sList)
+ mapOreLayerWrapper.put(tWorldGen.mWorldGenName, new OreLayerWrapper(tWorldGen));
+ }
+
+ private static void checkExtraSupport() {
+ Class clazzGTOreLayer = null;
+ try {
+ clazzGTOreLayer = Class.forName("gregtech.common.GT_Worldgen_GT_Ore_Layer");
+ } catch (ClassNotFoundException e) {}
+ if (clazzGTOreLayer != null) {
+ try {
+ Field fieldEndAsteroid = clazzGTOreLayer.getField("mEndAsteroid");
+ endAsteroidSupport = true;
+ } catch (Exception e) {}
+ try {
+ Field fieldGCMoon = clazzGTOreLayer.getField("mMoon");
+ Field fieldGCMars = clazzGTOreLayer.getField("mMars");
+ gcBasicSupport = true;
+ } catch (Exception e) {}
+ try {
+ Field fieldGCAsteroid = clazzGTOreLayer.getField("mAsteroid");
+ gcAsteroidSupport = true;
+ } catch (Exception e) {}
+ }
+ }
+
+ public class OreLayerWrapper {
+ public String veinName;
+ public short primaryMeta;
+ public short secondaryMeta;
+ public short betweenMeta;
+ public short sporadicMeta;
+ public String worldGenHeightRange;
+ public String weightedChance;
+ public String restrictBiome;
+ public boolean genOverworld = false;
+ public boolean genNether = false;
+ public boolean genEnd = false;
+ public boolean genMoon = false;
+ public boolean genMars = false;
+ public boolean genEndAsteroid = false;
+ public boolean genGCAsteroid = false;
+
+ public OreLayerWrapper(GT_Worldgen_GT_Ore_Layer worldGen) {
+ this.veinName = worldGen.mWorldGenName;
+ this.primaryMeta = worldGen.mPrimaryMeta;
+ this.secondaryMeta = worldGen.mSecondaryMeta;
+ this.betweenMeta = worldGen.mBetweenMeta;
+ this.sporadicMeta = worldGen.mSporadicMeta;
+ this.worldGenHeightRange = worldGen.mMinY + "-" + worldGen.mMaxY;
+ this.weightedChance = String.format("%.2f%%", (100.0f*worldGen.mWeight)/GT_Worldgen_GT_Ore_Layer.sWeight);
+ this.restrictBiome = worldGen.mRestrictBiome;
+ this.genOverworld = worldGen.mOverworld;
+ this.genNether = worldGen.mNether;
+ this.genEnd = worldGen.mEnd;
+ if (GTOreLayerHelper.gcBasicSupport) {
+ this.genMoon = worldGen.mMoon;
+ this.genMars = worldGen.mMars;
+ }
+ if (GTOreLayerHelper.endAsteroidSupport)
+ this.genEndAsteroid = worldGen.mEndAsteroid;
+ if (GTOreLayerHelper.gcAsteroidSupport)
+ this.genGCAsteroid = worldGen.mAsteroid;
+ List<Short> list = new ArrayList<Short>();
+ list.add(primaryMeta);
+ list.add(secondaryMeta);
+ list.add(betweenMeta);
+ list.add(sporadicMeta);
+ listVein.add(list);
+ if (genEndAsteroid || genGCAsteroid)
+ listAsteroid.add(list);
+ }
+ }
+
+}
diff --git a/src/main/java/pers/gwyog/gtneioreplugin/util/GTSmallOreHelper.java b/src/main/java/pers/gwyog/gtneioreplugin/util/GTSmallOreHelper.java
new file mode 100644
index 0000000000..40889e8c11
--- /dev/null
+++ b/src/main/java/pers/gwyog/gtneioreplugin/util/GTSmallOreHelper.java
@@ -0,0 +1,102 @@
+package pers.gwyog.gtneioreplugin.util;
+
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.world.GT_Worldgen;
+import gregtech.common.GT_Worldgen_GT_Ore_SmallPieces;
+import net.minecraft.client.resources.I18n;
+import net.minecraft.item.ItemStack;
+
+public class GTSmallOreHelper {
+ public static boolean gcBasicSupport = false;
+ public static List<ItemStack> smallOreList = new ArrayList<ItemStack>();
+ public static HashMap<String, SmallOreWrapper> mapSmallOreWrapper = new HashMap<String, SmallOreWrapper>();
+ public static HashMap<String, Short> mapOreDropUnlocalizedNameToOreMeta = new HashMap<String, Short>();
+ public static HashMap<Short, List<ItemStack>> mapOreMetaToOreDrops = new HashMap<Short, List<ItemStack>>();
+
+ public GTSmallOreHelper() {
+ checkExtraSupport();
+ ItemStack stack;
+ Materials material;
+ short meta;
+ for (GT_Worldgen worldGen : GregTech_API.sWorldgenList)
+ if (worldGen.mWorldGenName.startsWith("ore.small.") && worldGen instanceof GT_Worldgen_GT_Ore_SmallPieces) {
+ GT_Worldgen_GT_Ore_SmallPieces worldGenSmallPieces = (GT_Worldgen_GT_Ore_SmallPieces)worldGen;
+ meta = worldGenSmallPieces.mMeta;
+ material = GregTech_API.sGeneratedMaterials[meta];
+ mapSmallOreWrapper.put(worldGen.mWorldGenName, new SmallOreWrapper(worldGenSmallPieces));
+ if (!mapOreMetaToOreDrops.keySet().contains(meta)) {
+ List<ItemStack> stackList = new ArrayList<ItemStack>();
+ stack = GT_OreDictUnificator.get(OrePrefixes.gemExquisite, material, GT_OreDictUnificator.get(OrePrefixes.gem, material, 1L), 1L);
+ if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
+ stack = GT_OreDictUnificator.get(OrePrefixes.gemFlawless, material, GT_OreDictUnificator.get(OrePrefixes.gem, material, 1L), 1L);
+ if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
+ stack = GT_OreDictUnificator.get(OrePrefixes.gem, material, 1L);
+ if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
+ stack = GT_OreDictUnificator.get(OrePrefixes.gemFlawed, material, GT_OreDictUnificator.get(OrePrefixes.crushed, material, 1L), 1L);
+ if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
+ stack = GT_OreDictUnificator.get(OrePrefixes.crushed, material, 1L);
+ if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
+ stack = GT_OreDictUnificator.get(OrePrefixes.gemChipped, material, GT_OreDictUnificator.get(OrePrefixes.dustImpure, material, 1L), 1L);
+ if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
+ stack = GT_OreDictUnificator.get(OrePrefixes.dustImpure, material, 1L);
+ if (stack != null && !mapOreDropUnlocalizedNameToOreMeta.keySet().contains(stack.getUnlocalizedName())) {mapOreDropUnlocalizedNameToOreMeta.put(stack.getUnlocalizedName(), meta);stackList.add(stack);}
+ smallOreList.add(new ItemStack(GregTech_API.sBlockOres1, 1, meta+16000));
+ mapOreMetaToOreDrops.put(meta, stackList);
+ }
+ }
+ }
+
+ private static void checkExtraSupport() {
+ Class clazzGTOreLayer = null;
+ try {
+ clazzGTOreLayer = Class.forName("gregtech.common.GT_Worldgen_GT_Ore_SmallPieces");
+ } catch (ClassNotFoundException e) {}
+ if (clazzGTOreLayer != null) {
+ try {
+ Field fieldGCMoon = clazzGTOreLayer.getField("mMoon");
+ Field fieldGCMars = clazzGTOreLayer.getField("mMars");
+ gcBasicSupport = true;
+ } catch (Exception e) {}
+ }
+ }
+
+ public static Materials[] getDroppedDusts() {
+ return new Materials[]{Materials.Stone, Materials.Netherrack, Materials.Endstone, Materials.GraniteBlack, Materials.GraniteRed, Materials.Marble, Materials.Basalt, Materials.Stone};
+ }
+
+ public class SmallOreWrapper {
+ public String oreGenName;
+ public short oreMeta;
+ public String worldGenHeightRange;
+ public short amountPerChunk;
+ public String restrictBiome;
+ public boolean genOverworld = false;
+ public boolean genNether = false;
+ public boolean genEnd = false;
+ public boolean genMoon = false;
+ public boolean genMars = false;
+
+ public SmallOreWrapper(GT_Worldgen_GT_Ore_SmallPieces worldGen) {
+ this.oreGenName = worldGen.mWorldGenName;
+ this.oreMeta = worldGen.mMeta;
+ this.worldGenHeightRange = worldGen.mMinY + "-" + worldGen.mMaxY;
+ this.amountPerChunk = worldGen.mAmount;
+ this.restrictBiome = worldGen.mRestrictBiome;
+ this.genOverworld = worldGen.mOverworld;
+ this.genNether = worldGen.mNether;
+ this.genEnd = worldGen.mEnd;
+ if (GTOreLayerHelper.gcBasicSupport) {
+ this.genMoon = worldGen.mMoon;
+ this.genMars = worldGen.mMars;
+ }
+ }
+ }
+}
diff --git a/src/main/resources/assets/gtneioreplugin/lang/en_US.lang b/src/main/resources/assets/gtneioreplugin/lang/en_US.lang
new file mode 100644
index 0000000000..925a8d2fad
--- /dev/null
+++ b/src/main/resources/assets/gtneioreplugin/lang/en_US.lang
@@ -0,0 +1,73 @@
+# gui names
+gui.veinStat.name=Vein Stats
+gui.asteroidStat.name=Asteroid Stats
+gui.smallOreStat.name=Small Ore Stats
+
+gui.nei.veinName=Vein name
+gui.nei.primaryOre=Primary-Gen
+gui.nei.secondaryOre=Secondary-Gen
+gui.nei.betweenOre=Between-Gen
+gui.nei.sporadicOre=Sporadic-Gen
+gui.nei.genHeight=Height
+gui.nei.weightedChance=Chance
+gui.nei.worldNames=Generated world
+gui.nei.restrictBiome=Restricted biome
+
+gui.nei.asteroidPrimary=Main-Gen1
+gui.nei.asteroidSecondary=Main-Gen2
+gui.nei.asteroidBetween=Minor-Gen1
+gui.nei.asteroidSporadic=Minor-Gen2
+
+gui.nei.oreName=Ore name
+gui.nei.amount=Amount per chunk
+gui.nei.chanceDrops=Drops
+
+gui.nei.seeAll=See All
+
+
+# world names
+world.overworld.name=Overworld
+world.nether.name=Nether
+world.end.name=End
+world.moon.name=Moon
+world.mars.name=Mars
+world.asteroid.name=GalactiCraft Asteroid
+
+
+# biome names
+biome.none.name=None
+
+
+# vein names
+ore.mix.naquadah=Naquadah Vein
+ore.mix.lignite=Lignite Vein
+ore.mix.coal=Coal Vein
+ore.mix.magnetite=Magnetite Vein
+ore.mix.gold=Gold Vein
+ore.mix.iron=Iron Vein
+ore.mix.cassiterite=Cassiterite Vein
+ore.mix.tetrahedrite=Tetrahedrite Vein
+ore.mix.netherquartz=Nether Quartz Vein
+ore.mix.sulfur=Sulfur Vein
+ore.mix.copper=Copper Vein
+ore.mix.bauxite=Bauxite Vein
+ore.mix.salts=Salts Vein
+ore.mix.redstone=Redstone Vein
+ore.mix.soapstone=Soapstone Vein
+ore.mix.nickel=Nickel Vein
+ore.mix.platinum=Platinum Vein
+ore.mix.pitchblende=Pitchblends Vein
+ore.mix.uranium=Uranium Vein
+ore.mix.monazite=Monazite Vein
+ore.mix.molybdenum=Molybdenum Vein
+ore.mix.tungstate=Tungstate Vein
+ore.mix.sapphire=Sapphire Vein
+ore.mix.manganese=Manganese Vein
+ore.mix.quartz=Quartz Vein
+ore.mix.diamond=Diamond Vein
+ore.mix.olivine=Olivine Vein
+ore.mix.apatite=Apatite Vein
+ore.mix.galena=Galena Vein
+ore.mix.lapis=Lapis Vein
+ore.mix.beryllium=Beryllium Vein
+ore.mix.oilsand=Oilsand Vein \ No newline at end of file
diff --git a/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang b/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang
new file mode 100644
index 0000000000..59de961f69
--- /dev/null
+++ b/src/main/resources/assets/gtneioreplugin/lang/zh_CN.lang
@@ -0,0 +1,72 @@
+# gui names
+gui.veinStat.name=矿脉信息
+gui.asteroidStat.name=小行星信息
+gui.smallOreStat.name=贫瘠矿石信息
+
+gui.nei.veinName=矿脉名称
+gui.nei.primaryOre=上层矿石
+gui.nei.secondaryOre=下层矿石
+gui.nei.betweenOre=中层矿石
+gui.nei.sporadicOre=散乱分布
+gui.nei.genHeight=生成高度
+gui.nei.weightedChance=发现几率
+gui.nei.worldNames=生成世界
+gui.nei.restrictBiome=生物群系限制
+
+gui.nei.asteroidPrimary=主要生成1
+gui.nei.asteroidSecondary=主要生成2
+gui.nei.asteroidBetween=次要生成1
+gui.nei.asteroidSporadic=次要生成2
+
+gui.nei.oreName=矿石名称
+gui.nei.amount=每区块生成个数
+gui.nei.chanceDrops=几率掉落
+
+gui.nei.seeAll=查看全部
+
+# world names
+world.overworld.name=主世界
+world.nether.name=下界
+world.end.name=末地
+world.moon.name=月球
+world.mars.name=火星
+world.asteroid.name=星系mod小行星带
+
+
+# biome names
+biome.none.name=无
+
+
+# vein names
+ore.mix.naquadah=硅岩矿脉
+ore.mix.lignite=褐煤矿脉
+ore.mix.coal=煤矿脉
+ore.mix.magnetite=磁铁矿脉
+ore.mix.gold=金矿脉
+ore.mix.iron=铁矿脉
+ore.mix.cassiterite=锡石矿脉
+ore.mix.tetrahedrite=黝铜矿脉
+ore.mix.netherquartz=下届石英矿脉
+ore.mix.sulfur=硫矿脉
+ore.mix.copper=铜矿脉
+ore.mix.bauxite=铝土矿脉
+ore.mix.salts=岩盐矿脉
+ore.mix.redstone=红石矿脉
+ore.mix.soapstone=皂石矿脉
+ore.mix.nickel=镍矿脉
+ore.mix.platinum=铂矿脉
+ore.mix.pitchblende=沥青铀矿脉
+ore.mix.uranium=铀矿脉
+ore.mix.monazite=独居石矿脉
+ore.mix.molybdenum=钼矿脉
+ore.mix.tungstate=钨酸盐矿脉
+ore.mix.sapphire=蓝宝石矿脉
+ore.mix.manganese=锰矿脉
+ore.mix.quartz=石英岩矿脉
+ore.mix.diamond=钻石矿脉
+ore.mix.olivine=橄榄石矿脉
+ore.mix.apatite=磷灰石矿脉
+ore.mix.galena=方铅矿矿脉
+ore.mix.lapis=青金石矿脉
+ore.mix.beryllium=铍矿脉
+ore.mix.oilsand=油砂矿脉 \ No newline at end of file
diff --git a/src/main/resources/assets/gtneioreplugin/textures/gui/nei/guiBase.png b/src/main/resources/assets/gtneioreplugin/textures/gui/nei/guiBase.png
new file mode 100644
index 0000000000..87449ffd99
--- /dev/null
+++ b/src/main/resources/assets/gtneioreplugin/textures/gui/nei/guiBase.png
Binary files differ
diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info
new file mode 100644
index 0000000000..53bf12b1d3
--- /dev/null
+++ b/src/main/resources/mcmod.info
@@ -0,0 +1,16 @@
+[
+{
+ "modid": "gtneioreplugin",
+ "name": "GT NEI Ore Plugin",
+ "description": "A forge mod which adds NEI plugins for GregTech5's ores.",
+ "version": "v1.0.0",
+ "mcversion": "1.7.10",
+ "url": "",
+ "updateUrl": "",
+ "authorList": ["GWYOG"],
+ "credits": "",
+ "logoFile": "",
+ "screenshots": [],
+ "dependencies": []
+}
+]