ResourceLocationBracketHandler

Link to resourcelocationbrackethandler

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

Importare la Classe

Link to importare-la-classe

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 crafttweaker.api.bracket.ResourceLocationBracketHandler;

Link to getResourceLocation

Name: getResourceLocation

Creates a Resource location based on the tokens.
Throws an error if the tokens are not a valid location.

Returns: The location
Return Type: ResourceLocation

ZenScript
Copy
<resource:minecraft:dirt>

// ResourceLocationBracketHandler.getResourceLocation(tokens as string) as ResourceLocation

ResourceLocationBracketHandler.getResourceLocation("minecraft:dirt");
ParametroTipoDescrizione
Parametro
tokens
Tipo
string
Descrizione
The resource location