ScriptRotationUtil

A collection of useful rotation utilities for the ScriptAPI. This SHOULD not be changed in a way that breaks backwards compatibility.

This is a singleton object, so it can be accessed from the script API like this:

api.rotationUtil.newRaytracedRotationEntity(entity, 4.2, 0.0)
rotationUtil.newRotationEntity(entity)
rotationUtil.aimAtRotation(rotation, true)

Functions

Link copied to clipboard
@JvmName(name = "aimAtRotation")
fun aimAtRotation(rotation: Rotation, fixVelocity: Boolean)

Aims at the given rotation using the in-built RotationManager.

Link copied to clipboard
@JvmName(name = "newRaytracedRotationEntity")
fun newRaytracedRotationEntity(entity: Entity, range: Double, throughWallsRange: Double): Rotation?

Creates a new net.ccbluex.liquidbounce.utils.aiming.data.Rotation from entity's bounding box. This uses raytracing, so it's guaranteed to be the best spot.

Link copied to clipboard
@JvmName(name = "newRotationEntity")
fun newRotationEntity(entity: Entity): Rotation

Creates a new Rotation from entity's bounding box. This uses no raytracing, so it's not guaranteed to be the best spot. It will aim at the center of the bounding box.