ResourceLocation
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.
import crafttweaker.api.resource.ResourceLocation;
Loaders
This type is available in the following loaders:
crafttweaker
tags
Implements
Undocumented Interfaces
Comparable<ResourceLocation>
Operators
==(other as Object) as bool
// (ResourceLocation == (other as Object)) as boolmyResourceLocation == myObject
Parameters:
other: Object
Type: Object
Return Type:
bool
Members
Getter
// ResourceLocation.commandString as stringmyResourceLocation.commandString
Return Type:
string
compareTo(other as ResourceLocation) as int
myResourceLocation.compareTo(myResourceLocation);
Parameters:
other: ResourceLocation
Type: ResourceLocation
Return Type:
int
equals(other as Object) as bool
// ResourceLocation.equals(other as Object) as bool;myResourceLocation.equals(myObject);
Parameters:
other: Object
Type: Object
Return Type:
bool
static fromNamespaceAndPath(namespace as string, path as string) as ResourceLocation
Creates a new ResourceLocation from the given namespace and pathscript.zs
Returns: A new ResourceLocation from the given values.
ResourceLocation.fromNamespaceAndPath("crafttweaker", "some-path/to.1");
Parameters:
namespace: string
Type: string
- The namespace of the resource, usually a modid path: string
Type: string
- The path of the resource, May only contain lower-cased alphanumeric values, as well as / and _
Return Type:
ResourceLocation
hashCode() as int
// ResourceLocation.hashCode() as int;myResourceLocation.hashCode();
Return Type:
int
Getter
// ResourceLocation.namespace as stringmyResourceLocation.namespace
Return Type:
string
namespace() as string
// ResourceLocation.namespace() as string;myResourceLocation.namespace();
Return Type:
string
static parse(id as string) as ResourceLocation
Creates a new ResourceLocation from the given string.script.zs
Returns: A new ResourceLocation from the given id
ResourceLocation.parse("crafttweaker:some-path/to.1");
Parameters:
id: string
Type: string
- The ResourceLocation to parse.
Return Type:
ResourceLocation
Getter
// ResourceLocation.path as stringmyResourceLocation.path
Return Type:
string
path() as string
// ResourceLocation.path() as string;myResourceLocation.path();
Return Type:
string
toString() as string
// ResourceLocation.toString() as string;myResourceLocation.toString();
Return Type:
string
implicit as string
// ResourceLocation as stringmyResourceLocation as string
Return Type:
string