Skip to content

fix: update camera compatibility for RuneLite 1.12.31#1806

Merged
chsami merged 2 commits into
chsami:developmentfrom
JogOnJohn:fix/runelite-camera-api-compat
Jun 25, 2026
Merged

fix: update camera compatibility for RuneLite 1.12.31#1806
chsami merged 2 commits into
chsami:developmentfrom
JogOnJohn:fix/runelite-camera-api-compat

Conversation

@JogOnJohn

Copy link
Copy Markdown
Contributor

Summary

Follow-up Microbot camera/API compatibility hardening after the RuneLite 1.12.31 update already landed upstream.

This PR does not change the RuneLite version. It keeps the current upstream baseline and updates Microbot camera helpers around the changed client-side camera angle scale.

Changes

  • Convert Microbot camera helper reads/writes between the existing legacy 2048-angle API convention and the newer client-side scaled angle units.
  • Route camera target writes through the client thread.
  • Update NpcTracker yaw targeting to use the same conversion/client-thread path.
  • Mark EntityOps#getSubOps(int) nullable to reflect sparse/optional sub-op tables.

Validation

  • git diff --check upstream/development...HEAD
  • ./gradlew.bat :client:compileJava --console=plain

@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: c127b49c-976a-4a9d-af3b-96836f4a0a94

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

EntityOps#getSubOps(int idx) is annotated as nullable. Rs2Camera now converts camera pitch and yaw between client and legacy angle units, clamps and applies camera targets through client-thread helpers, and updates smoothing math to use the legacy scale. NpcTracker now computes yaw in two steps and schedules the yaw target update on the client thread.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main camera compatibility update for RuneLite 1.12.31.
Description check ✅ Passed The description matches the changeset, covering camera unit conversion, client-thread writes, and the nullable EntityOps update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

@JogOnJohn JogOnJohn force-pushed the fix/runelite-camera-api-compat branch from 4eca217 to 2403283 Compare June 25, 2026 10:42
@JogOnJohn JogOnJohn marked this pull request as ready for review June 25, 2026 11:09

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/camera/Rs2Camera.java`:
- Around line 289-297: The yaw validation in Rs2Camera’s setYaw and
setYawInstant now rejects the documented north value 2048, so update these
methods to normalize that input to the internal north equivalent before the
range check and then proceed through smoothTo or setCameraTargetOnClientThread.
Keep the public yaw contract in sync with the implementation by handling 2048
explicitly in the yaw normalization/validation path rather than silently
no-oping.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 44a4caf9-fca9-4b1e-ba30-abc30e97732d

📥 Commits

Reviewing files that changed from the base of the PR and between 262cce9 and 2403283.

📒 Files selected for processing (3)
  • runelite-api/src/main/java/net/runelite/api/EntityOps.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/camera/NpcTracker.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/util/camera/Rs2Camera.java

@JogOnJohn

Copy link
Copy Markdown
Contributor Author

Addressed the CodeRabbit yaw normalization finding in the latest push.

setYaw(2048) and setYawInstant(2048) now accept the documented north value and normalize it to 0 before applying the camera target.

@chsami chsami merged commit cfb8d63 into chsami:development Jun 25, 2026
1 check passed
@JogOnJohn JogOnJohn deleted the fix/runelite-camera-api-compat branch June 25, 2026 21:46
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