Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

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.

script.zs
import crafttweaker.api.resource.ResourceLocation;

Loaders

This type is available in the following loaders:

  • crafttweaker
  • tags

Implements

Undocumented Interfaces

Comparable<ResourceLocation>

Constructors

new(namespace as string, path as string)
script.zs
// new ResourceLocation(namespace as string, path as string);
new ResourceLocation(myString, myString);

Parameters:

namespace Type: string - Usually a ModId
path Type: string - May only contain lower-cased alphanumeric values, as well as / and _

Operators

==(other as Object) as bool
script.zs
// (ResourceLocation == (other as Object)) as bool
myResourceLocation == myObject

Parameters:

other Type: Object

Return Type: bool

Members

asData() as IData
script.zs
// ResourceLocation.asData() as IData;
myResourceLocation.asData();

Return Type: IData

implicit as IData
script.zs
// ResourceLocation as IData
myResourceLocation as IData

Return Type: IData

Getter
script.zs
// ResourceLocation.commandString as string
myResourceLocation.commandString

Return Type: string

compareTo(other as ResourceLocation) as int
script.zs
// ResourceLocation.compareTo(other as ResourceLocation) as int;
myResourceLocation.compareTo(myResourceLocation);

Parameters:

Return Type: int

equals(other as Object) as bool
script.zs
// ResourceLocation.equals(other as Object) as bool;
myResourceLocation.equals(myObject);

Parameters:

other Type: Object

Return Type: bool

hashCode() as int
script.zs
// ResourceLocation.hashCode() as int;
myResourceLocation.hashCode();

Return Type: int

Getter
script.zs
// ResourceLocation.namespace as string
myResourceLocation.namespace

Return Type: string

namespace() as string
script.zs
// ResourceLocation.namespace() as string;
myResourceLocation.namespace();

Return Type: string

Getter
script.zs
// ResourceLocation.path as string
myResourceLocation.path

Return Type: string

path() as string
script.zs
// ResourceLocation.path() as string;
myResourceLocation.path();

Return Type: string

toString() as string
script.zs
// ResourceLocation.toString() as string;
myResourceLocation.toString();

Return Type: string

implicit as string
script.zs
// ResourceLocation as string
myResourceLocation as string

Return Type: string