Represents a direction axis (X, Y, Z)

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

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

ZenScript
Copy
crafttweaker.api.util.DirectionAxis

已实现的接口

Link to 已实现的接口

DirectionAxis implements the following interfaces. 这意味着对这个接口可用的任何方法也可以在此类上使用。

Gets the coordinate of this axis based on the given values, if this axis is "X", then it will return the value of the "x" parameter

返回为int值

ZenScript
Copy
<directionaxis:x>.getCoordinate(x as int, y as int, z as int);
<directionaxis:x>.getCoordinate(1, 2, 3);
参数类型描述
参数
x
类型
int
描述
x value of the coordinate
参数
y
类型
int
描述
y value of the coordinate
参数
z
类型
int
描述
z value of the coordinate
名称类型可获得可设置
名称
commandString #命令字符串
类型
字符串[string]
可获得
true
可设置
false
名称
horizontal
类型
布尔值
可获得
true
可设置
false
名称
name(名称)
类型
字符串[string]
可获得
true
可设置
false
名称
ordinal
类型
int
可获得
true
可设置
false
名称
vertical
类型
布尔值
可获得
true
可设置
false