Initial resource pack – disc 13 replacement + painting/vinyl structure
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"create.subtitle.vinyl.track_01": "Track 01",
|
||||
"create.subtitle.vinyl.track_02": "Track 02"
|
||||
}
|
||||
@@ -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"
|
||||
}
|
||||
}
|
||||
@@ -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).
|
||||
Binary file not shown.
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"music_disc.13": {
|
||||
"sounds": [
|
||||
{
|
||||
"name": "minecraft:records/13",
|
||||
"stream": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Binary file not shown.
@@ -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
|
||||
@@ -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"
|
||||
}
|
||||
@@ -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).
|
||||
Executable
+47
@@ -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://<your-server-ip>: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."
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"pack": {
|
||||
"pack_format": 34,
|
||||
"description": "Zerolands – Custom Vinyls & Paintings"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user