Repository navigation
Releases
Releases · StarkTMA/Anvil
v1.0.1
v1.0.0
Anvil 1.0.0 rebuilds every add-on file on a typed JSON model and adds
support for Minecraft 1.26.60. It is a breaking release: projects built
on 0.9.x need their scripts updated.
Highlights
- Every component, document and file is a typed dataclass validated
against the Minecraft schemas at export, with clear ValueError messages. - The Jinja templates (.jsont) are gone: every file is written from Python.
- Full Minecraft 1.26.60 support, including the stricter entity schemas.
JSON model (anvil.lib.jsonmodel)
- New declarative engine: JsonObject, JsonValue, JsonComponent,
JsonCustomComponent, JsonContainer and JsonFile. - Field rules are typing.Annotated metadata (InRange, Length, Unique,
MinMax, ExactMinMax, RangeMinMax, Keyed, Hex, Pairs...) compiled into
checks, encoders and JSON schemas (schema). - JSON loading with from_json; unknown keys raise ValueError.
- All type aliases and enums live in anvil.lib.jsonmodel.types and
anvil.lib.jsonmodel.enums. - Component clashes are class-based: clashing components cannot be used
together in a block, a permutation or a component group.
Components and objects
- Entities, blocks, items and biomes: every component rewritten from the
Microsoft and Mojang references; parts have add_/set_ builders. - Actors: flattened modules, typed client/server descriptions, one class
each for animations, animation controllers and render controllers,
add_*_property builders, entity.set_display_name. - Items: plain Item class; attachables are item.client (ItemClient).
- Blocks: plain Block class; Block.descriptor() returns a BlockDescriptor
(name, states, tags). - Biomes: typed descriptions, server and client files created on use.
- Crafting: recipes and the crafting catalog split into typed modules.
- Features, feature rules, structures, loot tables, trade tables,
dialogue, UI, particles, PBR, camera, sounds, textures, geometry,
animations and voxel shapes are all typed files. - Molang: pack setting queries, Math.sign / Math.copy_sign, strict lerp.
Minecraft 1.26.60
- Vanilla data updated to 1.26.60; experimental vanilla content moved to
anvil.beta.vanilla. Vanilla factories only accept real ids. - Stricter entity schemas: {min, max} ranges (jump_delay, timer time,
attack damage, economy_trade_table discounts), transformation delay and
sound lists, trail radius, no tags with states in block descriptors. - block_entity entity_storage and container title (experimental).
- Server sound definitions are no longer experimental (1.26.60 schema).
- Dimensions are components in anvil.api.dimension (format 1.26.50,
vanilla overrides only). - Loot tables write format_version 1.26.60; new biome_has_tag condition.
- mega_trunk trunk_width accepts a range; jigsaw on_placed.
- Manifest multiselect pack setting.
- Script modules: @minecraft/server 2.11.0, @minecraft/server-ui 2.3.0.
Beta (features.experimental)
- anvil.beta.blocks.components: BlockCollisionBoxMinMax (min/max boxes
or a voxel shape from a Blockbench model), BlockEnchantmentPowerTransmitter,
BlockVibrationProperties, BlockNeighborChange. - anvil.beta.actors.components: EntityReflectProjectiles.
Project and tooling
- Config redesign: anvilconfig.json sections package, manifest, features,
build and anvil (no migration from the old layout). - pathlib everywhere, orjson everywhere, ValueError for user errors.
- tools/update_vanilla.py rebuilds the vanilla module from bedrock-samples.
- Docs: guides and API reference rewritten for the typed API.
- New issue and PR templates and contribution guide. The 0.9.x changelog
is archived in the docs; release notes now live on GitHub Releases.
v0.9.101
Anvil
- Sound files given with forward-slash paths are copied under their file name: before, only backslashes were split on, so a
path/to/sound.oggsource kept its whole path as its name.
Kit
- Wood set doors make double doors like vanilla: a door placed with a door on its left and none on its right hinges on the right and opens the other way, so the pair opens from the middle. Doors from other namespaces count whatever way they face, the set's own doors only when they face the same way. Added the
hinge_rightstate and theBlockWoodSetDoorcomponent (wood_set_door), which needs that state. - The wood set redstone consumer script is now
redstone-consumer.ts(wasredstoneConsumer.ts); the generated script index turns kebab-case module names intoregister<Name>Component.
v0.9.100
Release v0.9.100
Anvil
- Fixed
blocks.jsonnesting its blocks under a"blocks"key, which the game ignores: they now sit next toformat_version, like vanilla. This affected every block with custom sounds. - Added
block.client.sound_group(BlockSoundGroup.Wood), which gives a block the sounds of a vanilla sound group throughblocks.json, with no sound files (block_soundis still how you make your own).BlockSoundGrouplists the vanilla groups, andBlocksJSONObject.add_blocktakes the group. process_subcommandtakesexit_on_error, which exits with the subprocess's return code when it fails. The script build andanvil builduse it, so a failed build fails the CI job instead of carrying on.- A Blockbench model already loaded as another source can also be loaded as
items, this is particularly useful for Item Embeds and because there are no item model exports. - The generated GitHub release workflow runs on Ubuntu and can also be started by hand, never runs two releases of a ref at once, installs
mcanvilat least as new as the Anvil that generated it, plus the project'srequirements.txt, and builds with local export on. It releases only when no release exists for the version (any other API error fails the job instead of guessing), checks that the build made the.mcaddonor.mcworldthe target needs, and tags the pushed commit.
Kit
- Added
WoodSet.map_color(color)(andmap_color=oncreate_wood_set) to the wood set kit: the color every block of the set has on a map, "#e6d063" by default. Each block'screatetakes it as a keyword-onlymap_color. - Added
WoodSet.sound_group(group, parts)andWoodSet.options(parts, **options)to the wood set kit: the first sets the vanilla sound group of some parts, the second passes keyword arguments to theircreate, like the ids of the sounds the scripts play (open_sound,close_soundfor doors, trapdoors and fence gates,on_sound,off_soundfor buttons and pressure plates). A block's own sounds from files are made withblock.client.block_sound(...)on the built part. - Wood set blocks have vanilla sounds: the
woodgroup,hanging_signfor the hanging sign andgrassfor leaves and saplings, as oak has. - Wood set doors, trapdoors, fence gates, buttons and pressure plates play their vanilla open, close and click sounds: the game only plays those for vanilla blocks, so the scripts play them (also when redstone opens or closes them).
BlockWoodSetInteractable,BlockWoodSetRedstoneConsumerandBlockWoodSetTogglabletake their ids asopen_sound,close_sound,on_soundandoff_sound. - Wood set blocks now use
BlockLiquidDetectionlike vanilla Bedrock: slabs, stairs, fences, fence gates, doors, trapdoors, signs, hanging signs and leaves can be waterlogged, and saplings pop off and drop their loot when water flows into them. Leaves that decay while waterlogged leave their water behind. - Wood set doors, trapdoors and fence gates keep their open state when the world reloads. A
poweredstate remembers the last redstone power, so they only open or close when it changes (before, any redstone update without power closed them). Doors count as powered while either half is. Blocks usingBlockWoodSetRedstoneConsumerneed apoweredstate.
Repository
- Anvil's own GitHub workflows are split into
main,test,version,release,publish_pypianddocs(renamed frombuild_docs), replacingpublish_to_pypiandpublish_to_test_pypi.
0.9.96
Anvil
- Added the
--debugflag toanvil build, enabling debug mode for that build. - Component dependencies of a permutation can now be satisfied by the block's root components.
- Bumped the geometry format version to
1.26.0. - Declared
requestsas a dependency (it was imported but only installed indirectly).
Models
- Added
anvil.api.models, builders for model files made in code:Geometry(*.geo.json): a tree of bones holding cubes and locators, withclone(),merge(),translate()andscale(). Cubes use box UV (uv=(u, v)) or per-face UVs as keyword arguments (north=((0, 0), (4, 4)),up=((4, 0), (4, 4), 90), or a dict for amaterial_instance).Animations(*.animations.json): many animations in one file, with position/rotation/scale keyframes, particle, sound and timeline events, andvalidate()against aGeometry.VoxelShape(*.shape.json): named groups of boxes, built like aGeometry.
- Geometry, animation and culling shape references now accept these objects as well as names:
- Entities and attachables:
geometry(...),animation(...)andreuse_assets.geometry(...)/reuse_assets.animation(...). BlockGeometry,BlockItemVisualandBlockEmbeddedVisualaccept aGeometry.BlockGeometry.block_culling()accepts aVoxelShape, and gives a code-built geometry its own culling rules.
- Entities and attachables:
Blockbench
- The Blockbench importer now builds
anvil.api.modelsobjects and lives in the internalanvil.lib.blockbenchpackage. Imported models export the same files as before. - Collections:
- Groups nested inside a collection are resolved with their full children.
- A node is no longer exported twice when one of its ancestors is also in the collection.
queue_modelchecks the collection identifier.
- Block culling rules are now one file per geometry (
<model>or<model>.<collection>), checked against that geometry's bones;cube_indexis checked against the bone's actual cubes. - Voxel shapes mirror the model's groups; exporting a voxel shape from a model with no bounding boxes now raises an error, and inverted boxes are normalized.
- Animations:
- Empty particle and sound effects are skipped.
- Sounds without a locator no longer write
"locator": null. - Several events on the same keyframe are all kept.
- Animation files are exported under their source folder.
- Keyframe values are trimmed, and a blank value counts as 0 like in Blockbench, instead of exporting an invalid Molang expression.
- Loading the same
.bbmodelunder two sources (e.g. as an item and as a block) now raises an error. - Duplicate bone names in a model now raise an error instead of silently dropping a bone.
- A model with both top-level cubes and a
rootgroup keeps all cubes. override_bounding_boxnow also applies to geometries that were already built.
Blocks
- Added the
BlockReplaceablecomponent. BlockEntityno longer writes an emptycontainerwhen noslot_countis given.BlockMapColoraccepts any color format.BlockItemVisualandBlockEmbeddedVisualsupport Blockbench collections (collection=) andbone_visibility().placement_directiononly writes the fields that are set.- Removed a duplicate definition of
BlockDestructionParticles. - Fixed
BlockGeometry.n_way_visual_rotation(), which always failed; it now takes the axes as keywords like the visual components:n_way_visual_rotation(y=...).
Molang
- Breaking:
Query.AllandQuery.Anytake the compared queries as a list:Query.All(query, [a, b]). - Breaking:
Query.AllTagstakes a list of tags,Query.AllTags(["minecraft:is_axe"]), and raises an error when given a single string.
Enums
- Breaking: block state enums were renamed and regrouped:
BlockFaces→BlockFaceValuesBlockFacesTrait→FacingDirectionValues(which also replacesFacingDirectionsTrait)CardinalDirectionsTrait→CardinalDirectionsValuesVerticalHalfTrait→VerticalHalfValuesBlockCorner→BlockCornerValuesBlockCardinalConnection→CardinalConnectionStates
- Added the
BlockCornerStateandMultiblockPartStateenums.
Items
CraftingItemCatalogis now a true singleton, so groups added from different places end up in one catalog file instead of overwriting each other.CraftingItemCatalog.add_group()extends an existing group instead of adding a duplicate.
Schemas
MinecraftBlockDescriptorcan match blocks by tags alone:tagsis now a Molang expression (e.g.Query.AllTags([...])) andnameis optional. Block states still require a name.
Vanilla
- Added
MinecraftBlockTags.CornerableStairsandMinecraftBlockTags.HasFenceConnections. - Added
MinecraftItemTags.CopperTier.
Kit
- Added
anvil.kit.blocks.wood_set:create_wood_set(name, blocks=WoodBlock.ALL)creates a complete wood set (planks, logs, wood, stripped variants, slabs, stairs, fences, fence gates, doors, trapdoors, buttons, pressure plates, wall signs, standing signs, hanging signs, boats and chest boats). The set includes:- Its recipes.
- Vanilla wood tags, so every vanilla wood recipe accepts its planks, slabs and logs.
- Vanilla fuel values.
- Creative inventory placement next to the vanilla blocks, or in its own group with
own_creative_group=True. - The TypeScript components the blocks need, generated for every wood set in the project.
- Wall signs and standing signs (16-way rotation), placed with a single
<name>_signitem like vanilla signs, that ask for their text in a form when placed, store it in the block's dynamic properties, and show it again for editing when used (needsscriptui). - Hanging signs: one block hung under a block or on its side (cardinal rotation, a separate bone for each), 4 lines of 9 characters, broken with the block holding it.
- Signs can be dyed and made to glow with a glow ink sac (an ink sac removes the glow), in vanilla's dye colours and glow outline.
- Boats (two seats) and chest boats (one seat and a 27-slot chest, opened by sneaking) sharing one model. They float, face away from the player when placed, steer like vanilla boats (A/D turn, W/S row), can be leashed, and animate their paddles and shake when hit. They break after a few quick hits, or at once with an axe or in creative, dropping their item (not in creative) and the chest's contents.
- Its custom components as classes in
anvil.kit.blocks.wood_set.components:BlockWoodSetSign(text position, scale, line length, double-sided text),BlockWoodSetSupport(breaks the block with the block below, the one it was placed against or the one it faces, set withSupportedBy),BlockWoodSetInteractable,BlockWoodSetRedstoneConsumer,BlockWoodSetStrippable,BlockWoodSetTogglableandBlockWoodSetSlab.
anvil.kit.world.ldtknow explains how to install Amulet (pip install mcanvil[ldtk]) when it is missing.
Documentation
- Added the Models API pages and a Kit page, which notes that the kit may change between minor versions while
anvil.apiis the stable layer. - Updated the PBR guide to
BlockFaceValues.
0.9.93
Anvil
- Updated format version to
1.26.50. - Updated
@minecraft/npm package versions. - Particles now check for the existence of non vanilla particles referenced in the particle events.
- Behaviour Pack settings can now be used without setting the
previewflag to true.
Actor
- Updated
EntityAngerLevel,EntityProjectile,EntityAIRangedAttackcomponents. - Updated
EntityProjectilecomponent and itson_hitsubcomponents (wind_burst_on_hit,catch_fire_on_hit,thrown_potion_effect,arrow_effect,impact_damage,spawn_chance,stick_in_ground) according to the latest Bedrock documentation. - Added
EntityFreezingImmune,EntityFreezingVulnerable,EntityCanStandOnPowderSnowcomponents.
Blocks
- Added the new
BlockEntitycomponent.
Vanilla
- Added new Abandoned Camp Feature/Structure entries.
- Added all new Wool Stairs and Wool Slabs 16 color block factories.
- Added all new Cushion item factories.
- Added the new Cushion entity factory.
- Added a new
minecraft:leavesblock tag.
0.9.92
Anvil
- Added cross-platform support for Linux and macOS alongside Windows. Operating systems outside of Windows, Linux, and macOS are explicitly disallowed and raise an
OSError. - Added
local_export(bool) configuration option under[ANVIL]inanvilconfig.json.- When enabled (or running on non-Windows), exports development resource packs, behavior packs, and worlds into an isolated
./output/com.mojang/directory structure (output/com.mojang/development_resource_packs/RP_<name>,output/com.mojang/development_behavior_packs/BP_<name>,output/com.mojang/minecraftWorlds/<name>), preventing namespace collisions with packaged distribution archives (.mcaddon,.mcworld,.zip,.pdf) in./output/. - On Windows with
local_export: false, continues exporting to Minecraft Bedrock AppData folders (RELEASE_COM_MOJANGorPREVIEW_COM_MOJANG). - On non-Windows platforms,
local_exportis enforced asTrueat runtime.
- When enabled (or running on non-Windows), exports development resource packs, behavior packs, and worlds into an isolated
- Updated
Directory.create()to safely support absolute paths cross-platform without prepending./. - Updated
anvil init --vscodeworkspace launcher to support cross-platform commands (starton Windows,openon macOS, andxdg-openon Linux). - Updated
anvil clean/anvil clearand build-time pack cleanup (clean_old_dev) to dynamically locate and clear development packs fromoutput/com.mojangwhen local export is active. - Simplified
esbuild.jsscaffolding template to drop local path guessing and rely exclusively on the--outdirargument supplied duringanvil build. - Updated documentation and README with badges and setup instructions for Windows, Linux, and macOS.
Blockbench
- Added support for locator
rotationandignore_inherited_scaleproperties in Blockbench models. - Fixed newline handling in animation particle keyframes, allowing particle scripts, effects, and locators to be parsed cleanly without formatting issues.
- Added
VOXEL_SHAPE_VERSION(1.21.110) format version constant.
Components
- Added
add_stamp(bool) option under[ANVIL]inanvilconfig.jsonto configure whether metadata stamps are prepended to generated files. - Restricted
EntityAIHide.poi_typewith strictLiteral["bed", "jobsite", "meeting_area"]typing.
0.9.91
CLI & Scaffolding
- Enhanced
AnvilValidator.check_new_versions()to detect outdated packages across both npm dependencies and pip (mcanvil), outputting a clear, color-coded terminal table. - Updated project scaffolding template
package.jsonto include default"build"(node esbuild.js) and"test"(npx tsc --noemit) npm scripts. - Updated
esbuild.jsscaffolding template to targetBP_${projectName}behavior pack output directory and dynamically exclude@minecraft/server-uibased on thescriptuiconfig flag. - Updated GitHub Actions release workflow template to use Node.js version 24.
- Comprehensive documentation updates for the
anvil initcommand (aliasanvil create), clarifying valid flags and providing guidance on removed CLI options (--pbr,--random_seed/--seed, and--fullns).
Core
- Updated behavior pack module dependencies (
ManifestBP) so that@minecraft/serverand@minecraft/server-uipreview module versions are only used when bothpreviewandexperimentalflags are enabled.
0.9.9
Blockbench
- Added Voxel Shape support for Blockbench models. Now you can generate bounding boxes for your blocks in Blockbench and queue them to export using BlockGeometry.block_culling with full support for collections.
Blocks
- Added
BlockInstrumentSoundblock component for mapping note block sounds toupanddownblock faces. - Enhanced
multi_blocktrait in_BlockTraits:- Added support for horizontal directions (
"north","south","east","west") under experimental flag. - Added strict trait conflict validation:
multi_blockcannot be combined withplacement_positionorconnectiontraits. - Restricted
multi_block+placement_directionusage toPlacementDirectionTrait.CardinalDirection.
- Added support for horizontal directions (
Features
- Added
MultiBlockFeaturefor placing multi-blocks in worldgen.
Actors & Entities
- Added
EntityNotPickableFromInsidecomponent to prevent cursor targeting when the player's camera lies inside the entity's collision box. - Updated
EntityApplyKnockbackRules,EntityProjectileandEntityAIUseKineticWeaponwith the new schema. - Updated
EntityMovementMeterscalculation precision to 4 decimal places.
Vanilla
- Added
"minecraft:cushion"to vanilla entity IDs list. - Added ~80 new block factories:
- Colored wool slabs, double slabs, and stairs for all 16 wool colors (
{Color}WoolDoubleSlab,{Color}WoolSlab,{Color}WoolStairs). - Full Poplar wood block set (
PoplarButton,PoplarDoor,PoplarDoubleSlab,PoplarFence,PoplarFenceGate,PoplarHangingSign,PoplarLog,PoplarPlanks,PoplarPressurePlate,PoplarSapling,PoplarShelf,PoplarSlab,PoplarStairs,PoplarStandingSign,PoplarTrapdoor,PoplarWallSign,PoplarWood). StrippedPoplarLogandStrippedPoplarWood.- Poplar leaf variants (
OrangePoplarLeaves,RedPoplarLeaves,YellowPoplarLeaves). - New blocks:
RedShrub,ShelfMushroom, andStrawBed.
- Colored wool slabs, double slabs, and stairs for all 16 wool colors (
v0.9.8.71
Anvil
- The
Fontsobject will now create thedefault8texture in the resource pack instead of/assets - Update format version to
1.26.34. - Increased the file path length from 80 to 96.
- Fixed molang condition test unit.
Actors
- You can now customize your initial state name in client/server animation controller with "default" as the default name.
- Server animations now require a list of commands/events instead of a star-args.
- Creating a render controller with the same name will now return the existing controller if it exists instead of overwriting it.
Blocks
- Added
minecraft:sixteen_way_rotationtrait.
Molang
- Renamed
Molang.molang_condition()toMolang.condition()