ResourceLocation
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.
import crafttweaker.api.resource.ResourceLocation;
Implemented Interfaces
ResourceLocation implements the following interfaces. That means all methods defined in these interfaces are also available in ResourceLocation
- Comparable<ResourceLocation>
Constructors
new ResourceLocation(namespace as string, path as string) as ResourceLocation
Parameter | Type | Description |
---|---|---|
Parameter namespace | Type string | Description Usually a ModId |
Parameter path | Type string | Description May only contain lower-cased alphanumeric values, as well as / and _ |
Casters
Result Type | Is Implicit |
---|---|
Result Type IData | Is Implicit true |
Result Type string | Is Implicit true |
Methods
Return Type: IData
// ResourceLocation.asData() as IData
myResourceLocation.asData();
Return Type: int
ResourceLocation.compareTo(other as ResourceLocation) as int
Parameter | Type |
---|---|
Parameter other | Type ResourceLocation |
Return Type: boolean
ResourceLocation.equals(other as Object) as boolean
Parameter | Type |
---|---|
Parameter other | Type Object |
Return Type: string
// ResourceLocation.getNamespace() as string
myResourceLocation.getNamespace();
Return Type: string
// ResourceLocation.getPath() as string
myResourceLocation.getPath();
Return Type: int
// ResourceLocation.hashCode() as int
myResourceLocation.hashCode();
Return Type: string
// ResourceLocation.toString() as string
myResourceLocation.toString();
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 |