AxisCycle

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.math.AxisCycle;

Enum Constants

AxisCycle is an enum. It has 3 enum constants. They are accessible using the code below.

script.zs
<constant:minecraft:direction/axiscycle:none>
<constant:minecraft:direction/axiscycle:forward>
<constant:minecraft:direction/axiscycle:backward>

Methods

Return Type: Axis

script.zs
AxisCycle.cycle(axis as Axis) as Axis
ParameterType
Parameter
axis
Type
Axis

Return Type: double

script.zs
AxisCycle.cycle(x as double, y as double, z as double, axis as Axis) as double
ParameterType
Parameter
x
Type
double
Parameter
y
Type
double
Parameter
z
Type
double
Parameter
axis
Type
Axis

Return Type: int

script.zs
AxisCycle.cycle(x as int, y as int, z as int, axis as Axis) as int
ParameterType
Parameter
x
Type
int
Parameter
y
Type
int
Parameter
z
Type
int
Parameter
axis
Type
Axis

Return Type: AxisCycle

script.zs
// AxisCycle.inverse() as AxisCycle
myAxisCycle.inverse();