aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorchochem <40274384+chochem@users.noreply.github.com>2024-04-30 08:10:13 +0100
committerGitHub <noreply@github.com>2024-04-30 09:10:13 +0200
commit465898903f3420525d0a597216760069411f9e78 (patch)
tree21d444ac7364ebeac4c9623579324f68805c0a19 /src/main
parent7b4f39906eb4faf0baa4535a39e71868836fbd25 (diff)
downloadGT5-Unofficial-465898903f3420525d0a597216760069411f9e78.tar.gz
GT5-Unofficial-465898903f3420525d0a597216760069411f9e78.tar.bz2
GT5-Unofficial-465898903f3420525d0a597216760069411f9e78.zip
GT recipe.cfg cleanup (#871)
remove recipe.cfg uses from gt++
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java15
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java7
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java23
4 files changed, 13 insertions, 37 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java
index 3266f1b349..e8c50641aa 100644
--- a/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java
+++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/BOP_Block_Registrator.java
@@ -11,8 +11,6 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
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;
@@ -96,9 +94,7 @@ public class BOP_Block_Registrator {
GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null),
new ItemStack(Items.coal, 1, 1))) {
addPyrolyeOvenRecipes(aStack);
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) {
- GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
- }
+ GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
}
if (aMeta == 32767) {
for (int i = 0; i < 32767; ++i) {
@@ -106,10 +102,7 @@ public class BOP_Block_Registrator {
GT_ModHandler.getSmeltingOutput(new ItemStack(aStack.getItem(), 1, i), false, null),
new ItemStack(Items.coal, 1, 1))) {
addPyrolyeOvenRecipes(aStack);
- if (GregTech_API.sRecipeFile
- .get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) {
- GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i));
- }
+ GT_ModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i));
}
final ItemStack tStack = GT_ModHandler.getRecipeOutput(new ItemStack(aStack.getItem(), 1, i));
if (tStack == null) {
@@ -172,9 +165,7 @@ public class BOP_Block_Registrator {
GT_ModHandler.getSmeltingOutput(GT_Utility.copyAmount(1L, aStack), false, null),
new ItemStack(Items.coal, 1, 1))) {
addPyrolyeOvenRecipes(aStack);
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", true)) {
- GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
- }
+ GT_ModHandler.removeFurnaceSmelting(GT_Utility.copyAmount(1L, aStack));
}
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
index 68799b15d1..10c2066997 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Ore.java
@@ -7,7 +7,6 @@ import java.util.Set;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
-import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.util.GT_ModHandler;
@@ -680,13 +679,11 @@ public class RecipeGen_Ore extends RecipeGen_Base {
Logger.MATERIALS("[Electrolyzer] Either both inputs or outputs are null.");
return false;
}
- if ((aInput1 != null)
- && ((aDuration = GregTech_API.sRecipeFile.get("electrolyzer", aInput1, aDuration)) <= 0)) {
+ if ((aInput1 != null) && (aDuration <= 0)) {
Logger.MATERIALS("[Electrolyzer] Fail 1.");
return false;
}
- if ((aFluidInput != null) && ((aDuration = GregTech_API.sRecipeFile
- .get("electrolyzer", aFluidInput.getFluid().getName(), aDuration)) <= 0)) {
+ if ((aFluidInput != null) && (aDuration <= 0)) {
Logger.MATERIALS("[Electrolyzer] Fail 2.");
return false;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
index 4c4856a89b..9dd1d47ef1 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
@@ -192,7 +192,7 @@ public class RecipeGen_Plates extends RecipeGen_Base {
if ((aInput == null) || (aShape == null) || (aOutput == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("extruder", aOutput, aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
}
RecipeMaps.extruderRecipes.addRecipe(
@@ -213,9 +213,6 @@ public class RecipeGen_Plates extends RecipeGen_Base {
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
}
- if (!GregTech_API.sRecipeFile.get("forgehammer", aOutput1, true)) {
- return false;
- }
RecipeMaps.hammerRecipes.addRecipe(
true,
new ItemStack[] { aInput1 },
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index fa3d2f36cc..d00c7ca1db 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -5,8 +5,6 @@ import static gregtech.api.enums.GT_Values.RA;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.recipe.RecipeMaps;
@@ -38,13 +36,11 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
Logger.WARNING("Something was null, returning false");
return false;
}
- if (aOutput != null && (aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0) {
+ if (aOutput != null && (aDuration <= 0)) {
Logger.WARNING("Something was null, returning false");
return false;
}
- if (aFluidOutput != null
- && (aDuration = GregTech_API.sRecipeFile.get("cokeoven", aFluidOutput.getFluid().getName(), aDuration))
- <= 0) {
+ if (aFluidOutput != null && (aDuration <= 0)) {
Logger.WARNING("Something was null, returning false");
return false;
}
@@ -284,7 +280,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
if (aOutput.isFluidEqual(Materials.PhasedIron.getMolten(1))) {
aOutput = Materials.PulsatingIron.getMolten(aOutput.amount);
}
- if ((aDuration = GregTech_API.sRecipeFile.get("blastsmelter", aOutput.getFluid().getName(), aDuration)) <= 0) {
+ if (aDuration <= 0) {
Logger.WARNING("Recipe did not register.");
return false;
}
@@ -694,7 +690,7 @@ public class GregtechRecipeAdder implements IGregtech_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(
@@ -722,9 +718,6 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
if (aIngredient == null || aInput == null || aOutput == null) {
return false;
}
- if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) {
- return false;
- }
GT_Recipe tRecipe = RecipeMaps.brewingRecipes.addRecipe(
false,
new ItemStack[] { aIngredient },
@@ -910,8 +903,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
public boolean addDistilleryRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput,
ItemStack aSolidOutput, int aDuration, int aEUt, boolean aHidden) {
if (aInput != null && aOutput != null) {
- if ((aDuration = GregTech_API.sRecipeFile
- .get("distillery", aOutput.getFluid().getUnlocalizedName(), aDuration)) <= 0) {
+ if (aDuration <= 0) {
return false;
} else {
GT_Recipe tRecipe = RecipeMaps.distilleryRecipes.addRecipe(
@@ -971,9 +963,8 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
}
if (GT_Utility.getContainerItem(aInput, false) == null) {
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.maceration, aInput, true)) {
- GT_Utility.addSimpleIC2MachineRecipe(aInput, GT_ModHandler.getMaceratorRecipeList(), null, aOutput1);
- }
+ GT_Utility.addSimpleIC2MachineRecipe(aInput, GT_ModHandler.getMaceratorRecipeList(), null, aOutput1);
+
GT_Values.RA.addPulveriserRecipe(
aInput,
new ItemStack[] { aOutput1, aOutput2, aOutput3 },