RotationTarget

class RotationTarget(val rotation: Rotation, var entity: Entity? = null, val processors: List<RotationProcessor> = emptyList(), val ticksUntilReset: Int, val resetThreshold: Float, val considerInventory: Boolean, val movementCorrection: MovementCorrection, val whenReached: RestrictedSingleUseAction? = null)

An aim plan is a plan to aim at a certain rotation. It is being used to calculate the next rotation to aim at.

Parameters

rotation

The rotation we want to aim at.

angleSmooth

The mode of the smoother.

Constructors

Link copied to clipboard
constructor(rotation: Rotation, entity: Entity? = null, processors: List<RotationProcessor> = emptyList(), ticksUntilReset: Int, resetThreshold: Float, considerInventory: Boolean, movementCorrection: MovementCorrection, whenReached: RestrictedSingleUseAction? = null)

Properties

Link copied to clipboard

Consider if the inventory is open or not. If the inventory is open, we might not want to continue updating.

Link copied to clipboard
var entity: Entity?
Link copied to clipboard

The rotation processors which are being used to calculate the next rotation. This list should start with net.ccbluex.liquidbounce.utils.aiming.features.processors.anglesmooth.AngleSmooth and then continue with other processors like ShortStopRotationProcessor and FailFocus.

Link copied to clipboard

The reset threshold defines the threshold at which we are going to reset the aim plan. The threshold is being calculated by the distance between the current rotation and the rotation we want to aim.

Link copied to clipboard
Link copied to clipboard

The ticks until reset defines the amount of ticks until we are rotating back.

Link copied to clipboard

What should be done if the target rotation has been reached. Can be null.

Functions

Link copied to clipboard
fun towards(currentRotation: Rotation, isResetting: Boolean): Rotation

Calculates the next rotation to aim at. currentRotation is the current rotation or rather last rotation we aimed at. It is being used to calculate the next rotation.