Axis
Importing the class
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.
import crafttweaker.api.util.direction.Axis;
Implemented Interfaces
Axis implements the following interfaces. That means all methods defined in these interfaces are also available in Axis
- StringRepresentable
- Predicate<Direction>
Enum Constants
Axis is an enum. It has 3 enum constants. They are accessible using the code below.
<constant:minecraft:direction/axis:x><constant:minecraft:direction/axis:y><constant:minecraft:direction/axis:z>
Methods
Return Type: double
Axis.choose(x as double, y as double, z as double) as double
Parameter | Type |
---|---|
Parameter x | Type double |
Parameter y | Type double |
Parameter z | Type double |
Return Type: int
Axis.choose(x as int, y as int, z as int) as int
Parameter | Type |
---|---|
Parameter x | Type int |
Parameter y | Type int |
Parameter z | Type int |
Return Type: string
// Axis.getName() as string
myAxis.getName();
Return Type: Plane
// Axis.getPlane() as Plane
myAxis.getPlane();
Return Type: boolean
// Axis.isHorizontal() as boolean
myAxis.isHorizontal();
Return Type: boolean
// Axis.isVertical() as boolean
myAxis.isVertical();
Return Type: boolean
Axis.test(direction as Direction?) as boolean
Parameter | Type |
---|---|
Parameter direction | Type Direction? |
Properties
Name | Type | Has Getter | Has Setter |
---|---|---|---|
Name horizontal | Type boolean | Has Getter true | Has Setter false |
Name name | Type string | Has Getter true | Has Setter false |
Name plane | Type Plane | Has Getter true | Has Setter false |
Name vertical | Type boolean | Has Getter true | Has Setter false |