commit 1796b051d079481274f237797f69097879d7e2d8 Author: D3SXX Date: Sat May 9 13:46:17 2026 +0000 Initial resource pack – disc 13 replacement + painting/vinyl structure diff --git a/assets/create/lang/en_us.json b/assets/create/lang/en_us.json new file mode 100644 index 0000000..0f6db6d --- /dev/null +++ b/assets/create/lang/en_us.json @@ -0,0 +1,4 @@ +{ + "create.subtitle.vinyl.track_01": "Track 01", + "create.subtitle.vinyl.track_02": "Track 02" +} diff --git a/assets/create/sounds.json b/assets/create/sounds.json new file mode 100644 index 0000000..54f5e22 --- /dev/null +++ b/assets/create/sounds.json @@ -0,0 +1,20 @@ +{ + "vinyl.track_01": { + "sounds": [ + { + "name": "create:vinyl/track_01", + "stream": true + } + ], + "subtitle": "create.subtitle.vinyl.track_01" + }, + "vinyl.track_02": { + "sounds": [ + { + "name": "create:vinyl/track_02", + "stream": true + } + ], + "subtitle": "create.subtitle.vinyl.track_02" + } +} diff --git a/assets/create/sounds/vinyl/PLACE_OGG_FILES_HERE.txt b/assets/create/sounds/vinyl/PLACE_OGG_FILES_HERE.txt new file mode 100644 index 0000000..d8526fb --- /dev/null +++ b/assets/create/sounds/vinyl/PLACE_OGG_FILES_HERE.txt @@ -0,0 +1,17 @@ +Place your vinyl music files here as OGG Vorbis audio. + +File naming: + track_01.ogg → matches "vinyl.track_01" in sounds.json + track_02.ogg → matches "vinyl.track_02" in sounds.json + +Rules: + - Format: OGG Vorbis (NOT MP3, NOT WAV – must be .ogg) + - Convert with: ffmpeg -i input.mp3 -c:a libvorbis -q:a 4 output.ogg + - No spaces in filenames; use underscores. + - For each new track add a matching entry in assets/create/sounds.json + and a lang entry in assets/create/lang/en_us.json. + +In-game usage (Create mod): + 1. Craft a blank vinyl record. + 2. Use a jukebox with the sound event ID: create:vinyl.track_01 + OR configure via Create's vinyl disc crafting recipe (requires a datapack recipe). diff --git a/assets/create/sounds/vinyl/silent04.ogg b/assets/create/sounds/vinyl/silent04.ogg new file mode 100644 index 0000000..68ce661 Binary files /dev/null and b/assets/create/sounds/vinyl/silent04.ogg differ diff --git a/assets/minecraft/sounds.json b/assets/minecraft/sounds.json new file mode 100644 index 0000000..d814572 --- /dev/null +++ b/assets/minecraft/sounds.json @@ -0,0 +1,10 @@ +{ + "music_disc.13": { + "sounds": [ + { + "name": "minecraft:records/13", + "stream": true + } + ] + } +} diff --git a/assets/minecraft/sounds/records/13.ogg b/assets/minecraft/sounds/records/13.ogg new file mode 100644 index 0000000..68ce661 Binary files /dev/null and b/assets/minecraft/sounds/records/13.ogg differ diff --git a/assets/minecraft/sounds/records/PLACE_silent04_ogg_HERE.txt b/assets/minecraft/sounds/records/PLACE_silent04_ogg_HERE.txt new file mode 100644 index 0000000..4c2f4c0 --- /dev/null +++ b/assets/minecraft/sounds/records/PLACE_silent04_ogg_HERE.txt @@ -0,0 +1,10 @@ +Place silent04.ogg here. + +This file replaces the vanilla "Music Disc 13" audio. + +Requirements: + - Filename: silent04.ogg (must be OGG Vorbis, NOT mp3/wav) + - Convert: ffmpeg -i silent04.mp3 -c:a libvorbis -q:a 4 silent04.ogg + +After placing the file, rebuild the pack: + cd /root/servers/1.12.1-neoforge1/resourcepack && ./build_pack.sh diff --git a/assets/zerolands/lang/en_us.json b/assets/zerolands/lang/en_us.json new file mode 100644 index 0000000..b888793 --- /dev/null +++ b/assets/zerolands/lang/en_us.json @@ -0,0 +1,6 @@ +{ + "painting.zerolands.painting_01.title": "Painting 01", + "painting.zerolands.painting_01.author": "Zerolands", + "painting.zerolands.painting_02.title": "Painting 02", + "painting.zerolands.painting_02.author": "Zerolands" +} diff --git a/assets/zerolands/textures/painting/PLACE_PAINTING_PNGS_HERE.txt b/assets/zerolands/textures/painting/PLACE_PAINTING_PNGS_HERE.txt new file mode 100644 index 0000000..058f3ff --- /dev/null +++ b/assets/zerolands/textures/painting/PLACE_PAINTING_PNGS_HERE.txt @@ -0,0 +1,19 @@ +Place your painting PNG textures here. + +Naming: must match the `asset_id` defined in the datapack painting_variant JSON. + painting_01.png → "asset_id": "zerolands:painting_01" (1×1 blocks = 16×16 px) + painting_02.png → "asset_id": "zerolands:painting_02" (1×2 blocks = 16×32 px) + +Size guide (1 block = 16 px): + 1×1 → 16×16 2×1 → 32×16 1×2 → 16×32 + 2×2 → 32×32 4×2 → 64×32 4×4 → 64×64 + +Rules: + - PNG, RGBA (transparent background = black in-game border). + - Width/height in the JSON must match the actual image ratio (W×H blocks). + - For each new painting: add a JSON in the datapack AND a PNG here. + +After adding files: + 1. Rebuild the resource pack: cd resourcepack && ./build_pack.sh + 2. Re-upload the zip and update resource-pack-sha1 in server.properties. + 3. Run `/datapack enable "file/zerolands"` in-game (already enabled if server restarted). diff --git a/build_pack.sh b/build_pack.sh new file mode 100755 index 0000000..3548105 --- /dev/null +++ b/build_pack.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# Packages the resource pack, computes SHA1, and updates server.properties. +set -e + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SERVER_DIR="$(dirname "$SCRIPT_DIR")" +PACK_NAME="zerolands-resourcepack.zip" +OUTPUT="$SERVER_DIR/$PACK_NAME" +PROPS="$SERVER_DIR/server.properties" + +echo "=== Building resource pack ===" + +# Remove previous build +rm -f "$OUTPUT" + +# Zip everything inside the resourcepack folder (pack.mcmeta must be at root of zip) +cd "$SCRIPT_DIR" +zip -r "$OUTPUT" pack.mcmeta assets/ -x "*.txt" -x "build_pack.sh" -x ".DS_Store" + +SHA1=$(sha1sum "$OUTPUT" | awk '{print $1}') +echo "Built: $OUTPUT" +echo "SHA1: $SHA1" + +# ─── Update server.properties in-place ─────────────────────────────────────── +if [ -f "$PROPS" ]; then + # Read current URL (preserve whatever the user set) + CURRENT_URL=$(grep '^resource-pack=' "$PROPS" | cut -d= -f2-) + + sed -i \ + -e "s|^resource-pack-sha1=.*|resource-pack-sha1=$SHA1|" \ + "$PROPS" + + echo "" + echo "server.properties SHA1 updated." + if [ -z "$CURRENT_URL" ]; then + echo "" + echo "ACTION REQUIRED: set the resource-pack URL in server.properties:" + echo " resource-pack=http://:8080/$PACK_NAME" + else + echo "Resource pack URL: $CURRENT_URL" + fi +fi + +echo "" +echo "=== Done ===" +echo "Upload $OUTPUT to your web server (see docker-compose in resourcepack-server/)." +echo "Then restart or reload the Minecraft server." diff --git a/pack.mcmeta b/pack.mcmeta new file mode 100644 index 0000000..3a15e7a --- /dev/null +++ b/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 34, + "description": "Zerolands – Custom Vinyls & Paintings" + } +}