[PR #2438] [MERGED] End: spike crystals are saved with the chunk that generates them #4317

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

📋 Pull Request Information

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

Base: main ← Head: fix/end-crystals-at-generation


📝 Commits (1)

  • 55a066e End: spike crystals are saved with the chunk that generates them

📊 Changes

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

View changed files

📝 crates/horizon-world/src/worldgen/generator_decoration.rs (+27 -0)

📄 Description

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

What and why

SpikeFeature.placeSpike adds each end crystal to the WorldGenRegion, so a pre-generated End holds its ten crystals on the spikes before anyone ticks it. Horizon's decoration ignored spawn_end_crystal (the default does nothing). The game placed the crystals later, once the arena was loaded and ticking (place_spike_crystals). An End generated with ticks frozen, as a seed generator does, had no crystals at all.

What changes:

  • The decoration region writes the crystal like any placed entity: Pos, Rotation, Invulnerable, ShowBottom and beam_target from the feature's config.
  • The game's own placement stays for older worlds. It still skips a spike that already has its crystal, so nothing is doubled.

Vanilla reference

  • SpikeFeature.placeSpike: EntityType.END_CRYSTAL.create, setBeamTarget, setInvulnerable, snapTo, addFreshEntity.
  • EndCrystal.addAdditionalSaveData.

Tests

End to end, seed 1, End, 1,024 × 1,024 blocks, pre-generated by a dedicated server from the console:

  • with ticks frozen: 10 end crystals, as in vanilla (before: 0),
  • with ticks running: 10 end crystals, so none are placed twice.

Over seeds 12345, 1 and 8675309, the End now matches vanilla in blocks, heightmaps and entities.

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on 4aa00b19c3e9, against upstream/main at 68db8847e, 2 min 3 s)

Check Result
Scope ✅ 1 files, +27 −0
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (6 s)
clippy ✅ (23 s)
tests: horizon-world ✅ 242 passed (1 min 30 s)
doc tests ✅ 0 passed (1 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 331 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 319 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/2438 **Author:** [@FusselTV](https://github.com/FusselTV) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/end-crystals-at-generation` --- ### 📝 Commits (1) - [`55a066e`](https://github.com/horizon-rust/horizon/commit/55a066e88a7b0739903a6ef6f46d33ed4f19b7c3) End: spike crystals are saved with the chunk that generates them ### 📊 Changes **1 file changed** (+27 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-world/src/worldgen/generator_decoration.rs` (+27 -0) </details> ### 📄 Description > 🤖 Opened by FusselTV's AI agent (Claude Code, Opus 5.5), not by FusselTV personally. ## What and why `SpikeFeature.placeSpike` adds each end crystal to the `WorldGenRegion`, so a pre-generated End holds its ten crystals on the spikes before anyone ticks it. Horizon's decoration ignored `spawn_end_crystal` (the default does nothing). The game placed the crystals later, once the arena was loaded and ticking (`place_spike_crystals`). An End generated with ticks frozen, as a seed generator does, had no crystals at all. What changes: - The decoration region writes the crystal like any placed entity: `Pos`, `Rotation`, `Invulnerable`, `ShowBottom` and `beam_target` from the feature's config. - The game's own placement stays for older worlds. It still skips a spike that already has its crystal, so nothing is doubled. ## Vanilla reference - `SpikeFeature.placeSpike`: `EntityType.END_CRYSTAL.create`, `setBeamTarget`, `setInvulnerable`, `snapTo`, `addFreshEntity`. - `EndCrystal.addAdditionalSaveData`. ## Tests End to end, seed 1, End, 1,024 × 1,024 blocks, pre-generated by a dedicated server from the console: - with ticks frozen: 10 end crystals, as in vanilla (before: 0), - with ticks running: 10 end crystals, so none are placed twice. Over seeds 12345, 1 and 8675309, the End now matches vanilla in blocks, heightmaps and entities. ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on 4aa00b19c3e9, against upstream/main at 68db8847e, 2 min 3 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +27 −0 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (6 s) | | clippy | ✅ (23 s) | | tests: horizon-world | ✅ 242 passed (1 min 30 s) | | doc tests | ✅ 0 passed (1 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 331 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 319 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:18 +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#4317
No description provided.