BracketValidators

Link to bracketvalidators

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

Link to 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.

ZenScript
Copy
import mods.mekanism.api.BracketValidators;

This class allows you to check whether a certain Object exists or not before using the BracketHandlers class. All methods return a boolean that represents whether the passed in registry name or location has an Object associated to it.

Just like with the BracketHandlers, most of these are accessible through the /ct dump subcommands added by Mekanism or through their in-game names. Make sure to remove the prefix from the bracket you get, because that is handled by the static, specific method you use in this class. This means, no gas or other chemical prefix, just modid and name.

Link to validateGasStack

Name: validateGasStack

Validates if there is a Gas with the given registry name.

Returns: true if valid, false otherwise.
Return Type: boolean

ZenScript
Copy
BracketValidators.validateGasStack(tokens as string) as boolean
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The resource location to validate.

Link to validateInfusionStack

Name: validateInfusionStack

Validates if there is a InfuseType with the given registry name.

Returns: true if valid, false otherwise.
Return Type: boolean

ZenScript
Copy
BracketValidators.validateInfusionStack(tokens as string) as boolean
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The resource location to validate.

Link to validatePigmentStack

Name: validatePigmentStack

Validates if there is a Pigment with the given registry name.

Returns: true if valid, false otherwise.
Return Type: boolean

ZenScript
Copy
BracketValidators.validatePigmentStack(tokens as string) as boolean
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The resource location to validate.

Link to validateSlurryStack

Name: validateSlurryStack

Validates if there is a Slurry with the given registry name.

Returns: true if valid, false otherwise.
Return Type: boolean

ZenScript
Copy
BracketValidators.validateSlurryStack(tokens as string) as boolean
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The resource location to validate.

Link to validateModuleData

Name: validateModuleData

Validates if there is a ModuleData<MODULE> with the given registry name.

Returns: true if valid, false otherwise.
Return Type: boolean

ZenScript
Copy
BracketValidators.validateModuleData(tokens as string) as boolean
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The resource location to validate.

Link to validateRobitSkin

Name: validateRobitSkin

Validates if there is a RobitSkin with the given registry name.

Returns: true if valid, false otherwise.
Return Type: boolean

ZenScript
Copy
BracketValidators.validateRobitSkin(tokens as string) as boolean
ParameterTypeDescription
Parameter
tokens
Type
string
Description
The resource location to validate.