Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

Plane

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.util.direction.Plane;

Implements

Undocumented Interfaces

Iterable<Direction>,Predicate<Direction>,Comparable<Enum>

Enum Constants

Plane is an enum with 2 constants. They are accessible like so:

script.zs
// Plane.HORIZONTAL
<constant:minecraft:direction/plane:horizontal>
// Plane.VERTICAL
<constant:minecraft:direction/plane:vertical>

Members

getRandomAxis(random as RandomSource) as Axis
script.zs
// Plane.getRandomAxis(random as RandomSource) as Axis;
<constant:minecraft:direction/plane:horizontal>.getRandomAxis(myRandomSource);

Parameters:

random Type: RandomSource

Return Type: Axis

getRandomDirection(random as RandomSource) as Direction
script.zs
// Plane.getRandomDirection(random as RandomSource) as Direction;
<constant:minecraft:direction/plane:horizontal>.getRandomDirection(myRandomSource);

Parameters:

random Type: RandomSource

Return Type: Direction

Getter
script.zs
// Plane.iterator as Iterator<Direction>
<constant:minecraft:direction/plane:horizontal>.iterator

Return Type: Iterator<Direction>

iterator() as Iterator<Direction>
script.zs
// Plane.iterator() as Iterator<Direction>;
<constant:minecraft:direction/plane:horizontal>.iterator();

Return Type: Iterator<Direction>

test(direction as Direction) as bool
script.zs
// Plane.test(direction as Direction) as bool;
<constant:minecraft:direction/plane:horizontal>.test(myDirection);

Parameters:

direction Type: Direction

Return Type: bool