Class RotationHelper

java.lang.Object
dev.boze.api.interaction.RotationHelper

public final class RotationHelper extends Object
RotationHelper

Provides methods to calculate rotations

  • Constructor Details

    • RotationHelper

      public RotationHelper()
  • Method Details

    • calculateAngle

      public static Rotation calculateAngle(net.minecraft.util.math.Vec3d to)
      Parameters:
      to - the vector to calculate the angle to
      Returns:
      the angle between the player's eyes and the given vector
    • calculateAngle

      public static Rotation calculateAngle(net.minecraft.util.math.Vec3d from, net.minecraft.util.math.Vec3d to)
      Parameters:
      from - the vector to calculate the angle from
      to - the vector to calculate the angle to
      Returns:
      the angle between the given vectors