Skip to content

Comments

Updated Farm Tree Runner#1414

Merged
gmason0 merged 7 commits intochsami:developmentfrom
Lobotobag:main
Aug 29, 2025
Merged

Updated Farm Tree Runner#1414
gmason0 merged 7 commits intochsami:developmentfrom
Lobotobag:main

Conversation

@Lobotobag
Copy link
Contributor

@Lobotobag Lobotobag commented Aug 22, 2025

Farm tree runner: added missing trees, reworked UI to separate hardwood patches from trees & make more sense, reordered the patches in the config to match the order in the tree run.

Summary by CodeRabbit

  • New Features

    • Added hardwood tree support and three new patches (Avium Savannah hardwood, Auburnvale tree, Kastori fruit); Fossil Island now grouped under hardwood.
    • Sapling selection for tree, fruit, and hardwood types.
    • Protection toggles for trees, fruit trees, and hardwoods.
  • Improvements

    • Reorganized configuration into clearer sections and consolidated gear options.
    • Extended run sequence to include the new patches.
  • UI

    • Overlay version bumped to v1.3.1; plugin description and splash screen updated.

…od patches from trees & make more sense, reordered the patches in the config to match the order in the tree run.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 22, 2025

Walkthrough

Adds Auburnvale, Kastori, and Avium Savannah patches and handling states; restructures FarmTreeRunConfig into Sapling/Protection/Gear/patch sections with new selection and protection options and many renamed patch toggles; updates overlay title and plugin description; changes SplashScreen asset.

Changes

Cohort / File(s) Summary
Config restructure and API changes
.../farmTreeRun/FarmTreeRunConfig.java
Removed DEBUG_MODE and old generalSection; added section constants (saplingSection, protectionSection, gearSection, treePatchesSection, fruitTreePatchesSection, hardTreePatchesSection). Introduced sapling/fruit/hard tree selection methods, protection toggles, moved gear options, added/renamed many regular/fruit/hardwood patch toggles (including aviumSavannahHardwoodPatch, fossilTreePatch moved under hardwood). Removed RuneLite time-tracking config.
Run flow, enums and script updates
.../farmTreeRun/FarmTreeRunScript.java, .../farmTreeRun/enums/FarmTreeRunState.java
Added enum patch entries AUBURNVALE_TREE_PATCH, KASTORI_FRUIT_TREE_PATCH, AVIUM_SAVANNAH_HARDWOOD_PATCH with locations. Added states HANDLE_AUBURNVALE_TREE_PATCH, HANDLE_KASTORI_FRUIT_TREE_PATCH, HANDLE_AVIUM_SAVANNAH_HARDWOOD_PATCH and extended state machine to handle them before FINISHED. Minor import cleanup.
UI and metadata updates
.../farmTreeRun/FarmTreeRunOverlay.java, .../farmTreeRun/FarmTreeRunPlugin.java, ui/SplashScreen.java
Overlay title version bumped to v1.3.1. Plugin descriptor description now mentions hardwood trees. SplashScreen now loads microbot_splash.png instead of previous asset.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Plugin as FarmTreeRunPlugin
  participant Script as FarmTreeRunScript
  participant Config as FarmTreeRunConfig
  participant Game as Game Client

  User->>Plugin: enable/start
  Plugin->>Script: init/start
  Script->>Config: read sapling/protection/gear & patch toggles
  Script->>Script: build route (tree -> fruit -> hardwood)

  rect rgba(200,220,255,0.18)
    note over Script: Patch handling loop (includes Auburnvale, Kastori, Avium Savannah)
    loop per patch state
      Script->>Game: walk to patch location
      Script->>Config: isPatchEnabled(patch)?
      alt enabled
        Script->>Game: handlePatch(patch)
        Game-->>Script: result
      else disabled
        Script-->>Script: skip to next
      end
    end
  end

  Script-->>Plugin: FINISHED
  Plugin-->>User: run complete
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • Web Walker Fixes #1419 — Adds Auburnvale and Kastori map locations and matching patch/enum entries that overlap this PR's new patches and states.

