aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/xmod/gregtech/loaders/Processing_Ingot1.java
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-08-27 01:34:08 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-08-27 01:34:08 +1000
commit072f6322fb789703f163030edf4b60bf5a0201af (patch)
tree9d2d9c2ba6fe3bc5139a9868ee4eca95629fdd95 /src/Java/miscutil/xmod/gregtech/loaders/Processing_Ingot1.java
parentf555ac2e146e572155e176131c23e73cd74684f1 (diff)
downloadGT5-Unofficial-072f6322fb789703f163030edf4b60bf5a0201af.tar.gz
GT5-Unofficial-072f6322fb789703f163030edf4b60bf5a0201af.tar.bz2
GT5-Unofficial-072f6322fb789703f163030edf4b60bf5a0201af.zip
+ Attempted to add custom IC2 generators.
% Refactored the xmod package to be a parent, beside core. No longer is it a child, it needs room to grow.
Diffstat (limited to 'src/Java/miscutil/xmod/gregtech/loaders/Processing_Ingot1.java')
-rw-r--r--src/Java/miscutil/xmod/gregtech/loaders/Processing_Ingot1.java68
1 files changed, 68 insertions, 0 deletions
diff --git a/src/Java/miscutil/xmod/gregtech/loaders/Processing_Ingot1.java b/src/Java/miscutil/xmod/gregtech/loaders/Processing_Ingot1.java
new file mode 100644
index 0000000000..d8b13e2df0
--- /dev/null
+++ b/src/Java/miscutil/xmod/gregtech/loaders/Processing_Ingot1.java
@@ -0,0 +1,68 @@
+package miscutil.xmod.gregtech.loaders;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.enums.SubTag;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+import miscutil.core.util.Utils;
+import miscutil.xmod.gregtech.api.enums.GregtechOrePrefixes;
+import miscutil.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
+import miscutil.xmod.gregtech.api.interfaces.internal.Interface_OreRecipeRegistrator;
+import miscutil.xmod.gregtech.api.util.GregtechRecipeRegistrator;
+import net.minecraft.item.ItemStack;
+
+public class Processing_Ingot1 implements Interface_OreRecipeRegistrator {
+ public Processing_Ingot1() {
+ GregtechOrePrefixes.ingot.add(this);
+ }
+
+ @Override
+ public void registerOre(GregtechOrePrefixes aPrefix, GT_Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
+ Utils.LOG_INFO("Processing Ingots");
+ if (aMaterial.mFuelPower > 0) {
+ GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, aMaterial.mFuelPower, aMaterial.mFuelType);
+ }
+ GT_Values.RA.addBoxingRecipe(GT_Utility.copyAmount(16L, new Object[]{aStack}), ItemList.Crate_Empty.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, aMaterial, 1L), 100, 8);
+ GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(OrePrefixes.crateGtIngot, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 16L), ItemList.Crate_Empty.get(1L, new Object[0]), 800, 1);
+
+ if (aMaterial.mStandardMoltenFluid != null)
+ GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0L, new Object[0]), aMaterial.getMolten(144L), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), 32, 8);
+ GregtechRecipeRegistrator.registerReverseFluidSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, null);
+ GregtechRecipeRegistrator.registerReverseMacerating(aStack, aMaterial, aPrefix.mMaterialAmount, null, null, null, false);
+ if (aMaterial.mSmeltInto.mArcSmeltInto != aMaterial) {
+ GregtechRecipeRegistrator.registerReverseArcSmelting(GT_Utility.copyAmount(1L, new Object[]{aStack}), aMaterial, aPrefix.mMaterialAmount, null, null, null);
+ }
+ if (!aMaterial.contains(SubTag.NO_SMASHING)) {
+ GT_Values.RA.addWiremillRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.copy(new Object[]{GT_OreDictUnificator.get(OrePrefixes.wireGt01, aMaterial, 2L), GT_OreDictUnificator.get(OrePrefixes.wireFine, aMaterial, 8L)}), 100, 4);
+ GT_Values.RA.addForgeHammerRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), (int) Math.max(aMaterial.getMass(), 1L), 16);
+ GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L), (int) Math.max(aMaterial.getMass() * 1L, 1L), 24);
+ GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 1L), (int) Math.max(aMaterial.getMass() * 2L, 1L), 96);
+ GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial, 1L), (int) Math.max(aMaterial.getMass() * 3L, 1L), 96);
+ GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L), (int) Math.max(aMaterial.getMass() * 4L, 1L), 96);
+ GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(5L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plateQuintuple, aMaterial, 1L), (int) Math.max(aMaterial.getMass() * 5L, 1L), 96);
+ GT_Values.RA.addBenderRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L), (int) Math.max(aMaterial.getMass() * 9L, 1L), 96);
+ }
+
+
+ if (!GregtechOrePrefixes.block.isIgnored(aMaterial))
+ GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L));
+ if (!aMaterial.contains(SubTag.NO_WORKING))
+ GT_Values.RA.addLatheRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial.mMacerateInto, 2L), (int) Math.max(aMaterial.getMass() * 5L, 1L), 16);
+ if (!aMaterial.contains(SubTag.NO_SMELTING)) {
+ GT_Values.RA.addAlloySmelterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), ItemList.Shape_Mold_Nugget.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 9L), 100, 1);
+ if ((GT_ModHandler.getSmeltingOutput(aStack, false, null) == null) && (GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial.mSmeltInto, 1L) != null) && (!GT_ModHandler.addSmeltingRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial.mSmeltInto, 9L))))
+ GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial.mSmeltInto, 9L), new Object[]{aOreDictName});
+ }
+ ItemStack tStack;
+ if ((null != (tStack = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial.mMacerateInto, 1L))) && (
+ (aMaterial.mBlastFurnaceRequired) || (aMaterial.contains(SubTag.NO_SMELTING)))) {
+ GT_ModHandler.removeFurnaceSmelting(tStack);
+ }
+
+ GregtechRecipeRegistrator.registerUsagesForGT_Materials(GT_Utility.copyAmount(1L, new Object[]{aStack}), OrePrefixes.plate.get(aMaterial).toString(), !aMaterial.contains(SubTag.NO_SMASHING));
+
+ }
+}