Importare la Classe

Link to importare-la-classe

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;

Interfacce Implementate

Link to interfacce-implementate

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

Name: getAxis

Return Type: Axis

ZenScript
Copy
// Direction.getAxis() as Axis

myDirection.getAxis();

Link to getAxisDirection

Name: getAxisDirection

Return Type: AxisDirection

ZenScript
Copy
// Direction.getAxisDirection() as AxisDirection

myDirection.getAxisDirection();

Name: getClockWise

Return Type: Direction

ZenScript
Copy
// Direction.getClockWise() as Direction

myDirection.getClockWise();

Name: getClockWise

Return Type: Direction

ZenScript
Copy
Direction.getClockWise(axis as Axis) as Direction
ParametroTipoDescrizione
Parametro
axis
Tipo
Axis
Descrizione
No Description Provided

Link to getCounterClockWise

Name: getCounterClockWise

Return Type: Direction

ZenScript
Copy
// Direction.getCounterClockWise() as Direction

myDirection.getCounterClockWise();

Link to getCounterClockWise

Name: getCounterClockWise

Return Type: Direction

ZenScript
Copy
Direction.getCounterClockWise(axis as Axis) as Direction
ParametroTipoDescrizione
Parametro
axis
Tipo
Axis
Descrizione
No Description Provided

Name: getName

Return Type: string

ZenScript
Copy
// Direction.getName() as string

myDirection.getName();

Name: getNormal

Return Type: Vec3i

ZenScript
Copy
// Direction.getNormal() as Vec3i

myDirection.getNormal();

Name: getOpposite

Return Type: Direction

ZenScript
Copy
// Direction.getOpposite() as Direction

myDirection.getOpposite();

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();

Name: isFacingAngle

Return Type: boolean

ZenScript
Copy
Direction.isFacingAngle(degrees as float) as boolean
ParametroTipoDescrizione
Parametro
degrees
Tipo
float
Descrizione
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();
NomeTipoHa GetterHa SetterDescrizione
Nome
axis
Tipo
Axis
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
axisDirection
Tipo
AxisDirection
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
clockWise
Tipo
Direction
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
counterClockWise
Tipo
Direction
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
normal
Tipo
Vec3i
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
opposite
Tipo
Direction
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
rotation
Tipo
Quaternion
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
step
Tipo
Vector3f
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
stepX
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
stepY
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
stepZ
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
toYRot
Tipo
float
Ha Getter
Ha Setter
no
Descrizione
No Description Provided