Skip to content

Comments

refactor(tileobject): improve reachability check and simplify code#1648

Merged
chsami merged 4 commits intomainfrom
development
Jan 5, 2026
Merged

refactor(tileobject): improve reachability check and simplify code#1648
chsami merged 4 commits intomainfrom
development

Conversation

@chsami
Copy link
Owner

@chsami chsami commented Jan 5, 2026

No description provided.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 5, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request refactors the caching architecture to use dependency injection and singleton patterns. It introduces injected constructors to Rs2NpcCache, Rs2PlayerCache, Rs2TileItemCache, Rs2TileObjectCache, and Rs2BoatCache, replacing static access patterns with instance methods. The Microbot class now exposes these caches as injectable dependencies via getter methods. Supporting changes include updating documentation to encourage cache.query() usage, adding a WILL_ANNE boat type, refactoring Rs2BoatModel interactions to use tile-object caching, and adding an isReachable() method to Rs2TileObjectModel. The version is bumped to 2.1.8.

Possibly related PRs

  • 2.0.12 #1533: Both PRs modify Microbot's caching subsystem by introducing singleton Rs2 cache fields and updating cache-related access patterns in the Microbot class.
  • 2.0.9 #1530: Both PRs update Microbot.java's cache visibility and add cache-related access patterns to expose caching infrastructure.
  • 2.1.7 #1647: Both PRs refactor Rs2BoatModel to update boat-related heading and direction logic with new interaction patterns.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f7a605 and bf6396d.

📒 Files selected for processing (19)
  • AGENTS.md
  • gradle.properties
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/CLAUDE.md
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/Microbot.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/boat/Rs2BoatCache.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/boat/data/BoatType.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/boat/models/Rs2BoatModel.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/npc/NpcApiExample.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/npc/Rs2NpcCache.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/npc/Rs2NpcQueryable.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/player/Rs2PlayerCache.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/player/Rs2PlayerQueryable.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/tileitem/Rs2TileItemCache.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/tileitem/Rs2TileItemQueryable.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/tileitem/TileItemApiExample.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/tileobject/Rs2TileObjectCache.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/tileobject/Rs2TileObjectQueryable.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/api/tileobject/models/Rs2TileObjectModel.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/gameobject/Rs2GameObject.java

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chsami chsami merged commit b1dc73d into main Jan 5, 2026
2 of 3 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jan 8, 2026
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.

1 participant