MCResourceLocation

Link to mcresourcelocation

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
Copy
import crafttweaker.api.util.MCResourceLocation;

已实现的接口

Link to 已实现的接口

MCResourceLocation implements the following interfaces. That means all methods defined in these interfaces are also available in MCResourceLocation

Constructor #构造函数

Link to constructor-构造函数

ZenScript
Copy
new MCResourceLocation(namespace as string, path as string) as MCResourceLocation
参数类型描述
参数
命名空间
类型
string
描述
Usually a ModId
参数
path
类型
string
描述
May only contain lower-cased alphanumeric values, as well as / and _
结果类型是否隐藏
结果类型
IData #数据
是否隐藏
true
结果类型
string
是否隐藏
true

Name: asData

Return Type: IData

ZenScript
Copy
// MCResourceLocation.asData() as IData

myMCResourceLocation.asData();

Name: compareTo

Return Type: int

ZenScript
Copy
MCResourceLocation.compareTo(other as MCResourceLocation) as int
参数类型描述
参数
other
类型
MCResourceLocation
描述
No Description Provided

Name: equals

Return Type: boolean

ZenScript
Copy
MCResourceLocation.equals(other as Object) as boolean
参数类型描述
参数
other
类型
Object
描述
No Description Provided

Name: getNamespace

Return Type: string

ZenScript
Copy
// MCResourceLocation.getNamespace() as string

myMCResourceLocation.getNamespace();

Name: getPath

Return Type: string

ZenScript
Copy
// MCResourceLocation.getPath() as string

myMCResourceLocation.getPath();

Name: hashCode

Return Type: int

ZenScript
Copy
// MCResourceLocation.hashCode() as int

myMCResourceLocation.hashCode();

Name: toString

Return Type: string

ZenScript
Copy
// MCResourceLocation.toString() as string

myMCResourceLocation.toString();
名称类型可获得可设置描述
名称
commandString #命令字符串
类型
string
可获得
true
可设置
false
描述
No Description Provided
名称
命名空间
类型
string
可获得
true
可设置
false
描述
No Description Provided
名称
path
类型
string
可获得
true
可设置
false
描述
No Description Provided