ResourceLocation
Link to resourcelocation
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 crafttweaker.api.resource.ResourceLocation;
Implemented Interfaces
Link to implemented-interfaces
ResourceLocation implements the following interfaces. That means all methods defined in these interfaces are also available in ResourceLocation
- stdlib.Comparable<ResourceLocation>
Static Methods
Link to static-methods
Name: fromNamespaceAndPath
Creates a new ResourceLocation from the given namespace and path
Returns: A new ResourceLocation from the given values.
Return Type: ResourceLocation
ZenScript Copy// ResourceLocation.fromNamespaceAndPath(namespace as string, path as string) as ResourceLocation
ResourceLocation.fromNamespaceAndPath("crafttweaker", "some-path/to.1");
Parameter | Type | Description |
---|---|---|
Parameter namespace | Type string | Description The namespace of the resource, usually a modid |
Parameter path | Type string | Description The path of the resource, May only contain lower-cased alphanumeric values, as well as / and _ |
Name: parse
Creates a new ResourceLocation from the given string.
Returns: A new ResourceLocation from the given id
Return Type: ResourceLocation
ZenScript Copy// ResourceLocation.parse(id as string) as ResourceLocation
ResourceLocation.parse("crafttweaker:some-path/to.1");
Parameter | Type | Description |
---|---|---|
Parameter id | Type string | Description The ResourceLocation to parse. |
Casters
Link to casters
Result Type | Is Implicit |
---|---|
Result Type IData | Is Implicit true |
Result Type string | Is Implicit true |
Methods
Link to methods
Name: asData
Return Type: IData
ZenScript Copy// ResourceLocation.asData() as IData
myResourceLocation.asData();
Name: compareTo
Return Type: int
ZenScript CopyResourceLocation.compareTo(other as ResourceLocation) as int
Parameter | Type |
---|---|
Parameter other | Type ResourceLocation |
Name: equals
Return Type: boolean
ZenScript CopyResourceLocation.equals(other as Object) as boolean
Parameter | Type |
---|---|
Parameter other | Type Object |
Name: getNamespace
Return Type: string
ZenScript Copy// ResourceLocation.getNamespace() as string
myResourceLocation.getNamespace();
Name: getPath
Return Type: string
ZenScript Copy// ResourceLocation.getPath() as string
myResourceLocation.getPath();
Name: hashCode
Return Type: int
ZenScript Copy// ResourceLocation.hashCode() as int
myResourceLocation.hashCode();
Name: toString
Return Type: string
ZenScript Copy// ResourceLocation.toString() as string
myResourceLocation.toString();
Properties
Link to properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name commandString | Type string | Has Getter true | Has Setter false |
Name namespace | Type string | Has Getter true | Has Setter false |
Name path | Type string | Has Getter true | Has Setter false |