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 . IFluidStack;
IFluidStack
implements the following interfaces:
CommandStringDisplayable
// (IFluidStack | (other as CTFluidIngredient)) as CTFluidIngredient
myIFluidStack | myCTFluidIngredient
Return Type:
FluidIngredient
Checks if this IFluidStack, matches the given IFluidStack by checking if the fluids are the same, and if this fluid's amount is bigger than the given fluid's amount // ((other as IFluidStack) in IFluidStack) as bool
myIFluidStack in myIFluidStack
Return Type:
bool
Sets the fluid amount in MilliBuckets (mB) // (IFluidStack * (amount as int)) as IFluidStack
Parameters:
amount: int
Type: int
- The amount to multiply this stack
Return Type:
IFluidStack
Gets the fluid amount in MilliBuckets (mB). // IFluidStack.amount as long
Return Type:
long
// IFluidStack as CTFluidIngredient
myIFluidStack as CTFluidIngredient
Return Type:
FluidIngredient
// IFluidStack.asIData() as IData;
Return Type:
IData
// IFluidStack.asImmutable() as IFluidStack;
myIFluidStack . asImmutable();
Return Type:
IFluidStack
Makes this stack mutable Returns : A new Stack, that is mutable.
// IFluidStack.asMutable() as IFluidStack;
myIFluidStack . asMutable();
Return Type:
IFluidStack
Copies the stack. Only needed when mutable stacks are involved. Returns : A new stack, that contains the same info as this one
// IFluidStack.copy() as IFluidStack;
Return Type:
IFluidStack
Gets whether this fluid stack is empty. // IFluidStack.empty as bool
Return Type:
bool
Gets the empty IFluidStack Returns : The empty IFluidStack
// IFluidStack.empty() as IFluidStack;
Return Type:
IFluidStack
Retrieves this fluid stack's fluid. // IFluidStack.fluid as Fluid
Return Type:
Fluid
Retrieves this fluid stack's fluid.
Return Type:
Fluid
Returns true if this FluidStack has a Tag // IFluidStack.hasTag as bool
Return Type:
bool
// IFluidStack.isImmutable as bool
myIFluidStack . isImmutable
Return Type:
bool
// IFluidStack.isImmutable() as bool;
myIFluidStack . isImmutable();
Return Type:
bool
Checks if this IFluidStack, matches the given IFluidStack by checking if the fluids are the same, and if this fluid's amount is bigger than the given fluid's amount Returns : true if this fluid contains the other fluid
// IFluidStack.matches(other as IFluidStack) as bool;
myIFluidStack . matches(myIFluidStack);
Return Type:
bool
Gets the registry name for the fluid this stack is representing. // IFluidStack.registryName as ResourceLocation
myIFluidStack . registryName
Return Type:
ResourceLocation
Sets the fluid amount in MilliBuckets (mB) Returns : A new stack, or this stack, depending on if this stack is mutable
// IFluidStack.setAmount(amount as int) as IFluidStack;
myIFluidStack . setAmount( 1000 );
Parameters:
amount: int
Type: int
- The amount to multiply this stack
Return Type:
IFluidStack
Returns the NBT tag attached to this FluidStack. // IFluidStack.tag as IData
Return Type:
IData
Returns the NBT tag attached to this FluidStack. Returns : MapData of the FluidStack's NBT Tag, null if it doesn't exist.
// IFluidStack.tag() as IData;
Return Type:
IData
Sets the tag for the FluidStack. Returns : This FluidStack if it is mutable, a new one with the changed property otherwise
// IFluidStack.withTag(tag as IData) as IFluidStack;
myIFluidStack . withTag({Display: {lore: [ "Hello" ]}});
Return Type:
IFluidStack