From c27b9a2f34029b6af977317688caef7a315625e7 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Sun, 16 Dec 2018 17:59:04 +0100 Subject: Version 0.1.0 out of Techdemo stage +Added all missing texts and textures +Added Circuit Programmer +Hopefully fixed the ManualTrafo in Single Modes --- .../github/bartimaeusnek/bartworks/GuiHandler.java | 4 + .../github/bartimaeusnek/bartworks/MainMod.java | 4 +- .../gui/GT_GUIContainer_CircuitProgrammer.java | 23 ++ .../bartworks/client/gui/GT_GUIContainer_LESU.java | 3 +- .../bartworks/common/ConfigHandler.java | 7 +- .../bartworks/common/items/Circuit_Programmer.java | 90 +++++ .../common/items/GT_Destructopack_Item.java | 10 + .../bartworks/common/items/GT_Rockcutter_Item.java | 2 + .../bartworks/common/items/GT_Teslastaff_Item.java | 4 +- .../bartworks/common/loaders/ItemRegistry.java | 17 +- .../bartworks/common/loaders/RecipeLoader.java | 391 +++++++++++---------- .../tileentities/GT_MetaTileEntity_Diode.java | 2 +- .../GT_MetaTileEntity_EnergyDistributor.java | 2 +- .../common/tileentities/GT_TileEntity_DEHP.java | 14 +- .../common/tileentities/GT_TileEntity_LESU.java | 35 +- .../tileentities/GT_TileEntity_ManualTrafo.java | 351 ++++++++++++++---- .../container/GT_Container_CircuitProgrammer.java | 176 ++++++++++ 17 files changed, 840 insertions(+), 295 deletions(-) create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java create mode 100644 src/main/java/com/github/bartimaeusnek/bartworks/server/container/GT_Container_CircuitProgrammer.java (limited to 'src/main/java/com') diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java index 1a19fa32d6..7d2f2d4628 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/GuiHandler.java @@ -1,6 +1,8 @@ package com.github.bartimaeusnek.bartworks; +import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_CircuitProgrammer; import com.github.bartimaeusnek.bartworks.client.gui.GT_GUIContainer_Destructopack; +import com.github.bartimaeusnek.bartworks.server.container.GT_Container_CircuitProgrammer; import com.github.bartimaeusnek.bartworks.server.container.GT_Container_Item_Destructopack; import cpw.mods.fml.common.network.IGuiHandler; import net.minecraft.entity.player.EntityPlayer; @@ -12,6 +14,7 @@ public class GuiHandler implements IGuiHandler { public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { switch (ID){ case 0: return new GT_Container_Item_Destructopack(player.inventory); + case 1: return new GT_Container_CircuitProgrammer(player.inventory); } return null; } @@ -20,6 +23,7 @@ public class GuiHandler implements IGuiHandler { public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { switch (ID){ case 0: return new GT_GUIContainer_Destructopack(player.inventory); + case 1: return new GT_GUIContainer_CircuitProgrammer(player.inventory); } return null; } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java index cb5ab327f3..a2fc611223 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java @@ -36,6 +36,7 @@ public final class MainMod { public static final CreativeTabs GT2 = new GT2Tab("GT2C"); public static final CreativeTabs BWT = new bartworksTab("bartworks"); public static final IGuiHandler GH = new GuiHandler(); + @Mod.Instance(modID) public static MainMod instance; public static ConfigHandler CHandler; @@ -58,9 +59,6 @@ public final class MainMod { @Mod.EventHandler public void postInit(FMLPostInitializationEvent postinit) { NetworkRegistry.INSTANCE.registerGuiHandler(instance,GH); - - - } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java new file mode 100644 index 0000000000..d511369435 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/gui/GT_GUIContainer_CircuitProgrammer.java @@ -0,0 +1,23 @@ +package com.github.bartimaeusnek.bartworks.client.gui; + +import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.server.container.GT_Container_CircuitProgrammer; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.util.ResourceLocation; +import org.lwjgl.opengl.GL11; + +public class GT_GUIContainer_CircuitProgrammer extends GuiContainer { + + public GT_GUIContainer_CircuitProgrammer(InventoryPlayer p_i1072_1_) { + super(new GT_Container_CircuitProgrammer(p_i1072_1_)); + } + public static final ResourceLocation texture = new ResourceLocation(MainMod.modID, "textures/GUI/GUI_CircuitP.png"); + @Override + protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { + GL11.glColor4f(1F, 1F, 1F, 1F); + Minecraft.getMinecraft().getTextureManager().bindTexture(texture); + drawTexturedModalRect(guiLeft-79, guiTop, 0, 0, 256, 165); + } +} 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 89198f35d3..4a0b1ada5b 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 @@ -1,6 +1,7 @@ package com.github.bartimaeusnek.bartworks.client.gui; import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.common.ConfigHandler; import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU; import com.github.bartimaeusnek.bartworks.server.container.GT_Container_LESU; import gregtech.api.gui.GT_GUIContainer; @@ -29,7 +30,7 @@ public class GT_GUIContainer_LESU extends GT_GUIContainer { protected void drawGuiContainerForegroundLayer(final int par1, final int par2) { this.drawString(this.fontRendererObj,"L.E.S.U.", 11, 8, 16448255); if (this.mContainer != null) { - String percell = String.valueOf(c.energyPerCell).substring(1); + String percell = String.valueOf(ConfigHandler.energyPerCell).substring(1); this.drawString(this.fontRendererObj,"EU: " + String.valueOf(this.mContainer.mEnergy), 11, 16, 16448255); this.drawString(this.fontRendererObj,"MAX: " + (this.c.getBaseMetaTileEntity().isActive() ? String.valueOf(this.mContainer.mOutput)+ percell : Integer.toString(0)), 11, 24, 16448255); this.drawString(this.fontRendererObj,"MAX EU/t IN: " + String.valueOf(this.mContainer.mInput), 11, 32, 16448255); 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 45cfd43cbb..33999f71d4 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/ConfigHandler.java @@ -2,7 +2,6 @@ package com.github.bartimaeusnek.bartworks.common; import com.github.bartimaeusnek.bartworks.MainMod; -import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import gregtech.api.enums.GT_Values; import net.minecraftforge.common.config.Configuration; @@ -14,18 +13,22 @@ public class ConfigHandler { public static final int IDU=1+ GT_Values.VN.length; public static boolean ezmode = false; public static boolean teslastaff = false; + public static long energyPerCell = 100000L; + public static boolean newStuff = true; public final Configuration c; public ConfigHandler(FMLPreInitializationEvent e){ c = new Configuration(new File(e.getModConfigurationDirectory().toString()+"/"+MainMod.modID+".cfg")); 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); + 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; teslastaff=c.get("System","Enable Teslastaff",false,"Enables the Teslastaff, an Item used to destroy Electric Armors").getBoolean(false); + newStuff=!c.get("System","Disable non-original-GT-stuff",false,"This switch disables my new content, that is not part of the GT2 compat").getBoolean(false); if (c.hasChanged()) c.save(); + } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java new file mode 100644 index 0000000000..42167e7209 --- /dev/null +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/Circuit_Programmer.java @@ -0,0 +1,90 @@ +package com.github.bartimaeusnek.bartworks.common.items; + +import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.GT_Values; +import gregtech.api.items.GT_Generic_Item; +import ic2.api.item.ElectricItem; +import ic2.api.item.IElectricItem; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +import java.util.List; + +public class Circuit_Programmer extends GT_Generic_Item implements IElectricItem { + + public Circuit_Programmer() { + super("BWCircuitProgrammer","Circuit Programmer","Programs Integrated Circuits"); + this.setMaxStackSize(1); + this.setNoRepair(); + this.setHasSubtypes(false); + this.setCreativeTab(MainMod.BWT); + } + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + super.addInformation(aStack,aPlayer,aList,aF3_H); + aList.add("Has Circuit inside? "+ (aStack.getTagCompound().getBoolean("HasChip") ? "Yes" : "No")); + aList.add("Added by"+ ChatColorHelper.DARKGREEN +" BartWorks"); + } + + @Override + public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { + if (ElectricItem.manager.use(aStack,100,aPlayer)) { + aPlayer.openGui(MainMod.instance, 1, aWorld, 0, 0, 0); + } + return aStack; + } + + @SideOnly(Side.CLIENT) + public void getSubItems(Item p_150895_1_, CreativeTabs p_150895_2_, List itemList) { + ItemStack itemStack = new ItemStack(this, 1); + if (getChargedItem(itemStack) == this) { + ItemStack charged = new ItemStack(this, 1); + ElectricItem.manager.charge(charged, Integer.MAX_VALUE, Integer.MAX_VALUE, true, false); + itemList.add(charged); + } + if (getEmptyItem(itemStack) == this) { + itemList.add(new ItemStack(this, 1, getMaxDamage())); + } + } + + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister aIconRegister) { + this.mIcon = aIconRegister.registerIcon("bartworks:CircuitProgrammer"); + } + public int getTier(ItemStack var1){ + return 1; + } + + @Override + public boolean canProvideEnergy(ItemStack itemStack) { + return false; + } + + @Override + public Item getChargedItem(ItemStack itemStack) { + return this; + } + + @Override + public Item getEmptyItem(ItemStack itemStack) { + return this; + } + + @Override + public double getMaxCharge(ItemStack itemStack) { + return 10000; + } + + @Override + public double getTransferLimit(ItemStack itemStack) { + return GT_Values.V[1]; + } + +} 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 f3976ad979..88883a039c 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 @@ -1,6 +1,7 @@ package com.github.bartimaeusnek.bartworks.common.items; import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.items.GT_Generic_Item; @@ -9,6 +10,8 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.world.World; +import java.util.List; + public class GT_Destructopack_Item extends GT_Generic_Item { @@ -20,11 +23,18 @@ public class GT_Destructopack_Item extends GT_Generic_Item this.setCreativeTab(MainMod.GT2); } + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + super.addInformation(aStack,aPlayer,aList,aF3_H); + aList.add("Added by"+ ChatColorHelper.DARKGREEN +" BartWorks"); + } + @Override public ItemStack onItemRightClick(ItemStack aStack, World aWorld, EntityPlayer aPlayer) { aPlayer.openGui(MainMod.instance, 0, aWorld, 0, 0, 0); return aStack; } + @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aIconRegister) { this.mIcon = aIconRegister.registerIcon("bartworks:gt.GT2Destructopack"); 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 939659c332..3148281c38 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 @@ -1,6 +1,7 @@ package com.github.bartimaeusnek.bartworks.common.items; import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import com.google.common.collect.Sets; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -53,6 +54,7 @@ public class GT_Rockcutter_Item extends ItemTool implements IElectricItem public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { aList.add("Tier: " + GT_Values.VN[this.mTier]); + aList.add("Added by"+ ChatColorHelper.DARKGREEN +" BartWorks"); } public void onUpdate(ItemStack aStack, World p_77663_2_, Entity p_77663_3_, int p_77663_4_, boolean p_77663_5_) { 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 b1fc581475..59f8ac5835 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 @@ -1,6 +1,7 @@ package com.github.bartimaeusnek.bartworks.common.items; import com.github.bartimaeusnek.bartworks.MainMod; +import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import com.google.common.collect.Sets; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -20,7 +21,7 @@ import net.minecraft.util.IIcon; import java.util.List; import java.util.Set; -public class GT_Teslastaff_Item extends ItemTool implements ic2.api.item.IElectricItem +public class GT_Teslastaff_Item extends ItemTool implements IElectricItem { public double mCharge; public double mTransfer; @@ -45,6 +46,7 @@ public class GT_Teslastaff_Item extends ItemTool implements ic2.api.item.IElectr @Override public void addInformation(final ItemStack aStack, final EntityPlayer aPlayer, final List aList, final boolean aF3_H) { aList.add("No warranty!"); + aList.add("Added by"+ ChatColorHelper.DARKGREEN +" BartWorks"); } public boolean hitEntity(ItemStack aStack, EntityLivingBase aTarget, EntityLivingBase aPlayer) { diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java index ea3d2f27f7..11567daeee 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java @@ -15,6 +15,7 @@ import net.minecraft.item.ItemStack; import static com.github.bartimaeusnek.bartworks.MainMod.BWT; import static com.github.bartimaeusnek.bartworks.MainMod.GT2; +import static com.github.bartimaeusnek.bartworks.common.ConfigHandler.newStuff; public class ItemRegistry implements Runnable { @@ -23,6 +24,7 @@ public class ItemRegistry implements Runnable { public static final Item RockcutterLV = new GT_Rockcutter_Item(1); public static final Item RockcutterMV = new GT_Rockcutter_Item(2); public static final Item RockcutterHV = new GT_Rockcutter_Item(3); + public static final Item CircuitProgrammer = new Circuit_Programmer(); public static ItemStack[] Diode2A= new ItemStack[GT_Values.VN.length]; public static ItemStack[] Diode4A= new ItemStack[GT_Values.VN.length]; public static ItemStack[] Diode8A= new ItemStack[GT_Values.VN.length]; @@ -42,8 +44,8 @@ public class ItemRegistry implements Runnable { new BW_Blocks("BW_Machinery_Casings",new String[]{ MainMod.modID+":NickelFerriteBlocks", MainMod.modID+":TransformerCoil", - MainMod.modID+":DEHP_Casing", - MainMod.modID+":DEHP_Casing_Base" + // MainMod.modID+":DEHP_Casing", + // MainMod.modID+":DEHP_Casing_Base" },BWT), }; @@ -52,12 +54,15 @@ public class ItemRegistry implements Runnable { @Override public void run() { - GameRegistry.registerBlock(BW_BLOCKS[0], BW_ItemBlocks.class,"BW_ItemBlocks"); - GameRegistry.registerBlock(BW_BLOCKS[1], BW_ItemBlocks.class,"GT_LESU_CASING"); - GameRegistry.registerBlock(BW_BLOCKS[2], BW_ItemBlocks.class,"BW_Machinery_Casings"); + if (newStuff) { + GameRegistry.registerBlock(BW_BLOCKS[2], BW_ItemBlocks.class, "BW_Machinery_Casings"); + GT_OreDictUnificator.registerOre(OrePrefixes.block, Materials.NickelZincFerrite, new ItemStack(BW_BLOCKS[2])); + } - GT_OreDictUnificator.registerOre(OrePrefixes.block, Materials.NickelZincFerrite,new ItemStack(BW_BLOCKS[2])); + //GT2 stuff + GameRegistry.registerBlock(BW_BLOCKS[0], BW_ItemBlocks.class,"BW_ItemBlocks"); + GameRegistry.registerBlock(BW_BLOCKS[1], BW_ItemBlocks.class,"GT_LESU_CASING"); if (ConfigHandler.teslastaff) GameRegistry.registerItem(Teslastaff,Teslastaff.getUnlocalizedName()); 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 b7a992f2e5..9dd005076f 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 @@ -2,6 +2,7 @@ package com.github.bartimaeusnek.bartworks.common.loaders; import com.github.bartimaeusnek.bartworks.MainMod; import com.github.bartimaeusnek.bartworks.common.ConfigHandler; +import com.github.bartimaeusnek.bartworks.common.items.Circuit_Programmer; import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_Diode; import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_EnergyDistributor; import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU; @@ -18,6 +19,8 @@ import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidRegistry; +import static com.github.bartimaeusnek.bartworks.common.ConfigHandler.newStuff; + public class RecipeLoader implements Runnable { private final static long bitsd = GT_ModHandler.RecipeBits.DISMANTLEABLE | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE; @@ -25,22 +28,21 @@ public class RecipeLoader implements Runnable { @Override public void run() { - if(MainMod.GTNH) { + 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 { + 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_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( new ItemStack(ItemRegistry.BW_BLOCKS[1]), @@ -53,11 +55,11 @@ public class RecipeLoader implements Runnable { 'C', "circuitBasic" }); - GT_Values.RA.addCutterRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[1]),new ItemStack(ItemRegistry.BW_BLOCKS[0],9,1),GT_Values.NI,100,(int) (GT_Values.V[1] - (GT_Values.V[1] / 10))); - GT_Values.RA.addCompressorRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0],9,1),new ItemStack(ItemRegistry.BW_BLOCKS[1]),100,(int) (GT_Values.V[1] - (GT_Values.V[1] / 10))); - GT_Values.RA.addCompressorRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0],9,0),new ItemStack(ItemRegistry.BW_BLOCKS[1]),100,(int) (GT_Values.V[1] - (GT_Values.V[1] / 10))); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0],1,0),bitsd,new Object[]{new ItemStack(ItemRegistry.BW_BLOCKS[0],1,1)}); - GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0],1,1),bitsd,new Object[]{new ItemStack(ItemRegistry.BW_BLOCKS[0],1,0)}); + GT_Values.RA.addCutterRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[1]), new ItemStack(ItemRegistry.BW_BLOCKS[0], 9, 1), GT_Values.NI, 100, (int) (GT_Values.V[1] - (GT_Values.V[1] / 10))); + GT_Values.RA.addCompressorRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0], 9, 1), new ItemStack(ItemRegistry.BW_BLOCKS[1]), 100, (int) (GT_Values.V[1] - (GT_Values.V[1] / 10))); + GT_Values.RA.addCompressorRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0], 9, 0), new ItemStack(ItemRegistry.BW_BLOCKS[1]), 100, (int) (GT_Values.V[1] - (GT_Values.V[1] / 10))); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 0), bitsd, new Object[]{new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1)}); + GT_ModHandler.addShapelessCraftingRecipe(new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 1), bitsd, new Object[]{new ItemStack(ItemRegistry.BW_BLOCKS[0], 1, 0)}); } /* @@ -65,15 +67,15 @@ public class RecipeLoader implements Runnable { */ GT_ModHandler.addCraftingRecipe( - new GT_TileEntity_LESU(ConfigHandler.IDOffset,"LESU","LESU").getStackForm(1L), + new GT_TileEntity_LESU(ConfigHandler.IDOffset, "LESU", "LESU").getStackForm(1L), bitsd, new Object[]{ "CDC", "SBS", "CFC", - 'C', GT_OreDictUnificator.get(OrePrefixes.circuit, MainMod.GTNH ? Materials.Advanced : Materials.Basic,1L), + 'C', GT_OreDictUnificator.get(OrePrefixes.circuit, MainMod.GTNH ? Materials.Advanced : Materials.Basic, 1L), 'D', ItemList.Cover_Screen.get(1L), - 'S', GT_OreDictUnificator.get(OrePrefixes.cableGt12, MainMod.GTNH ? Materials.Platinum : Materials.AnnealedCopper,1L), + 'S', GT_OreDictUnificator.get(OrePrefixes.cableGt12, MainMod.GTNH ? Materials.Platinum : Materials.AnnealedCopper, 1L), 'B', new ItemStack(ItemRegistry.BW_BLOCKS[1]), 'F', MainMod.GTNH ? ItemList.Field_Generator_HV.get(1L) : ItemList.Field_Generator_LV.get(1L) }); @@ -85,8 +87,8 @@ public class RecipeLoader implements Runnable { "CPC", "PLP", "CPC", - 'C', GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced,1L), - 'P', GT_OreDictUnificator.get(MainMod.GTNH ? OrePrefixes.plateDouble : OrePrefixes.plate, Materials.Aluminium,1L), + 'C', GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), + 'P', GT_OreDictUnificator.get(MainMod.GTNH ? OrePrefixes.plateDouble : OrePrefixes.plate, Materials.Aluminium, 1L), 'L', new ItemStack(Items.lava_bucket) }); @@ -97,8 +99,8 @@ public class RecipeLoader implements Runnable { "CPC", "PLP", "CPC", - 'C', GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced,1L), - 'P', GT_OreDictUnificator.get(MainMod.GTNH ? OrePrefixes.plateDouble : OrePrefixes.plate, MainMod.GTNH ? Materials.Steel : Materials.Iron,1L), + 'C', GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L), + 'P', GT_OreDictUnificator.get(MainMod.GTNH ? OrePrefixes.plateDouble : OrePrefixes.plate, MainMod.GTNH ? Materials.Steel : Materials.Iron, 1L), 'L', new ItemStack(Items.lava_bucket) }); @@ -109,9 +111,9 @@ public class RecipeLoader implements Runnable { "DS ", "DP ", "DCB", - 'D', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond,1L), - 'S', GT_OreDictUnificator.get(OrePrefixes.stick,Materials.TungstenSteel,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,Materials.TungstenSteel,1L), + 'D', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), + 'S', GT_OreDictUnificator.get(OrePrefixes.stick, Materials.TungstenSteel, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.TungstenSteel, 1L), 'C', "circuitGood", 'B', ItemList.IC2_AdvBattery.get(1L) }); @@ -123,9 +125,9 @@ public class RecipeLoader implements Runnable { "DS ", "DP ", "DCB", - 'D', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond,1L), - 'S', GT_OreDictUnificator.get(OrePrefixes.stick,Materials.Titanium,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,Materials.Titanium,1L), + 'D', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), + 'S', GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Titanium, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 1L), 'C', "circuitBasic", 'B', ItemList.IC2_ReBattery.get(1L) }); @@ -137,9 +139,9 @@ public class RecipeLoader implements Runnable { "DS ", "DP ", "DCB", - 'D', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond,1L), - 'S', GT_OreDictUnificator.get(OrePrefixes.stick,Materials.Iridium,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,Materials.Iridium,1L), + 'D', GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Diamond, 1L), + 'S', GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Iridium, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 1L), 'C', "circuitAdvanced", 'B', ItemList.IC2_EnergyCrystal.get(1L) }); @@ -152,171 +154,194 @@ public class RecipeLoader implements Runnable { "BO ", "OP ", " P", - 'O', GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Superconductor,1L), + 'O', GT_OreDictUnificator.get(OrePrefixes.wireGt16, Materials.Superconductor, 1L), 'B', ItemList.Energy_LapotronicOrb.get(1L), 'P', "plateAlloyIridium", }); + if (newStuff) { + Materials[] cables = {Materials.Lead, Materials.Tin, Materials.AnnealedCopper, Materials.Gold, Materials.Aluminium, Materials.Tungsten, Materials.VanadiumGallium, Materials.Naquadah, Materials.NaquadahAlloy, Materials.Superconductor}; + Materials[] hulls = {Materials.WroughtIron, Materials.Steel, Materials.Aluminium, Materials.StainlessSteel, Materials.Titanium, Materials.TungstenSteel, Materials.Chrome, Materials.Iridium, Materials.Osmium, Materials.Naquadah}; - Materials[] cables = {Materials.Lead, Materials.Tin,Materials.AnnealedCopper,Materials.Gold,Materials.Aluminium,Materials.Tungsten, Materials.VanadiumGallium,Materials.Naquadah, Materials.NaquadahAlloy, Materials.Superconductor}; - Materials[] hulls = {Materials.WroughtIron, Materials.Steel,Materials.Aluminium,Materials.StainlessSteel,Materials.Titanium,Materials.TungstenSteel, Materials.Chrome,Materials.Iridium, Materials.Osmium, Materials.Naquadah}; - - for (int i = 0; i < GT_Values.VN.length; i++) { - try{ - Materials cable = cables[i]; - Materials hull = hulls[i]; - ItemStack machinehull = ItemList.MACHINE_HULLS[i].get(1L); + for (int i = 0; i < GT_Values.VN.length; i++) { + 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 - }); - GT_ModHandler.addCraftingRecipe( - ItemRegistry.Diode12A[i]=new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset+GT_Values.VN.length*4+1+i,"Cable Diode 12A "+GT_Values.VN[i], "Cable Diode 12A "+GT_Values.VN[i], i,12).getStackForm(1L), - bitsd, - new Object[]{ - "WDW", - "DCD", - "PDP", - 'D', ItemList.Circuit_Parts_Diode.get(1L,ItemList.Circuit_Parts_DiodeSMD.get(1L)), - 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt12,cable,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,hull,1L), - 'C', machinehull - } - ); - GT_ModHandler.addCraftingRecipe( - ItemRegistry.Diode12A[i], - bitsd, - new Object[]{ - "WDW", - "DCD", - "PDP", - 'D', ItemList.Circuit_Parts_DiodeSMD.get(1L,ItemList.Circuit_Parts_Diode.get(1L)), - 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt12,cable,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,hull,1L), - 'C', machinehull - } - ); - GT_ModHandler.addCraftingRecipe( - ItemRegistry.Diode8A[i]=new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset+GT_Values.VN.length*3+1+i,"Cable Diode 8A "+GT_Values.VN[i], "Cable Diode 8A "+GT_Values.VN[i], i,8).getStackForm(1L), - bitsd, - new Object[]{ - "WDW", - "DCD", - "PDP", - 'D', ItemList.Circuit_Parts_Diode.get(1L,ItemList.Circuit_Parts_DiodeSMD.get(1L)), - 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt08,cable,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,hull,1L), - 'C', machinehull - } - ); - GT_ModHandler.addCraftingRecipe( - ItemRegistry.Diode8A[i], - bitsd, - new Object[]{ - "WDW", - "DCD", - "PDP", - 'D', ItemList.Circuit_Parts_DiodeSMD.get(1L,ItemList.Circuit_Parts_Diode.get(1L)), - 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt08,cable,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,hull,1L), - 'C', machinehull - } - ); - GT_ModHandler.addCraftingRecipe( - ItemRegistry.Diode4A[i]=new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset+GT_Values.VN.length*2+1+i,"Cable Diode 4A "+GT_Values.VN[i], "Cable Diode 4A "+GT_Values.VN[i], i,4).getStackForm(1L), - bitsd, - new Object[]{ - "WDW", - "DCD", - "PDP", - 'D', ItemList.Circuit_Parts_Diode.get(1L,ItemList.Circuit_Parts_DiodeSMD.get(1L)), - 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt04,cable,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,hull,1L), - 'C', machinehull - } - ); - GT_ModHandler.addCraftingRecipe( - ItemRegistry.Diode4A[i], - bitsd, - new Object[]{ - "WDW", - "DCD", - "PDP", - 'D', ItemList.Circuit_Parts_DiodeSMD.get(1L,ItemList.Circuit_Parts_Diode.get(1L)), - 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt04,cable,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,hull,1L), - 'C', machinehull - } - ); - GT_ModHandler.addCraftingRecipe( - ItemRegistry.Diode2A[i]=new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset+GT_Values.VN.length+1+i,"Cable Diode 2A "+GT_Values.VN[i], "Cable Diode 2A "+GT_Values.VN[i], i,2).getStackForm(1L), - bitsd, - new Object[]{ - "WDW", - "DCD", - "PDP", - 'D', ItemList.Circuit_Parts_Diode.get(1L,ItemList.Circuit_Parts_DiodeSMD.get(1L)), - 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt02,cable,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,hull,1L), - 'C', machinehull - } - ); - GT_ModHandler.addCraftingRecipe( - ItemRegistry.Diode2A[i], - bitsd, - new Object[]{ - "WDW", - "DCD", - "PDP", - 'D', ItemList.Circuit_Parts_DiodeSMD.get(1L,ItemList.Circuit_Parts_Diode.get(1L)), - 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt02,cable,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,hull,1L), - 'C', machinehull - } - ); - GT_ModHandler.addCraftingRecipe( - ItemRegistry.Diode16A[i]=new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset+GT_Values.VN.length*5+5+i,"Cable Diode 16A "+GT_Values.VN[i], "Cable Diode 16A "+GT_Values.VN[i], i,16).getStackForm(1L), - bitsd, - new Object[]{ - "WHW", - "DCD", - "PDP", - 'H', ItemList.Circuit_Parts_Coil.get(1L), - 'D', ItemList.Circuit_Parts_Diode.get(1L,ItemList.Circuit_Parts_DiodeSMD.get(1L)), - 'W', GT_OreDictUnificator.get(OrePrefixes.wireGt16,cable,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,hull,1L), - 'C', machinehull - } - ); - GT_ModHandler.addCraftingRecipe( - ItemRegistry.Diode16A[i], - bitsd, - new Object[]{ - "WHW", - "DCD", - "PDP", - 'H', ItemList.Circuit_Parts_Coil.get(1L), - 'D', ItemList.Circuit_Parts_DiodeSMD.get(1L,ItemList.Circuit_Parts_Diode.get(1L)), - 'W', GT_OreDictUnificator.get(OrePrefixes.wireGt16,cable,1L), - 'P', GT_OreDictUnificator.get(OrePrefixes.plate,hull,1L), - 'C', machinehull - } - ); + 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 + }); + GT_ModHandler.addCraftingRecipe( + ItemRegistry.Diode12A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 4 + 1 + i, "Cable Diode 12A " + GT_Values.VN[i], "Cable Diode 12A " + GT_Values.VN[i], i, 12).getStackForm(1L), + bitsd, + new Object[]{ + "WDW", + "DCD", + "PDP", + 'D', ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)), + 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt12, cable, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, hull, 1L), + 'C', machinehull + } + ); + GT_ModHandler.addCraftingRecipe( + ItemRegistry.Diode12A[i], + bitsd, + new Object[]{ + "WDW", + "DCD", + "PDP", + 'D', ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)), + 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt12, cable, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, hull, 1L), + 'C', machinehull + } + ); + GT_ModHandler.addCraftingRecipe( + ItemRegistry.Diode8A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 3 + 1 + i, "Cable Diode 8A " + GT_Values.VN[i], "Cable Diode 8A " + GT_Values.VN[i], i, 8).getStackForm(1L), + bitsd, + new Object[]{ + "WDW", + "DCD", + "PDP", + 'D', ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)), + 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt08, cable, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, hull, 1L), + 'C', machinehull + } + ); + GT_ModHandler.addCraftingRecipe( + ItemRegistry.Diode8A[i], + bitsd, + new Object[]{ + "WDW", + "DCD", + "PDP", + 'D', ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)), + 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt08, cable, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, hull, 1L), + 'C', machinehull + } + ); + GT_ModHandler.addCraftingRecipe( + ItemRegistry.Diode4A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 2 + 1 + i, "Cable Diode 4A " + GT_Values.VN[i], "Cable Diode 4A " + GT_Values.VN[i], i, 4).getStackForm(1L), + bitsd, + new Object[]{ + "WDW", + "DCD", + "PDP", + 'D', ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)), + 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt04, cable, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, hull, 1L), + 'C', machinehull + } + ); + GT_ModHandler.addCraftingRecipe( + ItemRegistry.Diode4A[i], + bitsd, + new Object[]{ + "WDW", + "DCD", + "PDP", + 'D', ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)), + 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt04, cable, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, hull, 1L), + 'C', machinehull + } + ); + GT_ModHandler.addCraftingRecipe( + ItemRegistry.Diode2A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length + 1 + i, "Cable Diode 2A " + GT_Values.VN[i], "Cable Diode 2A " + GT_Values.VN[i], i, 2).getStackForm(1L), + bitsd, + new Object[]{ + "WDW", + "DCD", + "PDP", + 'D', ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)), + 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt02, cable, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, hull, 1L), + 'C', machinehull + } + ); + GT_ModHandler.addCraftingRecipe( + ItemRegistry.Diode2A[i], + bitsd, + new Object[]{ + "WDW", + "DCD", + "PDP", + 'D', ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)), + 'W', GT_OreDictUnificator.get(OrePrefixes.cableGt02, cable, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, hull, 1L), + 'C', machinehull + } + ); + GT_ModHandler.addCraftingRecipe( + ItemRegistry.Diode16A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 5 + 5 + i, "Cable Diode 16A " + GT_Values.VN[i], "Cable Diode 16A " + GT_Values.VN[i], i, 16).getStackForm(1L), + bitsd, + new Object[]{ + "WHW", + "DCD", + "PDP", + 'H', ItemList.Circuit_Parts_Coil.get(1L), + 'D', ItemList.Circuit_Parts_Diode.get(1L, ItemList.Circuit_Parts_DiodeSMD.get(1L)), + 'W', GT_OreDictUnificator.get(OrePrefixes.wireGt16, cable, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, hull, 1L), + 'C', machinehull + } + ); + GT_ModHandler.addCraftingRecipe( + ItemRegistry.Diode16A[i], + bitsd, + new Object[]{ + "WHW", + "DCD", + "PDP", + 'H', ItemList.Circuit_Parts_Coil.get(1L), + 'D', ItemList.Circuit_Parts_DiodeSMD.get(1L, ItemList.Circuit_Parts_Diode.get(1L)), + 'W', GT_OreDictUnificator.get(OrePrefixes.wireGt16, cable, 1L), + 'P', GT_OreDictUnificator.get(OrePrefixes.plate, hull, 1L), + 'C', machinehull + } + ); - }catch(ArrayIndexOutOfBoundsException e){ - //e.printStackTrace(); + } catch (ArrayIndexOutOfBoundsException e) { + //e.printStackTrace(); } } - new GT_TileEntity_ManualTrafo(ConfigHandler.IDOffset+GT_Values.VN.length*6+1,"ManualTravo","ManualTravo"); + GT_Values.RA.addAssemblerRecipe( + new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.wireFine, Materials.AnnealedCopper, 64L), GT_Utility.getIntegratedCircuit(17)}, + Materials.Plastic.getMolten(1152L), + new ItemStack(ItemRegistry.BW_BLOCKS[2]), + 20, + (int) (GT_Values.V[3] - (GT_Values.V[3] / 10)) + ); + + GT_ModHandler.addCraftingRecipe( + new GT_TileEntity_ManualTrafo(ConfigHandler.IDOffset + GT_Values.VN.length * 6 + 1, "Manual Travo", "Manual Travo").getStackForm(1L), + bitsd, + new Object[]{ + "SCS", + "CHC", + "ZCZ", + 'S', GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Titanium, 1L), + 'C', new ItemStack(ItemRegistry.BW_BLOCKS[2]), + 'H', ItemList.Hull_HV.get(1L), + 'Z', GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Advanced, 1L) + } + ); + + GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.circuit,Materials.Good,1L),Materials.Aluminium.getPlates(1),ItemList.Circuit_Board_Plastic.get(1L), ItemList.Battery_RE_LV_Lithium.get(1L)}, Materials.SolderingAlloy.getMolten(288L),new ItemStack(ItemRegistry.CircuitProgrammer),600,(int) (GT_Values.V[2] - (GT_Values.V[2] / 10))); //current ID: ConfigHandler.IDOffset+GT_Values.VN.length*6+1 } + } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_Diode.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_Diode.java index 0ad4ec3142..b2775252c9 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_Diode.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_Diode.java @@ -35,6 +35,6 @@ public class GT_MetaTileEntity_Diode extends GT_MetaTileEntity_BasicHull { return new GT_MetaTileEntity_Diode(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures); } public String[] getDescription() { - return new String[] {mDescription,"Voltage: "+ ChatColorHelper.YELLOW + GT_Values.V[this.mTier],"Amperage IN: " + ChatColorHelper.YELLOW + maxAmperesIn(),"Amperage OUT: " + ChatColorHelper.YELLOW + maxAmperesOut(), "Added by bartimaeusnek via BartWorks"}; + return new String[] {mDescription,"Voltage: "+ ChatColorHelper.YELLOW + GT_Values.V[this.mTier],"Amperage IN: " + ChatColorHelper.YELLOW + maxAmperesIn(),"Amperage OUT: " + ChatColorHelper.YELLOW + maxAmperesOut(), "Added by bartimaeusnek via "+ChatColorHelper.DARKGREEN+"BartWorks"}; } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java index 239484460e..218f8f0d50 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java @@ -47,7 +47,7 @@ public class GT_MetaTileEntity_EnergyDistributor extends GT_MetaTileEntity_Trans } public String[] getDescription() { - return new String[] {mDescription,"Voltage: "+ ChatColorHelper.YELLOW +GT_Values.V[this.mTier],"Amperage IN: " + ChatColorHelper.YELLOW + maxAmperesIn(),"Amperage OUT: " + ChatColorHelper.YELLOW + maxAmperesOut(), "Added by bartimaeusnek via BartWorks"}; + return new String[] {mDescription,"Voltage: "+ ChatColorHelper.YELLOW +GT_Values.V[this.mTier],"Amperage IN: " + ChatColorHelper.YELLOW + maxAmperesIn(),"Amperage OUT: " + ChatColorHelper.YELLOW + maxAmperesOut(), "Added by bartimaeusnek via "+ChatColorHelper.DARKGREEN+"BartWorks"}; } } diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_DEHP.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_DEHP.java index 150678ea23..1b2a2934fb 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_DEHP.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_DEHP.java @@ -20,7 +20,7 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase { @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { - return null; + return new GT_TileEntity_DEHP(this.mName); } @Override @@ -35,31 +35,33 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase { @Override protected ItemList getCasingBlockItem() { - return null; + return ItemList.Casing_HeatProof; } @Override protected Materials getFrameMaterial() { - return null; + return Materials.Tungsten; } @Override protected int getCasingTextureIndex() { - return 0; + return 13; } @Override protected int getMinTier() { - return 0; + return 5; } @Override protected boolean checkHatches() { - return false; + return !this.mMaintenanceHatches.isEmpty() && !this.mOutputHatches.isEmpty() && !this.mInputHatches.isEmpty(); } @Override protected void setElectricityStats() { + + } } 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 ef60d24828..501849bfcb 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 @@ -31,22 +31,14 @@ import net.minecraft.world.World; public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase { - @SideOnly(Side.CLIENT) - static IIcon[] iIcons = new IIcon[4]; - @SideOnly(Side.CLIENT) - static IIconContainer[] iIconContainers = new IIconContainer[4]; - @SideOnly(Side.CLIENT) - static ITexture[][] iTextures = new ITexture[4][1]; - @SideOnly(Side.CLIENT) - static final byte TEXID_SIDE = 0; - @SideOnly(Side.CLIENT) - static final byte TEXID_CHARGING = 1; - @SideOnly(Side.CLIENT) - static final byte TEXID_IDLE = 2; - @SideOnly(Side.CLIENT) - static final byte TEXID_EMPTY = 3; - public static long energyPerCell = 100000L; + private static IIcon[] iIcons = new IIcon[4]; + private static IIconContainer[] iIconContainers = new IIconContainer[4]; + private static ITexture[][] iTextures = new ITexture[4][1]; + private static final byte TEXID_SIDE = 0; + private static final byte TEXID_CHARGING = 1; + private static final byte TEXID_IDLE = 2; + private static final byte TEXID_EMPTY = 3; private long mStorage; public ConnectedBlocksChecker connectedcells; @@ -54,7 +46,7 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase { public GT_TileEntity_LESU(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); - this.mStorage = energyPerCell; + this.mStorage = ConfigHandler.energyPerCell; } public GT_TileEntity_LESU(String aName){ @@ -104,7 +96,7 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase { @Override public long maxEUOutput() { - return Math.min(Math.max(this.mStorage / energyPerCell, 1L), 32768L); + return Math.min(Math.max(this.mStorage / ConfigHandler.energyPerCell, 1L), 32768L); } @Override @@ -142,18 +134,19 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase { return new String[]{ "Controller Block for the GT2-Styled L.E.S.U.", "Size: ANY", - "Storage per LESU Casing: " + this.energyPerCell+"EU", + "Storage per LESU Casing: " + ConfigHandler.energyPerCell+"EU", "Output EU: LESU Casings amount"+ "Input EU: Next Voltage Tier to Output EU", "Input/Output Amps can be configured via 4 Circuits in GUI", "Output Side has a dot on it.", ChatColorHelper.RED+"Only one Controller allowed, no Wallsharing!", - "Added by bartimaeusnek via BartWorks" + "Added by bartimaeusnek via "+ChatColorHelper.DARKGREEN+"BartWorks" }; } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister aBlockIconRegister) { + for (int i = 0; i < iTextures.length; i++) { iIcons[i]=aBlockIconRegister.registerIcon(MainMod.modID+":LESU_CASING_"+i); final int finalI = i; @@ -204,6 +197,7 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase { ITexture[] ret = new ITexture[0]; if(this.isClientSide()) { + for (int i = 0; i < iTextures.length; i++) { iTextures[i][0] = new GT_RenderedTexture(iIconContainers[i], Dyes.getModulation(0, Dyes.MACHINE_METAL.mRGBa)); } @@ -331,7 +325,6 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase { @Override public boolean onRunningTick(ItemStack aStack){ this.mMaxProgresstime=1; - return true; } @@ -366,7 +359,7 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase { } this.mEfficiency=this.getMaxEfficiency(null); - this.mStorage=(energyPerCell * connectedcells.hashset.size() >= Long.MAX_VALUE-1 || energyPerCell * connectedcells.hashset.size() < 0) ? Long.MAX_VALUE-1 : energyPerCell * connectedcells.hashset.size() ; + this.mStorage=(ConfigHandler.energyPerCell * connectedcells.hashset.size() >= Long.MAX_VALUE-1 || ConfigHandler.energyPerCell * connectedcells.hashset.size() < 0) ? Long.MAX_VALUE-1 : ConfigHandler.energyPerCell * connectedcells.hashset.size() ; this.mMaxProgresstime=1; this.mProgresstime=0; diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_ManualTrafo.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_ManualTrafo.java index 2c0c255ce8..369a69ba38 100644 --- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_ManualTrafo.java +++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_ManualTrafo.java @@ -1,27 +1,34 @@ package com.github.bartimaeusnek.bartworks.common.tileentities; import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry; +import com.github.bartimaeusnek.bartworks.util.ChatColorHelper; import gregtech.api.GregTech_API; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.util.ForgeDirection; -import static gregtech.api.enums.GT_Values.V; - public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_MultiBlockBase { + private byte mode = 0; private byte texid = 2; private long mCoilWicks = 0; private boolean upstep = true; + private static final byte SINGLE_UPSTEP = 0; + private static final byte SINGLE_DOWNSTEP = 1; + private static final byte MULTI_UPSTEP = 2; + private static final byte MULTI_DOWNSTEP = 3; + public GT_TileEntity_ManualTrafo(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@