[ { "type": "text", "text": [ { "type": "markdown", "markdown": { "text": "## Building and Distributing Your .mcpack\n\nThis guide provides a complete, production-ready workflow for packaging your custom Minecraft Bedrock Edition assets into a distributable `.mcpack` format.\n\n---\n\n### 1. The Asset Pipeline\n\nA clean and automated asset pipeline is non-negotiable for complex resource packs. The basic workflow is:\n\n1. **Source**: Master high-resolution images (`source_assets/`).\n2. **Process**: Convert and optionally compress to Bedrock-compatible formats (`process/`).\n3. **Build**: A script (e.g., `build.js`) grabs processed assets, generates SHA-1 for each, and assembles the `manifest.json` and the final `.mcpack`.\n\n#### 1.1. Image Conversion\nBefore you can use an image, it must be in a format Minecraft: Bedrock Edition understands. The most common format is **DDS (DirectDraw Surface)**. While PNG is used for the manifest only, textures loaded in-game are almost always in a compressed DXT format.\n\n- **Tooling**: You'll need a command-line tool like `nvcompress` or `BSPTDF`. These allow you to convert PNGs to DXT1/DXT5 with a single command.\n ```bash\n # Example using nsfwcompress (a popular open-source tool)\n nsfwcompress ./source_assets/gui/title_je.png ./processed/assets/interface/texture/ui/title_je.dds -dxt5 -convert\n ```\n- **Naming Convention**: When managing multiple variants (e.g., for different resolutions), keep a clear naming scheme. `title_je.png`, `title_je@2x.png`, etc. The build script should be able to handle these. - **Grid Alignment**: Minecraft textures must be on a grid. A texture with a width of 64x24 will be padded to 64x32. Misaligned textures often result in weird stretching or mirroring. ### 2. The Manifest is the Source of Truth\n\nThe `manifest.json` generates the `.mcpack`. **Never hand-edit the final manifest after building; edit the source data and regenerate it.**\n\n#### 2.1. Manifest `version_3`\nIf you want the most modern features (like `extra_code_assets` for resource-pack mods like CozyUI or GoodBedrock), you would target `version_3` or higher. However, for compatibility with a broader range of version-agnostic tools,