Home Getting Started With Scripts Commands Examples
BracketDumpers BracketHandlers BracketValidators

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.

script.zs
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

Enum Constants

Axis is an enum. It has 3 enum constants. They are accessible using the code below.

script.zs
Axis.X
Axis.Y
Axis.Z

Methods

Return Type: double

script.zs
Axis.choose(x as double, y as double, z as double) as double
ParameterTypeDescription
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

script.zs
Axis.choose(x as int, y as int, z as int) as int
ParameterTypeDescription
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

script.zs
// Axis.getName() as string
myAxis.getName();

Return Type: Plane

script.zs
// Axis.getPlane() as Plane
myAxis.getPlane();

Return Type: boolean

script.zs
// Axis.isHorizontal() as boolean
myAxis.isHorizontal();

Return Type: boolean

script.zs
// Axis.isVertical() as boolean
myAxis.isVertical();

Return Type: boolean

script.zs
Axis.test(direction as Direction) as boolean
ParameterTypeDescription
Parameter
direction
Type
Direction
Description
No Description Provided

Properties

NameTypeHas GetterHas SetterDescription
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