diff options
author | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2018-09-17 00:35:47 +0200 |
---|---|---|
committer | bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> | 2018-09-17 00:35:47 +0200 |
commit | 44f6b8316644d6d4c1289d737c01978aacd74879 (patch) | |
tree | 1b0b8e2f703931e801a0318627170c493b2d6c8f /src | |
parent | c05995f211407bc8538b35695254e6934d90c054 (diff) | |
download | GT5-Unofficial-44f6b8316644d6d4c1289d737c01978aacd74879.tar.gz GT5-Unofficial-44f6b8316644d6d4c1289d737c01978aacd74879.tar.bz2 GT5-Unofficial-44f6b8316644d6d4c1289d737c01978aacd74879.zip |
fixed ID range
added EnergyDistributor Recipe
Diffstat (limited to 'src')
10 files changed, 38 insertions, 25 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index 8e7bb21122..2c431d3d1d 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -1,16 +1,9 @@ package com.github.bartimaeusnek.bartworks; -import codechicken.nei.NEIActions; -import codechicken.nei.NEIClientUtils; -import codechicken.nei.NEIServerUtils; -import codechicken.nei.asm.NEICorePlugin; import com.github.bartimaeusnek.bartworks.client.creativetabs.GT2Tab; import com.github.bartimaeusnek.bartworks.common.ConfigHandler; -import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; import com.github.bartimaeusnek.bartworks.common.loaders.LoaderRegistry; -import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_EnergyDistributor; -import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.event.FMLInitializationEvent; @@ -18,8 +11,6 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.IGuiHandler; import cpw.mods.fml.common.network.NetworkRegistry; -import gregtech.api.enums.GT_Values; -import gregtech.nei.NEI_GT_Config; import net.minecraft.creativetab.CreativeTabs; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java index 4946bdb328..68e2516979 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_Destructopack.java @@ -5,7 +5,6 @@ import com.github.bartimaeusnek.bartworks.server.container.GT_Container_Item_Des import net.minecraft.client.Minecraft; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java index 574bc89536..89198f35d3 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_LESU.java @@ -3,7 +3,6 @@ package com.github.bartimaeusnek.bartworks.client.gui; import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU; import com.github.bartimaeusnek.bartworks.server.container.GT_Container_LESU; -import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import gregtech.api.gui.GT_GUIContainer; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import net.minecraft.client.Minecraft; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java index e1dbebf049..45cfd43cbb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java @@ -10,7 +10,7 @@ import net.minecraftforge.common.config.Configuration; import java.io.File; public class ConfigHandler { - public static int IDOffset = 12500; + public static int IDOffset = 12600; public static final int IDU=1+ GT_Values.VN.length; public static boolean ezmode = false; public static boolean teslastaff = false; @@ -18,7 +18,7 @@ public class ConfigHandler { public ConfigHandler(FMLPreInitializationEvent e){ c = new Configuration(new File(e.getModConfigurationDirectory().toString()+"/"+MainMod.modID+".cfg")); - IDOffset=c.get("System","ID Offset",12500,"ID Offset for this mod. This Mod uses "+IDU+" IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS").getInt(12500); + IDOffset=c.get("System","ID Offset",12600,"ID Offset for this mod. This Mod uses "+IDU+" IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS").getInt(12600); GT_TileEntity_LESU.energyPerCell=c.get("Multiblocks","energyPerLESUCell",1000000,"This will set Up the Energy per LESU Cell",1000000,Integer.MAX_VALUE).getInt(1000000); ezmode=c.get("System","Mode switch",false,"If GTNH is Loaded, this will enable easy recipes, if not, it will enable harder recipes.").getBoolean(false); MainMod.GTNH = ezmode ? !MainMod.GTNH : MainMod.GTNH; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java index 3747bb2141..f3976ad979 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Destructopack_Item.java @@ -4,13 +4,10 @@ import com.github.bartimaeusnek.bartworks.MainMod; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.items.GT_Generic_Item; -import gregtech.api.util.GT_Config; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; -import sun.applet.Main; public class GT_Destructopack_Item extends GT_Generic_Item { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java index 7e4ef6c05c..939659c332 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Rockcutter_Item.java @@ -4,7 +4,6 @@ import com.github.bartimaeusnek.bartworks.MainMod; import com.google.common.collect.Sets; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java index addc694783..b1fc581475 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/GT_Teslastaff_Item.java @@ -4,7 +4,6 @@ import com.github.bartimaeusnek.bartworks.MainMod; import com.google.common.collect.Sets; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.GregTech_API; import ic2.api.item.ElectricItem; import ic2.api.item.IElectricItem; import net.minecraft.client.renderer.texture.IIconRegister; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java index dc7a7acda8..50de3bd0f0 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java @@ -24,11 +24,20 @@ public class RecipeLoader implements Runnable { public void run() { if(MainMod.GTNH) { + /* + * GTNH "hardmode" Recipes + */ + GT_Values.RA.addFluidSolidifierRecipe(new ItemStack(Blocks.lapis_block),Materials.Iron.getMolten(1296L),new ItemStack(ItemRegistry.BW_BLOCKS[0],1,0),100,(int) (GT_Values.V[3]-(GT_Values.V[3]/10))); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(ItemRegistry.BW_BLOCKS[0],1,0), Materials.Lapis.getPlates(9), GT_OreDictUnificator.get(OrePrefixes.circuit,Materials.Advanced,2L), GT_Utility.getIntegratedCircuit(17)}, FluidRegistry.getFluidStack("ic2coolant",1000),new ItemStack(ItemRegistry.BW_BLOCKS[0],1,1),100,(int) (GT_Values.V[3]-(GT_Values.V[3]/10))); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{new ItemStack(ItemRegistry.BW_BLOCKS[0],1,1), Materials.Lapis.getBlocks(8), GT_Utility.getIntegratedCircuit(17)}, GT_Values.NF, new ItemStack(ItemRegistry.BW_BLOCKS[1]),100,(int) (GT_Values.V[3]-(GT_Values.V[3]/10))); } else { + /* + * Vanilla Recipes + */ + + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{Materials.Lapis.getBlocks(8), GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L), GT_Utility.getIntegratedCircuit(17)}, GT_Values.NF, new ItemStack(ItemRegistry.BW_BLOCKS[1]), 100,(int) (GT_Values.V[1] - (GT_Values.V[1] / 10))); GT_ModHandler.addCraftingRecipe( @@ -49,6 +58,10 @@ public class RecipeLoader implements Runnable { GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0],1,1),bitsd,new Object[]{new ItemStack(ItemRegistry.BW_BLOCKS[0],1,0)}); } + /* + * Common Recipes + */ + GT_ModHandler.addCraftingRecipe( new GT_TileEntity_LESU(ConfigHandler.IDOffset,"LESU","LESU").getStackForm(1L), bitsd, @@ -142,8 +155,29 @@ public class RecipeLoader implements Runnable { 'P', "plateAlloyIridium", }); + + Materials[] cables = {Materials.Lead, Materials.Tin,Materials.AnnealedCopper,Materials.Gold,Materials.Aluminium,Materials.Tungsten, Materials.VanadiumGallium,Materials.Naquadah, Materials.Naquadah, Materials.Superconductor}; + Materials[] hulls = {Materials.WroughtIron, Materials.Steel,Materials.Aluminium,Materials.StainlessSteel,Materials.Titanium,Materials.TungstenSteel, Materials.Chrome,Materials.Iridium, Materials.Osmium, Materials.NaquadahAlloy}; + for (int i = 0; i < GT_Values.VN.length; i++) { - new GT_MetaTileEntity_EnergyDistributor(ConfigHandler.IDOffset+1+i,"Energy Distributor "+GT_Values.VN[i], "Energy Distributor "+GT_Values.VN[i], i, "Splits Amperage into several Sides"); + try{ + Materials cable = cables[i]; + Materials hull = hulls[i]; + ItemStack machinehull = ItemList.MACHINE_HULLS[i].get(1L); + GT_ModHandler.addCraftingRecipe( + new GT_MetaTileEntity_EnergyDistributor(ConfigHandler.IDOffset+1+i,"Energy Distributor "+GT_Values.VN[i], "Energy Distributor "+GT_Values.VN[i], i, "Splits Amperage into several Sides").getStackForm(1L), + bitsd, + new Object[]{ + "PWP", + "WCW", + "PWP", + 'W', GT_OreDictUnificator.get(OrePrefixes.wireGt16,cable,1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate,hull,1L), + 'C', machinehull + }); + }catch(ArrayIndexOutOfBoundsException e){ + //e.printStackTrace(); + } + } } - } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java index f4dca5cb4c..0441e7ebce 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java @@ -18,11 +18,8 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockB import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.IIcon; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java index 8b91ccf315..3e28f36d0b 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_LESU.java @@ -2,10 +2,8 @@ package com.github.bartimaeusnek.bartworks.server.container; import gregtech.api.gui.GT_Container_MultiMachine; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; public class GT_Container_LESU extends GT_Container_MultiMachine { |