Add and check data packs
This page is for an admin who wants to add a local data pack to the server. It covers pack selection and precedence, checks for registry and loot errors, and terrain previews without a running server.
Add a local pack
Section titled “Add a local pack”The bundled server selects the repository’s mcrs and beta packs alongside the vanilla pack from the game jar. To add another local pack:
- Put its folder under
mcrs/datapacks/in the assets root of the build. Keeppack.mcmetain the pack root and namespace folders directly beneath it, with nodata/wrapper. - Add its folder name to
MCRS_LOCAL_PACKS. Separate multiple names with commas; they are added to the built-in selection. The client’s integrated server also applies this variable. - Start the server with that setting. It loads the selected packs into the registries at start; other directories are not enabled automatically.
An embedded server selects local packs through ServerCorePlugin.local_packs; MinecraftServerPlugins::with_local_packs adds names to the bundled selection. Remove and replace vanilla parts describes these plugin settings.
Resolve overlapping files
Section titled “Resolve overlapping files”Local packs are layered by folder name in ascending order, and a later name wins when files overlap. The order in MCRS_LOCAL_PACKS does not set precedence. Names containing / or \, and the names . and .., are rejected; the binary logs the bad setting and keeps the built-in selection.1
Validate a pack
Section titled “Validate a pack”The check_pack example of mcrs_minecraft_game_registries accepts an arbitrary standard pack directory with pack.mcmeta and data/. It layers that pack above the test base of vanilla plus the repository’s mcrs and beta packs, prints registry diagnostics without starting a server, and exits with an error if loading fails or any diagnostic is an error. A standard pack cannot have the same folder name as an enabled local pack.2
A block drops what its loot table yields, and the server looks the table up by name among the tables of all loaded packs, so a table under the same name in a local pack changes the drop. When each dimension world starts, the server checks the tables and writes every problem to the log as an error, such as an unknown item, a missing table or a table that refers back to itself. The loot_validate example runs the same loot-table check without a server and prints each problem on its own line; it loads the supplied standard pack over vanilla, without the repository’s local packs.
Invalid world-generation data can stop startup. If the server cannot build the shared generation data, or rejects a dimension’s pack data as invalid, it logs the error and exits before accepting players. Some missing or unsupported generation data instead leaves a dimension without generation and logs the reason.3
Preview terrain
Section titled “Preview terrain”The same generator can run without a server or Bevy. The worldgen_preview example writes top views and vertical slices as PNG images, including terrain from extra standard data packs. Use mcrs as a library describes the generator API.2
Restart after a change
Section titled “Restart after a change”The server cannot reload a pack while it runs, so restart it after changing one. /reload and live enabling of packs are planned.4 The plan is that a reload replaces the data at a tick boundary and refuses changes that the saved world depends on, such as the height of a dimension type.
Connections, proxies and operators covers how players reach the server and who receives operator rights.
Footnotes
Section titled “Footnotes”-
Works#1089 Adds extra local packs and a join position through server settings. ↩
-
Works#1097 Adds server-free area generation and previews, and stacks extra standard packs. ↩ ↩2
-
Works#1091 Builds the generator of a dimension without Bevy and exits with an error on invalid world-generation data. ↩
-
WIP#316 Plans the reload of data packs while the server runs. ↩
Sources and verification
Verified: 26.4-snapshot-7, 1cf84286c, 2026-11-30
- src/main.rs
- crates/mcrs_minecraft_engine_server/src/server_core_plugin.rs
- crates/mcrs_minecraft_engine_server/src/data_pack.rs
- crates/mcrs_minecraft_server/src/lib.rs
- crates/mcrs_minecraft_server_settings/src/server_settings.rs
- crates/mcrs_minecraft_client/src/local_server.rs
- crates/mcrs_minecraft_datapack/src/root.rs
- crates/mcrs_minecraft_datapack/src/stack.rs
- crates/mcrs_minecraft_datapack/src/pack.rs
- crates/mcrs_minecraft_assets/src/packs.rs
- crates/mcrs_minecraft_engine_registries/src/registry_load_plugin.rs
- crates/mcrs_minecraft_game_registries/src/registry_load.rs
- crates/mcrs_minecraft_registries/src/load.rs
- crates/mcrs_minecraft_game_registries/examples/check_pack.rs
- crates/mcrs_minecraft_vanilla_worldgen/src/dimension_plans.rs
- crates/mcrs_minecraft_vanilla_worldgen/src/world_gen_plugin.rs
- crates/mcrs_minecraft_worldgen_generator/src/plan_error.rs
- crates/mcrs_minecraft_worldgen_generator/Cargo.toml
- crates/mcrs_minecraft_worldgen_generator/src/world_tables.rs
- crates/mcrs_minecraft_worldgen_generator/src/dimension_plan.rs
- crates/mcrs_minecraft_worldgen_generator/src/generate_area.rs
- crates/mcrs_minecraft_server/src/vanilla_blocks.rs
- crates/mcrs_minecraft_loot_table/src/loot_tables.rs
- crates/mcrs_minecraft_loot_table/src/loot_issue.rs
- examples/loot_validate/README.md
- examples/loot_validate/src/main.rs
- examples/worldgen_preview/README.md
- examples/worldgen_preview/src/main.rs
- examples/worldgen_preview/src/game_data.rs
- examples/worldgen_preview/tests/it/main.rs
- issue #316
- PR #1089
- PR #1091
- PR #1097
Related open issues:
- #299 Partial Worldgen preview by seed through the public API
- #316 WIP Reload data packs while the server runs
- #317 WIP Players receive reloaded tags and registry data
- #876 WIP Loot plugin: bake at registry load and refuse a load with a loot issue
- #956 WIP perf(registry): load structure templates on demand, not with the registries
- #1161 WIP Pack layering: decide where configured extra data packs sit relative to mcrs and beta packs
- #1175 WIP Worldgen preview: write the area as region files and its climate as JSON