Represents a direction axis (X, Y, Z)

Diese Klasse importieren

Link to diese-klasse-importieren

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;

Implemented Interfaces

Link to implemented-interfaces

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
ParameterTypeBeschreibung
Parameter
o
Type
Object
Beschreibung
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);
ParameterTypeBeschreibung
Parameter
x
Type
double
Beschreibung
x value of the coordinate
Parameter
y
Type
double
Beschreibung
y value of the coordinate
Parameter
z
Type
double
Beschreibung
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);
ParameterTypeBeschreibung
Parameter
x
Type
int
Beschreibung
x value of the coordinate
Parameter
y
Type
int
Beschreibung
y value of the coordinate
Parameter
z
Type
int
Beschreibung
z value of the coordinate

Name: hashCode

Return Type: int

ZenScript
Copy
// DirectionAxis.hashCode() as int

<directionaxis:x>.hashCode();
NameTypeHas GetterHas SetterBeschreibung
Name
commandString
Type
string
Has Getter
true
Has Setter
false
Beschreibung
No Description Provided
Name
hashCode
Type
int
Has Getter
true
Has Setter
false
Beschreibung
No Description Provided
Name
horizontal
Type
boolean
Has Getter
true
Has Setter
false
Beschreibung
No Description Provided
Name
name
Type
string
Has Getter
true
Has Setter
false
Beschreibung
Get the name of this Axis ("X", "Y" or "Z")
Name
ordinal
Type
int
Has Getter
true
Has Setter
false
Beschreibung
Gets the enum ordinal of this axis
Name
vertical
Type
boolean
Has Getter
true
Has Setter
false
Beschreibung
No Description Provided