v3.19.0, released yesterday, MIT licensed

Custom items and blocks without writing every file

Define an item or a block once. StewBeet writes its models, recipes, loot tables, translations and manual page on every build. The commands you still write by hand are checked by Spyglass in VS Code.

New to Python? A definition is a name, some values and a recipe. If you can read datapack JSON, you can read one.

One block, defined once

definitions/additions/equipments.py

Block(
	id="life_crystal_block",
	vanilla_block=VanillaBlock(
		id="minecraft:glass",
	),
	manual_category="equipment",
	components={
		"item_name": {"text": "Life Crystal Block"},
		"lore": [{"text": "Break it to get the crystal back"}],
	},
	no_silk_touch_drop=NoSilkTouchDrop(
		id="life_crystal",
	),
	recipes=[CraftingShapelessRecipe(
		category="equipment",
		result_count=1,
		ingredients=8 * [Ingr("minecraft:glass")]
			+ [Ingr("life_crystal")],
	)],
)
Life Crystal Block
Life Crystal

Life Crystal Block

Break it to get the crystal back

Written by the build:

Block functions: 4

Smithed Crafter recipes: 1

Loot tables: 1

Manual pages: 1

Resource pack files: 7

The Life Crystal Block placed in a Minecraft world
In game, Minecraft 26.3

14 files from this one definition. The first slot holds the render the build makes for the in-game manual.

I didn't know any Python, but thanks to a lot of trial and error I was able to figure it out, and it's been great.
Casper2137, made their first custom blocks with StewBeet

You keep control of every file

The build writes plain datapack and resource pack files, and heads each function with where it is called from. Here are the 14 files of the block above, as the build wrote them. Source maps link each line to the Python that wrote it.

Before trying it, I was pretty wary of pre-compilers: I thought all that abstraction would turn into spaghetti code. But StewBeet fits right into the creative process. It takes care of lots of tasks that add up to lost time and mental fatigue, while keeping absolute control over the code you produce.
RacoonJohn, author of Headconomics (translated from French)

datapack/data/stardust/function/custom_blocks/life_crystal_block/place_secondary.mcfunction


#> stardust:custom_blocks/life_crystal_block/place_secondary
#
# @executed	at @s
#
# @within	stardust:custom_blocks/life_crystal_block/place_main [ at @s ]
#

# Add convention and utils tags, and the custom block tag
tag @s add global.ignore
tag @s add global.ignore.kill
tag @s add smithed.entity
tag @s add smithed.block
tag @s add stardust.custom_block
tag @s add stardust.life_crystal_block
tag @s add stardust.vanilla.minecraft_glass

# Add a custom name
data merge entity @s {"CustomName": {"translate": "stardust.life_crystal_block","fallback": "Life Crystal Block"}}

# Modify item display entity to match the custom block
item replace entity @s contents with minecraft:furnace[item_model="stardust:life_crystal_block"]
function stardust:custom_blocks/compute_brightness

One block by hand is eight files

In two packs and four formats. Miss one and nothing errors: the block never drops. StewBeet writes all eight from the definition on every build.

By hand

  • function/place.mcfunctionplacement
  • function/destroy.mcfunctiondestruction
  • loot_table/block.jsondrops
  • recipe/block.jsonvanilla recipe
  • function/calls/crafter.mcfunctionNBT recipe
  • items/block.jsonitem definition
  • models/item/block.jsonmodel
  • lang/en_us.jsontranslation key

With StewBeet

1definition to maintain

src/definitions.py

Block(
  id="life_crystal_block",
  vanilla_block=VanillaBlock(id="minecraft:glass"),
  recipes=[CraftingShapelessRecipe(
    ingredients=8 * [Ingr("minecraft:glass")]
      + [Ingr("life_crystal")],
  )],
)

The eight files are written from it on every build, so they never drift apart.

One material, the whole tier

Name an ingot and the vanilla tier it matches. The tools, armour, ore, block and nugget come from the textures you dropped in, recipes included.

definitions/additions/common.py

generate_everything_about_these_materials({
  "solarium_ingot": EquipmentsConfig(
    DefaultOre.NETHERITE,
    attributes={
      "attack_damage": 15,
      "armor": 6.0,
    },
  ),
})
Stardust Fragment's solarium ingot, and the tools, armour and block registered from it

Your text, ready to translate

Write plain text in your commands. The build turns each one into a translation key and collects them in en_us.json.

What you write

tellraw @s {"text":"Energy stored: "}

What the build writes

tellraw @s {"translate":"simplenergy.energy_stored","fallback":"Energy stored: "}

assets/minecraft/lang/en_us.json

{
  "simplenergy.energy_stored": "Energy stored: "
}

Your datapack documents itself

Every item you define gets a manual page: its recipe drawn from the ingredients you declared, its description, and links between categories. Players craft the book in game, and the next build updates it.

Your commands, checked in your editor

A command inside a Python string is still a command. The StewBeet extension for VS Code gives it completion, hover and errors as you type, and Ctrl+click goes from a write_function call to the file the build wrote.

24 public projects are built with StewBeet

Other datapackers' projects first, then the author's packs and libraries. Each card opens its source. See them all.

StewBeet runs on beet, bolt and mecha, made by the beet team, and fetches the Smithed and Bookshelf libraries your functions call.

How StewBeet fits with beetCredits

From nothing to a built pack in two commands

Needs uv, which installs Python 3.14 for you.

Read the quickstart
  1. 01

    Creates the project. Type basic when it asks for a template.

  2. 02

    Builds the datapack and the resource pack, zipped in build/.

basic sets up every plugin with no example to delete, extensive is a full project to read. The three templates