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.
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
BracketHandlers.getGasStack(tokens as string) as GasStack
Parameter | Type | Description |
---|---|---|
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
BracketHandlers.getInfusionStack(tokens as string) as InfusionStack
Parameter | Type | Description |
---|---|---|
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
BracketHandlers.getPigmentStack(tokens as string) as PigmentStack
Parameter | Type | Description |
---|---|---|
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
BracketHandlers.getSlurryStack(tokens as string) as SlurryStack
Parameter | Type | Description |
---|---|---|
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
BracketHandlers.getModuleData(tokens as string) as ModuleData
Parameter | Type | Description |
---|---|---|
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
BracketHandlers.getRobitSkin(tokens as string) as RobitSkin
Parameter | Type | Description |
---|---|---|
Parameter tokens | Type string | Description The RobitSkin’s resource location. |