Skip to main content

Woodcutter

WoodcutterPlugin is a separate, disabled-by-default plugin (n3woodcutter). It does not replace or modify Tree Woodcutter.

Press F8 (or the configured hotkey) to capture the current tile and settings for a session. Changes to tree, radius, target level, output mode, nest handling, or bank preference apply to the next session.

Architecture

  • WoodcutterPlugin owns the F8 listener, RuneLite config provider, sidebar, overlay, Break Handler transitions, Packet Utils bootstrap requests, and input lock.
  • WoodcutterController is the pure per-tick decision layer. It captures WoodcutterSettings and the work-area anchor when a session starts.
  • WoodcutterWorkflows uses TaskPipeline for retained-destination bank trips: resolve, walk, open, deposit, optionally withdraw an axe, close, and return.
  • RuneLiteWoodcutterRuntime uses sdk.query, N3Client, revision-aware sdk.idmaps, InteractionApi.actions.*, and NavigationActions. It does not send packets, consume raw gamevals, or use legacy interaction facades.
  • sdk.input.HotkeyEventListener turns the persisted RuneLite key binding into the session-toggle event, while HotkeyCaptureEventListener owns sidebar key capture; the plugin does not depend on RuneLite's listener directly.

Behavior

  • Targets Normal, Oak, Willow, Teak, Maple, Mahogany, Yew, Magic, and Redwood inside the captured radius.
  • Stops at the configured real Woodcutting level.
  • Selects reachable trees by player path distance and retains paced tree and nest targets to avoid target oscillation. Redwood remains local to the work radius.
  • Uses the best usable equipped or inventory axe. If none is carried, it uses the configured bank, withdraws the best usable exact bank item, and returns.
  • Drops supported logs one at a time, or walks to the retained selected bank and deposits every supported log type when banking is enabled.
  • Nearest evaluates every sdk.workflow.BankLocation by reachable path; named banks are strict. An unavailable bank or missing usable axe pauses the session until it is stopped and restarted.
  • When enabled, picks the path-nearest recognized bird nest before output handling. A full inventory drops one supported log for space. Nests are never dropped: bank mode deposits them with logs, drop mode makes a nest-only bank trip, and axe-recovery trips deposit collected nests.
  • Records XP, levels, positive supported-log inventory deltas, active runtime, and hourly rates. Login/bootstrap and Break Handler waits do not accrue active time.
  • Registers with Break Handler only while a hotkey session is active and releases Packet Utils bootstrap and input ownership when idle or paused.

Settings and UI

RuneLite's native configuration page and the branded n3 sidebar write the same n3woodcutter keys. The sidebar provides rounded tree/bank dropdowns, radius and target-level spinners, banking/nest checkboxes, and key capture. Edits affect the next session because active settings are immutable snapshots.

The sidebar and overlay show state, tree, XP and level gains, XP/hour, logs, logs/hour, active runtime, output mode, selected bank, and nest state.

Validation

.\gradlew.bat test --tests com.n3plugins.woodcutter.* --console plain

Live validation

Pending: all nine tree types, live tree/nest path selection, nest spawning and full-inventory pickup, nest-only banking, nearest and strict bank routing, exact axe withdrawal, sidebar key capture, target-level stopping, overlay refresh, and Break Handler pause/resume in the RuneLite client.