Home Commands Examples Getting Started With Scripts Global Keywords
Generic JSON Recipes

BottlingMachine

Allows you to add or remove Bottling Machine recipes.

Bottling Machine recipes consist of an item ingredient, a fluid input and an item output.

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

script.zs
import mods.immersiveengineering.BottlingMachine;

Implemented Interfaces

BottlingMachine implements the following interfaces. That means all methods defined in these interfaces are also available in BottlingMachine

Methods

script.zs
BottlingMachine.addJsonRecipe(name as string, mapData as MapData)
ParameterType
Parameter
name
Type
string
Parameter
mapData
Type
MapData

Adds a recipe to the Bottling Machine. The bottling Machine only goes via Fluid tag!

script.zs
BottlingMachine.addRecipe(recipePath as string, inputs as IIngredientWithAmount[], fluidTag as Many<MCTag>, outputs as IItemStack[])
ParameterTypeDescription
Parameter
recipePath
Type
string
Description
The recipe name, without the resource location
Parameter
inputs
Type
IIngredientWithAmount[]
Description
The item input (the items to be filled)
Parameter
fluidTag
Type
Many<MCTag>
Description
The fluid tag of the fluid
Parameter
outputs
Type
IItemStack[]
Description
The resulting “filled” items.

Return Type: stdlib.List<T>

script.zs
// BottlingMachine.getAllRecipes() as stdlib.List<T>
<recipetype:immersiveengineering:bottling_machine>.getAllRecipes();

Return Type: T

script.zs
BottlingMachine.getRecipeByName(name as string) as T
ParameterType
Parameter
name
Type
string

Return Type: T[ResourceLocation]

script.zs
// BottlingMachine.getRecipeMap() as T[ResourceLocation]
<recipetype:immersiveengineering:bottling_machine>.getRecipeMap();

Return Type: stdlib.List<T>

script.zs
BottlingMachine.getRecipesByOutput(output as IIngredient) as stdlib.List<T>
ParameterType
Parameter
output
Type
IIngredient
script.zs
BottlingMachine.remove(output as IIngredient)
ParameterType
Parameter
output
Type
IIngredient
script.zs
// BottlingMachine.removeAll()
<recipetype:immersiveengineering:bottling_machine>.removeAll();
script.zs
BottlingMachine.removeByInput(input as IItemStack)
ParameterType
Parameter
input
Type
IItemStack
script.zs
BottlingMachine.removeByModid(modid as string, exclude as Predicate<string>)
ParameterTypeOptionalDefault Value
Parameter
modid
Type
string
Optional
false
Default Value
Parameter
exclude
Type
Predicate<string>
Optional
true
Default Value
(name as string) as bool => false
script.zs
BottlingMachine.removeByName(names as string[])
ParameterType
Parameter
names
Type
string[]
script.zs
BottlingMachine.removeByRegex(regex as string, exclude as Predicate<string>)
ParameterTypeOptionalDefault Value
Parameter
regex
Type
string
Optional
false
Default Value
Parameter
exclude
Type
Predicate<string>
Optional
true
Default Value
(name as string) as bool => false

Properties

NameTypeHas GetterHas Setter
Name
allRecipes
Type
stdlib.List<T>
Has Getter
true
Has Setter
false
Name
recipeMap
Type
T[ResourceLocation]
Has Getter
true
Has Setter
false