IntArrayData #整数数组数据

Link to intarraydata-整数数组数据

这个类由mod-id为crafttweaker的模组添加. 因此,如果要使用此功能,则需要安装此mod。

如果遇到任何问题(例如强制转换数组),则可能需要导入软件包,因此,最好的方式就是导入包支持。

ZenScript
Copy
craftminstruer.api.data.IntArrayData

已实现的接口

Link to 已实现的接口

IntArrayData实现了以下接口。 这意味着对这个接口可用的任何方法也可以在此类上使用。

Constructor #构造函数

Link to constructor-构造函数

ZenScript
Copy
new crafttweaker.api.data.IntArrayData(internal as int[]);
参数类型描述
参数
internal
类型
整型[]
描述
No description provided
ZenScript
Copy
[4, 128, 256, 1024].add(value as crafttweaker.api.data.IData);
[4, 128, 256, 1024].add("today");
参数类型描述
参数
value
类型
crafttweaker.api.data.IData
描述
要添加到列表的值
ZenScript
Copy
[4, 128, 256, 1024].add(index as int, value as crafttweaker.api.data.IData);
[4, 128, 256, 1024].add(1, "beautiful");
参数类型描述
参数
index
类型
int
描述
要添加的索引。 后续项目将会上移一个索引
参数
value
类型
crafttweaker.api.data.IData
描述
要添加到列表的值

asList #作为列表

Link to aslist-作为列表

获取列表 IData的表示形式,对

crafttweaker.api.data.ListData </ 0>以外的任何内容返回null。

如果IData值不是一个列表的话则返回值null

返回一个列表<crafttweaker.api.data.IData>

ZenScript
Copy
[4, 128, 256, 1024].asList();

asMap #作为地图数据

Link to asmap-作为地图数据

获取此IData的Map <String, IData>表示形式,对 crafttweaker.api.data.MapData </ 1>以外的任何内容返回null。

如果IData值不是一个地图数据的话则返回值null

返回字符串值 crafttweaker.api.data.IData

ZenScript
Copy
[4, 128, 256, 1024].asMap();

asString #作为字符串

Link to asstring-作为字符串

获取此IData的字符串表示形式

返回:`表示此IData(值和类型)的字符串。</ 0>

返回字符串[String]

ZenScript
Copy
[4, 128, 256, 1024].asString();
`
ZenScript
Copy
 
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],















,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],















,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],















,[object Object],
,[object Object],
,[object Object],
,[object Object],
,[object Object],




















,[object Object],
,[object Object],

















,[object Object]