diff options
Diffstat (limited to 'src/main/java/goodgenerator/util/CrackRecipeAdder.java')
-rw-r--r-- | src/main/java/goodgenerator/util/CrackRecipeAdder.java | 417 |
1 files changed, 215 insertions, 202 deletions
diff --git a/src/main/java/goodgenerator/util/CrackRecipeAdder.java b/src/main/java/goodgenerator/util/CrackRecipeAdder.java index 5af5773a7e..bf2779b64d 100644 --- a/src/main/java/goodgenerator/util/CrackRecipeAdder.java +++ b/src/main/java/goodgenerator/util/CrackRecipeAdder.java @@ -1,6 +1,12 @@ package goodgenerator.util; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + import com.github.bartimaeusnek.bartworks.system.material.Werkstoff; + import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -9,24 +15,15 @@ import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Cable; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidRegistry; -import net.minecraftforge.fluids.FluidStack; public class CrackRecipeAdder { - static float[] coe1 = {1.25f, 1.2f, 1.1f, 0.9f, 0.85f, 0.8f, 0.75f}; - static float[] coe2 = {1.4f, 1.25f, 1.2f, 0.8f, 0.75f, 0.7f, 0.65f}; - static float[] coe3 = {1.6f, 1.5f, 1.45f, 0.7f, 0.6f, 0.55f, 0.45f}; - public static void crackerAdder( - FluidStack inputFluid, - FluidStack cracker, - FluidStack[] outputFluids, - ItemStack outputItem, - int num, - int EUt, - int Duration) { + static float[] coe1 = { 1.25f, 1.2f, 1.1f, 0.9f, 0.85f, 0.8f, 0.75f }; + static float[] coe2 = { 1.4f, 1.25f, 1.2f, 0.8f, 0.75f, 0.7f, 0.65f }; + static float[] coe3 = { 1.6f, 1.5f, 1.45f, 0.7f, 0.6f, 0.55f, 0.45f }; + + public static void crackerAdder(FluidStack inputFluid, FluidStack cracker, FluidStack[] outputFluids, + ItemStack outputItem, int num, int EUt, int Duration) { String name; FluidStack[] actOutput = new FluidStack[num]; @@ -40,7 +37,12 @@ public class CrackRecipeAdder { (int) (Duration * 0.8), EUt); GT_Values.RA.addCrackingRecipe( - 2, inputFluid, cracker, FluidRegistry.getFluidStack("moderatelycracked" + name, 1000), Duration, EUt); + 2, + inputFluid, + cracker, + FluidRegistry.getFluidStack("moderatelycracked" + name, 1000), + Duration, + EUt); GT_Values.RA.addCrackingRecipe( 3, inputFluid, @@ -89,20 +91,40 @@ public class CrackRecipeAdder { EUt / 3); } - public static void addUniversalCircuitAssemblerRecipe( - ItemStack[] inputs, ItemStack output, int solders, int duration, int EUt, boolean isClean) { + public static void addUniversalCircuitAssemblerRecipe(ItemStack[] inputs, ItemStack output, int solders, + int duration, int EUt, boolean isClean) { GT_Values.RA.addCircuitAssemblerRecipe( - inputs, Materials.SolderingAlloy.getMolten(solders), output, duration, EUt, isClean); + inputs, + Materials.SolderingAlloy.getMolten(solders), + output, + duration, + EUt, + isClean); GT_Values.RA.addCircuitAssemblerRecipe( - inputs, Materials.Tin.getMolten(solders * 2), output, duration, EUt, isClean); + inputs, + Materials.Tin.getMolten(solders * 2), + output, + duration, + EUt, + isClean); GT_Values.RA.addCircuitAssemblerRecipe( - inputs, Materials.Lead.getMolten(solders * 4), output, duration, EUt, isClean); + inputs, + Materials.Lead.getMolten(solders * 4), + output, + duration, + EUt, + isClean); } - public static void addUniversalAssemblerRecipe( - ItemStack[] inputs, ItemStack output, int solders, int duration, int EUt, boolean isClean) { + public static void addUniversalAssemblerRecipe(ItemStack[] inputs, ItemStack output, int solders, int duration, + int EUt, boolean isClean) { GT_Values.RA.addAssemblerRecipe( - inputs, Materials.SolderingAlloy.getMolten(solders), output, duration, EUt, isClean); + inputs, + Materials.SolderingAlloy.getMolten(solders), + output, + duration, + EUt, + isClean); GT_Values.RA.addAssemblerRecipe(inputs, Materials.Tin.getMolten(solders * 2), output, duration, EUt, isClean); GT_Values.RA.addAssemblerRecipe(inputs, Materials.Lead.getMolten(solders * 4), output, duration, EUt, isClean); } @@ -123,7 +145,15 @@ public class CrackRecipeAdder { level); } else { GT_Values.RA.addBlastRecipe( - input, GT_Utility.getIntegratedCircuit(1), null, null, output, null, duration, EUt, level); + input, + GT_Utility.getIntegratedCircuit(1), + null, + null, + output, + null, + duration, + EUt, + level); } } @@ -138,63 +168,58 @@ public class CrackRecipeAdder { GT_OreDictUnificator.registerOre( OrePrefixes.pipeTiny.get(material.getBridgeMaterial()), new GT_MetaPipeEntity_Fluid( - ID, - "GT_Pipe_" + unName + "_Tiny", - "Tiny " + Name + " Fluid Pipe", - 0.25F, - material.getBridgeMaterial(), - flow / 6, - temp, - gas) - .getStackForm(1L)); + ID, + "GT_Pipe_" + unName + "_Tiny", + "Tiny " + Name + " Fluid Pipe", + 0.25F, + material.getBridgeMaterial(), + flow / 6, + temp, + gas).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.pipeSmall.get(material.getBridgeMaterial()), new GT_MetaPipeEntity_Fluid( - ID + 1, - "GT_Pipe_" + unName + "_Small", - "Small " + Name + " Fluid Pipe", - 0.375F, - material.getBridgeMaterial(), - flow / 3, - temp, - gas) - .getStackForm(1L)); + ID + 1, + "GT_Pipe_" + unName + "_Small", + "Small " + Name + " Fluid Pipe", + 0.375F, + material.getBridgeMaterial(), + flow / 3, + temp, + gas).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.pipeMedium.get(material.getBridgeMaterial()), new GT_MetaPipeEntity_Fluid( - ID + 2, - "GT_Pipe_" + unName, - Name + " Fluid Pipe", - 0.5F, - material.getBridgeMaterial(), - flow, - temp, - gas) - .getStackForm(1L)); + ID + 2, + "GT_Pipe_" + unName, + Name + " Fluid Pipe", + 0.5F, + material.getBridgeMaterial(), + flow, + temp, + gas).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.pipeLarge.get(material.getBridgeMaterial()), new GT_MetaPipeEntity_Fluid( - ID + 3, - "GT_Pipe_" + unName + "_Large", - "Large " + Name + " Fluid Pipe", - 0.75F, - material.getBridgeMaterial(), - flow * 2, - temp, - gas) - .getStackForm(1L)); + ID + 3, + "GT_Pipe_" + unName + "_Large", + "Large " + Name + " Fluid Pipe", + 0.75F, + material.getBridgeMaterial(), + flow * 2, + temp, + gas).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.pipeHuge.get(material.getBridgeMaterial()), new GT_MetaPipeEntity_Fluid( - ID + 4, - "GT_Pipe_" + unName + "_Huge", - "Huge " + Name + " Fluid Pipe", - 0.875F, - material.getBridgeMaterial(), - flow * 4, - temp, - gas) - .getStackForm(1L)); + ID + 4, + "GT_Pipe_" + unName + "_Huge", + "Huge " + Name + " Fluid Pipe", + 0.875F, + material.getBridgeMaterial(), + flow * 4, + temp, + gas).getStackForm(1L)); GT_Values.RA.addExtruderRecipe( material.get(OrePrefixes.ingot, 1), ItemList.Shape_Extruder_Pipe_Tiny.get(0), @@ -269,183 +294,171 @@ public class CrackRecipeAdder { OrePrefixes.wireGt01, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 0, - aTextWire1 + unName + ".01", - "1x " + Name + aTextWire2, - 0.125F, - material.getBridgeMaterial(), - aLoss, - 1L * aAmperage, - aVoltage, - false, - true) - .getStackForm(1L)); + ID + 0, + aTextWire1 + unName + ".01", + "1x " + Name + aTextWire2, + 0.125F, + material.getBridgeMaterial(), + aLoss, + 1L * aAmperage, + aVoltage, + false, + true).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.wireGt02, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 1, - aTextWire1 + unName + ".02", - "2x " + Name + aTextWire2, - 0.25F, - material.getBridgeMaterial(), - aLoss, - 2L * aAmperage, - aVoltage, - false, - true) - .getStackForm(1L)); + ID + 1, + aTextWire1 + unName + ".02", + "2x " + Name + aTextWire2, + 0.25F, + material.getBridgeMaterial(), + aLoss, + 2L * aAmperage, + aVoltage, + false, + true).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.wireGt04, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 2, - aTextWire1 + unName + ".04", - "4x " + Name + aTextWire2, - 0.375F, - material.getBridgeMaterial(), - aLoss, - 4L * aAmperage, - aVoltage, - false, - true) - .getStackForm(1L)); + ID + 2, + aTextWire1 + unName + ".04", + "4x " + Name + aTextWire2, + 0.375F, + material.getBridgeMaterial(), + aLoss, + 4L * aAmperage, + aVoltage, + false, + true).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.wireGt08, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 3, - aTextWire1 + unName + ".08", - "8x " + Name + aTextWire2, - 0.5F, - material.getBridgeMaterial(), - aLoss, - 8L * aAmperage, - aVoltage, - false, - true) - .getStackForm(1L)); + ID + 3, + aTextWire1 + unName + ".08", + "8x " + Name + aTextWire2, + 0.5F, + material.getBridgeMaterial(), + aLoss, + 8L * aAmperage, + aVoltage, + false, + true).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.wireGt12, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 4, - aTextWire1 + unName + ".12", - "12x " + Name + aTextWire2, - 0.625F, - material.getBridgeMaterial(), - aLoss, - 12L * aAmperage, - aVoltage, - false, - true) - .getStackForm(1L)); + ID + 4, + aTextWire1 + unName + ".12", + "12x " + Name + aTextWire2, + 0.625F, + material.getBridgeMaterial(), + aLoss, + 12L * aAmperage, + aVoltage, + false, + true).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.wireGt16, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 5, - aTextWire1 + unName + ".16", - "16x " + Name + aTextWire2, - 0.75F, - material.getBridgeMaterial(), - aLoss, - 16L * aAmperage, - aVoltage, - false, - true) - .getStackForm(1L)); + ID + 5, + aTextWire1 + unName + ".16", + "16x " + Name + aTextWire2, + 0.75F, + material.getBridgeMaterial(), + aLoss, + 16L * aAmperage, + aVoltage, + false, + true).getStackForm(1L)); if (cover) { GT_OreDictUnificator.registerOre( OrePrefixes.cableGt01, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 6, - aTextCable1 + unName + ".01", - "1x " + Name + aTextCable2, - 0.25F, - material.getBridgeMaterial(), - aLossInsulated, - 1L * aAmperage, - aVoltage, - true, - false) - .getStackForm(1L)); + ID + 6, + aTextCable1 + unName + ".01", + "1x " + Name + aTextCable2, + 0.25F, + material.getBridgeMaterial(), + aLossInsulated, + 1L * aAmperage, + aVoltage, + true, + false).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.cableGt02, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 7, - aTextCable1 + unName + ".02", - "2x " + Name + aTextCable2, - 0.375F, - material.getBridgeMaterial(), - aLossInsulated, - 2L * aAmperage, - aVoltage, - true, - false) - .getStackForm(1L)); + ID + 7, + aTextCable1 + unName + ".02", + "2x " + Name + aTextCable2, + 0.375F, + material.getBridgeMaterial(), + aLossInsulated, + 2L * aAmperage, + aVoltage, + true, + false).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.cableGt04, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 8, - aTextCable1 + unName + ".04", - "4x " + Name + aTextCable2, - 0.5F, - material.getBridgeMaterial(), - aLossInsulated, - 4L * aAmperage, - aVoltage, - true, - false) - .getStackForm(1L)); + ID + 8, + aTextCable1 + unName + ".04", + "4x " + Name + aTextCable2, + 0.5F, + material.getBridgeMaterial(), + aLossInsulated, + 4L * aAmperage, + aVoltage, + true, + false).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.cableGt08, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 9, - aTextCable1 + unName + ".08", - "8x " + Name + aTextCable2, - 0.625F, - material.getBridgeMaterial(), - aLossInsulated, - 8L * aAmperage, - aVoltage, - true, - false) - .getStackForm(1L)); + ID + 9, + aTextCable1 + unName + ".08", + "8x " + Name + aTextCable2, + 0.625F, + material.getBridgeMaterial(), + aLossInsulated, + 8L * aAmperage, + aVoltage, + true, + false).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.cableGt12, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 10, - aTextCable1 + unName + ".12", - "12x " + Name + aTextCable2, - 0.75F, - material.getBridgeMaterial(), - aLossInsulated, - 12L * aAmperage, - aVoltage, - true, - false) - .getStackForm(1L)); + ID + 10, + aTextCable1 + unName + ".12", + "12x " + Name + aTextCable2, + 0.75F, + material.getBridgeMaterial(), + aLossInsulated, + 12L * aAmperage, + aVoltage, + true, + false).getStackForm(1L)); GT_OreDictUnificator.registerOre( OrePrefixes.cableGt16, material.getBridgeMaterial(), new GT_MetaPipeEntity_Cable( - ID + 11, - aTextCable1 + unName + ".16", - "16x " + Name + aTextCable2, - 0.875F, - material.getBridgeMaterial(), - aLossInsulated, - 16L * aAmperage, - aVoltage, - true, - false) - .getStackForm(1L)); + ID + 11, + aTextCable1 + unName + ".16", + "16x " + Name + aTextCable2, + 0.875F, + material.getBridgeMaterial(), + aLossInsulated, + 16L * aAmperage, + aVoltage, + true, + false).getStackForm(1L)); } GT_Values.RA.addWiremillRecipe( material.get(OrePrefixes.ingot, 1), |