IFluidStack

This class was added by a mod with mod-id crafttweaker. So you need to have this mod installed if you want to use this feature.

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.

crafttweaker.api.fluid.IFluidStack

Implemented Interfaces

IFluidStack implements the following interfaces. That means any method available to them can also be used on this class.

Methods

containsOther

Checks if this IFluidStack, contains 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

Return type: boolean

myIFluidStack.containsOther(other as crafttweaker.api.fluid.IFluidStack);
ParameterTypeDescription
othercrafttweaker.api.fluid.IFluidStackother IFluidStack to compare against

copy

Copies the stack. Only needed when mutable stacks are involved.

Returns: A new stack, that contains the same info as this one

Return type: crafttweaker.api.fluid.IFluidStack

myIFluidStack.copy();

mutable

Makes this stack mutable

Returns: A new Stack, that is mutable.

Return type: crafttweaker.api.fluid.IFluidStack

myIFluidStack.mutable();

setAmount

Sets the fluid amount in MilliBuckets (mB)

Returns: A new stack, or this stack, depending if this stack is mutable

Return type: crafttweaker.api.fluid.IFluidStack

myIFluidStack.setAmount(amount as int);
myIFluidStack.setAmount(1000);
ParameterTypeDescription
amountintThe amount to multiply this stack

Properties

NameTypeHas GetterHas Setter
amountinttruefalse
commandStringStringtruefalse
emptybooleantruefalse
fluidcrafttweaker.api.fluid.MCFluidtruefalse
registryNamecrafttweaker.api.util.MCResourceLocationtruefalse

Operators

MUL

Sets the fluid amount in MilliBuckets (MB)

Returns: A new stack, or this stack, depending if this stack is mutable

myIFluidStack * amount as int
myIFluidStack * 1000
ParameterTypeDescription
amountintThe amount to multiply this stack
### CONTAINS

Checks if this IFluidStack, contains 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

myIFluidStack in other as crafttweaker.api.fluid.IFluidStack
ParameterTypeDescription
othercrafttweaker.api.fluid.IFluidStackother IFluidStack to compare against