Rotation

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

Implements

Rotation implements the following interfaces:

StringRepresentable

Undocumented Interfaces

Comparable<Enum>

Enum Constants

Rotation is an enum with 4 constants. They are accessible like so:

script.zs
// Rotation.CLOCKWISE_180
<constant:minecraft:direction/rotation:clockwise_180>
// Rotation.CLOCKWISE_90
<constant:minecraft:direction/rotation:clockwise_90>
// Rotation.COUNTERCLOCKWISE_90
<constant:minecraft:direction/rotation:counterclockwise_90>
// Rotation.NONE
<constant:minecraft:direction/rotation:none>

Members

getRotated(rotation as Rotation) as Rotation
script.zs
// Rotation.getRotated(rotation as Rotation) as Rotation;
<constant:minecraft:direction/rotation:clockwise_180>.getRotated(myRotation);

Parameters:

rotation Type: Rotation

Return Type: Rotation

rotate(direction as Direction) as Direction
script.zs
// Rotation.rotate(direction as Direction) as Direction;
<constant:minecraft:direction/rotation:clockwise_180>.rotate(myDirection);

Parameters:

direction Type: Direction

Return Type: Direction

rotate(rotation as int, positionCount as int) as int
script.zs
// Rotation.rotate(rotation as int, positionCount as int) as int;
<constant:minecraft:direction/rotation:clockwise_180>.rotate(myInt, myInt);

Parameters:

rotation Type: int
positionCount Type: int

Return Type: int

rotation() as OctahedralGroup
script.zs
// Rotation.rotation() as OctahedralGroup;
<constant:minecraft:direction/rotation:clockwise_180>.rotation();

Return Type: OctahedralGroup

Getter
Gets the serialized name.
script.zs
// Rotation.serializedName as string
<constant:minecraft:direction/rotation:clockwise_180>.serializedName

Return Type: string

serializedName() as string
Gets the serialized name.

Returns: the serialized name.

script.zs
// Rotation.serializedName() as string;
<constant:minecraft:direction/rotation:clockwise_180>.serializedName();

Return Type: string