Home Commands Examples Getting Started With Scripts Global Keywords

Plane

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.

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

Implemented Interfaces

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

Enum Constants

Plane is an enum. It has 2 enum constants. They are accessible using the code below.

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

Methods

Return Type: Axis

script.zs
Plane.getRandomAxis(random as RandomSource) as Axis
ParameterType
Parameter
random
Type
RandomSource

Return Type: Direction

script.zs
Plane.getRandomDirection(random as RandomSource) as Direction
ParameterType
Parameter
random
Type
RandomSource

Return Type: stdlib.Iterator<Direction>

script.zs
// Plane.iterator() as stdlib.Iterator<Direction>
myPlane.iterator();

Return Type: boolean

script.zs
Plane.test(direction as Direction?) as boolean
ParameterType
Parameter
direction
Type
Direction?

Properties

NameTypeHas GetterHas Setter
Name
iterator
Type
stdlib.Iterator<Direction>
Has Getter
true
Has Setter
false