Direction

Represents a cardinal direction (north, south, east, west) and (up and down).

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.

import crafttweaker.api.util.Direction;

Extending Enum<Direction>

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

Properties

NameTypeHas GetterHas Setter
sidesDirection[]truefalse
## Methods

rotateY

Rotates this direction on the Y axis

Return Type: Direction

Direction.rotateY() as Direction
<direction:north>.rotateY();

rotateYCCW

Rotates this direction counter-clock wise on the Y axis

Return Type: Direction

Direction.rotateYCCW() as Direction
<direction:north>.rotateYCCW();

Properties

NameTypeHas GetterHas Setter
axisDirectionAxistruefalse
axisOffsetinttruefalse
horizontalAnglefloattruefalse
horizontalIndexinttruefalse
indexinttruefalse
namestringtruefalse
oppositeDirectiontruefalse
xOffsetinttruefalse
yOffsetinttruefalse
zOffsetinttruefalse