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.
Axis.XAxis.YAxis.ZMethods
Return Type: double
Axis.choose(x as double, y as double, z as double) as double| Parameter | Type | Description |
|---|---|---|
Parameter x | Type double | Description No Description Provided |
Parameter y | Type double | Description No Description Provided |
Parameter z | Type double | Description No Description Provided |
Return Type: int
Axis.choose(x as int, y as int, z as int) as int| Parameter | Type | Description |
|---|---|---|
Parameter x | Type int | Description No Description Provided |
Parameter y | Type int | Description No Description Provided |
Parameter z | Type int | Description No Description Provided |
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 | Description |
|---|---|---|
Parameter direction | Type Direction | Description No Description Provided |
Properties
| Name | Type | Has Getter | Has Setter | Description |
|---|---|---|---|---|
Name horizontal | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name name | Type string | Has Getter true | Has Setter false | Description No Description Provided |
Name plane | Type Plane | Has Getter true | Has Setter false | Description No Description Provided |
Name vertical | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |