Repository navigation
Extend build height via bundled datapack (Java) and behavior pack (Bedrock) - #976
Conversation
…drock) The existing --disable-height-limit flag previously only told the elevation pipeline to skip compression, but generated worlds still cut off terrain at Y=319 because neither Java nor Bedrock honor extended ranges without the appropriate world extension. Java (1.21.4+): installs a datapack into <world>/datapacks/arnis_tall/ with an overworld dimension_type override (Y=-2032..2031) and registers it in level.dat's DataPacks.Enabled so it activates on first load. Bedrock (1.21.40+): bundles a behavior pack with minecraft:dimension_bounds (Y=-512..512) into the .mcworld archive, plus world_behavior_packs.json to auto-activate it. Writes the data_driven_biomes experiment flag to level.dat (and the required experiments_ever_used / saved_with_toggled_experiments markers) — without these, Bedrock silently falls back to vanilla bounds. scale_to_minecraft now honors per-format caps instead of hard-coding 2031. Re-enables the GUI toggle for Bedrock (previously force-disabled) and renames the label to "Extend build height" across all locales. Minor unrelated tweaks in the same branch: - Cliff faces now mix cobbled/plain deepslate per-column (50/50) instead of always plain deepslate in the under-fill - Doubled under-fill depth cap from 32 to 64 blocks to seal deeper cliffs - Added missing data-localize hook on "Anonymous Crash Reports" toggle + translations across all 19 locales Co-Authored-By: scrdest <[email protected]>
|
⏱️ Benchmark run finished in 0m 52s 📈 Compared against baseline: 30s 🟢 Generation time is unchanged. 📅 Last benchmark: 2026-04-23 22:26:11 UTC You can retrigger the benchmark by commenting |
There was a problem hiding this comment.
Pull request overview
Extends Arnis world generation to support taller build heights by bundling and auto-enabling the required world-extension packs for both Java (datapack) and Bedrock (behavior pack + experiment flags), and adjusts elevation scaling to respect per-format height caps.
Changes:
- Java: add a bundled tall-world datapack and auto-register it in
level.datso it’s enabled on first load. - Bedrock: optionally bundle a tall-world behavior pack into the
.mcworldarchive and set the required experiment flags inlevel.dat. - Terrain/UI: make elevation scaling honor per-format extended caps; re-enable the height toggle for Bedrock in the GUI; update translations; tweak cliff under-fill material mixing and depth.
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/world_utils.rs | Adds Java tall-world datapack installation and level.dat registration. |
| src/world_editor/mod.rs | Threads a Bedrock “extend height” boolean through WorldEditor to the writer. |
| src/world_editor/bedrock.rs | Adds Bedrock tall-world packaging (BP + world_behavior_packs.json) and experiment/version gating; adds tests for tall BP bundling. |
| src/main.rs | Installs the Java tall datapack when --disable-height-limit is used for Java CLI generation. |
| src/gui.rs | Installs the Java tall datapack during GUI “new Java world” preparation when the toggle is enabled. |
| src/data_processing.rs | Passes the “extend height” toggle into WorldEditor creation (used for Bedrock output). |
| src/args.rs | Updates CLI flag description to reflect bundled pack behavior for both formats. |
| src/elevation/mod.rs | Plumbs extended_max_y into elevation scaling. |
| src/elevation/postprocess.rs | Makes scale_to_minecraft clamp/compress against an effective max Y (vanilla vs extended per format). |
| src/ground.rs | Adds extended_max_y_for(args) (Java 2031 / Bedrock 512) and passes it into elevation fetch/scaling. |
| src/ground_generation.rs | Tweaks cliff face material selection (50/50 per-column) and increases under-fill depth cap (32→64). |
| src/gui/js/main.js | Adds localization hook for “Anonymous Crash Reports” and re-enables the height toggle for Bedrock in UI logic. |
| src/gui/index.html | Renames the height toggle label/tooltip and adds localization for “Anonymous Crash Reports”. |
| src/gui/locales/en-US.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/ar.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/de.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/es.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/fi.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/fr-FR.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/hu.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/ja.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/ko.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/lt.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/lv.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/pl.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/pt-BR.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/ru.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/sl.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/sv.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/ua.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| src/gui/locales/zh-CN.json | Renames the height toggle label and adds “anonymous_crash_reports”. |
| assets/minecraft/datapack_tall/pack.mcmeta | Adds bundled Java datapack metadata targeting 1.21.4+. |
| assets/minecraft/datapack_tall/data/minecraft/dimension_type/overworld.json | Adds Java dimension_type override for extended height range. |
| assets/minecraft/bp_tall/manifest.json | Adds bundled Bedrock behavior pack manifest (min engine 1.21.40). |
| assets/minecraft/bp_tall/dimensions/overworld.json | Adds Bedrock minecraft:dimension_bounds override (±512). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The CLI --spawn-lat/--spawn-lng path hardcoded spawn_y = 150 in both SpawnX/Y/Z and Player.Pos[1]. In vanilla-height worlds Minecraft's auto-relocation masked the issue, but with extended build height terrain can peak at Y≈2000 — the player would spawn deep inside stone and only escape via auto-relocation. Now `set_spawn_in_level_dat` takes an explicit spawn_y, and main.rs derives it from `ground.level(relative_spawn) + 3` before ground is moved into the generation pipeline. For flat worlds (no --terrain), this falls back to ground_level + 3, which is still better than the previous hardcoded 150. Bedrock was already terrain-aware via BedrockWriter::write_level_dat, no change. Also addresses Copilot review comments: - Tighten register_tall_datapack_in_level_dat doc to match actual behavior (we rely on fresh-template precondition, not explicit reordering). - Explain why network_version / inventory_version stay at 1.21.0 even when last_opened_with_version / minimum_compatible_client_version bump to 1.21.40 for extended Bedrock worlds.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 36 out of 36 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
The existing --disable-height-limit flag previously only told the elevation pipeline to skip compression, but generated worlds still cut off terrain at Y=319 because neither Java nor Bedrock honor extended ranges without the appropriate world extension.
Java (1.21.4+): installs a datapack into /datapacks/arnis_tall/ with an overworld dimension_type override (Y=-2032..2031) and registers it in level.dat's DataPacks.Enabled so it activates on first load.
Bedrock (1.21.40+): bundles a behavior pack with minecraft:dimension_bounds (Y=-512..512) into the .mcworld archive, plus world_behavior_packs.json to auto-activate it. Writes the data_driven_biomes experiment flag to level.dat (and the required experiments_ever_used / saved_with_toggled_experiments markers) — without these, Bedrock silently falls back to vanilla bounds.
scale_to_minecraft now honors per-format caps instead of hard-coding 2031. Re-enables the GUI toggle for Bedrock (previously force-disabled) and renames the label to "Extend build height" across all locales.
Minor unrelated tweaks in the same branch: