[PR #2776] [MERGED] refactor: the MobEffects and Potions tables live in horizon-client-core #4596

Closed
opened 2026-11-03 04:18:23 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2776
Author: @ludovic111
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: refactor/cut-effect-tables


📝 Commits (1)

  • bc0c0fd refactor: the MobEffects and Potions tables live in horizon-client-core

📊 Changes

5 files changed (+263 additions, -257 deletions)

View changed files

📝 crates/horizon-client-core/src/lib.rs (+1 -0)
➕ crates/horizon-client-core/src/potions.rs (+249 -0)
📝 crates/horizon-client/src/brewing.rs (+5 -250)
📝 crates/horizon-client/src/effects.rs (+5 -5)
📝 crates/horizon-client/src/hud_overlays.rs (+3 -2)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

Step B of the plan to break the cycle in horizon-client's lib (crate split, ci-speed). With step A, these cuts take the render/UI layer (gfx, hud, ui, chunks, light, mesher, streaming, world...; 46 modules, ~60k lines) out of the lib's 80-module cycle, so it can move to a crate of its own. This PR removes one edge of that cycle. It moves code only: no behaviour change.

What

  • The MobEffects and Potions tables (EFFECTS, POTIONS, EffectDef, PotionDef, Category, effect, potion, namespaced, potion_color, BASE_POTION_COLOR) move from brewing.rs to a new horizon-client-core/src/potions.rs. They have no dependencies.
  • brewing re-exports them all.
  • effects.rs and hud_overlays.rs read them from horizon-client-core, which removes effects -> brewing and hud_overlays -> brewing.
  • It also shrinks the client lib by ~240 lines.
  • pr_ready flags 520 lines of code. They are the ~250 lines of tables, counted once removed and once added. The move can't be split without leaving half the tables behind.

Self-check

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at cd4ff3828, 6 min 54 s)

Check Result
Scope ⚠️ 5 files, +263 −257; 520 lines of code: over 500, split it if it can ship in parts
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 331 passed (45 s)
rustfmt ✅ (6 s)
clippy ✅ (1 min 40 s)
tests: horizon-client, horizon-client-core ✅ 1361 passed (3 min 29 s)
doc tests ✅ 0 passed (46 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 119 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_transformer, breaking_model, camera and 107 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code


🔄 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/2776 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `refactor/cut-effect-tables` --- ### 📝 Commits (1) - [`bc0c0fd`](https://github.com/horizon-rust/horizon/commit/bc0c0fdf4a2911594008f386260177f08138bede) refactor: the MobEffects and Potions tables live in horizon-client-core ### 📊 Changes **5 files changed** (+263 additions, -257 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-core/src/lib.rs` (+1 -0) ➕ `crates/horizon-client-core/src/potions.rs` (+249 -0) 📝 `crates/horizon-client/src/brewing.rs` (+5 -250) 📝 `crates/horizon-client/src/effects.rs` (+5 -5) 📝 `crates/horizon-client/src/hud_overlays.rs` (+3 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Step B of the plan to break the cycle in horizon-client's lib (crate split, ci-speed). With step A, these cuts take the render/UI layer (gfx, hud, ui, chunks, light, mesher, streaming, world...; 46 modules, ~60k lines) out of the lib's 80-module cycle, so it can move to a crate of its own. This PR removes one edge of that cycle. It moves code only: no behaviour change. ## What - The `MobEffects` and `Potions` tables (`EFFECTS`, `POTIONS`, `EffectDef`, `PotionDef`, `Category`, `effect`, `potion`, `namespaced`, `potion_color`, `BASE_POTION_COLOR`) move from `brewing.rs` to a new `horizon-client-core/src/potions.rs`. They have no dependencies. - `brewing` re-exports them all. - `effects.rs` and `hud_overlays.rs` read them from horizon-client-core, which removes `effects -> brewing` and `hud_overlays -> brewing`. - It also shrinks the client lib by ~240 lines. - pr_ready flags 520 lines of code. They are the ~250 lines of tables, counted once removed and once added. The move can't be split without leaving half the tables behind. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at cd4ff3828, 6 min 54 s) | Check | Result | | --- | --- | | Scope | ⚠️ 5 files, +263 −257; 520 lines of code: over 500, split it if it can ship in parts | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 331 passed (45 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (1 min 40 s) | | tests: horizon-client, horizon-client-core | ✅ 1361 passed (3 min 29 s) | | doc tests | ✅ 0 passed (46 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 119 affected, to run in CI (--quick): ambient_sound, arrow, audio_attributes, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, block_transformer, breaking_model, camera and 107 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:18:23 +07:00
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#4596
No description provided.