IFluidStack

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 crafttweaker.api.fluid.IFluidStack;

Implemented Interfaces

IFluidStack implements the following interfaces. That means all methods defined in these interfaces are also available in IFluidStack

Casters

Result typeIs Implicit
MCFluidotrue

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

Return Type: boolean

IFluidStack.containsOther(other as IFluidStack) as boolean
ParameterTypeDescription
otherIFluidStackother IFluidStack to compare against

copy

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

Return Type: IFluidStack

IFluidStack.copy() as IFluidStack
myIFluidStack.copy();

mutable

Makes this stack mutable

Return Type: IFluidStack

IFluidStack.mutable() as IFluidStack
myIFluidStack.mutable();

setAmount

Sets the fluid amount in MilliBuckets (mB)

Return Type: IFluidStack

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

Operators

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

other as IFluidStack in myIFluidStack

MUL

Sets the fluid amount in MilliBuckets (MB)

myIFluidStack * amount as int
myIFluidStack * 1000

Properties

NameTypeHas GetterHas Setter
amountinttruefalse
commandStringstringtruefalse
emptybooleantruefalse
fluidMCFluidotruefalse
registryNameUbicaciĆ³n MCResourcetruefalse