Direction

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

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

导入相关包

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

crafttweaker.api.util.Direction

方法

rotateAround

Rotates this direction around a given Axis

Returns crafttweaker.api.util.Direction

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

rotateY

Rotates this direction on the Y axis

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

Returns crafttweaker.api.util.Direction

<direction:north>.rotateY();

rotateYCCW

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

<direction:north>.rotateYCCW();

参数

名称类型可获得可设置
axiscrafttweaker.api.util.DirectionAxistruefalse
axisOffsetinttruefalse
horizontalAnglefloattruefalse
horizontalIndexinttruefalse
indexinttruefalse
nameStringtruefalse
oppositecrafttweaker.api.util.Directiontruefalse
xOffsetinttruefalse
yOffsetinttruefalse
zOffsetinttruefalse