HauntingManager

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.

script.zs
import mods.create.HauntingManager;

Description

Implements

HauntingManager implements the following interfaces:

IProcessingRecipeManager<HauntingRecipe>,IRecipeManager<ProcessingRecipe>,CommandStringDisplayable

Undocumented Interfaces

Iterable<Recipe>

Members

addJsonRecipe(name as string, mapData as MapData)
script.zs
// HauntingManager.addJsonRecipe(name as string, mapData as MapData);
<recipetype:create:haunting>.addJsonRecipe(myString, myMapData);

Parameters:

name Type: string
mapData Type: MapData
addRecipe(name as string, outputs as Percentaged<IItemStack>[], input as IIngredient, duration as int = 100)
Adds a Haunting recipe.
script.zs
// HauntingManager.addRecipe(name as string, outputs as Percentaged<IItemStack>[], input as IIngredient, duration as int = 100);
<recipetype:create:haunting>.addRecipe("2spooky4me", [<item:minecraft:diamond> % 50, <item:minecraft:apple>, (<item:minecraft:dirt> * 2) % 12], <item:minecraft:dirt>, 200);

Parameters:

name Type: string - The name of the recipe
outputs Type: Percentaged<IItemStack>[] - The output ItemStacks of the recipe.
input Type: IIngredient - The input of the recipe.
duration (optional) Type: int - The duration of the recipe (default 100 ticks)

Default Value: 100

Getter
script.zs
// HauntingManager.allRecipes as List<Recipe>
<recipetype:create:haunting>.allRecipes

Return Type: List<Recipe>

allRecipes() as List<Recipe>
script.zs
// HauntingManager.allRecipes() as List<Recipe>;
<recipetype:create:haunting>.allRecipes();

Return Type: List<Recipe>

Getter
script.zs
// HauntingManager.commandString as string
<recipetype:create:haunting>.commandString

Return Type: string

commandString() as string
script.zs
// HauntingManager.commandString() as string;
<recipetype:create:haunting>.commandString();

Return Type: string

getRecipeByName(name as string) as Recipe
script.zs
// HauntingManager.getRecipeByName(name as string) as Recipe;
<recipetype:create:haunting>.getRecipeByName(myString);

Parameters:

name Type: string

Return Type: Recipe

getRecipesByOutput(output as IIngredient) as List<Recipe>
script.zs
// HauntingManager.getRecipesByOutput(output as IIngredient) as List<Recipe>;
<recipetype:create:haunting>.getRecipesByOutput(myIIngredient);

Parameters:

output Type: IIngredient

Return Type: List<Recipe>

Getter
script.zs
// HauntingManager.recipeMap as Recipe[ResourceLocation]
<recipetype:create:haunting>.recipeMap

Return Type: Recipe[ResourceLocation]

recipeMap() as Recipe[ResourceLocation]
script.zs
// HauntingManager.recipeMap() as Recipe[ResourceLocation];
<recipetype:create:haunting>.recipeMap();

Return Type: Recipe[ResourceLocation]

registerRecipe(name as string, recipeBuilder as function(t as ProcessingRecipeBuilder<ProcessingRecipe>) as void)
Registers a recipe using a builder approach.
script.zs
// HauntingManager.registerRecipe(name as string, recipeBuilder as function(t as ProcessingRecipeBuilder<ProcessingRecipe>) as void);
<recipetype:create:haunting>.registerRecipe(myString, myConsumer);

Parameters:

name Type: string - The name of the recipe.
recipeBuilder Type: function(t as ProcessingRecipeBuilder<ProcessingRecipe>) as void - The recipe builder.
remove(output as IIngredient)
script.zs
// HauntingManager.remove(output as IIngredient);
<recipetype:create:haunting>.remove(myIIngredient);

Parameters:

output Type: IIngredient
removeAll()
script.zs
// HauntingManager.removeAll();
<recipetype:create:haunting>.removeAll();
removeByInput(input as IItemStack)
script.zs
// HauntingManager.removeByInput(input as IItemStack);
<recipetype:create:haunting>.removeByInput(myIItemStack);

Parameters:

input Type: IItemStack
removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false)
script.zs
// HauntingManager.removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false);
<recipetype:create:haunting>.removeByModid(myString, myPredicate);

Parameters:

modid Type: string
exclude (optional) Type: function(t as string) as bool

Default Value: (name as string) as bool => false

removeByName(names as string[])
script.zs
// HauntingManager.removeByName(names as string[]);
<recipetype:create:haunting>.removeByName(myString[]);

Parameters:

names Type: string[]
removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false)
script.zs
// HauntingManager.removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false);
<recipetype:create:haunting>.removeByRegex(myString, myPredicate);

Parameters:

regex Type: string
exclude (optional) Type: function(t as string) as bool

Default Value: (name as string) as bool => false