Direction 5.46.0
Java's Direction enum, as ints in vanilla's ordinal order (the order matters: vanilla iterates and picks random directions by ordinal).
Constants
AXIS
php
public const AXIS = [1, 1, 2, 2, 0, 0]Axis per direction: 0 = x, 1 = y, 2 = z.
DOWN
php
public const DOWN = 0EAST
php
public const EAST = 5HORIZONTAL
php
public const HORIZONTAL = [self::SOUTH, self::WEST, self::NORTH, self::EAST]Horizontal directions in 2D data value order (Direction.Plane.HORIZONTAL / from2DDataValue): S, W, N, E.
NAMES
php
public const NAMES = ["down", "up", "north", "south", "west", "east"]NORTH
php
public const NORTH = 2OPPOSITE
php
public const OPPOSITE = [1, 0, 3, 2, 5, 4]PLANE_HORIZONTAL
php
public const PLANE_HORIZONTAL = [self::NORTH, self::EAST, self::SOUTH, self::WEST]Direction.Plane.HORIZONTAL iteration order: N, E, S, W.
PLANE_VERTICAL
php
public const PLANE_VERTICAL = [self::UP, self::DOWN]Direction.Plane.VERTICAL: UP, DOWN.
SOUTH
php
public const SOUTH = 3STEP_X
php
public const STEP_X = [0, 0, 0, 0, -1, 1]STEP_Y
php
public const STEP_Y = [-1, 1, 0, 0, 0, 0]STEP_Z
php
public const STEP_Z = [0, 0, -1, 1, 0, 0]UP
php
public const UP = 1WEST
php
public const WEST = 4Methods
clockWise()
php
public static function clockWise(int $direction) : intClockwise rotation around Y (horizontal directions only).
counterClockWise()
php
public static function counterClockWise(int $direction) : intfromName()
php
public static function fromName(string $name) : int