Skip to content
This repository has been archived by the owner on Dec 29, 2024. It is now read-only.

Commit

Permalink
Cleanup recipemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
miozune committed Dec 1, 2023
1 parent f482e61 commit 4a7eb30
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 62 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.elisis.gtnhlanth.loader;
package com.elisis.gtnhlanth.api.recipe;

import gregtech.api.gui.modularui.GT_UITextures;
import gregtech.api.recipe.RecipeMap;
Expand All @@ -7,14 +7,13 @@
import gregtech.nei.formatter.HeatingCoilSpecialValueFormatter;
import gregtech.nei.formatter.SimpleSpecialValueFormatter;

public class RecipeAdder {
public class LanthanidesRecipeMaps {

public static final RecipeAdder instance = new RecipeAdder();

public final RecipeMap<RecipeMapBackend> DigesterRecipes = RecipeMapBuilder.of("gtnhlanth.recipe.digester")
public static final RecipeMap<RecipeMapBackend> digesterRecipes = RecipeMapBuilder.of("gtnhlanth.recipe.digester")
.maxIO(1, 1, 1, 1).minInputs(1, 1).progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE)
.neiSpecialInfoFormatter(HeatingCoilSpecialValueFormatter.INSTANCE).build();
public final RecipeMap<RecipeMapBackend> DissolutionTankRecipes = RecipeMapBuilder.of("gtnhlanth.recipe.disstank")
.maxIO(2, 3, 2, 1).minInputs(1, 1).progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE)
public static final RecipeMap<RecipeMapBackend> dissolutionTankRecipes = RecipeMapBuilder
.of("gtnhlanth.recipe.disstank").maxIO(2, 3, 2, 1).minInputs(1, 1)
.progressBar(GT_UITextures.PROGRESSBAR_ARROW_MULTIPLE)
.neiSpecialInfoFormatter(new SimpleSpecialValueFormatter("value.disstank")).build();
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;

import com.elisis.gtnhlanth.loader.RecipeAdder;
import com.elisis.gtnhlanth.api.recipe.LanthanidesRecipeMaps;
import com.elisis.gtnhlanth.util.DescTextLocalization;
import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
Expand Down Expand Up @@ -93,7 +93,7 @@ public void setCoilLevel(HeatingCoilLevel level) {

@Override
public RecipeMap<?> getRecipeMap() {
return RecipeAdder.instance.DigesterRecipes;
return LanthanidesRecipeMaps.digesterRecipes;
}

@Override
Expand All @@ -107,8 +107,7 @@ public boolean checkRecipe(ItemStack itemStack) {

// GT_Log.out.print("Digester: " + Arrays.toString(mInventory));

// Collection<GT_Recipe> tRecipes = RecipeAdder.instance.DigesterRecipes.mRecipeList;
GT_Recipe tRecipe = RecipeAdder.instance.DigesterRecipes
GT_Recipe tRecipe = LanthanidesRecipeMaps.digesterRecipes
.findRecipe(getBaseMetaTileEntity(), false, tVoltage, tFluidInputArray, tItems);

if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluidInputArray, tItems)) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;

import com.elisis.gtnhlanth.loader.RecipeAdder;
import com.elisis.gtnhlanth.api.recipe.LanthanidesRecipeMaps;
import com.elisis.gtnhlanth.util.DescTextLocalization;
import com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry;
import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
Expand Down Expand Up @@ -90,7 +90,7 @@ private boolean addGlass(Block block, int meta) {

@Override
public RecipeMap<?> getRecipeMap() {
return RecipeAdder.instance.DissolutionTankRecipes;
return LanthanidesRecipeMaps.dissolutionTankRecipes;
}

@Override
Expand All @@ -102,7 +102,7 @@ public boolean checkRecipe(ItemStack itemStack) {
ItemStack[] tItems = this.getStoredInputs().toArray(new ItemStack[0]);
long tVoltage = this.getMaxInputVoltage();

GT_Recipe tRecipe = RecipeAdder.instance.DissolutionTankRecipes
GT_Recipe tRecipe = LanthanidesRecipeMaps.dissolutionTankRecipes
.findRecipe(getBaseMetaTileEntity(), false, tVoltage, tFluidInputArray, tItems);

if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, tFluidInputArray, tItems)) return false;
Expand Down
Loading

0 comments on commit 4a7eb30

Please sign in to comment.