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

FluidIngredient

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.tfc.api.ingredient.FluidIngredient;

Static Methods

Create an empty fluid ingredient

Return Type: FluidIngredient

script.zs
// FluidIngredient.empty() as FluidIngredient
FluidIngredient.empty();

Create a fluid ingredient from a fluidstack

Returns:
Return Type: FluidIngredient

script.zs
// FluidIngredient.of(fluid as IFluidStack) as FluidIngredient
FluidIngredient.of(<fluid:tfc:olive_oil>*100);
ParameterTypeDescription
Parameter
fluid
Type
IFluidStack
Description
Fluidstack

Create a fluid ingredient from a list of fluids

Returns:
Return Type: FluidIngredient

script.zs
// FluidIngredient.of(fluidStacks as IFluidStack[], amount as int) as FluidIngredient
FluidIngredient.of([<fluid:minecraft:water>, <fluid:minecraft:lava>], 1000);
ParameterTypeDescription
Parameter
fluidStacks
Type
IFluidStack[]
Description
array of fluids
Parameter
amount
Type
int
Description
amount of fluid

Create a fluid ingredient from a fluid tag

Returns:
Return Type: FluidIngredient

script.zs
// FluidIngredient.of(fluids as KnownTag<Fluid>, amount as int) as FluidIngredient
FluidIngredient.of(<tag:fluids:minecraft:water>, 100);
ParameterTypeDescription
Parameter
fluids
Type
KnownTag<Fluid>
Description
tag of fluids
Parameter
amount
Type
int
Description
amount of fluid