๐ stewbeet.plugins.merge_smithed_weld
๐ Source Code: stewbeet/plugins/merge_smithed_weld/__init__.py ๐
๐ Source Code: stewbeet/plugins/merge_smithed_weld/weld.py ๐
๐ Dependencies
- โ Required: Generated base archives from archive plugin
- โ Required: Configured output directory and project name
- ๐ง Optional: Custom libraries in configured libs folder
- ๐ง Optional: Official libraries (automatically detected from usage)
- ๐ Position: Must run after archive plugin creates base zip files
๐ Overview
The merge_smithed_weld plugin merges generated datapacks and resource packs with their dependencies.
It uses Smithed Weld to combine project archives with library dependencies, official libraries,
and custom libraries into unified distribution packages with proper metadata handling,
consistent timestamps, and optimized compression for production deployment.
Some Features Showcase
Output directory will get both datapack and resource pack zipped

We can see inside the datapack all namespaces

๐ฏ Purpose
- ๐ Merges project packs with library dependencies using Smithed Weld
- ๐ฆ Combines custom libraries from configured libs folder
- ๐๏ธ Integrates used official libraries automatically
- ๐ ๏ธ Handles proper pack.mcmeta and pack.png preservation
- ๐ Maintains consistent timestamps for reproducible builds
- ๐ Creates distribution-ready merged archives
โ๏ธ Configuration
๐ฏ Basic Example Configuration
# Requires output and project name configuration output: "build" name: "My Project" pipeline: - ... - stewbeet.plugins.merge_smithed_weld meta: stewbeet: libs_folder: "libs" # Optional: custom libraries folder
๐ Configuration Options
| Option | Type | Default | Description |
|---|---|---|---|
output | string | Required | Directory containing base archives and destination for merged archives |
name | string | Required | Project name used for archive naming |
libs_folder | string | "libs" | Folder containing custom library archives (datapack/.zip, resource_pack/.zip) |
| Archive Naming | automatic | {project}_with_libs.zip | Naming pattern for merged archive outputs |
โจ Features
๐ Archive Detection System
Automatically detects and validates base archives for merging:
- ๐ฆ Looks for project datapack and resource pack archives
- โ Only processes packs when base archives exist
- ๐ท๏ธ Uses sanitized project names for consistent file naming
- ๐ Ensures output directory structure is properly created
๐ Smithed Weld Integration
Uses Smithed Weld CLI for professional pack merging:
- โก Leverages Smithed's battle-tested merging algorithms
- ๐ก๏ธ Handles conflict resolution and dependency management
- ๐ง Configures error-only logging for clean output
- ๐ Creates temporary files for safe processing
๐๏ธ Official Library Integration
Automatically includes used official libraries in merged packs:
- ๐ Reads from OFFICIAL_LIBS registry for available libraries
- โ Only includes libraries marked as used in the project
- ๐ Supports separate datapack and resource pack library paths
- ๐ Validates library existence before inclusion
๐ฆ Custom Library Support
Integrates custom libraries from configured folders:
- ๐ Scans configured libs_folder for datapack and resource pack archives
- ๐ Uses glob patterns to find all zip files in respective folders
- ๐ฏ Supports organized library structure with separate pack types
- โ Gracefully handles missing or empty library folders
๐ ๏ธ Metadata Preservation System
Ensures proper pack.mcmeta and pack.png handling:
- ๐ Excludes conflicting metadata from merged libraries
- ๐ Uses project's original pack.mcmeta for final archive
- ๐ผ๏ธ Preserves project's pack.png if available
- โ Ensures proper metadata precedence and consistency
๐ Timestamp and Compression Management
Maintains consistent timestamps and optimal compression:
- โฐ Uses get_consistent_timestamp for reproducible builds
- ๐๏ธ Applies ZIP_DEFLATED compression with level 6
- ๐ Creates proper ZipInfo objects for all entries
- ๐งน Cleans up temporary files after processing