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.
import crafttweaker.api.fluid.Fluid;
Implements
Undocumented Interfaces
IFluidExtension
Operators
*(amount as int) as IFluidStack
Creates a new script.zs
IFluidStack
with the given amount of fluid.// (Fluid * (amount as int)) as IFluidStackmyFluid * myInt
Parameters:
amount: int
Type: int
Return Type:
IFluidStack
Members
Getter
Gets the bucket item for this fluid.script.zs
// Fluid.bucket as ItemDefinitionmyFluid.bucket
Return Type:
ItemDefinition
bucket() as Item
Gets the bucket item for this fluid.script.zs
Returns: The bucket item for this fluid.
myFluid.bucket();
Return Type:
ItemDefinition
Getter
Gets the command string for this fluid.script.zs
// Fluid.commandString as stringmyFluid.commandString
Return Type:
string
commandString() as string
Gets the command string for this fluid.script.zs
Returns: The command string for this fluid.
// Fluid.commandString() as string;myFluid.commandString();
Return Type:
string
isIn(tag as KnownTag<Fluid>) as bool
isSame(other as Fluid) as bool
makeStack(amount as int) as IFluidStack
Creates a new script.zs
IFluidStack
with the given amount of fluid.Returns: a new (immutable) IFluidStack
myFluid.makeStack(1000);
Parameters:
amount: int
Type: int
Return Type:
IFluidStack
Getter
Gets the registry name of this fluid.script.zs
// Fluid.registryName as ResourceLocationmyFluid.registryName
Return Type:
ResourceLocation
registryName() as ResourceLocation
Gets the registry name of this fluid.script.zs
Returns: The registry name of this fluid.
myFluid.registryName();
Return Type:
ResourceLocation