[PR #7902] a sculk catalyst takes a dying player's experience #7885

Open
opened 2026-11-03 07:25:59 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7902
Author: @grkthegreat2018-bot
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/7848-player-catalyst-xp


📝 Commits (1)

  • 8dfffbe a sculk catalyst takes a dying player's experience

📊 Changes

2 files changed (+146 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/combat.rs (+16 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+130 -1)

📄 Description

🤖 Opened by GRKTheGreat's AI agent (Devin, SWE-2 Max), not by GRKTheGreat personally.

What and why

ServerPlayer.die sends GameEvent.ENTITY_DIE before dropAllDeathLoot, and
a SculkCatalystBlockEntity.CatalystListener within 8 blocks turns
getExperienceReward into a sculk charge and calls skipDropExperience, so a
player dying next to a catalyst drops no orbs — the same as a mob. Horizon's
guest_die went straight to spawn_orbs, leaving the orbs and giving the
catalyst nothing.

The guest death path now runs catalyst_takes_experience first, like
mob_died: the reward becomes the charge, orbs are skipped when consumed, and
the player the victim's combat record credits (its getKillCredit) gets
kill_mob_near_sculk_catalyst with the death's killing_blow. Verified in
game: a kill one block from a catalyst spreads sculk and drops no orbs, while
a kill away from one drops orbs as before.

Fixes #7848.

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

  • LivingEntity.die (GameEvent.ENTITY_DIE before dropAllDeathLoot)
  • SculkCatalystBlockEntity.CatalystListener.handleGameEvent /
    tryTriggerItSpawnsAdvancement (kill_mob_near_sculk_catalyst for the
    getKillCredit player, getLastDamageSource as killing_blow)
  • LivingEntity.skipDropExperience / dropExperience
  • CombatTracker.getKiller (hundred-tick credit window)

Other projects' code

none

Self-check

pr_ready (tools/pr_ready.py --quick on GRKTheGreat, against origin/main at 31f83499b, 5 min 49 s)

Check Result
Scope ✅ 2 files, +146 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 614 passed (1 min 11 s)
rustfmt ✅ (8 s)
clippy ✅ (43 s)
tests: horizon-client ✅ 717 passed (3 min 22 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
mod API up to date ✅ (20 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Devin


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7902 **Author:** [@grkthegreat2018-bot](https://github.com/grkthegreat2018-bot) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/7848-player-catalyst-xp` --- ### 📝 Commits (1) - [`8dfffbe`](https://github.com/horizon-rust/horizon/commit/8dfffbec3313b61538b4e6c1f688a7a3a121eef7) a sculk catalyst takes a dying player's experience ### 📊 Changes **2 files changed** (+146 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/combat.rs` (+16 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+130 -1) </details> ### 📄 Description > 🤖 Opened by GRKTheGreat's AI agent (Devin, SWE-2 Max), not by GRKTheGreat personally. ## What and why `ServerPlayer.die` sends `GameEvent.ENTITY_DIE` before `dropAllDeathLoot`, and a `SculkCatalystBlockEntity.CatalystListener` within 8 blocks turns `getExperienceReward` into a sculk charge and calls `skipDropExperience`, so a player dying next to a catalyst drops no orbs — the same as a mob. Horizon's `guest_die` went straight to `spawn_orbs`, leaving the orbs and giving the catalyst nothing. The guest death path now runs `catalyst_takes_experience` first, like `mob_died`: the reward becomes the charge, orbs are skipped when consumed, and the player the victim's combat record credits (its `getKillCredit`) gets `kill_mob_near_sculk_catalyst` with the death's `killing_blow`. Verified in game: a kill one block from a catalyst spreads sculk and drops no orbs, while a kill away from one drops orbs as before. Fixes #7848. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference - `LivingEntity.die` (`GameEvent.ENTITY_DIE` before `dropAllDeathLoot`) - `SculkCatalystBlockEntity.CatalystListener.handleGameEvent` / `tryTriggerItSpawnsAdvancement` (`kill_mob_near_sculk_catalyst` for the `getKillCredit` player, `getLastDamageSource` as `killing_blow`) - `LivingEntity.skipDropExperience` / `dropExperience` - `CombatTracker.getKiller` (hundred-tick credit window) ## Other projects' code none ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on GRKTheGreat, against origin/main at 31f83499b, 5 min 49 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +146 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 614 passed (1 min 11 s) | | rustfmt | ✅ (8 s) | | clippy | ✅ (43 s) | | tests: horizon-client | ✅ 717 passed (3 min 22 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | mod API up to date | ✅ (20 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Devin](https://devin.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#7885
No description provided.