MCResourceLocation
Link to mcresourcelocation
导入类
Link to 导入类
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.util.MCResourceLocation;
已实现的接口
Link to 已实现的接口
MCResourceLocation implements the following interfaces. That means all methods defined in these interfaces are also available in MCResourceLocation
- Comparable<MCResourceLocation>
Constructor #构造函数
Link to constructor-构造函数
ZenScript Copynew 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 _ |
Casters
Link to casters
结果类型 | 是否隐藏 |
---|---|
结果类型 IData #数据 | 是否隐藏 true |
结果类型 string | 是否隐藏 true |
使用方式
Link to 使用方式
Name: asData
Return Type: IData
ZenScript Copy// MCResourceLocation.asData() as IData
myMCResourceLocation.asData();
Name: compareTo
Return Type: int
ZenScript CopyMCResourceLocation.compareTo(other as MCResourceLocation) as int
参数 | 类型 | 描述 |
---|---|---|
参数 other | 类型 MCResourceLocation | 描述 No Description Provided |
Name: equals
Return Type: boolean
ZenScript CopyMCResourceLocation.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 |