aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Bee <a.bramley@gmail.com>2024-03-12 12:43:25 +0000
committerGitHub <noreply@github.com>2024-03-12 13:43:25 +0100
commitaf38e95b383c682ae62ef1b7ac423625357dcbe0 (patch)
treece2a75830b78d645073e06b36447214372e91ba1 /src
parenta89e014f52b2a4a4be27b31dbbd7f8db1805bb9a (diff)
downloadGT5-Unofficial-af38e95b383c682ae62ef1b7ac423625357dcbe0.tar.gz
GT5-Unofficial-af38e95b383c682ae62ef1b7ac423625357dcbe0.tar.bz2
GT5-Unofficial-af38e95b383c682ae62ef1b7ac423625357dcbe0.zip
CoALs: Add missing styrene-butadiene variants for AssLine recipes. (#239)
Diffstat (limited to 'src')
-rw-r--r--src/main/java/goodgenerator/loader/ComponentAssemblyLineRecipeLoader.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main/java/goodgenerator/loader/ComponentAssemblyLineRecipeLoader.java b/src/main/java/goodgenerator/loader/ComponentAssemblyLineRecipeLoader.java
index 18fda2f118..a77dfad5f7 100644
--- a/src/main/java/goodgenerator/loader/ComponentAssemblyLineRecipeLoader.java
+++ b/src/main/java/goodgenerator/loader/ComponentAssemblyLineRecipeLoader.java
@@ -176,6 +176,21 @@ public class ComponentAssemblyLineRecipeLoader {
recipe.mDuration * INPUT_MULTIPLIER, // Takes as long as this many
recipe.mEUt,
info.getRight()); // Casing tier
+
+ // Add a second recipe using Styrene-Butadiene
+ // Rubber instead of Silicone Rubber.
+ // This relies on silicone rubber being first in
+ // @allSyntheticRubber so it's quite fragile, but
+ // it's also the least invasive change.
+ if (swapSiliconeForStyreneButadiene(fixedFluids)) {
+ MyRecipeAdder.instance.addComponentAssemblyLineRecipe(
+ fixedInputs.toArray(new ItemStack[0]),
+ fixedFluids.toArray(new FluidStack[0]),
+ info.getLeft().get(OUTPUT_MULTIPLIER), // The component output
+ recipe.mDuration * INPUT_MULTIPLIER, // Takes as long as this many
+ recipe.mEUt,
+ info.getRight()); // Casing tier
+ }
}
}
});
@@ -442,4 +457,15 @@ public class ComponentAssemblyLineRecipeLoader {
fluidInputs.add(MaterialsUEVplus.Eternity.getMolten(mhdcsmAmount - 576 * 48));
}
}
+
+ private static boolean swapSiliconeForStyreneButadiene(ArrayList<FluidStack> fluidInputs) {
+ for (int i = 0; i < fluidInputs.size(); i++) {
+ FluidStack fluidstack = fluidInputs.get(i);
+ if (fluidstack.getFluid().equals(FluidRegistry.getFluid("molten.silicone"))) {
+ fluidInputs.set(i, FluidRegistry.getFluidStack("molten.styrenebutadienerubber", fluidstack.amount));
+ return true;
+ }
+ }
+ return false;
+ }
}