FluidIngredient
Link to fluidingredient
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 Copyimport mods.tfc.api.ingredient.FluidIngredient;
Static Methods
Link to static-methods
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);
Parameter | Type | Description |
---|---|---|
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);
Parameter | Type | Description |
---|---|---|
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);
Parameter | Type | Description |
---|---|---|
Parameter fluids | Type KnownTag<Fluid> | Description tag of fluids |
Parameter amount | Type int | Description amount of fluid |