Tree Woodcutter
TreeWoodcutterPlugin is a per-tick MVC woodcutting helper registered in
runelite-plugin.properties (config group n3treewc, disabled by default).
Architecture
TreeWoodcutterPlugin- lifecycle, overlay XP baseline, delegates ticks to controller.TreeWoodcutterController- pure top-level state machine; chopping remains per-tick, while ordered subflows run throughTaskPipeline.TreeWoodcutterWorkflows- package-private Workflow API pipelines for supply recovery, nest pickup, drop/bank/deposit-box output, and fletching.RuneLiteTreeWoodcutterRuntime- live adapter toInteractionApi/sdk.query.WoodcuttingTarget,WoodcuttingAxeTier,FletchingProduct,WoodcuttingInventoryPolicy- data/rules.
Core behavior
onGameTick runs TreeWoodcutterController.onGameTick(). Global ActionPacer is
advanced from PacketUtilsPlugin.onGameTick - see Suite Wiring.
The plugin registers with Break Handler and stays active there while the
controller is not stopped. A due or active break releases the input lock and
skips the controller tick before any chop, bank, drop, fletch, or nest action.
State priority (determineState)
- Not logged in →
WAITING_FOR_LOGIN - Session limit (
maxSessionMinutes> 0) →STOPPED - Woodcutting level too low for selected tree (not
ANY) →STOPPED - FLETCH guards: members world, not
ANY, valid product/level → elseSTOPPED - Resolve best usable axe (equipped or inventory)
- Missing axe/knife → bank supply trip (
WALK_TO_BANK/OPEN_BANK/WITHDRAW_SUPPLY) - Return to anchor when away (after banking trips)
- Bird nest pickup (members, config enabled) before output/chop
- Deposit/bank output when interfaces open and inventory full; FLETCH mode deposits finished products when full and no logs remain
- Production UI open →
SELECT_FLETCH_PRODUCT - Moving or animating →
CHOPPING_WAIT - Logs ready + FLETCH mode →
START_FLETCH - Full inventory → DROP / deposit box / bank per
OutputMode - Else
CHOP_TREEorWAIT_FOR_TREE
Legacy bankLogs = true with outputMode = DROP is treated as BANK (effectiveOutputMode).
Tree names (post-2023-07-12)
Config TreeType | Object names (lowercase) |
|---|---|
NORMAL | tree, evergreen |
OAK | oak tree |
WILLOW | willow tree |
MAPLE | maple tree |
YEW | yew tree |
MAGIC | magic tree |
ANY | union of all above |
Targets must expose the Chop down action (TreeWoodcutterPlugin.CHOP_ACTION).
Output modes
| Mode | Full inventory behavior |
|---|---|
DROP | Drop one eligible item per tick (InventoryActions) |
BANK | Prefer deposit box when closer (config); else nearest bank; one deposit per tick |
FLETCH | Knife + logs → production UI; deposit fletched products when full |
Axes are always protected. Additional names via protectedItems (comma-separated, tag-stripped).
Configuration
treeType,radius(anchor search)outputMode,bankLogs(deprecated migration)preferDepositBox,fallbackToBankWhenDepositBoxUnavailablefletchingProduct(FLETCH mode)pickupBirdNests(members)maxSessionMinutes(0 = disabled)protectedItems,showOverlay
Anti-detection note
Tree selection first removes trees without a reachable interaction tile, then
ranks the remainder by distance to the captured anchor and path distance from
the player. chopNearestTree randomizes only exact-score ties and retains that
choice while an interaction is paced. Bird nests stay inside the anchor radius
and use path-nearest selection. Deposit-box walking and opening retain the same
selected location.
Testing
.\gradlew.bat test --tests com.n3plugins.treewoodcutter.* --console plain
TreeWoodcutterDataTest- axe/log/tree predicates, tag strippingTreeWoodcutterControllerTest- controller routing and workflow behavior (login, level, supply cleanup, deposit fallback, nest retry, fletching output)WoodcuttingTargetSelectorTest- anchor/path ranking, unreachable trees, exact ties, and paced target retentionRuneLiteTreeWoodcutterRuntimeSelectionTest- nest and deposit-box query policyTreeWoodcutterPluginBaselineTest- overlay XP baseline
Live validation (pending)
Fletch product selection, obstructed tree clusters, multiple visible deposit boxes, deposit box vs bank fallback, nest pickup with full inventory, axe/knife withdrawal, return-to-anchor after banking, session limit stop.