#!/bin/bash set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" BUILD_DIR="$SCRIPT_DIR/build" rm -rf "$BUILD_DIR" mkdir -p "$BUILD_DIR" # Each pack is zipped from INSIDE its own directory so that manifest.json sits # at the archive root. An extra nesting level makes Minecraft reject the import. # No -x exclude here, unlike addon/build.sh: these pack dirs contain no # dotfiles, and dropping it keeps the script working with the 7-Zip `zip` # shim on the Windows workstation as well as Info-ZIP on the CI runner. echo "Packaging Behavior Pack..." cd "$SCRIPT_DIR/redstone_link_BP" zip -rq "$BUILD_DIR/redstone_link_BP.mcpack" . echo "Packaging Resource Pack..." cd "$SCRIPT_DIR/redstone_link_RP" zip -rq "$BUILD_DIR/redstone_link_RP.mcpack" . echo "Creating .mcaddon bundle..." cd "$BUILD_DIR" zip -rq "$BUILD_DIR/redstone_link.mcaddon" redstone_link_BP.mcpack redstone_link_RP.mcpack echo "" echo "Build complete!" echo " Output: $BUILD_DIR/redstone_link.mcaddon" echo "" echo "To install:" echo " - Double-click the .mcaddon file on Windows to auto-import" echo " - Or copy packs to com.mojang/development_behavior_packs/ and development_resource_packs/" echo "" echo "Note: import BOTH packs. The behavior pack alone gives you working" echo "logic with missing textures and untranslated block names."