CompactingManager

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.CompactingManager;

Description

Implements

CompactingManager implements the following interfaces:

IProcessingRecipeManager<CompactingRecipe>,IRecipeManager<ProcessingRecipe>,CommandStringDisplayable

Undocumented Interfaces

Iterable<Recipe>

Members

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

Parameters:

name Type: string
mapData Type: MapData
addRecipe(name as string, heat as HeatCondition, outputs as Percentaged<IItemStack>[], itemInputs as IIngredientWithAmount[], fluidInputs as CTFluidIngredient[] = [] as crafttweaker.api.fluid.FluidIngredient[], duration as int = 100)
Adds a recipe to the Compactor that outputs ItemStacks.
script.zs
// CompactingManager.addRecipe(name as string, heat as HeatCondition, outputs as Percentaged<IItemStack>[], itemInputs as IIngredientWithAmount[], fluidInputs as FluidIngredient[] = [] as crafttweaker.api.fluid.FluidIngredient[], duration as int = 100);
<recipetype:create:compacting>.addRecipe("compacted", <constant:create:heat_condition:heated>, [<item:minecraft:diamond> % 50, <item:minecraft:apple>, (<item:minecraft:dirt> * 2) % 12], [<item:minecraft:glass> * 2], [<fluid:minecraft:water> * 250], 200);

Parameters:

name Type: string - The name of the recipe.
heat Type: HeatCondition - The required heat of the recipe.
outputs Type: Percentaged<IItemStack>[] - The output ItemStacks of the recipe.
itemInputs Type: IIngredientWithAmount[] - The item inputs of the recipe.
fluidInputs (optional) Type: FluidIngredient[] - The optional fluid inputs of the recipe.

Default Value: [] as crafttweaker.api.fluid.FluidIngredient[]

duration (optional) Type: int - The duration of the recipe in ticks.

Default Value: 100

addRecipe(name as string, heat as HeatCondition, outputs as IFluidStack[], itemInputs as IIngredientWithAmount[], fluidInputs as CTFluidIngredient[] = [] as crafttweaker.api.fluid.FluidIngredient[], duration as int = 100)
Adds a recipe to the Compactor that outputs FluidStacks.
script.zs
// CompactingManager.addRecipe(name as string, heat as HeatCondition, outputs as IFluidStack[], itemInputs as IIngredientWithAmount[], fluidInputs as FluidIngredient[] = [] as crafttweaker.api.fluid.FluidIngredient[], duration as int = 100);
<recipetype:create:compacting>.addRecipe("fluid_compacted", <constant:create:heat_condition:none>, [<fluid:minecraft:water> * 200], [<item:minecraft:glass> * 2], [<fluid:minecraft:water> * 250], 200);

Parameters:

name Type: string - The name of the recipe.
heat Type: HeatCondition - The required heat of the recipe.
outputs Type: IFluidStack[] - The output FluidStacks of the recipe.
itemInputs Type: IIngredientWithAmount[] - The item inputs of the recipe.
fluidInputs (optional) Type: FluidIngredient[] - The optional fluid inputs of the recipe.

Default Value: [] as crafttweaker.api.fluid.FluidIngredient[]

duration (optional) Type: int - The duration of the recipe in ticks.

Default Value: 100

Getter
script.zs
// CompactingManager.allRecipes as List<Recipe>
<recipetype:create:compacting>.allRecipes

Return Type: List<Recipe>

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

Return Type: List<Recipe>

Getter
script.zs
// CompactingManager.commandString as string
<recipetype:create:compacting>.commandString

Return Type: string

commandString() as string
script.zs
// CompactingManager.commandString() as string;
<recipetype:create:compacting>.commandString();

Return Type: string

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

Parameters:

name Type: string

Return Type: Recipe

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

Parameters:

output Type: IIngredient

Return Type: List<Recipe>

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

Return Type: Recipe[ResourceLocation]

recipeMap() as Recipe[ResourceLocation]
script.zs
// CompactingManager.recipeMap() as Recipe[ResourceLocation];
<recipetype:create:compacting>.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
// CompactingManager.registerRecipe(name as string, recipeBuilder as function(t as ProcessingRecipeBuilder<ProcessingRecipe>) as void);
<recipetype:create:compacting>.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 CTFluidIngredient)
Removes a recipe based on the output IFluidStack.
script.zs
// CompactingManager.remove(output as FluidIngredient);
<recipetype:create:compacting>.remove(<fluid:minecraft:water>);

Parameters:

output Type: FluidIngredient - The output FluidStack
remove(output as IIngredient)
script.zs
// CompactingManager.remove(output as IIngredient);
<recipetype:create:compacting>.remove(myIIngredient);

Parameters:

output Type: IIngredient
removeAll()
script.zs
// CompactingManager.removeAll();
<recipetype:create:compacting>.removeAll();
removeByInput(input as IItemStack)
script.zs
// CompactingManager.removeByInput(input as IItemStack);
<recipetype:create:compacting>.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
// CompactingManager.removeByModid(modid as string, exclude as function(t as string) as bool = (name as string) as bool => false);
<recipetype:create:compacting>.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
// CompactingManager.removeByName(names as string[]);
<recipetype:create:compacting>.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
// CompactingManager.removeByRegex(regex as string, exclude as function(t as string) as bool = (name as string) as bool => false);
<recipetype:create:compacting>.removeByRegex(myString, myPredicate);

Parameters:

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

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