Suggested reviewers

  • g-mason0

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunScript.java (2)

946-953: Bug: Avium hardwood patch will use the wrong sapling

getSaplingToUse only treats Fossil Island patches as hardwood. The new AVIUM_SAVANNAH_HARDWOOD_PATCH will fall through and incorrectly select a fruit sapling. Select by TreeKind instead.

-    private static int getSaplingToUse(Patch patch, FarmTreeRunConfig config) {
-        if (patch == Patch.FOSSIL_TREE_PATCH_A || patch == Patch.FOSSIL_TREE_PATCH_B || patch == Patch.FOSSIL_TREE_PATCH_C ) {
-            return config.selectedHardTree().getSaplingId();
-        } else return patch.kind == TreeKind.TREE ?
-                config.selectedTree().getSaplingId() :
-                config.selectedFruitTree().getSaplingId();
-    }
+    private static int getSaplingToUse(Patch patch, FarmTreeRunConfig config) {
+        if (patch.kind == TreeKind.HARD_TREE) {
+            return config.selectedHardTree().getSaplingId();
+        }
+        return patch.kind == TreeKind.TREE
+                ? config.selectedTree().getSaplingId()
+                : config.selectedFruitTree().getSaplingId();
+    }

696-703: Possible NPE: interacting with a null gardener

Rs2Npc.interact(treeGardener, "Pay"); is called before null-checking treeGardener. This can NPE when the nearest “Pay” NPC isn’t found (likely at new/edge locations).

-        Rs2NpcModel treeGardener = null;
-        treeGardener = Rs2Npc.getNearestNpcWithAction("Pay");
-        Rs2Npc.interact(treeGardener, "Pay");
-
-        if (treeGardener == null) {
-            handleExoticGardeners();
-        }
+        Rs2NpcModel treeGardener = Rs2Npc.getNearestNpcWithAction("Pay");
+        if (treeGardener != null) {
+            Rs2Npc.interact(treeGardener, "Pay");
+        } else {
+            handleExoticGardeners();
+        }
🧹 Nitpick comments (9)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/enums/FarmTreeRunState.java (1)

48-53: New states are well-placed; update the run-order comment to match

The enum additions look correct and align with the script flow. Please also update the header comment (Lines 3–16) to include Auburnvale Tree, Kastori Fruit, and Avium Savannah Hardwood so the documented order matches actual execution.

runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunOverlay.java (1)

26-26: Version bump acknowledged; avoid hardcoding version in multiple places

The title change to v1.3.1 is fine. To prevent drift between overlay title and future descriptor changes, consider sourcing the version from a single constant (e.g., from the plugin class).

Example (outside this hunk):

  • In FarmTreeRunPlugin:
public static final String VERSION = "v1.3.1";
  • Here:
- .text("Acun's farm tree runner (v1.3.1)")
+ .text("Acun's farm tree runner (" + FarmTreeRunPlugin.VERSION + ")")
runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunPlugin.java (1)

25-30: Descriptor text matches new scope; consider improving discoverability tags

Good call updating the description to include hardwood trees. Optional: add a “hardwood” tag to improve searchability in the plugins list.

 @PluginDescriptor(
         name = PluginDescriptor.Default + "Farm tree runner",
-        description = "Acun's farm tree runner. Supports regular, fruit and hardwood trees",
-        tags = {"Farming", "Tree run"},
+        description = "Acun's farm tree runner. Supports regular, fruit and hardwood trees",
+        tags = {"Farming", "Tree run", "Hardwood"},
         enabledByDefault = false
 )
runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunScript.java (3)

87-91: Confirm new patch IDs and coordinates; set appropriate farming levels

The new patches are wired correctly. Please confirm object IDs/WorldPoints and set realistic farmingLevel requirements (non-1) where applicable to avoid misleading “requires level 1” messages.


304-341: States integrate cleanly; consider DRYing state boilerplate

The three new states mirror existing handling and transition correctly. The repeated pattern (walk → handlePatch → gate on handled → next state) could be extracted into a helper to reduce duplication and future maintenance.

