Represents a cardinal direction (north, south, east, west) and (up and down).

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

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

ZenScript
Copy
crafttweaker.api.util.Direction

Rotates this direction around a given Axis

Returns crafttweaker.api.util.Direction

ZenScript
Copy
<direction:north>.rotateAround(axis as crafttweaker.api.util.DirectionAxis);
<direction:north>.rotateAround(<directionaxis:north>);
参数类型描述
参数
axis
类型
crafttweaker.api.util.DirectionAxis
描述
the Axis to rotate around

Rotates this direction on the Y axis

Returns: the direction that rotated on the Y axis of this direction

Returns crafttweaker.api.util.Direction

ZenScript
Copy
<direction:north>.rotateY();

Rotates this direction counter-clock wise on the Y axis

Returns: the direction that is counter clockwise on the Y axis

Returns crafttweaker.api.util.Direction

ZenScript
Copy
<direction:north>.rotateYCCW();
名称类型可获得可设置
名称
axis
类型
crafttweaker.api.util.DirectionAxis
可获得
true
可设置
false
名称
axisOffset
类型
int
可获得
true
可设置
false
名称
horizontalAngle
类型
float
可获得
true
可设置
false
名称
horizontalIndex
类型
int
可获得
true
可设置
false
名称
index
类型
int
可获得
true
可设置
false
名称
name(名称)
类型
字符串[string]
可获得
true
可设置
false
名称
opposite
类型
crafttweaker.api.util.Direction
可获得
true
可设置
false
名称
xOffset
类型
int
可获得
true
可设置
false
名称
yOffset
类型
int
可获得
true
可设置
false
名称
zOffset
类型
int
可获得
true
可设置
false