Upgrading
Each section covers one release step. To skip a release, follow the sections
in order; cobble migrate --from <old> --to <new> reports the combined
changes. The changelog
lists every change.
0.10 To 0.11
0.11 is still in development. This section lists the changes on main so far
and will grow before the release.
Cobble 0.11 keeps the Minecraft Java Edition 26.3 target and pack format
121.0, so cobble.toml and the command tree stay as they are. The changes are
in generated output: each pack keeps its variables on its own objective, and
module variables can opt into keeping their values across loads.
Recommended Flow
- Review the project with the migration report (0.10 to 0.11 is the default route):
cobble migrate --json
The report lists every raw command and execute header that names the
temp objective (temp-objective-reference). These lines keep working;
the list shows where your pack reads or writes Cobble variables, which helps
with step 3.
- Rebuild and re-run project checks:
cobble check
cobble build --validate
- Update anything outside the pack that reads Cobble variables by objective
name, such as command blocks, other data packs, plugins, or commands typed
in chat.
/scoreboard players get round tempbecomes/scoreboard players get round <namespace>.vars.
Per-Pack Variable Objective
0.10 kept every pack’s numeric variables and internal helper scores on one
shared temp objective, so two Cobble packs on one server that used the same
variable name overwrote each other. The math and __internal__ objectives
were shared the same way.
In 0.11 these scores live on <namespace>.vars, for example parkour.vars
for the namespace parkour. The load function creates it with
scoreboard objectives add <namespace>.vars dummy. Strings, lists, and maps
already lived in the per-namespace storage <namespace>:global and are
unchanged.
temp stays the name Cobble source uses for this objective. The compiler
rewrites it to <namespace>.vars in scoreboard arguments, if score,
unless score, store result score, scores={...} selector filters, and
score text components. Other text, such as a chat message containing the word
temp, is left alone. See
The temp Objective In Raw Commands.
Values already stored under temp in an existing world are not carried over.
Module variables reset on every load in 0.10 as well, so the new objective
starts from the same values. Once no other pack uses it, remove the old
objective with /scoreboard objectives remove temp; do the same for math and
__internal__ if no other pack uses them.
Persistent Module Variables
Module variables still reset on every load. Declare one with persist to keep
its value across /reload and server restarts:
persist best_time = 0
persist champion = "nobody"
The initializer only runs while the score or storage value is unset. persist
is only allowed at module level and takes a constant initializer. Packs that
kept records in a hand-written objective to survive reloads can switch to
persist for pack-wide values; per-player records still need their own
objective.
persist is not a reserved word: a variable named persist keeps working.
Tooling Changes
cobble migratedefaults to--from 0.10 --to 0.11. Routes from 0.8 and 0.9 to 0.11 are also supported; pass--to 0.10for the previous route.- The serde AST adds
Assignment.persist, omitted from JSON whenfalse.
0.9 To 0.10
Cobble 0.10.0 targets Minecraft Java Edition 26.3 and requires pack format
121.0 (121 names the same format). Like 0.9, the migration path is
report-first: normal build, check, and watch commands never rewrite project
files.
Recommended Flow
- Review the project with the migration report (0.9 to 0.10 is the default
route; use
--from 0.8for older projects):
cobble migrate --json
- Update
cobble.tomlonly after reviewing the report:
cobble migrate --apply
- Replace the 26.1.2 command tree. The default
data/commands.jsonis fingerprint-checked against the 26.3 tree, so an old file is refused; delete it and let--validateregenerate it, or generate it explicitly:
rm data/commands.json
scripts/setup_commands_json.sh 26.3
- Re-run project checks and a validated build:
cobble check
cobble build --validate
--apply updates [project].pack_format to 121.0 and writes a timestamped
backup of cobble.toml first. It does not rewrite source files.
Minecraft 26.2 And 26.3 Changes To Review
Cobble emits datapack.* JSON and raw commands as written, so sources written
for 26.1.2 may need these updates.
JSON resources (Cobble reports these as datapack-resource-format errors,
because a 26.3 server whose packs fail to load refuses to start):
- Predicates:
conditionis nowtype. - Item modifiers:
functionis nowtype;conditionslists are a singlecondition(combine several withminecraft:all_of). - Loot tables:
functionsis nowmodifier,conditionsis a singlecondition, and aminecraft:tagentry’snameis nowitems("#minecraft:logs"). - Root advancements with
displayneeddisplay.background. - Cooking recipes need
cookingtime(it no longer defaults to 200).
Other resource changes Cobble does not check:
- Entity predicates (26.2):
typeis nowminecraft:entity_type, unknown keys are rejected, andtype_specificsub-predicates moved to top-level keys such asminecraft:type_specific/player. - Advancement trigger fields were renamed (for example
recipetorecipesandblocktoblocks), and predicate lists are no longerall_ofshorthand. - Number providers need an explicit
type, and several were renamed (sumtoadd,producttomul). - Block state SNBT:
Name/Propertiesare nowid/properties.
Raw commands:
- Slot arguments of
itemandexecute if itemsare slot sources; existing slot strings such ascontainer.0andweapon.mainhandkeep working. - Team and waypoint colors must be lowercase names such as
dark_purple;resetis its own literal. schedule cleartakes a namespaced function ID.- Sign click events and commands only run when the sign sets
allow_op_features:true. giveover the item limit,tick step, and agameruleset to its current value now fail, which changes whatexecute store successrecords.
Text components in item components and entity NBT are SNBT (formerly
stringified JSON), so custom_name='{"text":"Sword"}' becomes
custom_name={"text":"Sword"}. The enchantments component is a plain map
(enchantments={"minecraft:sharpness":5}). Both changed in 1.21.5; the 0.10
examples were updated.
Cobble Behavior Changes
See the 0.10.0 changelog for the full list. The ones most likely to change a working pack:
- Execute blocks with more than one command run their body in a helper function once per entity, so conditions are no longer re-checked between body commands.
- Expressions folded into scores use Minecraft’s integer division and floor
modulus (
-7 / 2is-4). not (a and b)now compiles with De Morgan’s laws.- Recursive function calls are rejected at compile time.
- Plain
cobble buildandcobble clean --outputrefuse non-empty output directories that do not carry this project’s ownership marker. --validaterejects commands above the function permission level (2 by default; setCOBBLE_FUNCTION_PERMISSION_LEVELfor a server that raised it) and macro lines without$(...)variables.- Merged function tags are sorted, which can reorder
minecraft:loadandminecraft:tickhandlers.
Library users: the serde AST gained Assignment.target_expr, the
ExecuteModifier::If/Unless(Expression) variants and the CobbleError enum
were removed, and transpiler functions return a typed TranspileError.
0.8 To 0.9
Cobble 0.9.0 targets Minecraft Java Edition 26.1.2 and requires pack format
101.1. The migration path is report-first: normal build, check,
and watch commands never rewrite project files.
Recommended Flow
- Review the project with the migration report:
cobble migrate --from 0.8 --to 0.9 --json
- Update
cobble.tomlonly after reviewing the report:
cobble migrate --from 0.8 --to 0.9 --apply
- Re-run project checks and a validated build:
cobble check --json --experimental-python-compat
cobble build --validate
In 0.9.0, --apply only updates supported config settings such as
[project].pack_format to 101.1; it does not rewrite source files or enable
experimental features. Before changing
cobble.toml, Cobble writes a timestamped backup next to the original file and
reports that path as config.backup_path.
The JSON report is designed for CI review. It includes:
config.changes[]with before/after values for supported config updates.actions[]entries with before/after values for pack-format changes.source.file_details[]with per-file counts and manual-review locations.suggested_cobble_alternativehints for unsupported Python-like constructs.
Items To Review Manually
pack_format: update old values such as81to101.1.resource_pack.*: keep[experimental] resource_pack = trueor pass--experimental-resource-packwhen using resource-pack helpers.- Python-like source: use
cobble check --experimental-python-compatto see the supported Python-inspired surface and unsupported constructs that remain errors. - Plugins:
plugins/*.tomlmanifests are experimental and diagnostics-only in 0.9.0. Cobble can evaluate built-in declarative rules, but it does not run project plugin code.