[PR #2769] [MERGED] refactor: the villager Poi enum lives in poi_sections.rs #4593

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

📋 Pull Request Information

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

Base: main ← Head: refactor/cut-villager-poi


📝 Commits (1)

  • 84c631a refactor: the villager Poi enum lives in poi_sections.rs

📊 Changes

3 files changed (+11 additions, -9 deletions)

View changed files

📝 crates/horizon-client/src/mobs/villager_brain.rs (+1 -8)
📝 crates/horizon-client/src/poi_sections.rs (+9 -0)
📝 crates/horizon-client/src/world.rs (+1 -1)

📄 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 villager Poi enum (job site, home, meeting) moves from mobs/villager_brain.rs to poi_sections.rs, which stores POIs of that type for World.
  • villager_brain re-exports it and keeps its methods.
  • This removes world -> mobs.

Self-check

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

Check Result
Scope ✅ 3 files, +11 −9
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 331 passed (45 s)
rustfmt ✅ (13 s)
clippy ✅ (1 min 13 s)
tests: horizon-client ✅ 1323 passed (2 min 56 s)
doc tests ✅ 0 passed (22 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 ➖ 71 affected, to run in CI (--quick): arrow, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, breaking_model, cauldron, command_exec, composter, crafter and 59 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/2769 **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-villager-poi` --- ### 📝 Commits (1) - [`84c631a`](https://github.com/horizon-rust/horizon/commit/84c631a88b15a0f3fca6613c297dcad2addb1457) refactor: the villager Poi enum lives in poi_sections.rs ### 📊 Changes **3 files changed** (+11 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/mobs/villager_brain.rs` (+1 -8) 📝 `crates/horizon-client/src/poi_sections.rs` (+9 -0) 📝 `crates/horizon-client/src/world.rs` (+1 -1) </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 villager `Poi` enum (job site, home, meeting) moves from `mobs/villager_brain.rs` to `poi_sections.rs`, which stores POIs of that type for `World`. - `villager_brain` re-exports it and keeps its methods. - This removes `world -> mobs`. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at cd4ff3828, 5 min 42 s) | Check | Result | | --- | --- | | Scope | ✅ 3 files, +11 −9 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 331 passed (45 s) | | rustfmt | ✅ (13 s) | | clippy | ✅ (1 min 13 s) | | tests: horizon-client | ✅ 1323 passed (2 min 56 s) | | doc tests | ✅ 0 passed (22 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 | ➖ 71 affected, to run in CI (--quick): arrow, auto_jump, block_entity_anim, block_entity_render, block_entity_tickers, block_particles, block_removal, breaking_model, cauldron, command_exec, composter, crafter and 59 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:20 +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#4593
No description provided.