Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

ResourceLocationBracketHandler

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.bracket.ResourceLocationBracketHandler;

Description

Bracket handlers specifically for resource location as it is used in multiple loaders.

Loaders

This type is available in the following loaders:

  • crafttweaker
  • tags

Members

static getResourceLocation(tokens as string) as ResourceLocation
Creates a Resource location based on the tokens. Throws an error if the tokens are not a valid location.

Returns: The location

script.zs
// ResourceLocationBracketHandler.getResourceLocation(tokens as string) as ResourceLocation;
ResourceLocationBracketHandler.getResourceLocation("minecraft:dirt");

Parameters:

tokens Type: string - The resource location

Return Type: ResourceLocation