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

Direction

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;

Implements

Direction implements the following interfaces:

StringRepresentable

Undocumented Interfaces

Comparable<Enum>

Enum Constants

Direction is an enum with 6 constants. They are accessible like so:

script.zs
// Direction.DOWN
<constant:minecraft:direction:down>
// Direction.EAST
<constant:minecraft:direction:east>
// Direction.NORTH
<constant:minecraft:direction:north>
// Direction.SOUTH
<constant:minecraft:direction:south>
// Direction.UP
<constant:minecraft:direction:up>
// Direction.WEST
<constant:minecraft:direction:west>

Members

Getter
script.zs
// Direction.axis as Axis
<constant:minecraft:direction:down>.axis

Return Type: Axis

axis() as Axis
script.zs
// Direction.axis() as Axis;
<constant:minecraft:direction:down>.axis();

Return Type: Axis

Getter
script.zs
// Direction.axisDirection as AxisDirection
<constant:minecraft:direction:down>.axisDirection

Return Type: AxisDirection

axisDirection() as AxisDirection
script.zs
// Direction.axisDirection() as AxisDirection;
<constant:minecraft:direction:down>.axisDirection();

Return Type: AxisDirection

Getter
script.zs
// Direction.clockWise as Direction
<constant:minecraft:direction:down>.clockWise

Return Type: Direction

clockWise() as Direction
script.zs
// Direction.clockWise() as Direction;
<constant:minecraft:direction:down>.clockWise();

Return Type: Direction

Getter
script.zs
// Direction.counterClockWise as Direction
<constant:minecraft:direction:down>.counterClockWise

Return Type: Direction

counterClockWise() as Direction
script.zs
// Direction.counterClockWise() as Direction;
<constant:minecraft:direction:down>.counterClockWise();

Return Type: Direction

getClockWise(axis as Axis) as Direction
script.zs
// Direction.getClockWise(axis as Axis) as Direction;
<constant:minecraft:direction:down>.getClockWise(myAxis);

Parameters:

axis Type: Axis

Return Type: Direction

getCounterClockWise(axis as Axis) as Direction
script.zs
// Direction.getCounterClockWise(axis as Axis) as Direction;
<constant:minecraft:direction:down>.getCounterClockWise(myAxis);

Parameters:

axis Type: Axis

Return Type: Direction

getName() as string
script.zs
// Direction.getName() as string;
<constant:minecraft:direction:down>.getName();

Return Type: string

isFacingAngle(degrees as float) as bool
script.zs
// Direction.isFacingAngle(degrees as float) as bool;
<constant:minecraft:direction:down>.isFacingAngle(myFloat);

Parameters:

degrees Type: float

Return Type: bool

Getter
script.zs
// Direction.normal as Vec3i
<constant:minecraft:direction:down>.normal

Return Type: Vec3i

normal() as Vec3i
script.zs
// Direction.normal() as Vec3i;
<constant:minecraft:direction:down>.normal();

Return Type: Vec3i

Getter
script.zs
// Direction.opposite as Direction
<constant:minecraft:direction:down>.opposite

Return Type: Direction

opposite() as Direction
script.zs
// Direction.opposite() as Direction;
<constant:minecraft:direction:down>.opposite();

Return Type: Direction

Getter
script.zs
// Direction.rotation as Quaternionf
<constant:minecraft:direction:down>.rotation

Return Type: Quaternionf

rotation() as Quaternionf
script.zs
// Direction.rotation() as Quaternionf;
<constant:minecraft:direction:down>.rotation();

Return Type: Quaternionf

Getter
Gets the serialized name.
script.zs
// Direction.serializedName as string
<constant:minecraft:direction:down>.serializedName

Return Type: string

serializedName() as string
Gets the serialized name.

Returns: the serialized name.

script.zs
// Direction.serializedName() as string;
<constant:minecraft:direction:down>.serializedName();

Return Type: string

Getter
script.zs
// Direction.step as Vector3f
<constant:minecraft:direction:down>.step

Return Type: Vector3f

step() as Vector3f
script.zs
// Direction.step() as Vector3f;
<constant:minecraft:direction:down>.step();

Return Type: Vector3f

Getter
script.zs
// Direction.stepX as int
<constant:minecraft:direction:down>.stepX

Return Type: int

stepX() as int
script.zs
// Direction.stepX() as int;
<constant:minecraft:direction:down>.stepX();

Return Type: int

Getter
script.zs
// Direction.stepY as int
<constant:minecraft:direction:down>.stepY

Return Type: int

stepY() as int
script.zs
// Direction.stepY() as int;
<constant:minecraft:direction:down>.stepY();

Return Type: int

Getter
script.zs
// Direction.stepZ as int
<constant:minecraft:direction:down>.stepZ

Return Type: int

stepZ() as int
script.zs
// Direction.stepZ() as int;
<constant:minecraft:direction:down>.stepZ();

Return Type: int

Getter
script.zs
// Direction.toYRot as float
<constant:minecraft:direction:down>.toYRot

Return Type: float

toYRot() as float
script.zs
// Direction.toYRot() as float;
<constant:minecraft:direction:down>.toYRot();

Return Type: float