Home Migration Guide Getting Started With Scripts Commands Examples
Generic JSON Recipes
About Mekanism

BracketHandlers

This class was added by a mod with mod-id mekanism. 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 at the very top of the file.

script.zs
import mods.mekanism.api.BracketHandlers;

This class allows you to get any of the Objects in the following methods by providing their registry name. Some of these are collected through a dump command, while others can be found in game. Make sure to remove the prefix from the dump Bracket, as that is handled by the static method you are using here.

Static Methods

Gets the GasStack based on registry name. Throws an error if it can’t find the Gas.

Returns: A stack of the Gas with an amount of one mB.
Return Type: GasStack

script.zs
BracketHandlers.getGasStack(tokens as string) as GasStack
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The Gas’s resource location.

Gets the InfusionStack based on registry name. Throws an error if it can’t find the InfuseType.

Returns: A stack of the InfuseType with an amount of one mB.
Return Type: InfusionStack

script.zs
BracketHandlers.getInfusionStack(tokens as string) as InfusionStack
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The InfuseType’s resource location.

Gets the PigmentStack based on registry name. Throws an error if it can’t find the Pigment.

Returns: A stack of the Pigment with an amount of one mB.
Return Type: PigmentStack

script.zs
BracketHandlers.getPigmentStack(tokens as string) as PigmentStack
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The Pigment’s resource location.

Gets the SlurryStack based on registry name. Throws an error if it can’t find the Slurry.

Returns: A stack of the Slurry with an amount of one mB.
Return Type: SlurryStack

script.zs
BracketHandlers.getSlurryStack(tokens as string) as SlurryStack
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The Slurry’s resource location.

Gets the ModuleData<MODULE> based on registry name. Throws an error if it can’t find the ModuleData<MODULE>.

Returns: A reference to the ModuleData<MODULE>.
Return Type: ModuleData

script.zs
BracketHandlers.getModuleData(tokens as string) as ModuleData
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The ModuleData<MODULE>‘s resource location.

Gets the RobitSkin based on registry name. Throws an error if it can’t find the RobitSkin.

Returns: A reference to the RobitSkin.
Return Type: RobitSkin

script.zs
BracketHandlers.getRobitSkin(tokens as string) as RobitSkin
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The RobitSkin’s resource location.