Skip to content

Minecraft: Java Edition 26.3 rewritten from scratch in Rust, checked against vanilla with 281 differential harnesses. Get it with the Horizon launcher.

1.9 KB
Raw Blame
{
  "hooks": [
    {
      "name": "experience_orb_pickup_listened",
      "target": "horizon_client::game::native_hooks::Game<'_>::native_experience_orb_pickup_listened",
      "side": "server"
    },
    {
      "name": "experience_orb_pickup",
      "target": "horizon_client::game::native_hooks::Game<'_>::native_experience_orb_pickup",
      "side": "server",
      "cancellable": true
    },
    {
      "name": "mending_repair",
      "target": "horizon_client::game::native_hooks::Game<'_>::native_mending_repair",
      "side": "server"
    }
  ],
  "rust_summary": "a server player taking an experience orb (`native_experience_orb_pickup`, asked for through\n`native_experience_orb_pickup_listened`: cancel it, or change the orb's value and count) and the Mending repair\nproposed for the item it picked (`native_mending_repair`).",
  "doc_summary": "A mod that hears `native_experience_orb_pickup` sets `listened` in `native_experience_orb_pickup_listened` (a HEAD injection); `native_experience_orb_pickup(player, dimension, orb, value, count, canceled)` then runs before a server player takes an orb. Canceling leaves the orb and the pickup delay unchanged; otherwise the value is clamped to 1..=2,147,483,647 and the count to at least one, then one count is taken. `native_mending_repair(player, stack, experience, repair)` sees the damaged Mending item picked at random and can change the durability repair proposed for it, which is capped at its current damage. Turning a positive proposal into zero leaves the experience unspent (a zero vanilla proposal keeps vanilla's behaviour); if the picked stack is removed, changed except for its damage, or no longer eligible, the repair is skipped and the experience remains. The repair also decides how much experience is left for further repairs. It runs for `native_give_experience` too. Both run on the integrated and the dedicated server, guests included. Bundles need \"hooks\": @API:experience_orb_pickup@.",
  "comments": []
}