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.
import mods.tfc.api.ingredient.FluidIngredient;
Static Methods
Create an empty fluid ingredient
Return Type: FluidIngredient
// FluidIngredient.empty() as FluidIngredient
FluidIngredient.empty();
Create a fluid ingredient from a fluidstack
Returns:
Return Type: FluidIngredient
// FluidIngredient.of(fluid as IFluidStack) as FluidIngredient
FluidIngredient.of(<fluid:tfc:olive_oil>*100);
Parameter | Type | Description |
---|---|---|
Parameter fluid | Type IFluidStack | Description Fluidstack |
Create a fluid ingredient from a list of fluids
Returns:
Return Type: FluidIngredient
// 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 |
Create a fluid ingredient from a fluid tag
Returns:
Return Type: FluidIngredient
// 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 |