Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

Axis

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.util.direction.Axis;

Implements

Axis implements the following interfaces:

StringRepresentable

Undocumented Interfaces

Predicate<Direction>,Comparable<Enum>

Enum Constants

Axis is an enum with 3 constants. They are accessible like so:

script.zs
// Axis.X
<constant:minecraft:direction/axis:x>
// Axis.Y
<constant:minecraft:direction/axis:y>
// Axis.Z
<constant:minecraft:direction/axis:z>

Members

choose(x as int, y as int, z as int) as int
script.zs
// Axis.choose(x as int, y as int, z as int) as int;
<constant:minecraft:direction/axis:x>.choose(myInt, myInt, myInt);

Parameters:

x Type: int
y Type: int
z Type: int

Return Type: int

choose(x as double, y as double, z as double) as double
script.zs
// Axis.choose(x as double, y as double, z as double) as double;
<constant:minecraft:direction/axis:x>.choose(myDouble, myDouble, myDouble);

Parameters:

x Type: double
y Type: double
z Type: double

Return Type: double

Getter
script.zs
// Axis.horizontal as bool
<constant:minecraft:direction/axis:x>.horizontal

Return Type: bool

horizontal() as bool
script.zs
// Axis.horizontal() as bool;
<constant:minecraft:direction/axis:x>.horizontal();

Return Type: bool

Getter
script.zs
// Axis.name as string
<constant:minecraft:direction/axis:x>.name

Return Type: string

name() as string
script.zs
// Axis.name() as string;
<constant:minecraft:direction/axis:x>.name();

Return Type: string

Getter
script.zs
// Axis.plane as Plane
<constant:minecraft:direction/axis:x>.plane

Return Type: Plane

plane() as Plane
script.zs
// Axis.plane() as Plane;
<constant:minecraft:direction/axis:x>.plane();

Return Type: Plane

Getter
Gets the serialized name.
script.zs
// Axis.serializedName as string
<constant:minecraft:direction/axis:x>.serializedName

Return Type: string

serializedName() as string
Gets the serialized name.

Returns: the serialized name.

script.zs
// Axis.serializedName() as string;
<constant:minecraft:direction/axis:x>.serializedName();

Return Type: string

test(direction as Direction) as bool
script.zs
// Axis.test(direction as Direction) as bool;
<constant:minecraft:direction/axis:x>.test(myDirection);

Parameters:

direction Type: Direction

Return Type: bool

Getter
script.zs
// Axis.vertical as bool
<constant:minecraft:direction/axis:x>.vertical

Return Type: bool

vertical() as bool
script.zs
// Axis.vertical() as bool;
<constant:minecraft:direction/axis:x>.vertical();

Return Type: bool