StoneCutterManager
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.recipe.StoneCutterManager;
Description
Implements
StoneCutterManager
implements the following interfaces:
IRecipeManager<StonecutterRecipe>
,CommandStringDisplayable
Undocumented Interfaces
Iterable<RecipeHolder<Recipe>>
Members
myStoneCutterManager.addJsonRecipe("recipe_name", {ingredient: <item:minecraft:gold_ore>,result: <item:minecraft:cooked_porkchop>.registryName,experience: 0.35 as float,cookingtime:100});
myStoneCutterManager.addRecipe("recipe_name", <item:minecraft:grass>, <tag:item:minecraft:wool>);
Parameters:
recipeName: string
Type: string
- name of the recipe myStoneCutterManager.allRecipes
Return Type:
List<RecipeHolder<Recipe>>
// StoneCutterManager.commandString as stringmyStoneCutterManager.commandString
Return Type:
string
// StoneCutterManager.commandString() as string;myStoneCutterManager.commandString();
Return Type:
string
myStoneCutterManager.getRecipeByName(myString);
Parameters:
name: string
Type: string
Return Type:
RecipeHolder<Recipe>
myStoneCutterManager.getRecipesByOutput(myIIngredient);
Parameters:
output: IIngredient
Type: IIngredient
Return Type:
List<RecipeHolder<Recipe>>
// StoneCutterManager.getRecipesMatching(predicate as function(t as RecipeHolder<Recipe>) as bool) as List<RecipeHolder<Recipe>>;myStoneCutterManager.getRecipesMatching(myPredicate);
Parameters:
predicate: function(t as RecipeHolder<Recipe>) as bool
Type: function(t as RecipeHolder<Recipe>) as bool
Return Type:
List<RecipeHolder<Recipe>>
myStoneCutterManager.recipeMap
Return Type:
RecipeHolder<Recipe>[ResourceLocation]
Returns: A Map of recipe name to recipe of all known recipes.
myStoneCutterManager.recipeMap();
Return Type:
RecipeHolder<Recipe>[ResourceLocation]
myStoneCutterManager.remove(<tag:item:minecraft:wool>);
Parameters:
// StoneCutterManager.removeAll();myStoneCutterManager.removeAll();
myStoneCutterManager.removeByInput(<item:minecraft:iron_ingot>);
Parameters:
// StoneCutterManager.removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false);myStoneCutterManager.removeByModid("minecraft", myPredicate);
Parameters:
modid: string
Type: string
- modid of the recipes to remove exclude: function(t as string) as bool
(optional) Type: function(t as string) as bool
Default Value: (name as string) as bool => false
// StoneCutterManager.removeByName(names as string[]);myStoneCutterManager.removeByName(myString[]);
Parameters:
names: string[]
Type: string[]
- registry names of recipes to remove // StoneCutterManager.removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false);myStoneCutterManager.removeByRegex("\\d_\\d", (name as string) => {return name == "orange_wool";});
Parameters:
regex: string
Type: string
- regex to match against exclude: function(t as string) as bool
(optional) Type: function(t as string) as bool
Default Value: (name as string) as bool => false
myStoneCutterManager.removeMatching((holder) => "wool" in holder.id.path);
Parameters:
predicate: function(t as RecipeHolder<Recipe>) as bool
Type: function(t as RecipeHolder<Recipe>) as bool
- a predicate of RecipeHolder<T> to test recipes against.