[PR #1107] [MERGED] Beehives: nests on trees grown in the world get their bees #3051

Closed
opened 2026-11-02 16:01:07 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/beehive-break-releases-bees


📝 Commits (1)

  • d32fd54 Beehives: nests grown in the live level get their block entity and bees

📊 Changes

7 files changed (+81 additions, -19 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+10 -0)
📝 crates/horizon-world/src/level/feature_world.rs (+11 -0)
📝 crates/horizon-world/src/level/growth_tests.rs (+31 -0)
📝 crates/horizon-world/src/level/mod.rs (+4 -0)
📝 crates/horizon-world/src/worldgen/generator_decoration.rs (+2 -18)
📝 crates/horizon-world/src/worldgen/tree.rs (+1 -1)
📝 crates/horizon-world/src/worldgen/tree/decorator.rs (+22 -0)

📄 Description

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

Fixes #1097. Reported by Tydragon on Discord: thanks!

What

Bee nests on trees placed in the live world now hold their bees, so breaking them releases angry bees, and bees can use them.

Why

BeehiveDecorator stores 2 or 3 bees in the nest's block entity. World generation kept them, but trees placed in the live level dropped them: LevelFeatureWorld had no store_beehive_occupants, and the nest got no block entity at all. That covers saplings grown next to flowers (they pick the *_bees_005 trees, 5% with a nest) and /place feature.

How

  • LevelAccess::load_block_entity (default: dropped); the game decodes the data into the nest's block entity.
  • LevelFeatureWorld::store_beehive_occupants uses it; the occupant data is shared with world generation (worldgen::tree::beehive_occupants).
  • New test a_tree_with_bees_fills_its_nest (/place feature minecraft:fancy_oak_bees in the live level: one nest, 2 or 3 bees; fails without the fix).
  • In the game (Mac mini, survival): /place feature minecraft:fancy_oak_bees, then /data get block on the nest shows its bees, and breaking it released them. Before: The target block is not a block entity, and nothing came out.

Proof

Self-check on one integration commit holding the seven B4 branches (#1049 #1050 #1046 #1056 #505 #504 #1097), on origin/main caeffffb, on the Mac mini:

cargo fmt --all --check                                                   ok
set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings    exit 0
cargo test -p horizon-client -p horizon-world                             all passed, 0 failed (horizon-client lib 959, horizon-world lib 152, ...)

tools/parity.py --changed origin/main (selects 304 of 326 harnesses: the branches touch game.rs): running on the integration commit; the result follows in a comment.

Needs Ludovic

Nothing.

🤖 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/1107 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/21/2026 **Status:** ✅ Merged **Merged:** 10/21/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/beehive-break-releases-bees` --- ### 📝 Commits (1) - [`d32fd54`](https://github.com/horizon-rust/horizon/commit/d32fd5457a9268ae0f69e9e67b4d04cd25290e8e) Beehives: nests grown in the live level get their block entity and bees ### 📊 Changes **7 files changed** (+81 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+10 -0) 📝 `crates/horizon-world/src/level/feature_world.rs` (+11 -0) 📝 `crates/horizon-world/src/level/growth_tests.rs` (+31 -0) 📝 `crates/horizon-world/src/level/mod.rs` (+4 -0) 📝 `crates/horizon-world/src/worldgen/generator_decoration.rs` (+2 -18) 📝 `crates/horizon-world/src/worldgen/tree.rs` (+1 -1) 📝 `crates/horizon-world/src/worldgen/tree/decorator.rs` (+22 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes #1097. Reported by **Tydragon** on Discord: thanks! ## What Bee nests on trees placed in the live world now hold their bees, so breaking them releases angry bees, and bees can use them. ## Why `BeehiveDecorator` stores 2 or 3 bees in the nest's block entity. World generation kept them, but trees placed in the live level dropped them: `LevelFeatureWorld` had no `store_beehive_occupants`, and the nest got no block entity at all. That covers saplings grown next to flowers (they pick the `*_bees_005` trees, 5% with a nest) and `/place feature`. ## How - `LevelAccess::load_block_entity` (default: dropped); the game decodes the data into the nest's block entity. - `LevelFeatureWorld::store_beehive_occupants` uses it; the occupant data is shared with world generation (`worldgen::tree::beehive_occupants`). - New test `a_tree_with_bees_fills_its_nest` (`/place feature minecraft:fancy_oak_bees` in the live level: one nest, 2 or 3 bees; fails without the fix). - In the game (Mac mini, survival): `/place feature minecraft:fancy_oak_bees`, then `/data get block` on the nest shows its bees, and breaking it released them. Before: `The target block is not a block entity`, and nothing came out. ## Proof Self-check on one integration commit holding the seven B4 branches (#1049 #1050 #1046 #1056 #505 #504 #1097), on origin/main `caeffffb`, on the Mac mini: ``` cargo fmt --all --check ok set -o pipefail; cargo clippy --workspace --all-targets -- -D warnings exit 0 cargo test -p horizon-client -p horizon-world all passed, 0 failed (horizon-client lib 959, horizon-world lib 152, ...) ``` `tools/parity.py --changed origin/main` (selects 304 of 326 harnesses: the branches touch `game.rs`): running on the integration commit; the result follows in a comment. ## Needs Ludovic Nothing. 🤖 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-02 16:01:07 +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#3051
No description provided.