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 Copyimport 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.
Static Methods
Link to static-methods
Name: validateGasStack
Validates if there is a Gas with the given registry name.
Returns: true
if valid, false
otherwise.
Return Type: boolean
ZenScript CopyBracketValidators.validateGasStack(tokens as string) as boolean
Parameter | Type | Description |
---|---|---|
Parameter tokens | Type string | Description The resource location to validate. |
Name: validateInfusionStack
Validates if there is a InfuseType with the given registry name.
Returns: true
if valid, false
otherwise.
Return Type: boolean
ZenScript CopyBracketValidators.validateInfusionStack(tokens as string) as boolean
Parameter | Type | Description |
---|---|---|
Parameter tokens | Type string | Description The resource location to validate. |
Name: validatePigmentStack
Validates if there is a Pigment with the given registry name.
Returns: true
if valid, false
otherwise.
Return Type: boolean
ZenScript CopyBracketValidators.validatePigmentStack(tokens as string) as boolean
Parameter | Type | Description |
---|---|---|
Parameter tokens | Type string | Description The resource location to validate. |
Name: validateSlurryStack
Validates if there is a Slurry with the given registry name.
Returns: true
if valid, false
otherwise.
Return Type: boolean
ZenScript CopyBracketValidators.validateSlurryStack(tokens as string) as boolean
Parameter | Type | Description |
---|---|---|
Parameter tokens | Type string | Description The resource location to validate. |
Name: validateModuleData
Validates if there is a ModuleData<MODULE> with the given registry name.
Returns: true
if valid, false
otherwise.
Return Type: boolean
ZenScript CopyBracketValidators.validateModuleData(tokens as string) as boolean
Parameter | Type | Description |
---|---|---|
Parameter tokens | Type string | Description The resource location to validate. |
Name: validateRobitSkin
Validates if there is a RobitSkin with the given registry name.
Returns: true
if valid, false
otherwise.
Return Type: boolean
ZenScript CopyBracketValidators.validateRobitSkin(tokens as string) as boolean
Parameter | Type | Description |
---|---|---|
Parameter tokens | Type string | Description The resource location to validate. |