Home Migration Guide Getting Started With Scripts Commands Examples
BracketHandlers

IFluidHandler

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.

script.zs
import crafttweaker.api.capability.IFluidHandler;

Methods

Return Type: IFluidStack

script.zs
IFluidHandler.drain(maxDrain as int, action as IFluidHandlerAction) as IFluidStack
ParameterTypeDescription
Parameter
maxDrain
Type
int
Description
No Description Provided
Parameter
action
Type
IFluidHandlerAction
Description
No Description Provided

Return Type: IFluidStack

script.zs
IFluidHandler.drain(resource as IFluidStack, action as IFluidHandlerAction) as IFluidStack
ParameterTypeDescription
Parameter
resource
Type
IFluidStack
Description
No Description Provided
Parameter
action
Type
IFluidHandlerAction
Description
No Description Provided

Return Type: int

script.zs
IFluidHandler.fill(resource as IFluidStack, action as IFluidHandlerAction) as int
ParameterTypeDescription
Parameter
resource
Type
IFluidStack
Description
No Description Provided
Parameter
action
Type
IFluidHandlerAction
Description
No Description Provided

Return Type: IFluidStack

script.zs
IFluidHandler.getFluidInTank(tank as int) as IFluidStack
ParameterTypeDescription
Parameter
tank
Type
int
Description
No Description Provided

Return Type: int

script.zs
IFluidHandler.getTankCapacity(tank as int) as int
ParameterTypeDescription
Parameter
tank
Type
int
Description
No Description Provided

Return Type: int

script.zs
// IFluidHandler.getTanks() as int
myIFluidHandler.getTanks();

Return Type: boolean

script.zs
IFluidHandler.isFluidValid(tank as int, stack as IFluidStack) as boolean
ParameterTypeDescription
Parameter
tank
Type
int
Description
No Description Provided
Parameter
stack
Type
IFluidStack
Description
No Description Provided

Properties

NameTypeHas GetterHas SetterDescription
Name
tanks
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided