Everything you don't need to think about
A datapack is mostly paperwork: tags that start it, scores that compare versions, a model file for each item, a pack.mcmeta that matches the game, a zip a release can use. StewBeet writes all of it from your definitions and your beet.yml. This page lists it by area, with a link to the plugin behind each item.
Loading and ticking
- Your pack gets the load sequence of the Lantern Load convention: the
minecraft:loadtag, theload:tags other packs hook into, and aload.statusobjective reset at every/reload. The load tags of your libraries run before yours. - Two copies of the same pack in one world do not both load. Each copy raises the
#<id>.major,#<id>.minorand#<id>.patchscores to its own version, and only the copy that reads back its own version loads. The functions sit under<id>:v<version>/, so versions never overwrite each other's files. See Load functions. - The load function cannot run twice, and the
tickfunction only runs once the pack has loaded. - Players whose name is in
authorget theconvention.debugtag, and receive[Loaded <name> v<version>]in the chat when the pack loads. - For a pack that supports Minecraft 26.3 or newer, other packs can detect yours through the Smithed tags
#<id>:installed,#<id>:major,#<id>:minorand#<id>:patch. - Every item of your definitions is put in the
<id>:itemsstorage on load. - A function named
tick,tick_2,second,second_5orminutegets its timer. The tick function counts one score per timer and calls the function when the threshold is reached. See Tick, second and minute functions. - A custom block that has a
secondortickfunction in its folder gets the tag, the counter and the dispatcher that run it for every placed copy, and a line in the stats function. See Block ticking. - Every
#<n> <id>.dataconstant your functions use is set on load. You write the number where you need it. See Scoreboard constants. - An
unloadfunction is built by reading your functions: it removes each scoreboard objective you add, removes each field of an<id>:storage you modify, kills the entities you summon with a custom tag or UUID, and clears your items from players. It also calls theunloadfunction of a library when its archive has one.
Files from one definition
- An item defined once gets its model, its
items/definition and its texture in the resource pack, found by file name in your textures folder. A block takes the right parent model from the sides it finds (_front,_top,_side), a bow its pulling states, a lit machine its_onmodel. See Item models. - Textures dropped at the top of the textures folder are renamed on disk to the names the models look for: lowercase,
_upbecomes_top,_northbecomes_front, and so on. The build warns for each rename. - The same item gets a loot table, one more for each count a recipe gives, a creative loot table, and a
_give_allfunction that gives chests holding every item, 27 to a chest. See Loot tables. - The four setup calls of the templates fill the rest of an item: its
item_model, its name from its id, your pack's lore, acustom_dataentry under your namespace, and the Smithed ignore flags. - Plain text becomes translatable text. Each
{"text": "..."}in a file of your datapack turns into atranslatecomponent with the text as its fallback, anden_us.jsonis written with the keys. The key is the project id plus the text, and two different texts that would share a key get a numeric suffix. See Lang file. - Your sound files become
sounds.json. Files that differ by a trailing number are grouped as variants of one event, each variant gets its subtitle, and a sound longer than 10 seconds is streamed. See Sounds. - A
renderkey in a text component is replaced by a glyph of that item, drawn by a font the build generates. See Item images in text. - Each function gets a header saying which functions, tags or advancements call it and in what context, and which macro arguments it takes. See Function headers.
- Your
pack.pngis copied into the datapack and the resource pack.
Versions
- Both packs get the pack format of the Minecraft version in
beet.yml, including versions beet does not know yet. pack.mcmetais written for you: format,min_formatandmax_formatwhere the game reads them,supported_formatsfor older ones, the description from your name, version and author, and your project id.- The first and last entries of
mc_supportsset the range of formats, and"infinite"stands for the latest known version. - Overlays agree on their format keys, since the game refuses a pack.mcmeta whose overlays disagree.
- The lowest release in
mc_supportsbecomes the game version the pack asks for. On an older game, the pack prints a red error in chat instead of half working.
Libraries
- Your functions are scanned for the markers of the official libraries, such as Smithed Custom Block or a Bookshelf module. Each one found is downloaded for your Minecraft version from Smithed or Modrinth, kept in the beet cache, and added to the load tags. Datapack libraries lists them.
- For each library, and each one you declare under
load_dependencies, the pack compares the library's version scores with the one it was built against. A missing or outdated library prints a clickable line with its name, the version needed and a link. See Library version checks.
Output
- Both packs are zipped as
<Name>_datapack.zipand<Name>_resource_pack.zip, where<Name>is your project name without spaces. Every entry carries the date of the last commit of yourbeet.yml(a fixed date outside git), text entries use Unix line endings, and an unchanged entry is copied from the previous zip. The same sources give the same zip on any machine. See Zip archives. - Each pack can be merged with your libraries into a
_with_libs.zip. A_with_libs.zipof a pack type your pipeline does not weld is moved out of the output, so a release never picks up a stale one. See Smithed Weld merge. sha1_hashes.jsonlists the SHA1 of every zip. See SHA-1 hashes.- The zips go to every folder of
build_copy_destinations, local or over SFTP. A remote file that already holds the same bytes is not uploaded again. See Copy to destination.
Checks
The build warns or fails where the game would stay silent.
- A texture that is not a power of 2 in
item/orblock/is listed with its size. See Texture size check. - A texture file that no JSON file of the resource pack references is listed. See Unused textures.
- A function line that starts with
$without a macro, or a line that uses$(name)without the leading$, is reported with its function and line number, since the game would run neither as written. - An item id that contains
:is warned about and stripped of its namespace. - A texture a model needs and the folder lacks, or a block whose textures fit no shape, is logged as an error naming the missing file.
- A project
versionthat is notmajor.minor.patch, or a missingid,name,versionorauthor, stops the build before anything is written.
Next steps
- Plugins: the whole pipeline, with what each plugin writes and how to configure it.
- Datapack libraries: the libraries the build downloads and checks for you.
- Publishing releases: sending the zips to GitHub, Modrinth and Smithed.