Interface Rotation

All Superinterfaces:
DefaultedRegistryValue

@CatalogedBy(Rotations.class) public interface Rotation extends DefaultedRegistryValue
  • Method Details

    • and

      Rotation and(Rotation rotation)
    • angle

      Angle angle()
      Gets the the rotation in degrees always in clockwise order.
      Returns:
      The rotation
    • toRotationMatrix

      default Matrix4d toRotationMatrix()
      Gets the 4D rotation matrix of this rotation.

      Minecraft's coordinate system is different than traditional systems applying the semantic meaning behind the x and z axis. These natures are described as below:

      • The x-axis indicates the east (when positive) or west (when negative) of the origin point (0, 0, 0)
      • The z-axis indicates the south (when positive) or north (when negative) of the origin point (0, 0, 0)

      These rules differ from traditional coordinate interpretations and therefore may be unintuitive when a rotation of 90 degrees will instead rotate the coordinates (1, 1, 1) across the pivot (0, 0, 0)

      Returns:
      The euler matrix that represents this rotation in the X-Z plane.