mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-12 00:17:51 +00:00
1 parent
3ce702343d
commit
1e36822fa4
19 files changed
+490
-9
No files matched your search
@@ -18,7 +18,9 @@ import codechicken.nei.config.OptionKeyBind;
|
||||
import codechicken.nei.recipe.GuiCraftingRecipe;
|
||||
import codechicken.nei.recipe.GuiUsageRecipe;
|
||||
import codechicken.nei.recipe.ICraftingHandler;
|
||||
import codechicken.nei.recipe.IRecipeHandler;
|
||||
import codechicken.nei.recipe.IUsageHandler;
|
||||
import codechicken.nei.recipe.RecipeCatalysts;
|
||||
import codechicken.nei.recipe.RecipeInfo;
|
||||
import codechicken.nei.recipe.StackInfo;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -30,6 +32,7 @@ import org.lwjgl.input.Keyboard;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* This is the main class that handles item property configuration.
|
||||
@@ -291,4 +294,24 @@ public class API
|
||||
StackInfo.stackStringifyHandlers.add(handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an association between an ingredient and what it can craft. (i.e. Furnace ItemStack -> Smelting and Fuel Recipes)
|
||||
* Allows players to see what ingredient they need to craft in order to make recipes from a recipe category.
|
||||
* @param stack the ingredient that can craft recipes (like a furnace or crafting table)
|
||||
* @param handler the recipe category handled by the ingredient
|
||||
*/
|
||||
public static void addRecipeCatalyst(ItemStack stack, Class<? extends IRecipeHandler> handler) {
|
||||
addRecipeCatalyst(Collections.singletonList(stack), handler);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an association between an ingredient and what it can craft. (i.e. Furnace ItemStack -> Smelting and Fuel Recipes)
|
||||
* Allows players to see what ingredient they need to craft in order to make recipes from a recipe category.
|
||||
* @param stacks the ingredients that can craft recipes (like a furnace or crafting table)
|
||||
* @param handler the recipe category handled by the ingredient
|
||||
*/
|
||||
public static void addRecipeCatalyst(List<ItemStack> stacks, Class<? extends IRecipeHandler> handler) {
|
||||
RecipeCatalysts.addRecipeCatalyst(stacks, handler);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user