Skip to content

Commit

Permalink
Remove tungsten chain recipe remover (#3251)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Robertz <[email protected]>
  • Loading branch information
serenibyss and Dream-Master authored Sep 21, 2024
1 parent d31fa71 commit e21f588
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 32 deletions.
4 changes: 4 additions & 0 deletions src/main/java/bartworks/system/material/WerkstoffLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ public static void setUp() {
public static final Werkstoff Ferberite = new Werkstoff(
new short[] { 0xB0, 0xB0, 0xB0, 0 },
"Ferberite",
Werkstoff.Types.getDefaultStatForType(Werkstoff.Types.COMPOUND)
.setElektrolysis(false),
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures(),
11,
Expand Down Expand Up @@ -383,6 +385,8 @@ public static void setUp() {
public static final Werkstoff Huebnerit = new Werkstoff(
new short[] { 0x80, 0x60, 0x60, 0 },
"Huebnerite",
Werkstoff.Types.getDefaultStatForType(Werkstoff.Types.COMPOUND)
.setElektrolysis(false),
Werkstoff.Types.COMPOUND,
new Werkstoff.GenerationFeatures(),
17,
Expand Down
1 change: 0 additions & 1 deletion src/main/java/gtnhlanth/GTNHLanthanides.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public static void postInit(FMLPostInitializationEvent e) {
@EventHandler
public static void onModLoadingComplete(FMLLoadCompleteEvent e) {

BotRecipes.removeRecipes();
RecipeLoader.removeCeriumSources();

}
Expand Down
31 changes: 0 additions & 31 deletions src/main/java/gtnhlanth/loader/BotRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import static gregtech.api.recipe.RecipeMaps.chemicalReactorRecipes;
import static gregtech.api.recipe.RecipeMaps.crackingRecipes;
import static gregtech.api.recipe.RecipeMaps.distilleryRecipes;
import static gregtech.api.recipe.RecipeMaps.electrolyzerRecipes;
import static gregtech.api.recipe.RecipeMaps.multiblockChemicalReactorRecipes;
import static gregtech.api.util.GTRecipeBuilder.MINUTES;
import static gregtech.api.util.GTRecipeBuilder.SECONDS;
Expand All @@ -15,8 +14,6 @@
import static gregtech.api.util.GTRecipeConstants.UniversalChemical;
import static gtnhlanth.common.register.BotWerkstoffMaterialPool.*;

import java.util.HashSet;

import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;

Expand All @@ -26,7 +23,6 @@
import gregtech.api.enums.TierEU;
import gregtech.api.util.GTModHandler;
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTRecipe;
import gregtech.api.util.GTUtility;
import gtnhlanth.common.register.BotWerkstoffMaterialPool;
import ic2.core.Ic2Items;
Expand Down Expand Up @@ -232,31 +228,4 @@ public static void addGTRecipe() {
.eut(TierEU.RECIPE_EV)
.addTo(crackingRecipes);
}

public static void removeRecipes() {
BotRecipes.removeTungstenElectro();
}

public static void removeTungstenElectro() {
HashSet<GTRecipe> toDel = new HashSet<>();
ItemStack[] toRemove = { Materials.Scheelite.getDust(1), Materials.Tungstate.getDust(1),
WerkstoffLoader.Ferberite.get(dust, 1), WerkstoffLoader.Huebnerit.get(dust, 1) };
for (GTRecipe tRecipe : electrolyzerRecipes.getAllRecipes()) {
if (tRecipe.mFakeRecipe) continue;
for (int i = 0; i < tRecipe.mInputs.length; i++) {
ItemStack tItem = tRecipe.mInputs[i];
if (item == null || !GTUtility.isStackValid(tItem)) continue;
for (ItemStack tStack : toRemove) {
if (GTUtility.areStacksEqual(tItem, tStack)) {
toDel.add(tRecipe);
continue;
}
}
}
}
electrolyzerRecipes.getBackend()
.removeRecipes(toDel);
electrolyzerRecipes.getBackend()
.reInit();
}
}

0 comments on commit e21f588

Please sign in to comment.