DirectionAxis

Represents a direction axis (X, Y, Z)

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

Extending Enum<DirectionAxis>

DirectionAxis extends Enum<DirectionAxis>. That means all methods available in Enum<DirectionAxis> are also available in DirectionAxis

Implemented Interfaces

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

  • Predicate

Methods

equals

Return Type: boolean

ZenScript
Copy
DirectionAxis.equals(o as Object) as boolean
ParameterTypeDescription
oObjectNo Description Provided
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

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);
ParameterTypeDescription
xdoublex value of the coordinate
ydoubley value of the coordinate
zdoublez value of the coordinate
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

Return Type: int

ZenScript
Copy
DirectionAxis.getCoordinate(x as int, y as int, z as int) as int
<directionaxis:x>.getCoordinate(1, 2, 3);
ParameterTypeDescription
xintx value of the coordinate
yinty value of the coordinate
zintz value of the coordinate
hashCode

Return Type: int

ZenScript
Copy
DirectionAxis.hashCode() as int
<directionaxis:x>.hashCode();

Properties

NameTypeHas GetterHas Setter
commandStringstringtruefalse
hashCodeinttruefalse
horizontalbooleantruefalse
namestringtruefalse
ordinalinttruefalse
verticalbooleantruefalse