aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/gregtech')
-rw-r--r--src/main/java/gregtech/GT_Mod.java21
-rw-r--r--src/main/java/gregtech/api/GregTech_API.java4
-rw-r--r--src/main/java/gregtech/api/enums/ConfigCategories.java4
-rw-r--r--src/main/java/gregtech/api/recipe/RecipeMapBackend.java3
-rw-r--r--src/main/java/gregtech/api/util/GT_BaseCrop.java14
-rw-r--r--src/main/java/gregtech/api/util/GT_ModHandler.java17
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeConstants.java8
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeRegistrator.java57
-rw-r--r--src/main/java/gregtech/common/GT_RecipeAdder.java227
-rw-r--r--src/main/java/gregtech/common/GT_ThaumcraftCompat.java12
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Item_02.java8
-rw-r--r--src/main/java/gregtech/common/items/GT_MetaGenerated_Tool_01.java51
-rw-r--r--src/main/java/gregtech/loaders/load/GT_ItemIterator.java29
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingBlock.java40
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java247
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java5
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingGem.java35
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingIngot.java21
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java20
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingNugget.java3
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java7
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingPlate.java134
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingShaping.java5
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingStone.java19
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_CraftingRecipeLoader.java299
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_RecyclerBlacklistLoader.java152
-rw-r--r--src/main/java/gregtech/loaders/postload/recipes/AssemblerRecipes.java89
-rw-r--r--src/main/java/gregtech/loaders/postload/recipes/Pulverizer.java7
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_PreLoad.java6
29 files changed, 647 insertions, 897 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index 90791c95f2..2569ff3b53 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -51,7 +51,6 @@ import gregtech.api.GregTech_API;
import gregtech.api.enchants.Enchantment_EnderDamage;
import gregtech.api.enchants.Enchantment_Hazmat;
import gregtech.api.enchants.Enchantment_Radioactivity;
-import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -439,14 +438,12 @@ public class GT_Mod implements IGT_Mod {
null,
null),
new ItemData(Materials.Tin, 10886400L));
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.storageblockcrafting, "tile.glowstone", false)) {
- GT_ModHandler.removeRecipe(
- new ItemStack(Items.glowstone_dust, 1),
- new ItemStack(Items.glowstone_dust, 1),
- null,
- new ItemStack(Items.glowstone_dust, 1),
- new ItemStack(Items.glowstone_dust, 1));
- }
+ GT_ModHandler.removeRecipe(
+ new ItemStack(Items.glowstone_dust, 1),
+ new ItemStack(Items.glowstone_dust, 1),
+ null,
+ new ItemStack(Items.glowstone_dust, 1),
+ new ItemStack(Items.glowstone_dust, 1));
GT_ModHandler.removeRecipeDelayed(
new ItemStack(Blocks.wooden_slab, 1, 0),
new ItemStack(Blocks.wooden_slab, 1, 1),
@@ -484,9 +481,7 @@ public class GT_Mod implements IGT_Mod {
.getDisplayName()));
}
new GT_CraftingRecipeLoader().run();
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2forgehammer", true)) {
- GT_ModHandler.removeRecipeByOutput(ItemList.IC2_ForgeHammer.getWildcard(1L));
- }
+ GT_ModHandler.removeRecipeByOutput(ItemList.IC2_ForgeHammer.getWildcard(1L));
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("machine", 1L));
GT_ModHandler.addCraftingRecipe(
GT_ModHandler.getIC2Item("machine", 1L),
@@ -517,8 +512,6 @@ public class GT_Mod implements IGT_Mod {
new String[] { "blastfurnace", "blockcutter", "inductionFurnace", "generator", "windMill", "waterMill",
"solarPanel", "centrifuge", "electrolyzer", "compressor", "electroFurnace", "extractor",
"macerator", "recycler", "metalformer", "orewashingplant", "massFabricator", "replicator", })
- .filter(
- tName -> GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + tName, true))
.map(tName -> GT_ModHandler.getIC2Item(tName, 1L))
.forEach(GT_ModHandler::removeRecipeByOutputDelayed);
diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java
index 47c99403ab..e80bc7345b 100644
--- a/src/main/java/gregtech/api/GregTech_API.java
+++ b/src/main/java/gregtech/api/GregTech_API.java
@@ -279,8 +279,8 @@ public class GregTech_API {
/**
* The Configuration Objects
*/
- public static GT_Config sRecipeFile = null, sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null,
- sUnification = null, sSpecialFile = null, sClientDataFile, sOPStuff = null;
+ public static GT_Config sMachineFile = null, sWorldgenFile = null, sMaterialProperties = null, sUnification = null,
+ sSpecialFile = null, sClientDataFile, sOPStuff = null;
public static int TICKS_FOR_LAG_AVERAGING = 25, MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = 100;
/**
diff --git a/src/main/java/gregtech/api/enums/ConfigCategories.java b/src/main/java/gregtech/api/enums/ConfigCategories.java
index a85d569d74..83deec4f58 100644
--- a/src/main/java/gregtech/api/enums/ConfigCategories.java
+++ b/src/main/java/gregtech/api/enums/ConfigCategories.java
@@ -20,14 +20,12 @@ public enum ConfigCategories {
}
public enum Recipes {
- researches,
harderrecipes,
gregtechrecipes,
disabledrecipes,
recipereplacements,
storageblockcrafting,
- storageblockdecrafting,
- crops
+ storageblockdecrafting
}
public enum Machines {
diff --git a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
index cbc2e8b73f..a539067e93 100644
--- a/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
+++ b/src/main/java/gregtech/api/recipe/RecipeMapBackend.java
@@ -174,8 +174,7 @@ public class RecipeMapBackend {
if (properties.recipeConfigCategory != null) {
assert properties.recipeConfigKeyConvertor != null;
String configKey = properties.recipeConfigKeyConvertor.apply(recipe);
- if (configKey != null && (recipe.mDuration = GregTech_API.sRecipeFile
- .get(properties.recipeConfigCategory, configKey, recipe.mDuration)) <= 0) {
+ if (configKey != null && recipe.mDuration <= 0) {
continue;
}
}
diff --git a/src/main/java/gregtech/api/util/GT_BaseCrop.java b/src/main/java/gregtech/api/util/GT_BaseCrop.java
index c379cec52a..d8608c85a0 100644
--- a/src/main/java/gregtech/api/util/GT_BaseCrop.java
+++ b/src/main/java/gregtech/api/util/GT_BaseCrop.java
@@ -115,12 +115,10 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo {
mStats[4] = aStatWeed;
mAttributes = aAttributes;
mBlock = aBlock;
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.crops, aCropName, true)) {
- if (!Crops.instance.registerCrop(this, aID))
- throw new GT_ItsNotMyFaultException("Make sure the Crop ID is valid!");
- if (aBaseSeed != null) Crops.instance.registerBaseSeed(aBaseSeed, this, 1, 1, 1, 1);
- sCropList.add(this);
- }
+ if (!Crops.instance.registerCrop(this, aID))
+ throw new GT_ItsNotMyFaultException("Make sure the Crop ID is valid!");
+ if (aBaseSeed != null) Crops.instance.registerBaseSeed(aBaseSeed, this, 1, 1, 1, 1);
+ sCropList.add(this);
}
if (bIc2NeiLoaded) {
try {
@@ -226,7 +224,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo {
/**
* Checks if the crop needs a block below it
- *
+ *
* @return True if the crop needs a block below it to grow to its max size
*/
public boolean needsBlockBelow() {
@@ -263,7 +261,7 @@ public class GT_BaseCrop extends CropCard implements ICropCardInfo {
/**
* An isolated function to check if an item stack is a block that should be below this crop
- *
+ *
* @param aItem a stack of the block placed under the crop
* @return The result of the check
*/
diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java
index 0ada5df764..70dc2f30b0 100644
--- a/src/main/java/gregtech/api/util/GT_ModHandler.java
+++ b/src/main/java/gregtech/api/util/GT_ModHandler.java
@@ -58,7 +58,6 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -494,8 +493,6 @@ public class GT_ModHandler {
if (aOutput == null || aChance <= 0) return false;
aOutput.stackSize = 1;
if (GT_Config.troll && !GT_Utility.areStacksEqual(aOutput, new ItemStack(Items.wooden_hoe, 1, 0))) return false;
- aChance = (float) GregTech_API.sRecipeFile.get(ConfigCategories.Machines.scrapboxdrops, aOutput, aChance);
- if (aChance <= 0) return false;
try {
GT_Utility.callMethod(
GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true, true),
@@ -538,7 +535,6 @@ public class GT_ModHandler {
public static boolean addSmeltingRecipe(ItemStack aInput, ItemStack aOutput) {
aOutput = GT_OreDictUnificator.get(true, aOutput);
if (aInput == null || aOutput == null) return false;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.smelting, aInput, true)) return false;
FurnaceRecipes.smelting()
.func_151394_a(aInput, GT_Utility.copyOrNull(aOutput), 0.0F);
return true;
@@ -562,10 +558,6 @@ public class GT_ModHandler {
|| (OrePrefixes.gem.contains(aInput)))) {
return false;
}
- int duration = GregTech_API.sRecipeFile.get("alloysmelting", input2 == null ? aInput : aOutput, 130);
- if (duration <= 0) {
- return false;
- }
GT_RecipeBuilder recipeBuilder = GT_Values.RA.stdBuilder();
if (input2 == null) {
recipeBuilder.itemInputs(aInput);
@@ -573,7 +565,7 @@ public class GT_ModHandler {
recipeBuilder.itemInputs(aInput, input2);
}
recipeBuilder.itemOutputs(aOutput)
- .duration(duration * TICKS)
+ .duration(6 * SECONDS + 10 * TICKS)
.eut(3)
.recipeCategory(RecipeCategories.alloySmelterRecycling);
if (hidden) {
@@ -617,7 +609,6 @@ public class GT_ModHandler {
public static boolean addExtractionRecipe(ItemStack aInput, ItemStack aOutput) {
aOutput = GT_OreDictUnificator.get(true, aOutput);
if (aInput == null || aOutput == null) return false;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.extractor, aInput, true)) return false;
RA.stdBuilder()
.itemInputs(aInput)
.itemOutputs(aOutput)
@@ -894,7 +885,6 @@ public class GT_ModHandler {
@Deprecated
public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int[] aChances, int aHeat, Object... aOutput) {
if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, true)) return false;
RA.addThermalCentrifugeRecipe(
aInput,
(ItemStack) aOutput[0],
@@ -909,7 +899,6 @@ public class GT_ModHandler {
@Deprecated
public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int aHeat, Object... aOutput) {
if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, true)) return false;
RA.addThermalCentrifugeRecipe(
aInput,
(ItemStack) aOutput[0],
@@ -925,7 +914,6 @@ public class GT_ModHandler {
*/
public static boolean addOreWasherRecipe(ItemStack aInput, int[] aChances, int aWaterAmount, Object... aOutput) {
if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, true)) return false;
RA.stdBuilder()
.itemInputs(aInput)
.itemOutputs((ItemStack) aOutput[0], (ItemStack) aOutput[1], (ItemStack) aOutput[2])
@@ -948,7 +936,6 @@ public class GT_ModHandler {
public static boolean addOreWasherRecipe(ItemStack aInput, int aWaterAmount, Object... aOutput) {
if (aInput == null || aOutput == null || aOutput.length == 0 || aOutput[0] == null) return false;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, true)) return false;
RA.stdBuilder()
.itemInputs(aInput)
.itemOutputs((ItemStack) aOutput[0], (ItemStack) aOutput[1], (ItemStack) aOutput[2])
@@ -982,7 +969,6 @@ public class GT_ModHandler {
public static boolean addCompressionRecipe(ItemStack aInput, ItemStack aOutput, int duration, int EUPerTick) {
aOutput = GT_OreDictUnificator.get(true, aOutput);
if (aInput == null || aOutput == null || GT_Utility.areStacksEqual(aInput, aOutput, true)) return false;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.compression, aInput, true)) return false;
RA.addCompressorRecipe(aInput, aOutput, duration, EUPerTick);
return true;
}
@@ -992,7 +978,6 @@ public class GT_ModHandler {
*/
public static boolean addIC2MatterAmplifier(ItemStack aAmplifier, int aValue) {
if (aAmplifier == null || aValue <= 0) return false;
- if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.massfabamplifier, aAmplifier, true)) return false;
try {
NBTTagCompound tNBT = new NBTTagCompound();
tNBT.setInteger("amplification", aValue);
diff --git a/src/main/java/gregtech/api/util/GT_RecipeConstants.java b/src/main/java/gregtech/api/util/GT_RecipeConstants.java
index 8e728030f2..d9d6c7d7d2 100644
--- a/src/main/java/gregtech/api/util/GT_RecipeConstants.java
+++ b/src/main/java/gregtech/api/util/GT_RecipeConstants.java
@@ -14,7 +14,6 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import cpw.mods.fml.common.registry.GameRegistry;
-import gregtech.api.GregTech_API;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.interfaces.IRecipeMap;
@@ -105,7 +104,7 @@ public class GT_RecipeConstants {
if (!GT_Utility.isArrayOfLength(builder.getItemInputsBasic(), 1)
|| GT_Utility.isArrayEmptyOrNull(builder.getItemOutputs())) return Collections.emptyList();
int aDuration = builder.getDuration();
- if ((aDuration = GregTech_API.sRecipeFile.get("arcfurnace", builder.getItemInputBasic(0), aDuration)) <= 0) {
+ if (aDuration <= 0) {
return Collections.emptyList();
}
builder.duration(aDuration);
@@ -291,10 +290,7 @@ public class GT_RecipeConstants {
if (!builder.isValid()) return Collections.emptyList();
Integer fuelType = builder.getMetadata(FUEL_TYPE);
if (fuelType == null) return Collections.emptyList();
- builder.metadata(
- FUEL_VALUE,
- GregTech_API.sRecipeFile
- .get("fuel_" + fuelType, builder.getItemInputBasic(0), builder.getMetadataOrDefault(FUEL_VALUE, 0)));
+ builder.metadata(FUEL_VALUE, builder.getMetadataOrDefault(FUEL_VALUE, 0));
return FuelType.get(fuelType)
.getTarget()
.doAdd(builder);
diff --git a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
index e36e9c68af..f4490b59b0 100644
--- a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
+++ b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
@@ -54,7 +54,6 @@ import com.google.common.collect.SetMultimap;
import cpw.mods.fml.relauncher.ReflectionHelper;
import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
@@ -183,19 +182,19 @@ public class GT_RecipeRegistrator {
|| GT_Utility.getFluidForFilledItem(aStack, false) != null
|| aData.mMaterial.mMaterial.mSubTags.contains(SubTag.NO_RECIPES)) return;
registerReverseMacerating(GT_Utility.copyAmount(1, aStack), aData, aData.mPrefix == null);
- registerReverseSmelting(
- GT_Utility.copyAmount(1, aStack),
- aData.mMaterial.mMaterial,
- aData.mMaterial.mAmount,
- true);
if (!GT_Utility.areStacksEqual(GT_ModHandler.getIC2Item("iridiumOre", 1L), aStack)) {
+ registerReverseSmelting(
+ GT_Utility.copyAmount(1, aStack),
+ aData.mMaterial.mMaterial,
+ aData.mMaterial.mAmount,
+ true);
registerReverseFluidSmelting(
GT_Utility.copyAmount(1, aStack),
aData.mMaterial.mMaterial,
aData.mMaterial.mAmount,
aData.getByProduct(0));
+ registerReverseArcSmelting(GT_Utility.copyAmount(1, aStack), aData);
}
- registerReverseArcSmelting(GT_Utility.copyAmount(1, aStack), aData);
}
/**
@@ -604,30 +603,26 @@ public class GT_RecipeRegistrator {
if (aRecipeReplacing && aPlate != null && sShapesA[i] != null && sShapesA[i].length > 1) {
assert aItemData != null;
- if (GregTech_API.sRecipeFile.get(
- ConfigCategories.Recipes.recipereplacements,
- aItemData.mMaterial.mMaterial + "." + sShapesA[i][0],
- true)) {
- if (null != (tStack = GT_ModHandler.removeRecipe(tRecipe.shape))) {
- switch (sShapesA[i].length) {
- case 2 -> GT_ModHandler.addCraftingRecipe(
- tStack,
- GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] { sShapesA[i][1], s_P.charAt(0), aPlate, s_R.charAt(0),
- OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData });
- case 3 -> GT_ModHandler.addCraftingRecipe(
- tStack,
- GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] { sShapesA[i][1], sShapesA[i][2], s_P.charAt(0), aPlate,
- s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0),
- aItemData });
- default -> GT_ModHandler.addCraftingRecipe(
- tStack,
- GT_ModHandler.RecipeBits.BUFFERED,
- new Object[] { sShapesA[i][1], sShapesA[i][2], sShapesA[i][3],
- s_P.charAt(0), aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial),
- s_I.charAt(0), aItemData });
- }
+
+ if (null != (tStack = GT_ModHandler.removeRecipe(tRecipe.shape))) {
+ switch (sShapesA[i].length) {
+ case 2 -> GT_ModHandler.addCraftingRecipe(
+ tStack,
+ GT_ModHandler.RecipeBits.BUFFERED,
+ new Object[] { sShapesA[i][1], s_P.charAt(0), aPlate, s_R.charAt(0),
+ OrePrefixes.stick.get(tMaterial), s_I.charAt(0), aItemData });
+ case 3 -> GT_ModHandler.addCraftingRecipe(
+ tStack,
+ GT_ModHandler.RecipeBits.BUFFERED,
+ new Object[] { sShapesA[i][1], sShapesA[i][2], s_P.charAt(0), aPlate,
+ s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0),
+ aItemData });
+ default -> GT_ModHandler.addCraftingRecipe(
+ tStack,
+ GT_ModHandler.RecipeBits.BUFFERED,
+ new Object[] { sShapesA[i][1], sShapesA[i][2], sShapesA[i][3], s_P.charAt(0),
+ aPlate, s_R.charAt(0), OrePrefixes.stick.get(tMaterial), s_I.charAt(0),
+ aItemData });
}
}
}
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java
index 4c682e9135..d236bbc4f2 100644
--- a/src/main/java/gregtech/common/GT_RecipeAdder.java
+++ b/src/main/java/gregtech/common/GT_RecipeAdder.java
@@ -19,7 +19,6 @@ import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -57,13 +56,6 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if (aInput1 == null || aInput2 == null || aOutput1 == null || aDuration < 1 || aEUt < 1 || aStartEU < 1) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get(
- "fusion",
- aOutput1.getFluid()
- .getName(),
- aDuration)) <= 0) {
- return false;
- }
RecipeMaps.fusionRecipes.addRecipe(
null,
new FluidStack[] { aInput1, aInput2 },
@@ -162,14 +154,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) {
return false;
}
- if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("centrifuge", aInput1, aDuration)) <= 0)) {
+ if ((aInput1 != null) && (aDuration <= 0)) {
return false;
}
- if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile.get(
- "centrifuge",
- aFluidInput.getFluid()
- .getName(),
- aDuration)) <= 0)) {
+ if ((aFluidInput != null) && (aDuration <= 0)) {
return false;
}
if (!GT_Mod.gregtechproxy.mEnableCleanroom) {
@@ -234,7 +222,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("compressor", aInput1, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
RecipeMaps.compressorRecipes.addRecipe(
@@ -278,15 +266,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) {
return false;
}
- if ((aInput1 != null)
- && ((aDuration = GregTech_API.sRecipeFile.get("electrolyzer", aInput1, aDuration)) <= 0)) {
+ if ((aInput1 != null) && (aDuration <= 0)) {
return false;
}
- if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile.get(
- "electrolyzer",
- aFluidInput.getFluid()
- .getName(),
- aDuration)) <= 0)) {
+ if ((aFluidInput != null) && (aDuration <= 0)) {
return false;
}
RecipeMaps.electrolyzerRecipes.addRecipe(
@@ -400,15 +383,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
|| ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) {
return false;
}
- if ((aOutput != null || aOutput2 != null)
- && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) {
+ if ((aOutput != null || aOutput2 != null) && (aDuration <= 0)) {
return false;
}
- if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(
- "chemicalreactor",
- aFluidOutput.getFluid()
- .getName(),
- aDuration)) <= 0)) {
+ if ((aFluidOutput != null) && (aDuration <= 0)) {
return false;
}
if (aEUtick <= 0) {
@@ -452,15 +430,10 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
|| ((aOutput == null) && (aOutput2 == null) && (aFluidOutput == null))) {
return false;
}
- if ((aOutput != null || aOutput2 != null)
- && ((aDuration = GregTech_API.sRecipeFile.get("chemicalreactor", aOutput, aDuration)) <= 0)) {
+ if ((aOutput != null || aOutput2 != null) && (aDuration <= 0)) {
return false;
}
- if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(
- "chemicalreactor",
- aFluidOutput.getFluid()
- .getName(),
- aDuration)) <= 0)) {
+ if ((aFluidOutput != null) && (aDuration <= 0)) {
return false;
}
if (aEUtick <= 0) {
@@ -544,7 +517,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("blastfurnace", aInput1, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
RecipeMaps.blastFurnaceRecipes.addRecipe(
@@ -568,7 +541,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("blastfurnace", aInput1, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
RecipeMaps.blastFurnaceRecipes.addRecipe(
@@ -613,7 +586,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if (aCoalAmount <= 0) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("primitiveblastfurnace", aInput1, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
Materials[] coals = new Materials[] { Materials.Coal, Materials.Charcoal };
@@ -735,7 +708,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("canning", aInput1, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
RecipeMaps.cannerRecipes.addRecipe(
@@ -770,8 +743,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
|| (OrePrefixes.gem.contains(aInput1)))) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("alloysmelting", aInput2 == null ? aInput1 : aOutput1, aDuration))
- <= 0) {
+ if (aDuration <= 0) {
return false;
}
GT_Recipe tRecipe = new GT_Recipe(
@@ -798,7 +770,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("lathe", aInput1, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
RecipeMaps.latheRecipes.addRecipe(
@@ -822,7 +794,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput == null) || (aLubricant == null) || (aOutput1 == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("cutting", aInput, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
RecipeMaps.cutterRecipes.addRecipe(
@@ -905,7 +877,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
.noneMatch(Objects::nonNull)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("cutting", aInputs[0], aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
if (!GT_Mod.gregtechproxy.mEnableCleanroom && aSpecial == -200) {
@@ -1026,7 +998,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("assembling", aOutput1, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
@@ -1072,7 +1044,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("assembling", aOutput1, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
@@ -1103,7 +1075,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput == null) || (aOutput == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("wiremill", aInput, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
RecipeMaps.wiremillRecipes.addRecipe(
@@ -1125,7 +1097,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput == null) || (aOutput == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("wiremill", aInput, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
RecipeMaps.wiremillRecipes.addRecipe(
@@ -1147,7 +1119,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput == null) || (aOutput == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("polarizer", aInput, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
RecipeMaps.polarizerRecipes.addRecipe(
@@ -1169,7 +1141,7 @@ public class GT_RecipeAdder implements IGT_RecipeAdder {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("bender", aInput1, aDuration)) <= 0) {
<