DirectionAxis
Link to directionaxis
Represents a direction axis (X, Y, Z)
导入类
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.DirectionAxis;
已实现的接口
Link to 已实现的接口
DirectionAxis implements the following interfaces. That means all methods defined in these interfaces are also available in DirectionAxis
- Predicate
Enum Constants
Link to enum-constants
DirectionAxis is an enum. It has 3 enum constants. They are accessible using the code below.
ZenScript CopyDirectionAxis.X
DirectionAxis.Y
DirectionAxis.Z
使用方式
Link to 使用方式
Name: equals
Return Type: boolean
ZenScript CopyDirectionAxis.equals(o as Object) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 o | 类型 Object | 描述 No Description Provided |
Name: getCoordinate
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
Returns: value of the coordinate
Return Type: double
ZenScript Copy// DirectionAxis.getCoordinate(x as double, y as double, z as double) as double
<directionaxis:x>.getCoordinate(1.2, 2.5, 3.87);
参数 | 类型 | 描述 |
---|---|---|
参数 x | 类型 double | 描述 x value of the coordinate |
参数 y | 类型 double | 描述 y value of the coordinate |
参数 z | 类型 double | 描述 z value of the coordinate |
Name: getCoordinate
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
Returns: value of the coordinate
Return Type: int
ZenScript Copy// DirectionAxis.getCoordinate(x as int, y as int, z as int) 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 |
Name: hashCode
Return Type: int
ZenScript Copy// DirectionAxis.hashCode() as int
<directionaxis:x>.hashCode();
名称 | 类型 | 可获得 | 可设置 | 描述 |
---|---|---|---|---|
名称 commandString #命令字符串 | 类型 string | 可获得 true | 可设置 false | 描述 No Description Provided |
名称 hashCode | 类型 int | 可获得 true | 可设置 false | 描述 No Description Provided |
名称 horizontal | 类型 布尔值 | 可获得 true | 可设置 false | 描述 No Description Provided |
名称 name(名称) | 类型 string | 可获得 true | 可设置 false | 描述 Get the name of this Axis ("X", "Y" or "Z") |
名称 ordinal | 类型 int | 可获得 true | 可设置 false | 描述 Gets the enum ordinal of this axis |
名称 vertical | 类型 布尔值 | 可获得 true | 可设置 false | 描述 No Description Provided |