Files
minecraft-aiworld/redstone-link-addon/build.sh
sysadminandClaude Opus 5 db8931784e feat(redstone-link): real block textures via build-textures.py, add build.sh
The first textures were a motif floating on a flat slab. That hits the
lesson already documented on mailbox_block(): an icon-like sprite "reads
as a placeholder when applied to all 6 faces of a cube". Replaced with
machine faces whose traces run out to the edges, so they connect across
tile boundaries and a wall of them reads as continuous circuitry --
transmitter radiating out, receiver feeding in.

Generated through scripts/build-textures.py using the existing palette and
rect/px/save helpers rather than an ad-hoc script, so they regenerate with
everything else. Running the pipeline also rewrites the other five
textures, but pixel-identically -- that churn is only a newer Pillow
re-encoding, so those files are left alone.

RP header bumped to 1.0.1 (with the BP dependency to match) because clients
cache packs by uuid+version and would otherwise keep serving the old art.
The lobby world pin was updated to match; a mismatch silently drops the
pack from the stack.

Adds build.sh to package the .mcaddon, mirroring addon/build.sh. It omits
that script's `-x` exclude: these packs have no dotfiles, and dropping it
keeps the script working with the 7-Zip `zip` shim on the workstation as
well as Info-ZIP on the CI runner.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015Gf1kZypRDfPL1YiWUS1LC
2026-08-28 11:40:16 +01:00

39 lines
1.3 KiB
Bash

#!/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."