Skip to content

Comments

Fix Build Errors#1620

Merged
chsami merged 1 commit intochsami:developmentfrom
gmason0:fix/rs2-tile-object
Dec 2, 2025
Merged

Fix Build Errors#1620
chsami merged 1 commit intochsami:developmentfrom
gmason0:fix/rs2-tile-object

Conversation

@gmason0
Copy link
Contributor

@gmason0 gmason0 commented Nov 30, 2025

When working on fix for another person, I was having issues compiling the client due to these methods not being implemented when updating the RL version here - fa321d1

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 30, 2025

Walkthrough

Two delegated override methods were added to the Rs2TileObjectModel class. The getOpOverride(int index) method forwards to tileObject.getOpOverride(index) and returns a nullable String. The isOpShown(int index) method forwards to tileObject.isOpShown(index) and returns a boolean. Both methods are marked with the @Override annotation and delegate directly to the underlying tileObject instance. The existing getObjectComposition() implementation remains unchanged. No modifications were made to other existing methods or logic.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title 'Fix Build Errors' is vague and generic, using a non-descriptive term that doesn't convey what specific build errors or which methods were added. Consider a more specific title like 'Add missing methods to Rs2TileObjectModel' that clearly indicates the specific change made.
✅ Passed checks (1 passed)
Check name Status Explanation
Description check ✅ Passed The description is related to the changeset, explaining that compilation issues arose from missing method implementations after an RL version update.
✨ Finishing touches
  • 📝 Generate docstrings

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.

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

🧹 Nitpick comments (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/tileobject/Rs2TileObjectModel.java (1)

95-105: Null check in getName() is placed after dereferencing composition

You call composition.getImpostorIds() before checking whether composition is null, then later do if(composition == null) return null;. If getObjectDefinition can ever return null (which this check suggests you expect), the dereference happens first and would NPE, making the later null check effectively inconsistent with the intended guard.

Consider reordering the null check ahead of any use of composition, and guarding again after resolving the impostor:

-            ObjectComposition composition = Microbot.getClient().getObjectDefinition(tileObject.getId());
-            if(composition.getImpostorIds() != null)
-            {
-                composition = composition.getImpostor();
-            }
-            if(composition == null)
-                return null;
-            return Rs2UiHelper.stripColTags(composition.getName());
+            ObjectComposition composition = Microbot.getClient().getObjectDefinition(tileObject.getId());
+            if(composition == null)
+                return null;
+
+            if(composition.getImpostorIds() != null)
+            {
+                composition = composition.getImpostor();
+                if(composition == null)
+                    return null;
+            }
+
+            return Rs2UiHelper.stripColTags(composition.getName());
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bd563fe and 4389a0a.

📒 Files selected for processing (1)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/tileobject/Rs2TileObjectModel.java (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/**/*.java

📄 CodeRabbit inference engine (AGENTS.md)

runelite-client/src/main/java/net/runelite/client/plugins/microbot/**/*.java: Gameplay automation lives in runelite-client/src/main/java/net/runelite/client/plugins/microbot; keep new scripts and utilities inside this plugin
Register new automation under net.runelite.client.plugins.microbot and reuse the scheduler pattern shown in ExampleScript

Files:

  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/tileobject/Rs2TileObjectModel.java
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/**/*.java

📄 CodeRabbit inference engine (AGENTS.md)

Shared helpers sit under .../microbot/util

Files:

  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/tileobject/Rs2TileObjectModel.java
**/*.java

📄 CodeRabbit inference engine (AGENTS.md)

**/*.java: Keep indentation with tabs, follow the brace placement already in MicrobotPlugin.java, and prefer lines under 120 characters
Use UpperCamelCase for types, lowerCamelCase for members, and prefix configuration interfaces with the plugin name (e.g., ExampleConfig)
Rely on Lombok for boilerplate where already adopted

Files:

  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/tileobject/Rs2TileObjectModel.java
⏰ 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 (1)
runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/tileobject/Rs2TileObjectModel.java (1)

143-155: New TileObject overrides correctly delegate to the wrapped instance

getOpOverride(int index) and isOpShown(int index) both directly forward to the underlying tileObject, matching the delegation pattern used by the rest of this adapter and satisfying the updated TileObject contract; no logic inconsistencies here.

@chsami chsami merged commit e857d0f into chsami:development Dec 2, 2025
2 checks passed
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.

2 participants