Many<T : Object>
Link to manyt--object
Used to represent data with an amount. (Think something like a
导入类
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.Many;
已实现的接口
Link to 已实现的接口
Many implements the following interfaces. That means all methods defined in these interfaces are also available in Many
使用方式
Link to 使用方式
Name: getAmount
Return Type: int
ZenScript Copy// Many.getAmount() as int
myMany.getAmount();
Name: getData
Return Type: T
ZenScript Copy// Many.getData() as T
myMany.getData();
名称 | 类型 | 可获得 | 可设置 |
---|---|---|---|
名称 amount | 类型 int | 可获得 true | 可设置 false |
名称 data | 类型 T | 可获得 true | 可设置 false |