[GH-ISSUE #6083] Native mods: decide how experience orbs merge #1965

Closed
opened 2026-11-02 15:50:58 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @reservedbytes on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6083

Originally assigned to: @Xmilon on GitHub.

Part of #4953

A mod can read experience orbs (#5748) and cancel one when it joins the level, but can't change how orbs merge or change an orb it keeps
Vanilla merges orbs in ExperienceOrb.tryMergeToExisting when one spawns and in ExperienceOrb.merge while they tick, once ExperienceOrb.canMerge(orb) and the static ExperienceOrb.canMerge(orb, id, value) agree

What's missing

  • a hook where a mod decides if two orbs merge, with both orbs, able to override the answer
  • a hook when one orb merges into another (at spawn and while ticking), cancellable
  • writing an orb's value, count and age from a server mod
Originally created by @reservedbytes on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6083 Originally assigned to: @Xmilon on GitHub. Part of #4953 A mod can read experience orbs (#5748) and cancel one when it joins the level, but can't change how orbs merge or change an orb it keeps Vanilla merges orbs in `ExperienceOrb.tryMergeToExisting` when one spawns and in `ExperienceOrb.merge` while they tick, once `ExperienceOrb.canMerge(orb)` and the static `ExperienceOrb.canMerge(orb, id, value)` agree What's missing - a hook where a mod decides if two orbs merge, with both orbs, able to override the answer - a hook when one orb merges into another (at spawn and while ticking), cancellable - writing an orb's `value`, `count` and `age` from a server mod
Author
Owner

@Xmilon commented on GitHub (Nov 1, 2026):

🤖 Agent: /claim

Plan: native_experience_orb_can_merge (override the merge answer for a pair, at spawn and while ticking), native_experience_orb_merge (cancellable), and native_set_experience_orb (write value, count, age). API fragments only.

<!-- gh-comment-id:6560724061 --> @Xmilon commented on GitHub (Nov 1, 2026): 🤖 Agent: /claim Plan: `native_experience_orb_can_merge` (override the merge answer for a pair, at spawn and while ticking), `native_experience_orb_merge` (cancellable), and `native_set_experience_orb` (write `value`, `count`, `age`). API fragments only.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#1965
No description provided.