Libraries & tooling
A developer's deep dive into the data-pack ecosystem: what each library and tool actually provides, how the Smithed / Weld / Lantern-Load stack lets packs coexist, and the full develop → package → distribute workflow.
This page is the developer-tools deep dive. For a lighter, categorised index of references, generators, communities and creators, see the resource hub. Primary target throughout is 1.21+ (singular resource folders).
Libraries
Drop-in, namespaced data packs that provide reusable functionality. Reach for a library instead of hand-rolling anything non-trivial (raycasting, GUIs, trig, player physics) — see the advanced techniques page for the patterns they replace.
| Library | What it provides | When to reach for it | Home |
|---|---|---|---|
| Bookshelf (Gunivers) | Modular utility suite — block, raycast, math (trig/exp/log), generation, random, health, plus vector/move helpers. Pick only the modules you need. |
Any general-purpose need — treat it as the standard library. | docs · GitHub |
| Smithed libraries | Actionbar, Title (coordinated shared HUD), Crafter (shared custom crafting), Custom Block, Damage (score-based damage), Item, Prevent Aggression. |
When you want cross-pack compatibility — a shared actionbar/title/crafter that many packs use at once. | docs.smithed.dev/libraries |
| Iris (Aeldrion) | Precision raycasting — real block AABBs, entity targeting, hit block face, micrometer distance. 1.20.3+ | Accurate "what am I looking at" — guns, tools, interaction targeting. | github.com/Aeldrion/Iris |
| AjjGUI | In-game-authored item/container GUIs; 8 widget types; multiplayer- and per-player-safe menus. | Interactive inventory menus without editing files. | github.com/AjjMC/ajjgui |
| TagLib (HeDeAnTheonlyone) | 463 pre-built block/entity/item/biome tags plus a "tag dereferencer" that flattens tag references into concrete entries. Through 1.21.3. | Save time building categorisation tags; reference-based tag composition. | github.com/HeDeAnTheonlyone/Taglib |
| player_motion (MulverineX) | Additive player velocity — launch local/global, dashes, knockback — via a data-driven impulse enchantment. | Grappling hooks, dashes, blink, knockback applied to players. | github.com/MulverineX/player_motion |
| BlockState (Triton365) | Reads full block-state data at a location via a hardcoded loot-table binary-search tree (avoids modified-loot-table conflicts; handles no-loot blocks). | Reliable "what block + properties is here." | github.com/Triton365/BlockState |
| moxlib (moxvallix) | Predictable data-driven API — helpers, data (NBT array ops), math, player, string, test, TUI, dimension. Single-tick, no timers. LGPL. |
Data-manipulation-heavy packs that want a clean, tidy API. | github.com/moxvallix/moxlib |
| mcfunction-logger (MulverineX) | Structured logging to the server console for debugging function execution. | Tracing what your functions actually did, without spamming chat. | github.com/MulverineX/mcfunction-logger |
For raw utilities reach for Bookshelf; for cross-pack interop reach for the Smithed libraries (they exist specifically so multiple packs can share one actionbar/title/crafter). Use Iris for precise raycasts, BlockState for block introspection, player_motion for player physics, TagLib for tags, and moxlib for data/string/math behind a clean API.
The coexistence model
The Smithed ecosystem standardises how libraries live together. Each library is namespaced, versioned, and exposes its functionality through function tags rather than plain function paths. It receives inputs via scoreboard fake-players or storage NBT, and is merged with other packs by Weld using declarative merge rules. Version resolution is built on Lantern Load (#load:load). This "call the newest versioned function via a tag" convention is exactly what lets ten packs ship the same library without clobbering each other.
| Layer | Role |
|---|---|
| Lantern Load | The load-ordering foundation. Packs register in #load:load and publish a load.status score so dependencies initialise in a controlled order within the same tick — #minecraft:load alone can't guarantee this. |
| Function tags | A library exposes its API as a function tag (e.g. #bs.math:sin). When two versions are installed, the tag calls the newest and dedupes duplicates — so packs bundling the same dependency don't conflict. |
| Weld | Smithed's merger. It combines multiple data/resource packs into one distributable using declarative merge rules (priorities, conditions, sources) — merging pack.mcmeta, tags and function tags cleanly. It's the engine behind Smithed-library coexistence. |
| Smithed | The distribution platform and dependency layer on top. Depend on a library through Smithed and Weld resolves and bundles it. |
data/yourpack/function/load.mcfunction (guarding init behind a dependency)
# registered in #load:load; only init once the dependency is present
execute if score dep_pack load.status matches 1.. run function yourpack:init
Depend on libraries through the ecosystem rather than copy-pasting their code. Register in #load:load, call library APIs through their function tags (never the raw internal function path), and let Weld merge shared dependencies at build time so end users install one pack, not ten.
Tooling
The editors, generators, mergers and dev mods that make authoring bearable. None are required to run a data pack — they exist to speed up writing, validating and debugging one.
| Tool | Purpose | URL |
|---|---|---|
| Misode | Schema-driven web generators for loot tables, predicates, advancements, recipes, item modifiers, worldgen, text components and pack.mcmeta. Also a Data Pack Upgrader (convert between versions) and a technical changelog / version diff, backed by mcmeta. | misode.github.io |
| mcmeta (misode) | Version-controlled archive of Minecraft's generated data & assets (1.14→latest). Branches include summary, data, data-json, assets, registries and diff, one commit per version. Powers Misode's changelog and countless tools. | github.com/misode/mcmeta |
| Weld | Smithed's data/resource-pack merger — combine multiple packs into one distributable via declarative merge rules. The engine behind library coexistence. | weld.smithed.dev |
| MCStacker | Web builder for complex commands (summon/give/data) with a full NBT/components UI. | mcstacker.net |
| BDEngine (Block Display Engine) | Web editor/animator for display entities — build and animate models, export to a data pack (summon commands / animation functions). | bdengine.app |
| Animated Java | Blockbench plugin that rigs and animates models, exporting a data pack + resource pack that drive display entities for animated custom models. | animated-java.dev |
| Datapack Debugger | In-game breakpoints via #breakpoint in .mcfunction; /breakpoint step (line-by-line), /breakpoint move (resume), /breakpoint get <key> (inspect macro args). Freezes the world like tick freeze while you inspect. Fabric, 1.21. | modrinth.com/mod/datapack-debugger |
| Datamancer | Function profiling/benchmarking, debug lines, marker goggles, a live variable tracker, and auto-reload on file change. Fabric/Quilt, 1.20–1.21. | github.com/Trivaxy/datamancer |
| Better Suggestions | Smarter in-game command autocomplete — registry/argument-aware suggestions. | Modrinth |
| NBT Autocomplete | Autocompletes NBT/component keys and values while typing commands. | Modrinth |
| Spyglass / VS Code | Syntax highlighting, validation, autocomplete and linting for .mcfunction and every JSON resource; version-aware. The standard pro workflow. | spyglassmc.com |
Also useful but adjacent: mcfunction-debugger (a mod-free Debug Adapter Protocol debugger for .mcfunction — breakpoints, line-by-line, @s score inspection; GitHub), and higher-level compilers that emit data packs for large projects: JMC, PackScript, and Bolt/Beet.
Many external tutorials and command generators predate the 1.20.5 NBT→components migration, so their item snippets (stick{…}) are wrong on current versions. When following an older guide, validate item/component syntax against Misode or the mcmeta diff before pasting. A few tool homepages are single-page apps that resist scraping — when in doubt, the URLs above are canonical.
Develop → package → distribute
Develop
Work directly in a test world's datapacks/<yourpack>/ folder (or symlink from a git repo), and keep a dedicated flat/creative world template for fast iteration. Edit in VS Code + Spyglass for validation and autocomplete; for large projects reach for a compiler (JMC/PackScript/Beet-Bolt). Iterate with the tight loop: save → /reload → /function yourpack:test. Bind /reload plus a test function to a repeating command block or a carrot_on_a_stick for one-key testing.
Debug
- Step through logic with the Datapack Debugger (
#breakpoint,/breakpoint step|move|get) or mcfunction-debugger (DAP breakpoints,@sscore inspection). - Profile hot functions and track live variables with Datamancer, which also auto-reloads on file change.
- Log and inspect state with
tellraw/actionbar or a logging library (mcfunction-logger), and read storage with/data get storage yourpack:…. - Validate JSON in Misode, and use the mcmeta diff / Misode changelog to catch version-breaking changes before they bite.
Package
Get the structure right: pack.mcmeta with the correct pack_format for your target version, data/<ns>/function/…, tags in data/<ns>/tags/…, and data/minecraft/tags/function/{load,tick}.json (or Lantern Load's #load:load). Ship a resource pack alongside when you need custom models/textures/sounds — custom items use the item_model/custom_model_data components on 1.21.4+ (or CustomModelData earlier). Combine the RP + DP so custom items actually look right; Modrinth and Smithed can bundle both. Use Weld to pre-merge library dependencies into a single distributable pack when needed.
- Baseline
pack_format= 48 for 1.21–1.21.1. - Since 1.21.2–1.21.3: 57. Since 1.21.4: 61. Since 1.21.5: 71 — and it keeps climbing per release.
- Always verify the current format against Misode / mcmeta rather than memory.
Distribute
| Platform | Best for |
|---|---|
| Smithed | Library/ecosystem packs — handles Lantern Load / Weld conventions and cross-pack compatibility. |
| Modrinth | General data-pack + resource-pack hosting with versioning and declared dependencies. |
| Planet Minecraft / CurseForge | Broad reach for standalone content. |
Whichever platform you pick, tag supported Minecraft versions accurately, include install instructions, and ship an uninstall function so players can cleanly remove your pack.
A minimal, reliable toolchain: Misode to generate and validate JSON, VS Code + Spyglass to edit, the Datapack Debugger to troubleshoot, Bookshelf for common utilities, and Weld to bundle it all for release. See the resource hub for the wider catalogue of references and creators.