PressingManager
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.PressingManager;
Description
Implements
PressingManager
implements the following interfaces:
IProcessingRecipeManager<PressingRecipe>
,IRecipeManager<ProcessingRecipe>
,CommandStringDisplayable
Undocumented Interfaces
Iterable<Recipe>
Members
addRecipe(name as string, outputs as Percentaged<IItemStack>[], input as IIngredientWithAmount, duration as int = 100)
Adds a pressing recipe.script.zs
// PressingManager.addRecipe(name as string, outputs as Percentaged<IItemStack>[], input as IIngredientWithAmount, duration as int = 100);<recipetype:create:pressing>.addRecipe("pressed", [<item:minecraft:diamond> % 50, <item:minecraft:apple>, (<item:minecraft:dirt> * 2) % 12], <item:minecraft:dirt>, 200);
Parameters:
name: string
Type: string
- The name of the recipe. duration: int
(optional) Type: int
- The duration of the recipe (default 100 ticks).
Default Value: 100
Getter
// PressingManager.commandString as string<recipetype:create:pressing>.commandString
Return Type:
string
commandString() as string
// PressingManager.commandString() as string;<recipetype:create:pressing>.commandString();
Return Type:
string
getRecipesByOutput(output as IIngredient) as List<Recipe>
<recipetype:create:pressing>.getRecipesByOutput(myIIngredient);
Parameters:
output: IIngredient
Type: IIngredient
Return Type:
List<Recipe>
Getter
<recipetype:create:pressing>.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
// PressingManager.registerRecipe(name as string, recipeBuilder as function(t as ProcessingRecipeBuilder<ProcessingRecipe>) as void);<recipetype:create:pressing>.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:pressing>.remove(myIIngredient);
Parameters:
output: IIngredient
Type: IIngredient
removeAll()
// PressingManager.removeAll();<recipetype:create:pressing>.removeAll();
removeByInput(input as IItemStack)
<recipetype:create:pressing>.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)
// PressingManager.removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false);<recipetype:create:pressing>.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[])
// PressingManager.removeByName(names as string[]);<recipetype:create:pressing>.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)
// PressingManager.removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false);<recipetype:create:pressing>.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