Illustrative refactor (outside this hunk):

private void process(Patch patch, boolean enabled, FarmTreeRunState next) {
    if (enabled && walkToLocation(patch.getLocation())) {
        if (!handlePatch(config, patch)) return;
    }
    botStatus = next;
}

Usage:

case HANDLE_AUBURNVALE_TREE_PATCH:
    process(Patch.AUBURNVALE_TREE_PATCH, config.auburnTreePatch(), HANDLE_KASTORI_FRUIT_TREE_PATCH);
    break;

879-881: Counting logic for withdrawals looks intentional; add a clarifying comment

Listing fossilTreePatch three times to represent A/B/C drives correct sapling/payment counts. Consider adding a brief comment so future readers know the duplication is deliberate.

Also applies to: 895-896, 913-914

runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java (3)

36-39: Config help text mentions “banking is broken” — align defaults or remove note

If banking is intentionally unreliable, consider defaulting banking() to false to spare new users, or remove the warning once fixed. Right now the note and default (true) conflict.

Optional diff:

-    default boolean banking() { return true; }
+    default boolean banking() { return false; }

110-118: Avoid spaces in keyName for the hard tree sapling selector

keyName = "Fossil Island Tree" contains spaces; config keys are used as persistent identifiers and typically avoid spaces. Suggest a stable, descriptive key like hardTreeSapling (UI name can stay friendly).

-    @ConfigItem(
-            keyName = "Fossil Island Tree",
-            name = "Hard sapling",
-            description = "Select Hard tree sapling to use",
-            position = 2,
-            section = saplingSection
-    )
+    @ConfigItem(
+            keyName = "hardTreeSapling",
+            name = "Hardwood sapling",
+            description = "Select hardwood sapling to use",
+            position = 2,
+            section = saplingSection
+    )

141-147: Tone and consistency for “Protect Hard trees”

Minor: consider “Protect hardwood trees” to match section naming and keep tone professional.

-    name = "Protect Hard trees",
-    description = "Do you want to protect your hard wood ;)?",
+    name = "Protect hardwood trees",
+    description = "Pay gardeners to protect hardwood trees",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7e7b8a3 and fb9d395.

