Represents a direction axis (X, Y, Z)

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.DirectionAxis;

Interfacce Implementate

Link to interfacce-implementate

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

  • Predicate

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

ZenScript
Copy
DirectionAxis.X
DirectionAxis.Y
DirectionAxis.Z

Name: equals

Return Type: boolean

ZenScript
Copy
DirectionAxis.equals(o as Object) as boolean
ParametroTipoDescrizione
Parametro
o
Tipo
Object
Descrizione
No Description Provided

Name: getCoordinate

Gets the coordinate of this axis based on the given values, if this axis is "X", then it will return the value of the "x" parameter

Returns: value of the coordinate
Return Type: double

ZenScript
Copy
// DirectionAxis.getCoordinate(x as double, y as double, z as double) as double

<directionaxis:x>.getCoordinate(1.2, 2.5, 3.87);
ParametroTipoDescrizione
Parametro
x
Tipo
double
Descrizione
x value of the coordinate
Parametro
y
Tipo
double
Descrizione
y value of the coordinate
Parametro
z
Tipo
double
Descrizione
z value of the coordinate

Name: getCoordinate

Gets the coordinate of this axis based on the given values, if this axis is "X", then it will return the value of the "x" parameter

Returns: value of the coordinate
Return Type: int

ZenScript
Copy
// DirectionAxis.getCoordinate(x as int, y as int, z as int) as int

<directionaxis:x>.getCoordinate(1, 2, 3);
ParametroTipoDescrizione
Parametro
x
Tipo
int
Descrizione
x value of the coordinate
Parametro
y
Tipo
int
Descrizione
y value of the coordinate
Parametro
z
Tipo
int
Descrizione
z value of the coordinate

Name: hashCode

Return Type: int

ZenScript
Copy
// DirectionAxis.hashCode() as int

<directionaxis:x>.hashCode();
NomeTipoHa GetterHa SetterDescrizione
Nome
commandString
Tipo
string
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
hashCode
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
horizontal
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
nome
Tipo
string
Ha Getter
Ha Setter
no
Descrizione
Get the name of this Axis ("X", "Y" or "Z")
Nome
ordinal
Tipo
int
Ha Getter
Ha Setter
no
Descrizione
Gets the enum ordinal of this axis
Nome
vertical
Tipo
boolean
Ha Getter
Ha Setter
no
Descrizione
No Description Provided