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.
import crafttweaker.api.util.MCResourceLocation;
已实现的接口
MCResourceLocation implements the following interfaces. That means all methods defined in these interfaces are also available in MCResourceLocation
Constructor #构造函数
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 _ |
Casters
结果类型 | 是否隐藏 |
---|
IData | true |
string | true |
方法
asData
Return Type: IData
MCResourceLocation.asData() as IData
myMCResourceLocation.asData();
比较到
Return Type: int
MCResourceLocation.compareTo(other as MCResourceLocation) as int
equals #等于
Return Type: boolean
MCResourceLocation.equals(other as Object) as boolean
参数 | 类型 | 描述 |
---|
other | Object | No Description Provided |
getNamespace
Return Type: string
MCResourceLocation.getNamespace() as string
myMCResourceLocation.getNamespace();
getPath
Return Type: string
MCResourceLocation.getPath() as string
myMCResourceLocation.getPath();
hashCode
Return Type: int
MCResourceLocation.hashCode() as int
myMCResourceLocation.hashCode();
toString
Return Type: string
MCResourceLocation.toString() as string
myMCResourceLocation.toString();
参数
名称 | 类型 | 可获得 | 可设置 |
---|
commandString | string | true | false |
命名空间 | string | true | false |
path | string | true | false |