📒 Files selected for processing (5)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java (2 hunks)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunOverlay.java (1 hunks)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunPlugin.java (1 hunks)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunScript.java (5 hunks)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/enums/FarmTreeRunState.java (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
🔇 Additional comments (4)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java (4)

44-67: Sectioning looks good and improves clarity

Nice separation into Sapling, Protection, Gear, and patch sections. This will make the UI easier to navigate.


256-263: Auburnvale toggle aligns with new state — LGTM

Toggle naming and positioning are consistent with run order.


323-330: Kastori fruit patch toggle added — LGTM

Defaults and ordering mirror the script.


334-350: Hardwood patch toggles reflect run order — LGTM

Fossil Island (x3) then Avium Savannah matches the new state flow and withdrawal counting logic.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java (1)

11-11: Ensure ConfigGroup is correctly set for FarmTreeRunConfig

The placeholder @ConfigGroup("example") on line 11 of FarmTreeRunConfig.java should be replaced with a plugin-specific identifier to prevent user settings from being reset:

- @ConfigGroup("example")
+ @ConfigGroup("farmTreeRun")

• Update the annotation in src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java:11.
• Verify there are no other usages of "example" as a config group.
• If this plugin has already been released with the incorrect group, document the breaking change or provide a migration path so users don’t lose their saved configurations.

🧹 Nitpick comments (5)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java (5)

36-39: Minor copy/text polish + HTML line breaks for correct rendering

“Happy botting\n” won’t render a break in HTML. Also, add punctuation and keep naming consistent with the rest of the text.

-        "<br> If you want to stop the script during your farm run (maybe it gets stuck or whatever reason), make sure to disable 'Banking' and disable patches you previously ran." +
-        "Happy botting\n" +
-        "<br><br>UI and new trees added thanks to Diogenes and T\n" +
+        "<br> If you want to stop the script during your farm run (maybe it gets stuck or whatever reason), make sure to disable 'Banking' and disable patches you previously ran." +
+        "<br>Happy botting!" +
+        "<br><br>UI and new trees added thanks to Diogenes and T." +
         "<br><br> The tree order is as follows: GS Fruit → GS Tree → TGV Fruit → Farming Guild Tree → Farming Guild Fruit → Taverley → Falador → Lumbridge → Varrock → Brimhaven Fruit → Catherby Fruit → Fossil A/B/C → Lletya Fruit → Auburnvale Tree → Kastori Fruit → Avium Savannah Hardwood. <br><br>Patches are listed in the order they will be attended filtered by type\n"

42-42: AI summary mismatch: DEBUG_MODE is still present

The AI summary notes DEBUG_MODE was removed, but it remains. If intentional, keep it; otherwise, remove to avoid dead code.

-    public static final boolean DEBUG_MODE = System.getProperty("java.vm.info", "").contains("sharing");
+    // DEBUG_MODE removed; enable locally when needed.

123-147: Tone and terminology for hardwood protection

Use consistent terminology (“hardwood”) and a neutral description.

-    @ConfigItem(
-            keyName = "protectHardTree",
-            name = "Protect Hard trees",
-            description = "Do you want to protect your hard wood ;)?",
+    @ConfigItem(
+            keyName = "protectHardTree",
+            name = "Protect hardwood trees",
+            description = "Enable payment protection for hardwood trees.",
             position = 2,
             section = protectionSection
     )

331-350: Hardwood keyNames: be explicit and consistent; clarify description

“fossil” is vague. Recommend “fossilIslandHardwood” as the key and reflecting “hardwood patches (x3)” in the description for clarity.

     @ConfigItem(
-            keyName = "fossil",
+            keyName = "fossilIslandHardwood",
             name = "Fossil Island",
-            description = "Fossil Island tree patch x3",
+            description = "Fossil Island hardwood patches (x3)",
             position = 0,
             section = hardTreePatchesSection
     )

268-329: Fruit patch polish: capitalization, description clarity, and keyName consistency

  • Capitalize the “Tree Gnome Village” name
  • Make the Lletya description explicitly “fruit tree”
  • Drop the trailing “Patch” from Kastori’s keyName to match the others
  • Note: changing only the annotation’s keyName (“kastoriFruitTreePatch” → “kastoriFruitTree”) has no downstream impact.
  • If you also rename the method signature (kastoriFruitTreePatch()kastoriFruitTree()), update its two call sites in FarmTreeRunScript.java (lines ~320–321) as discovered by your rg search.

Suggested diff:

@@ FarmTreeRunConfig.java
     @ConfigItem(
-        keyName = "treeGnomeVillage",
+        keyName = "treeGnomeVillage",
         name = "Tree Gnome Village",
         description = "Tree gnome village fruit tree patch",
@@ FarmTreeRunConfig.java
     @ConfigItem(
         keyName = "lletya",
         name = "Lletya",
-        description = "Lletya tree patch",
+        description = "Lletya fruit tree patch",
@@ FarmTreeRunConfig.java
     @ConfigItem(
-        keyName = "kastoriFruitTreePatch",
+        keyName = "kastoriFruitTree",
         name = "Kastori",
         description = "Enable Kastori fruit tree patch",

If you opt to rename the method, run:

rg -nP '\bkastoriFruitTreePatch\s*\(' -C2

and update those two occurrences to config.kastoriFruitTree().

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 3d95dd6 and b05e37e.

📒 Files selected for processing (1)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build
🔇 Additional comments (3)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java (3)

44-88: Nice sectional refactor; config is much clearer now

Breaking the UI into Sapling, Protection, Gear, and Patch sections improves discoverability and aligns with the described run order. Good defaults, too.


93-109: Sapling defaults LGTM

Sensible defaults for tree and fruit tree saplings. Enum usage is appropriate.


153-195: Gear settings look good

Good set of toggles and sensible defaults; descriptions are clear. No issues spotted.

Comment on lines +110 to +117
@ConfigItem(
keyName = "Fossil Island Tree",
name = "Hard sapling",
description = "Select Hard tree sapling to use",
position = 2,
section = generalSection
section = saplingSection
)
default TreeEnums selectedTree() {
return TreeEnums.MAPLE;
}
default HardTreeEnums selectedHardTree() { return HardTreeEnums.MAHOGANY; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Avoid spaces in keyName and use “hardwood” consistently

keyName values become persisted keys; spaces are brittle and inconsistent with the rest. Also prefer “Hardwood” over “Hard”.

-    @ConfigItem(
-            keyName = "Fossil Island Tree",
-            name = "Hard sapling",
-            description = "Select Hard tree sapling to use",
+    @ConfigItem(
+            keyName = "hardwoodSapling",
+            name = "Hardwood sapling",
+            description = "Select hardwood tree sapling to use",
             position = 2,
             section = saplingSection
     )
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@ConfigItem(
keyName = "Fossil Island Tree",
name = "Hard sapling",
description = "Select Hard tree sapling to use",
position = 2,
section = generalSection
section = saplingSection
)
default TreeEnums selectedTree() {
return TreeEnums.MAPLE;
}
default HardTreeEnums selectedHardTree() { return HardTreeEnums.MAHOGANY; }
@ConfigItem(
keyName = "hardwoodSapling",
name = "Hardwood sapling",
description = "Select hardwood tree sapling to use",
position = 2,
section = saplingSection
)
default HardTreeEnums selectedHardTree() { return HardTreeEnums.MAHOGANY; }
🤖 Prompt for AI Agents
In
runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java
around lines 110-117, the config item's keyName uses spaces and the label uses
"Hard" inconsistently; update keyName to a space-free identifier (e.g.,
"hardwoodTree" or "hardwoodSapling"), change the displayed name and description
to use "Hardwood" instead of "Hard" (e.g., "Hardwood sapling" and "Select
Hardwood tree sapling to use"), and ensure any references to the old key are
updated accordingly so persisted settings remain consistent.

Comment on lines +197 to 263
/* =========================
* Tree patches (regular) — ordered to match run:
* GS Tree → Farming Guild Tree → Taverley → Falador → Lumbridge → Varrock → Auburnvale
* ========================= */
@ConfigItem(
keyName = "falador",
name = "Falador",
description = "Falador tree patch",
keyName = "gnomeStrongholdTree",
name = "Gnome Stronghold",
description = "Gnome Stronghold tree patch",
position = 0,
section = treePatchesSection
)
default boolean faladorTreePatch() {
return true;
}
default boolean gnomeStrongholdTreePatch() { return true; }

@ConfigItem(
keyName = "gnomeStrongholdTree",
name = "Gnome Stronghold",
description = "Gnome Stronghold tree patch",
keyName = "farmingGuildTree",
name = "Farming Guild",
description = "FarmingGuild tree patch",
position = 1,
section = treePatchesSection
)
default boolean gnomeStrongholdTreePatch() {
return true;
}
default boolean farmingGuildTreePatch() { return true; }

@ConfigItem(
keyName = "lumbridge",
name = "Lumbridge",
description = "Lumbridge tree patch",
keyName = "taverley",
name = "Taverley",
description = "Taverley tree patch",
position = 2,
section = treePatchesSection
)
default boolean lumbridgeTreePatch() {
return true;
}
default boolean taverleyTreePatch() { return true; }

@ConfigItem(
keyName = "taverley",
name = "Taverley",
description = "Taverley tree patch",
keyName = "falador",
name = "Falador",
description = "Falador tree patch",
position = 3,
section = treePatchesSection
)
default boolean taverleyTreePatch() {
return true;
}
default boolean faladorTreePatch() { return true; }

@ConfigItem(
keyName = "varrock",
name = "Varrock",
description = "Varrock tree patch",
keyName = "lumbridge",
name = "Lumbridge",
description = "Lumbridge tree patch",
position = 4,
section = treePatchesSection
)
default boolean varrockTreePatch() {
return true;
}
default boolean lumbridgeTreePatch() { return true; }

@ConfigItem(
keyName = "fossil",
name = "Fossil Island",
description = "Fossil Island tree patch x3",
position = 4,
keyName = "varrock",
name = "Varrock",
description = "Varrock tree patch",
position = 5,
section = treePatchesSection
)
default boolean fossilTreePatch() {
return true;
}
default boolean varrockTreePatch() { return true; }

@ConfigItem(
keyName = "farmingGuildTree",
name = "Farming Guild",
description = "FarmingGuild tree patch",
position = 5,
keyName = "AuburnvaleTree",
name = "Auburnvale",
description = "Auburnvale tree patch",
position = 6,
section = treePatchesSection
)
default boolean farmingGuildTreePatch() {
return true;
}
default boolean auburnTreePatch() { return true; }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Patch naming consistency and minor description fix (“Farming Guild”)

  • Keep keyName in lowerCamelCase without spaces and with consistent suffixes.
  • Fix “FarmingGuild” spacing in description.
  • Consider renaming Auburnvale items for consistency.
     @ConfigItem(
-            keyName = "farmingGuildTree",
+            keyName = "farmingGuildTree",
             name = "Farming Guild",
-            description = "FarmingGuild tree patch",
+            description = "Farming Guild tree patch",
             position = 1,
             section = treePatchesSection
     )
@@
     @ConfigItem(
-            keyName = "AuburnvaleTree",
+            keyName = "auburnvaleTree",
             name = "Auburnvale",
             description = "Auburnvale tree patch",
             position = 6,
             section = treePatchesSection
     )
-    default boolean auburnTreePatch() { return true; }
+    default boolean auburnvaleTreePatch() { return true; }

Verification script to find call sites needing updates if you rename the method:


🏁 Script executed:

#!/bin/bash
# Find usages of the old method name, if any
rg -nP '\bauburnTreePatch\s*\(' -C2

Length of output: 1556


Consistent Auburnvale naming and Farming Guild description

Please apply the following refactors to keep naming consistent and avoid compile breaks:

• In FarmTreeRunConfig.java

  • Rename the Auburnvale config key and method:
     @ConfigItem(
  •   keyName = "AuburnvaleTree",
    
  •   keyName = "auburnvaleTree",
      name = "Auburnvale",
      description = "Auburnvale tree patch",
      position = 6,
      section = treePatchesSection
    
    )
  • default boolean auburnTreePatch() { return true; }
  • default boolean auburnvaleTreePatch() { return true; }
    ```
  • Fix the Farming Guild description spacing:
     @ConfigItem(
         keyName = "farmingGuildTree",
         name = "Farming Guild",
  •    description = "FarmingGuild tree patch",
    
  •    description = "Farming Guild tree patch",
       position = 1,
       section = treePatchesSection
    
    )
    
    

• In FarmTreeRunScript.java

  • Update method calls to the renamed Auburnvale config method:
     case HANDLE_AUBURNVALE_TREE_PATCH: {
  •   if (config.auburnTreePatch()) {
    
  •   if (config.auburnvaleTreePatch()) {
          if (walkToLocation(patch.getLocation())) {
              handledPatch = handlePatch(config, patch);
          }
    
    }
    
    

These changes are required to prevent compilation errors and maintain consistent lower-camel-case naming.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
/* =========================
* Tree patches (regular) — ordered to match run:
* GS TreeFarming Guild TreeTaverleyFaladorLumbridgeVarrockAuburnvale
* ========================= */
@ConfigItem(
keyName = "falador",
name = "Falador",
description = "Falador tree patch",
keyName = "gnomeStrongholdTree",
name = "Gnome Stronghold",
description = "Gnome Stronghold tree patch",
position = 0,
section = treePatchesSection
)
default boolean faladorTreePatch() {
return true;
}
default boolean gnomeStrongholdTreePatch() { return true; }
@ConfigItem(
keyName = "gnomeStrongholdTree",
name = "Gnome Stronghold",
description = "Gnome Stronghold tree patch",
keyName = "farmingGuildTree",
name = "Farming Guild",
description = "FarmingGuild tree patch",
position = 1,
section = treePatchesSection
)
default boolean gnomeStrongholdTreePatch() {
return true;
}
default boolean farmingGuildTreePatch() { return true; }
@ConfigItem(
keyName = "lumbridge",
name = "Lumbridge",
description = "Lumbridge tree patch",
keyName = "taverley",
name = "Taverley",
description = "Taverley tree patch",
position = 2,
section = treePatchesSection
)
default boolean lumbridgeTreePatch() {
return true;
}
default boolean taverleyTreePatch() { return true; }
@ConfigItem(
keyName = "taverley",
name = "Taverley",
description = "Taverley tree patch",
keyName = "falador",
name = "Falador",
description = "Falador tree patch",
position = 3,
section = treePatchesSection
)
default boolean taverleyTreePatch() {
return true;
}
default boolean faladorTreePatch() { return true; }
@ConfigItem(
keyName = "varrock",
name = "Varrock",
description = "Varrock tree patch",
keyName = "lumbridge",
name = "Lumbridge",
description = "Lumbridge tree patch",
position = 4,
section = treePatchesSection
)
default boolean varrockTreePatch() {
return true;
}
default boolean lumbridgeTreePatch() { return true; }
@ConfigItem(
keyName = "fossil",
name = "Fossil Island",
description = "Fossil Island tree patch x3",
position = 4,
keyName = "varrock",
name = "Varrock",
description = "Varrock tree patch",
position = 5,
section = treePatchesSection
)
default boolean fossilTreePatch() {
return true;
}
default boolean varrockTreePatch() { return true; }
@ConfigItem(
keyName = "farmingGuildTree",
name = "Farming Guild",
description = "FarmingGuild tree patch",
position = 5,
keyName = "AuburnvaleTree",
name = "Auburnvale",
description = "Auburnvale tree patch",
position = 6,
section = treePatchesSection
)
default boolean farmingGuildTreePatch() {
return true;
}
default boolean auburnTreePatch() { return true; }
/* =========================
* Tree patches (regular) — ordered to match run:
* GS TreeFarming Guild TreeTaverleyFaladorLumbridgeVarrockAuburnvale
* ========================= */
@ConfigItem(
keyName = "gnomeStrongholdTree",
name = "Gnome Stronghold",
description = "Gnome Stronghold tree patch",
position = 0,
section = treePatchesSection
)
default boolean gnomeStrongholdTreePatch() { return true; }
@ConfigItem(
keyName = "farmingGuildTree",
name = "Farming Guild",
description = "Farming Guild tree patch",
position = 1,
section = treePatchesSection
)
default boolean farmingGuildTreePatch() { return true; }
@ConfigItem(
keyName = "taverley",
name = "Taverley",
description = "Taverley tree patch",
position = 2,
section = treePatchesSection
)
default boolean taverleyTreePatch() { return true; }
@ConfigItem(
keyName = "falador",
name = "Falador",
description = "Falador tree patch",
position = 3,
section = treePatchesSection
)
default boolean faladorTreePatch() { return true; }
@ConfigItem(
keyName = "lumbridge",
name = "Lumbridge",
description = "Lumbridge tree patch",
position = 4,
section = treePatchesSection
)
default boolean lumbridgeTreePatch() { return true; }
@ConfigItem(
keyName = "varrock",
name = "Varrock",
description = "Varrock tree patch",
position = 5,
section = treePatchesSection
)
default boolean varrockTreePatch() { return true; }
@ConfigItem(
keyName = "auburnvaleTree",
name = "Auburnvale",
description = "Auburnvale tree patch",
position = 6,
section = treePatchesSection
)
default boolean auburnvaleTreePatch() { return true; }
Suggested change
/* =========================
* Tree patches (regular) — ordered to match run:
* GS TreeFarming Guild TreeTaverleyFaladorLumbridgeVarrockAuburnvale
* ========================= */
@ConfigItem(
keyName = "falador",
name = "Falador",
description = "Falador tree patch",
keyName = "gnomeStrongholdTree",
name = "Gnome Stronghold",
description = "Gnome Stronghold tree patch",
position = 0,
section = treePatchesSection
)
default boolean faladorTreePatch() {
return true;
}
default boolean gnomeStrongholdTreePatch() { return true; }
@ConfigItem(
keyName = "gnomeStrongholdTree",
name = "Gnome Stronghold",
description = "Gnome Stronghold tree patch",
keyName = "farmingGuildTree",
name = "Farming Guild",
description = "FarmingGuild tree patch",
position = 1,
section = treePatchesSection
)
default boolean gnomeStrongholdTreePatch() {
return true;
}
default boolean farmingGuildTreePatch() { return true; }
@ConfigItem(
keyName = "lumbridge",
name = "Lumbridge",
description = "Lumbridge tree patch",
keyName = "taverley",
name = "Taverley",
description = "Taverley tree patch",
position = 2,
section = treePatchesSection
)
default boolean lumbridgeTreePatch() {
return true;
}
default boolean taverleyTreePatch() { return true; }
@ConfigItem(
keyName = "taverley",
name = "Taverley",
description = "Taverley tree patch",
keyName = "falador",
name = "Falador",
description = "Falador tree patch",
position = 3,
section = treePatchesSection
)
default boolean taverleyTreePatch() {
return true;
}
default boolean faladorTreePatch() { return true; }
@ConfigItem(
keyName = "varrock",
name = "Varrock",
description = "Varrock tree patch",
keyName = "lumbridge",
name = "Lumbridge",
description = "Lumbridge tree patch",
position = 4,
section = treePatchesSection
)
default boolean varrockTreePatch() {
return true;
}
default boolean lumbridgeTreePatch() { return true; }
@ConfigItem(
keyName = "fossil",
name = "Fossil Island",
description = "Fossil Island tree patch x3",
position = 4,
keyName = "varrock",
name = "Varrock",
description = "Varrock tree patch",
position = 5,
section = treePatchesSection
)
default boolean fossilTreePatch() {
return true;
}
default boolean varrockTreePatch() { return true; }
@ConfigItem(
keyName = "farmingGuildTree",
name = "Farming Guild",
description = "FarmingGuild tree patch",
position = 5,
keyName = "AuburnvaleTree",
name = "Auburnvale",
description = "Auburnvale tree patch",
position = 6,
section = treePatchesSection
)
default boolean farmingGuildTreePatch() {
return true;
}
default boolean auburnTreePatch() { return true; }
case HANDLE_AUBURNVALE_TREE_PATCH: {
if (config.auburnvaleTreePatch()) {
if (walkToLocation(patch.getLocation())) {
handledPatch = handlePatch(config, patch);
}
}
break;
}
🤖 Prompt for AI Agents
In
runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunConfig.java
around lines 197-263, the Auburnvale config key and method name are inconsistent
and the Farming Guild description lacks a space; rename the Auburnvale config
key from "AuburnvaleTree" to "auburnvaleTree" and the default method
auburnTreePatch() to auburnvaleTreePatch() (keeping the same return value and
annotation attributes), change the Farming Guild description string from
"FarmingGuild tree patch" to "Farming Guild tree patch", and then update all
references in
runelite-client/src/main/java/net/runelite/client/plugins/microbot/farmTreeRun/FarmTreeRunScript.java
to call the new auburnvaleTreePatch() method so compilation succeeds.

Copy link
Contributor Author

@Lobotobag Lobotobag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated farm tree runner; added microbot splash screen for brand awareness.

Copy link
Contributor

@gmason0 gmason0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, please keep client related changes & plugin related changes in different pull requests. I would merged this simple UI change way earlier than this large plugin change.

@gmason0 gmason0 merged commit a60806f into chsami:development Aug 29, 2025
2 checks passed
@chsami chsami mentioned this pull request Sep 3, 2025
@coderabbitai coderabbitai bot mentioned this pull request Sep 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants