CrushingManager
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 mods.create.CrushingManager;
Description
Implements
CrushingManager
implements the following interfaces:
IProcessingRecipeManager<CrushingRecipe>
,IRecipeManager<ProcessingRecipe>
,CommandStringDisplayable
Undocumented Interfaces
Iterable<Recipe>
Members
addRecipe(name as string, output as Percentaged<IItemStack>[], input as IIngredient, duration as int = 100)
Adds a recipe to the Crusher.script.zs
// CrushingManager.addRecipe(name as string, output as Percentaged<IItemStack>[], input as IIngredient, duration as int = 100);<recipetype:create:crushing>.addRecipe("crushed", [<item:minecraft:diamond> % 50, <item:minecraft:apple>, (<item:minecraft:dirt> * 2) % 12], <item:minecraft:glass>, 200);
Parameters:
name: string
Type: string
- The name of the recipe. output: Percentaged<IItemStack>[]
Type: Percentaged<IItemStack>[]
- The Percentaged IItemStack outputs. duration: int
(optional) Type: int
- The duration of the recipe in ticks (defaults to 100).
Default Value: 100
Getter
// CrushingManager.commandString as string<recipetype:create:crushing>.commandString
Return Type:
string
commandString() as string
// CrushingManager.commandString() as string;<recipetype:create:crushing>.commandString();
Return Type:
string
getRecipesByOutput(output as IIngredient) as List<Recipe>
<recipetype:create:crushing>.getRecipesByOutput(myIIngredient);
Parameters:
output: IIngredient
Type: IIngredient
Return Type:
List<Recipe>
Getter
<recipetype:create:crushing>.recipeMap
Return Type:
Recipe[ResourceLocation]
recipeMap() as Recipe[ResourceLocation]
registerRecipe(name as string, recipeBuilder as function(t as ProcessingRecipeBuilder<ProcessingRecipe>) as void)
Registers a recipe using a builder approach.script.zs
// CrushingManager.registerRecipe(name as string, recipeBuilder as function(t as ProcessingRecipeBuilder<ProcessingRecipe>) as void);<recipetype:create:crushing>.registerRecipe(myString, myConsumer);
Parameters:
name: string
Type: string
- The name of the recipe. recipeBuilder: function(t as ProcessingRecipeBuilder<ProcessingRecipe>) as void
Type: function(t as ProcessingRecipeBuilder<ProcessingRecipe>) as void
- The recipe builder. remove(output as IIngredient)
<recipetype:create:crushing>.remove(myIIngredient);
Parameters:
output: IIngredient
Type: IIngredient
removeAll()
// CrushingManager.removeAll();<recipetype:create:crushing>.removeAll();
removeByInput(input as IItemStack)
<recipetype:create:crushing>.removeByInput(myIItemStack);
Parameters:
input: IItemStack
Type: IItemStack
removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false)
// CrushingManager.removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false);<recipetype:create:crushing>.removeByModid(myString, myPredicate);
Parameters:
modid: string
Type: string
exclude: function(t as string) as bool
(optional) Type: function(t as string) as bool
Default Value: (name as string) as bool => false
removeByName(names as string[])
// CrushingManager.removeByName(names as string[]);<recipetype:create:crushing>.removeByName(myString[]);
Parameters:
names: string[]
Type: string[]
removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false)
// CrushingManager.removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false);<recipetype:create:crushing>.removeByRegex(myString, myPredicate);
Parameters:
regex: string
Type: string
exclude: function(t as string) as bool
(optional) Type: function(t as string) as bool
Default Value: (name as string) as bool => false