ClickPlan

class ClickPlan(timing: ClickTiming, random: Random = Random())

Press timestamps planned ahead in milliseconds and batched into ticks the way net.minecraft.client.Minecraft.handleKeybinds drains every click queued since the previous tick.

Tick n consumes the presses in (tickTime + (n - 1) * 50, tickTime + n * 50], so clicksAt is what that tick will consume.

Constructors

Link copied to clipboard
constructor(timing: ClickTiming, random: Random = Random())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Adds a guaranteed click to tick n when nothing is planned for it.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun clicksAt(tick: Int): Int
Link copied to clipboard
inline fun consume(gate: () -> Boolean, block: () -> Boolean): Int

Uses up the presses of the current tick. A press failing gate is dropped, as vanilla drops presses while missTime is set. Returns the amount of successful block calls.

Link copied to clipboard
fun reset(now: Long)

Starts a new combo with a press at now.

Link copied to clipboard
fun tick(now: Long)

Advances to the next tick and consumes the presses due at now. Presses nobody used for a while, or a gap in ticks, end the combo.