[PR #2542] [CLOSED] Worldgen: bee nests keep the bees the tree decorator put in them #4410

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2542
Author: @FusselTV
Created: 10/26/2026
Status: ❌ Closed

Base: main ← Head: fix/generated-bee-nests


📝 Commits (1)

  • cecfd33 Worldgen: bee nests keep the bees the tree decorator put in them

📊 Changes

1 file changed (+30 additions, -0 deletions)

View changed files

📝 crates/horizon-client/src/structure_blocks.rs (+30 -0)

📄 Description

🤖 Opened by FusselTV's AI agent (Claude Code, Opus 5.5), not by FusselTV personally.

What and why

BeehiveDecorator stores two or three bees in every bee nest it places on a tree, and Horizon's decoration already writes them into the nest's block entity. The finished column then turns its generated block entities into live ones in structure_blocks::generated_block_entity, which only loads the stored NBT for spawners, trial spawners, vaults and banners. So every generated nest started empty.

Over seeds 12345, 1 and 8675309 (1,024 × 1,024 blocks), all 30 generated nests had bees: []. Vanilla has 2 or 3 bees in each.

What changes:

  • generated_block_entity loads a beehive's stored bees (Beehive::from_nbt).

Vanilla reference

  • BeehiveDecorator.place: storeBee(Occupant.create(...)) for 2 + nextInt(2) bees.
  • BeehiveBlockEntity.loadAdditional: bees.

Tests

  • New unit test structure_blocks::tests::a_generated_bee_nest_keeps_its_bees.
  • End to end, the same three seeds: every generated nest has 2 or 3 bees (10 × 2, 19 × 3; vanilla 15 × 2, 17 × 3 over its own nest positions). Where both worlds have a nest, the saved bees no longer differ from vanilla's.

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on 8fde0f0c2080, against upstream/main at cb43e3278, 4 min 43 s)

Check Result
Scope ✅ 1 files, +30 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 320 passed (22 s)
rustfmt ✅ (6 s)
clippy ✅ (46 s)
tests: horizon-client ✅ 1337 passed (2 min 59 s)
doc tests ✅ 0 passed (29 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 332 affected, to run in CI (--quick): arrow, attribute_map_queries, auto_jump, biome_source_codec, biome_temperature, biome_weather, biome_zoom, block_blob, block_collision_scan, block_column, block_entity_anim, block_entity_render and 320 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/2542 **Author:** [@FusselTV](https://github.com/FusselTV) **Created:** 10/26/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/generated-bee-nests` --- ### 📝 Commits (1) - [`cecfd33`](https://github.com/horizon-rust/horizon/commit/cecfd33fb70b0394f120fe368ce4dbab8c1d7be3) Worldgen: bee nests keep the bees the tree decorator put in them ### 📊 Changes **1 file changed** (+30 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/structure_blocks.rs` (+30 -0) </details> ### 📄 Description > 🤖 Opened by FusselTV's AI agent (Claude Code, Opus 5.5), not by FusselTV personally. ## What and why `BeehiveDecorator` stores two or three bees in every bee nest it places on a tree, and Horizon's decoration already writes them into the nest's block entity. The finished column then turns its generated block entities into live ones in `structure_blocks::generated_block_entity`, which only loads the stored NBT for spawners, trial spawners, vaults and banners. So every generated nest started empty. Over seeds 12345, 1 and 8675309 (1,024 × 1,024 blocks), all 30 generated nests had `bees: []`. Vanilla has 2 or 3 bees in each. What changes: - `generated_block_entity` loads a beehive's stored bees (`Beehive::from_nbt`). ## Vanilla reference - `BeehiveDecorator.place`: `storeBee(Occupant.create(...))` for 2 + nextInt(2) bees. - `BeehiveBlockEntity.loadAdditional`: `bees`. ## Tests - New unit test `structure_blocks::tests::a_generated_bee_nest_keeps_its_bees`. - End to end, the same three seeds: every generated nest has 2 or 3 bees (10 × 2, 19 × 3; vanilla 15 × 2, 17 × 3 over its own nest positions). Where both worlds have a nest, the saved bees no longer differ from vanilla's. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on 8fde0f0c2080, against upstream/main at cb43e3278, 4 min 43 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +30 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 320 passed (22 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (46 s) | | tests: horizon-client | ✅ 1337 passed (2 min 59 s) | | doc tests | ✅ 0 passed (29 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 332 affected, to run in CI (--quick): arrow, attribute_map_queries, auto_jump, biome_source_codec, biome_temperature, biome_weather, biome_zoom, block_blob, block_collision_scan, block_column, block_entity_anim, block_entity_render and 320 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:16:58 +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#4410
No description provided.