Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

Fluid

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.fluid.Fluid;

Implements

Undocumented Interfaces

IFluidExtension

Operators

==(other as Fluid) as bool
script.zs
// (Fluid == (other as Fluid)) as bool
myFluid == myFluid

Parameters:

other Type: Fluid

Return Type: bool

*(amount as int) as IFluidStack
Creates a new IFluidStack with the given amount of fluid.
script.zs
// (Fluid * (amount as int)) as IFluidStack
myFluid * myInt

Parameters:

amount Type: int

Return Type: IFluidStack

Members

Getter
script.zs
// Fluid.bucket as Item
myFluid.bucket

Return Type: ItemDefinition

bucket() as Item
script.zs
// Fluid.bucket() as Item;
myFluid.bucket();

Return Type: ItemDefinition

Getter
script.zs
// Fluid.commandString as string
myFluid.commandString

Return Type: string

isIn(tag as KnownTag<Fluid>) as bool
script.zs
// Fluid.isIn(tag as KnownTag<Fluid>) as bool;
myFluid.isIn(myKnownTag);

Parameters:

tag Type: KnownTag<Fluid>

Return Type: bool

isSame(other as Fluid) as bool
script.zs
// Fluid.isSame(other as Fluid) as bool;
myFluid.isSame(myFluid);

Parameters:

other Type: Fluid

Return Type: bool

makeStack(amount as int) as IFluidStack
Creates a new IFluidStack with the given amount of fluid.

Returns: a new (immutable) IFluidStack

script.zs
// Fluid.makeStack(amount as int) as IFluidStack;
myFluid.makeStack(1000);

Parameters:

amount Type: int

Return Type: IFluidStack

Getter
script.zs
// Fluid.registryName as ResourceLocation
myFluid.registryName

Return Type: ResourceLocation

registryName() as ResourceLocation
script.zs
// Fluid.registryName() as ResourceLocation;
myFluid.registryName();

Return Type: ResourceLocation