Importing the class

Link to 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.

ZenScript
Copy
import mods.tfc.api.ingredient.FluidIngredient;

Name: empty

Create an empty fluid ingredient

Return Type: FluidIngredient

ZenScript
Copy
// FluidIngredient.empty() as FluidIngredient

FluidIngredient.empty();

Name: of

Create a fluid ingredient from a fluidstack

Returns:
Return Type: FluidIngredient

ZenScript
Copy
// FluidIngredient.of(fluid as IFluidStack) as FluidIngredient

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

Name: of

Create a fluid ingredient from a list of fluids

Returns:
Return Type: FluidIngredient

ZenScript
Copy
// 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

Name: of

Create a fluid ingredient from a fluid tag

Returns:
Return Type: FluidIngredient

ZenScript
Copy
// 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