[GH-ISSUE #6084] Native mods: a player picking up an experience orb, and the mending repair #1963

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/6084

Part of #4953

A mod can't change what happens when a player touches an experience orb, or how much mending repairs from it
Vanilla's ExperienceOrb.playerTouch gives the orb's value once per count, and ExperienceOrb.repairPlayerItems spends it on a random mending item (EnchantmentHelper.getRandomItemWith), NeoForge fires PlayerXpEvent.PickupXp there

What's missing

  • a cancellable hook when a player touches an orb, with the orb's value and count writable
  • the mending repair amount overridable, with the chosen item visible
Originally created by @reservedbytes on GitHub (Nov 1, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/6084 Part of #4953 A mod can't change what happens when a player touches an experience orb, or how much mending repairs from it Vanilla's `ExperienceOrb.playerTouch` gives the orb's value once per `count`, and `ExperienceOrb.repairPlayerItems` spends it on a random mending item (`EnchantmentHelper.getRandomItemWith`), NeoForge fires `PlayerXpEvent.PickupXp` there What's missing - a cancellable hook when a player touches an orb, with the orb's value and count writable - the mending repair amount overridable, with the chosen item visible
Author
Owner

@kira-horizon[bot] commented on GitHub (Nov 1, 2026):

Claimed by Lokic on Discord (GitHub: loicpiller), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #6084).

<!-- gh-comment-id:6560720971 --> @kira-horizon[bot] commented on GitHub (Nov 1, 2026): Claimed by `Lokic` on Discord (GitHub: `loicpiller`), to avoid duplicate work. The claim lapses after 14 days without activity (a comment, a pull request or a commit mentioning #6084). <!-- kira:work -->
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#1963
No description provided.