Importing the class

Link to 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.

ZenScript
Copy
import crafttweaker.api.util.Direction;

Implemented Interfaces

Link to implemented-interfaces

Direction implements the following interfaces. That means all methods defined in these interfaces are also available in Direction

Direction is an enum. It has 6 enum constants. They are accessible using the code below.

ZenScript
Copy
Direction.DOWN
Direction.UP
Direction.NORTH
Direction.SOUTH
Direction.WEST
Direction.EAST

Link to g-

Name: getAxis

Return Type: Axis

ZenScript
Copy
// Direction.getAxis() as Axis

myDirection.getAxis();

Link to g--1

Name: getAxisDirection

Return Type: AxisDirection

ZenScript
Copy
// Direction.getAxisDirection() as AxisDirection

myDirection.getAxisDirection();

Link to g--2

Name: getClockWise

Return Type: Direction

ZenScript
Copy
// Direction.getClockWise() as Direction

myDirection.getClockWise();

Link to g--3

Name: getClockWise

Return Type: Direction

ZenScript
Copy
Direction.getClockWise(axis as Axis) as Direction
ParameterTypeDescription
Parameter
axis
Type
Axis
Description
No Description Provided

Link to g--4

Name: getCounterClockWise

Return Type: Direction

ZenScript
Copy
// Direction.getCounterClockWise() as Direction

myDirection.getCounterClockWise();

Link to g--5

Name: getCounterClockWise

Return Type: Direction

ZenScript
Copy
Direction.getCounterClockWise(axis as Axis) as Direction
ParameterTypeDescription
Parameter
axis
Type
Axis
Description
No Description Provided

Name: getName

Return Type: string

ZenScript
Copy
// Direction.getName() as string

myDirection.getName();

Link to g--7

Name: getNormal

Return Type: Vec3i

ZenScript
Copy
// Direction.getNormal() as Vec3i

myDirection.getNormal();

Link to g--8

Name: getOpposite

Return Type: Direction

ZenScript
Copy
// Direction.getOpposite() as Direction

myDirection.getOpposite();

Link to g--9

Name: getRotation

Return Type: Quaternion

ZenScript
Copy
// Direction.getRotation() as Quaternion

myDirection.getRotation();

Name: getStepX

Return Type: int

ZenScript
Copy
// Direction.getStepX() as int

myDirection.getStepX();

Name: getStepY

Return Type: int

ZenScript
Copy
// Direction.getStepY() as int

myDirection.getStepY();

Name: getStepZ

Return Type: int

ZenScript
Copy
// Direction.getStepZ() as int

myDirection.getStepZ();

Link to g--13

Name: isFacingAngle

Return Type: boolean

ZenScript
Copy
Direction.isFacingAngle(degrees as float) as boolean
ParameterTypeDescription
Parameter
degrees
Type
float
Description
No Description Provided

Name: step

Return Type: Vector3f

ZenScript
Copy
// Direction.step() as Vector3f

myDirection.step();

Name: toYRot

Return Type: float

ZenScript
Copy
// Direction.toYRot() as float

myDirection.toYRot();
NameTypeHas GetterHas SetterDescription
Name
axis
Type
Axis
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
axisDirection
Type
AxisDirection
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
clockWise
Type
Direction
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
counterClockWise
Type
Direction
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
normal
Type
Vec3i
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
opposite
Type
Direction
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
rotation
Type
Quaternion
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
step
Type
Vector3f
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
stepX
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
stepY
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
stepZ
Type
int
Has Getter
true
Has Setter
false
Description
No Description Provided
Name
toYRot
Type
float
Has Getter
true
Has Setter
false
Description
No Description Provided