ResourceLocationBracketHandler
Link to resourcelocationbrackethandler
Bracket handlers specifically for resource location as it is used in multiple loaders.
导入类
Link to 导入类
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 crafttweaker.api.bracket.ResourceLocationBracketHandler;
Static Methods
Link to static-methods
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");
参数 | 类型 | 描述 |
---|---|---|
参数 tokens | 类型 string | 描述 The resource location |