From 4c426c166bfe366c2d2c7f3b1f085a4b88ea2f31 Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 25 Nov 2026 10:51:30 +0100 Subject: [PATCH] Repair Java 26.3 resourcepack delivery and fauna sprite references --- .forgejo/workflows/resourcepack-ci.yml | 51 ++++++ DuneRealmsGUI/build.gradle.kts | 2 +- DuneRealmsGUI/ecology/models/jerboa.json | 2 +- .../ecology/models/jerboa_curled.json | 2 +- .../ecology/models/jerboa_walk_left.json | 2 +- .../ecology/models/jerboa_walk_right.json | 2 +- DuneRealmsGUI/ecology/models/tiny_worm.json | 2 +- DuneRealmsGUI/network-artwork.json | 39 ++-- DuneRealmsGUI/resourcepack-repair/README.md | 69 +++++++ .../resourcepack-repair/manifest.json | 169 ++++++++++++++++++ .../main/java/com/dunerealms/gui/DuneGUI.java | 35 ++-- .../dunerealms/gui/NetworkArtworkPolicy.java | 20 +++ .../dunerealms/gui/PlanetMaterialPolicy.java | 2 + .../dunerealms/gui/PlanetTexturePacks.java | 13 +- DuneRealmsGUI/src/main/resources/gui-pack.yml | 9 +- .../src/main/resources/planet-textures.yml | 44 +++-- DuneRealmsGUI/src/main/resources/plugin.yml | 2 +- .../gui/NetworkArtworkPolicyTest.java | 28 +++ tools/build-arrakis-fauna-pack.mjs | 10 +- tools/build-fauna-models.mjs | 9 +- tools/build-resourcepack-repair.py | 118 ++++++++++++ tools/test_resourcepack_repair.py | 130 ++++++++++++++ 22 files changed, 699 insertions(+), 61 deletions(-) create mode 100644 .forgejo/workflows/resourcepack-ci.yml create mode 100644 DuneRealmsGUI/resourcepack-repair/README.md create mode 100644 DuneRealmsGUI/resourcepack-repair/manifest.json create mode 100644 DuneRealmsGUI/src/main/java/com/dunerealms/gui/NetworkArtworkPolicy.java create mode 100644 DuneRealmsGUI/src/test/java/com/dunerealms/gui/NetworkArtworkPolicyTest.java create mode 100644 tools/build-resourcepack-repair.py create mode 100644 tools/test_resourcepack_repair.py diff --git a/.forgejo/workflows/resourcepack-ci.yml b/.forgejo/workflows/resourcepack-ci.yml new file mode 100644 index 00000000..35f105cc --- /dev/null +++ b/.forgejo/workflows/resourcepack-ci.yml @@ -0,0 +1,51 @@ +name: DuneRealms Resourcepack CI +on: + push: + branches: [main] + paths: + - 'DuneRealmsGUI/**' + - 'tools/build-resourcepack-repair.py' + - 'tools/test_resourcepack_repair.py' + - 'tools/build-arrakis-fauna-pack.mjs' + - 'tools/build-fauna-models.mjs' + - '.forgejo/workflows/resourcepack-ci.yml' +jobs: + resourcepack: + runs-on: dune-ci + steps: + - name: Checkout exact reviewed revision + shell: bash + env: + REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git init . + git -c http.extraheader="AUTHORIZATION: basic $(printf 'x-access-token:%s' "$REPO_TOKEN" | base64 -w0)" fetch --depth=1 https://www.dunerealms.com/git/unimatrix/MC.git "$GITHUB_SHA" + git checkout --detach FETCH_HEAD + - name: Build immutable repair archives and verify pinned inputs + shell: bash + run: | + mkdir -p resourcepack-baselines resourcepack-output + curl --fail --location --retry 2 https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v3.zip -o resourcepack-baselines/DuneRealms-Network-Artwork-v3.zip + curl --fail --location --retry 2 https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v4.zip -o resourcepack-baselines/DuneRealms-Materials-arrakis-v4.zip + DUNE_REPAIR_BASELINE_DIR="$PWD/resourcepack-baselines" python3 tools/test_resourcepack_repair.py -v + python3 tools/build-resourcepack-repair.py resourcepack-baselines/DuneRealms-Network-Artwork-v3.zip resourcepack-baselines/DuneRealms-Materials-arrakis-v4.zip resourcepack-output + - name: Install Java 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + - name: Install Gradle + uses: gradle/actions/setup-gradle@v4 + with: + gradle-version: '9.2.1' + - name: Build and test pack delivery plugin + run: gradle --no-daemon -p DuneRealmsGUI test jar + - name: Upload reviewed packs and GUI plugin + uses: actions/upload-artifact@v3 + with: + name: DuneRealms-Resourcepack-Repair + path: | + resourcepack-output/ + DuneRealmsGUI/build/libs/DunerealmsGUI.jar + if-no-files-found: error + retention-days: 7 diff --git a/DuneRealmsGUI/build.gradle.kts b/DuneRealmsGUI/build.gradle.kts index 471a85dd..c9c88bed 100644 --- a/DuneRealmsGUI/build.gradle.kts +++ b/DuneRealmsGUI/build.gradle.kts @@ -1,6 +1,6 @@ plugins { java } group = "com.dunerealms" -version = "1.1.29" +version = "1.1.30" repositories { mavenCentral(); maven("https://repo.papermc.io/repository/maven-public/"); maven("https://repo.opencollab.dev/main/") } dependencies { compileOnly("io.papermc.paper:paper-api:1.21.8-R0.1-SNAPSHOT") diff --git a/DuneRealmsGUI/ecology/models/jerboa.json b/DuneRealmsGUI/ecology/models/jerboa.json index 2432b9db..e9b0b2e1 100644 --- a/DuneRealmsGUI/ecology/models/jerboa.json +++ b/DuneRealmsGUI/ecology/models/jerboa.json @@ -1 +1 @@ -{"ambientocclusion":false,"textures":{"fur":"dunerealms:entity/jerboa"},"elements":[{"from":[5.5,12,5.5],"to":[10.5,16,10.5],"faces":{"west":{"uv":[4.888888888888889,6.222222222222222,7.111111111111111,8],"texture":"#fur"},"north":{"uv":[7.111111111111111,6.222222222222222,9.333333333333334,8],"texture":"#fur"},"east":{"uv":[9.333333333333334,6.222222222222222,11.555555555555555,8],"texture":"#fur"},"south":{"uv":[11.555555555555555,6.222222222222222,13.777777777777779,8],"texture":"#fur"},"up":{"uv":[7.111111111111111,4,9.333333333333334,6.222222222222222],"texture":"#fur"},"down":{"uv":[9.333333333333334,4,11.555555555555555,6.222222222222222],"texture":"#fur"}}},{"from":[6.5,12,3.5],"to":[9.5,14,5.5],"faces":{"west":{"uv":[11.11111111111111,0.8888888888888888,12,1.7777777777777777],"texture":"#fur"},"north":{"uv":[12,0.8888888888888888,13.333333333333334,1.7777777777777777],"texture":"#fur"},"east":{"uv":[13.333333333333334,0.8888888888888888,14.222222222222221,1.7777777777777777],"texture":"#fur"},"south":{"uv":[14.222222222222221,0.8888888888888888,15.555555555555555,1.7777777777777777],"texture":"#fur"},"up":{"uv":[12,0,13.333333333333334,0.8888888888888888],"texture":"#fur"},"down":{"uv":[13.333333333333334,0,14.666666666666666,0.8888888888888888],"texture":"#fur"}}},{"from":[10.5,13,8.5],"to":[11.5,15,9.5],"faces":{"west":{"uv":[5.333333333333333,0.4444444444444444,5.777777777777778,1.3333333333333333],"texture":"#fur"},"north":{"uv":[5.777777777777778,0.4444444444444444,6.222222222222222,1.3333333333333333],"texture":"#fur"},"east":{"uv":[6.222222222222222,0.4444444444444444,6.666666666666667,1.3333333333333333],"texture":"#fur"},"south":{"uv":[6.666666666666667,0.4444444444444444,7.111111111111111,1.3333333333333333],"texture":"#fur"},"up":{"uv":[5.777777777777778,0,6.222222222222222,0.4444444444444444],"texture":"#fur"},"down":{"uv":[6.222222222222222,0,6.666666666666667,0.4444444444444444],"texture":"#fur"}}},{"from":[4.5,13,8.5],"to":[5.5,15,9.5],"faces":{"west":{"uv":[0,0.4444444444444444,0.4444444444444444,1.3333333333333333],"texture":"#fur"},"north":{"uv":[0.4444444444444444,0.4444444444444444,0.8888888888888888,1.3333333333333333],"texture":"#fur"},"east":{"uv":[0.8888888888888888,0.4444444444444444,1.3333333333333333,1.3333333333333333],"texture":"#fur"},"south":{"uv":[1.3333333333333333,0.4444444444444444,1.7777777777777777,1.3333333333333333],"texture":"#fur"},"up":{"uv":[0.4444444444444444,0,0.8888888888888888,0.4444444444444444],"texture":"#fur"},"down":{"uv":[0.8888888888888888,0,1.3333333333333333,0.4444444444444444],"texture":"#fur"}}},{"from":[6,2,6],"to":[10,12,10],"faces":{"west":{"uv":[0,1.7777777777777777,1.7777777777777777,6.222222222222222],"texture":"#fur"},"north":{"uv":[1.7777777777777777,1.7777777777777777,3.5555555555555554,6.222222222222222],"texture":"#fur"},"east":{"uv":[3.5555555555555554,1.7777777777777777,5.333333333333333,6.222222222222222],"texture":"#fur"},"south":{"uv":[5.333333333333333,1.7777777777777777,7.111111111111111,6.222222222222222],"texture":"#fur"},"up":{"uv":[1.7777777777777777,0,3.5555555555555554,1.7777777777777777],"texture":"#fur"},"down":{"uv":[3.5555555555555554,0,5.333333333333333,1.7777777777777777],"texture":"#fur"}}},{"from":[9,6,6],"to":[11,11,8],"faces":{"west":{"uv":[0,9.777777777777779,0.8888888888888888,12],"texture":"#fur"},"north":{"uv":[0.8888888888888888,9.777777777777779,1.7777777777777777,12],"texture":"#fur"},"east":{"uv":[1.7777777777777777,9.777777777777779,2.6666666666666665,12],"texture":"#fur"},"south":{"uv":[2.6666666666666665,9.777777777777779,3.5555555555555554,12],"texture":"#fur"},"up":{"uv":[0.8888888888888888,8.88888888888889,1.7777777777777777,9.777777777777779],"texture":"#fur"},"down":{"uv":[1.7777777777777777,8.88888888888889,2.6666666666666665,9.777777777777779],"texture":"#fur"}},"rotation":{"origin":[8.5,8.5,7.5],"axis":"x","angle":22.5}},{"from":[5,6,6],"to":[7,11,8],"faces":{"west":{"uv":[5.333333333333333,8.88888888888889,6.222222222222222,11.11111111111111],"texture":"#fur"},"north":{"uv":[6.222222222222222,8.88888888888889,7.111111111111111,11.11111111111111],"texture":"#fur"},"east":{"uv":[7.111111111111111,8.88888888888889,8,11.11111111111111],"texture":"#fur"},"south":{"uv":[8,8.88888888888889,8.88888888888889,11.11111111111111],"texture":"#fur"},"up":{"uv":[6.222222222222222,8,7.111111111111111,8.88888888888889],"texture":"#fur"},"down":{"uv":[7.111111111111111,8,8,8.88888888888889],"texture":"#fur"}},"rotation":{"origin":[5.5,8.5,7.5],"axis":"x","angle":22.5}},{"from":[9.5,1,7],"to":[10.5,5,9.5],"faces":{"west":{"uv":[2.2222222222222223,11.777777777777779,3.3333333333333335,13.555555555555555],"texture":"#fur"},"north":{"uv":[3.3333333333333335,11.777777777777779,3.7777777777777777,13.555555555555555],"texture":"#fur"},"east":{"uv":[3.7777777777777777,11.777777777777779,4.888888888888889,13.555555555555555],"texture":"#fur"},"south":{"uv":[4.888888888888889,11.777777777777779,5.333333333333333,13.555555555555555],"texture":"#fur"},"up":{"uv":[3.3333333333333335,10.666666666666666,3.7777777777777777,11.777777777777779],"texture":"#fur"},"down":{"uv":[3.7777777777777777,10.666666666666666,4.222222222222222,11.777777777777779],"texture":"#fur"}}},{"from":[8.5,0,5],"to":[10.5,1,10],"faces":{"west":{"uv":[7.111111111111111,2.2222222222222223,9.333333333333334,2.6666666666666665],"texture":"#fur"},"north":{"uv":[9.333333333333334,2.2222222222222223,10.222222222222221,2.6666666666666665],"texture":"#fur"},"east":{"uv":[10.222222222222221,2.2222222222222223,12.444444444444445,2.6666666666666665],"texture":"#fur"},"south":{"uv":[12.444444444444445,2.2222222222222223,13.333333333333334,2.6666666666666665],"texture":"#fur"},"up":{"uv":[9.333333333333334,0,10.222222222222221,2.2222222222222223],"texture":"#fur"},"down":{"uv":[10.222222222222221,0,11.11111111111111,2.2222222222222223],"texture":"#fur"}}},{"from":[5.5,0,5],"to":[7.5,1,10],"faces":{"west":{"uv":[0,8.444444444444445,2.2222222222222223,8.88888888888889],"texture":"#fur"},"north":{"uv":[2.2222222222222223,8.444444444444445,3.111111111111111,8.88888888888889],"texture":"#fur"},"east":{"uv":[3.111111111111111,8.444444444444445,5.333333333333333,8.88888888888889],"texture":"#fur"},"south":{"uv":[5.333333333333333,8.444444444444445,6.222222222222222,8.88888888888889],"texture":"#fur"},"up":{"uv":[2.2222222222222223,6.222222222222222,3.111111111111111,8.444444444444445],"texture":"#fur"},"down":{"uv":[3.111111111111111,6.222222222222222,4,8.444444444444445],"texture":"#fur"}}},{"from":[5.5,1,7],"to":[6.5,5,9.5],"faces":{"west":{"uv":[8.88888888888889,9.11111111111111,10,10.88888888888889],"texture":"#fur"},"north":{"uv":[10,9.11111111111111,10.444444444444445,10.88888888888889],"texture":"#fur"},"east":{"uv":[10.444444444444445,9.11111111111111,11.555555555555555,10.88888888888889],"texture":"#fur"},"south":{"uv":[11.555555555555555,9.11111111111111,12,10.88888888888889],"texture":"#fur"},"up":{"uv":[10,8,10.444444444444445,9.11111111111111],"texture":"#fur"},"down":{"uv":[10.444444444444445,8,10.88888888888889,9.11111111111111],"texture":"#fur"}}},{"from":[7.5,4,10.5],"to":[8.5,9,11.5],"faces":{"west":{"uv":[5.777777777777778,11.555555555555555,6.222222222222222,13.777777777777779],"texture":"#fur"},"north":{"uv":[6.222222222222222,11.555555555555555,6.666666666666667,13.777777777777779],"texture":"#fur"},"east":{"uv":[6.666666666666667,11.555555555555555,7.111111111111111,13.777777777777779],"texture":"#fur"},"south":{"uv":[7.111111111111111,11.555555555555555,7.555555555555555,13.777777777777779],"texture":"#fur"},"up":{"uv":[6.222222222222222,11.11111111111111,6.666666666666667,11.555555555555555],"texture":"#fur"},"down":{"uv":[6.666666666666667,11.11111111111111,7.111111111111111,11.555555555555555],"texture":"#fur"}},"rotation":{"origin":[7.5,6.5,11.5],"axis":"x","angle":45}}]} +{"ambientocclusion":false,"textures":{"fur":"dunerealms:entity/jerboa","particle":"#fur"},"elements":[{"from":[5.5,12,5.5],"to":[10.5,16,10.5],"faces":{"west":{"uv":[4.888888888888889,6.222222222222222,7.111111111111111,8],"texture":"#fur"},"north":{"uv":[7.111111111111111,6.222222222222222,9.333333333333334,8],"texture":"#fur"},"east":{"uv":[9.333333333333334,6.222222222222222,11.555555555555555,8],"texture":"#fur"},"south":{"uv":[11.555555555555555,6.222222222222222,13.777777777777779,8],"texture":"#fur"},"up":{"uv":[7.111111111111111,4,9.333333333333334,6.222222222222222],"texture":"#fur"},"down":{"uv":[9.333333333333334,4,11.555555555555555,6.222222222222222],"texture":"#fur"}}},{"from":[6.5,12,3.5],"to":[9.5,14,5.5],"faces":{"west":{"uv":[11.11111111111111,0.8888888888888888,12,1.7777777777777777],"texture":"#fur"},"north":{"uv":[12,0.8888888888888888,13.333333333333334,1.7777777777777777],"texture":"#fur"},"east":{"uv":[13.333333333333334,0.8888888888888888,14.222222222222221,1.7777777777777777],"texture":"#fur"},"south":{"uv":[14.222222222222221,0.8888888888888888,15.555555555555555,1.7777777777777777],"texture":"#fur"},"up":{"uv":[12,0,13.333333333333334,0.8888888888888888],"texture":"#fur"},"down":{"uv":[13.333333333333334,0,14.666666666666666,0.8888888888888888],"texture":"#fur"}}},{"from":[10.5,13,8.5],"to":[11.5,15,9.5],"faces":{"west":{"uv":[5.333333333333333,0.4444444444444444,5.777777777777778,1.3333333333333333],"texture":"#fur"},"north":{"uv":[5.777777777777778,0.4444444444444444,6.222222222222222,1.3333333333333333],"texture":"#fur"},"east":{"uv":[6.222222222222222,0.4444444444444444,6.666666666666667,1.3333333333333333],"texture":"#fur"},"south":{"uv":[6.666666666666667,0.4444444444444444,7.111111111111111,1.3333333333333333],"texture":"#fur"},"up":{"uv":[5.777777777777778,0,6.222222222222222,0.4444444444444444],"texture":"#fur"},"down":{"uv":[6.222222222222222,0,6.666666666666667,0.4444444444444444],"texture":"#fur"}}},{"from":[4.5,13,8.5],"to":[5.5,15,9.5],"faces":{"west":{"uv":[0,0.4444444444444444,0.4444444444444444,1.3333333333333333],"texture":"#fur"},"north":{"uv":[0.4444444444444444,0.4444444444444444,0.8888888888888888,1.3333333333333333],"texture":"#fur"},"east":{"uv":[0.8888888888888888,0.4444444444444444,1.3333333333333333,1.3333333333333333],"texture":"#fur"},"south":{"uv":[1.3333333333333333,0.4444444444444444,1.7777777777777777,1.3333333333333333],"texture":"#fur"},"up":{"uv":[0.4444444444444444,0,0.8888888888888888,0.4444444444444444],"texture":"#fur"},"down":{"uv":[0.8888888888888888,0,1.3333333333333333,0.4444444444444444],"texture":"#fur"}}},{"from":[6,2,6],"to":[10,12,10],"faces":{"west":{"uv":[0,1.7777777777777777,1.7777777777777777,6.222222222222222],"texture":"#fur"},"north":{"uv":[1.7777777777777777,1.7777777777777777,3.5555555555555554,6.222222222222222],"texture":"#fur"},"east":{"uv":[3.5555555555555554,1.7777777777777777,5.333333333333333,6.222222222222222],"texture":"#fur"},"south":{"uv":[5.333333333333333,1.7777777777777777,7.111111111111111,6.222222222222222],"texture":"#fur"},"up":{"uv":[1.7777777777777777,0,3.5555555555555554,1.7777777777777777],"texture":"#fur"},"down":{"uv":[3.5555555555555554,0,5.333333333333333,1.7777777777777777],"texture":"#fur"}}},{"from":[9,6,6],"to":[11,11,8],"faces":{"west":{"uv":[0,9.777777777777779,0.8888888888888888,12],"texture":"#fur"},"north":{"uv":[0.8888888888888888,9.777777777777779,1.7777777777777777,12],"texture":"#fur"},"east":{"uv":[1.7777777777777777,9.777777777777779,2.6666666666666665,12],"texture":"#fur"},"south":{"uv":[2.6666666666666665,9.777777777777779,3.5555555555555554,12],"texture":"#fur"},"up":{"uv":[0.8888888888888888,8.88888888888889,1.7777777777777777,9.777777777777779],"texture":"#fur"},"down":{"uv":[1.7777777777777777,8.88888888888889,2.6666666666666665,9.777777777777779],"texture":"#fur"}},"rotation":{"origin":[8.5,8.5,7.5],"axis":"x","angle":22.5}},{"from":[5,6,6],"to":[7,11,8],"faces":{"west":{"uv":[5.333333333333333,8.88888888888889,6.222222222222222,11.11111111111111],"texture":"#fur"},"north":{"uv":[6.222222222222222,8.88888888888889,7.111111111111111,11.11111111111111],"texture":"#fur"},"east":{"uv":[7.111111111111111,8.88888888888889,8,11.11111111111111],"texture":"#fur"},"south":{"uv":[8,8.88888888888889,8.88888888888889,11.11111111111111],"texture":"#fur"},"up":{"uv":[6.222222222222222,8,7.111111111111111,8.88888888888889],"texture":"#fur"},"down":{"uv":[7.111111111111111,8,8,8.88888888888889],"texture":"#fur"}},"rotation":{"origin":[5.5,8.5,7.5],"axis":"x","angle":22.5}},{"from":[9.5,1,7],"to":[10.5,5,9.5],"faces":{"west":{"uv":[2.2222222222222223,11.777777777777779,3.3333333333333335,13.555555555555555],"texture":"#fur"},"north":{"uv":[3.3333333333333335,11.777777777777779,3.7777777777777777,13.555555555555555],"texture":"#fur"},"east":{"uv":[3.7777777777777777,11.777777777777779,4.888888888888889,13.555555555555555],"texture":"#fur"},"south":{"uv":[4.888888888888889,11.777777777777779,5.333333333333333,13.555555555555555],"texture":"#fur"},"up":{"uv":[3.3333333333333335,10.666666666666666,3.7777777777777777,11.777777777777779],"texture":"#fur"},"down":{"uv":[3.7777777777777777,10.666666666666666,4.222222222222222,11.777777777777779],"texture":"#fur"}}},{"from":[8.5,0,5],"to":[10.5,1,10],"faces":{"west":{"uv":[7.111111111111111,2.2222222222222223,9.333333333333334,2.6666666666666665],"texture":"#fur"},"north":{"uv":[9.333333333333334,2.2222222222222223,10.222222222222221,2.6666666666666665],"texture":"#fur"},"east":{"uv":[10.222222222222221,2.2222222222222223,12.444444444444445,2.6666666666666665],"texture":"#fur"},"south":{"uv":[12.444444444444445,2.2222222222222223,13.333333333333334,2.6666666666666665],"texture":"#fur"},"up":{"uv":[9.333333333333334,0,10.222222222222221,2.2222222222222223],"texture":"#fur"},"down":{"uv":[10.222222222222221,0,11.11111111111111,2.2222222222222223],"texture":"#fur"}}},{"from":[5.5,0,5],"to":[7.5,1,10],"faces":{"west":{"uv":[0,8.444444444444445,2.2222222222222223,8.88888888888889],"texture":"#fur"},"north":{"uv":[2.2222222222222223,8.444444444444445,3.111111111111111,8.88888888888889],"texture":"#fur"},"east":{"uv":[3.111111111111111,8.444444444444445,5.333333333333333,8.88888888888889],"texture":"#fur"},"south":{"uv":[5.333333333333333,8.444444444444445,6.222222222222222,8.88888888888889],"texture":"#fur"},"up":{"uv":[2.2222222222222223,6.222222222222222,3.111111111111111,8.444444444444445],"texture":"#fur"},"down":{"uv":[3.111111111111111,6.222222222222222,4,8.444444444444445],"texture":"#fur"}}},{"from":[5.5,1,7],"to":[6.5,5,9.5],"faces":{"west":{"uv":[8.88888888888889,9.11111111111111,10,10.88888888888889],"texture":"#fur"},"north":{"uv":[10,9.11111111111111,10.444444444444445,10.88888888888889],"texture":"#fur"},"east":{"uv":[10.444444444444445,9.11111111111111,11.555555555555555,10.88888888888889],"texture":"#fur"},"south":{"uv":[11.555555555555555,9.11111111111111,12,10.88888888888889],"texture":"#fur"},"up":{"uv":[10,8,10.444444444444445,9.11111111111111],"texture":"#fur"},"down":{"uv":[10.444444444444445,8,10.88888888888889,9.11111111111111],"texture":"#fur"}}},{"from":[7.5,4,10.5],"to":[8.5,9,11.5],"faces":{"west":{"uv":[5.777777777777778,11.555555555555555,6.222222222222222,13.777777777777779],"texture":"#fur"},"north":{"uv":[6.222222222222222,11.555555555555555,6.666666666666667,13.777777777777779],"texture":"#fur"},"east":{"uv":[6.666666666666667,11.555555555555555,7.111111111111111,13.777777777777779],"texture":"#fur"},"south":{"uv":[7.111111111111111,11.555555555555555,7.555555555555555,13.777777777777779],"texture":"#fur"},"up":{"uv":[6.222222222222222,11.11111111111111,6.666666666666667,11.555555555555555],"texture":"#fur"},"down":{"uv":[6.666666666666667,11.11111111111111,7.111111111111111,11.555555555555555],"texture":"#fur"}},"rotation":{"origin":[7.5,6.5,11.5],"axis":"x","angle":45}}]} diff --git a/DuneRealmsGUI/ecology/models/jerboa_curled.json b/DuneRealmsGUI/ecology/models/jerboa_curled.json index 0132c25f..fd37589a 100644 --- a/DuneRealmsGUI/ecology/models/jerboa_curled.json +++ b/DuneRealmsGUI/ecology/models/jerboa_curled.json @@ -1 +1 @@ -{"ambientocclusion":false,"textures":{"fur":"dunerealms:entity/jerboa"},"elements":[{"from":[3,1,4],"to":[13,10,15],"faces":{"north":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"south":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"east":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"west":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"up":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"down":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]}}},{"from":[2,3,5],"to":[14,8,14],"faces":{"north":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"south":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"east":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"west":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"up":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"down":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]}}},{"from":[5,0,6],"to":[11,2,13],"faces":{"north":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"south":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"east":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"west":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"up":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"down":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]}}},{"from":[4,3,2],"to":[12,8,6],"faces":{"north":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"south":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"east":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"west":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"up":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"down":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]}}},{"from":[4,2,14],"to":[12,4,17],"faces":{"north":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"south":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"east":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"west":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"up":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"down":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]}}}]} +{"ambientocclusion":false,"textures":{"fur":"dunerealms:entity/jerboa","particle":"#fur"},"elements":[{"from":[3,1,4],"to":[13,10,15],"faces":{"north":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"south":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"east":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"west":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"up":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"down":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]}}},{"from":[2,3,5],"to":[14,8,14],"faces":{"north":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"south":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"east":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"west":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"up":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"down":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]}}},{"from":[5,0,6],"to":[11,2,13],"faces":{"north":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"south":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"east":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"west":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"up":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"down":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]}}},{"from":[4,3,2],"to":[12,8,6],"faces":{"north":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"south":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"east":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"west":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"up":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"down":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]}}},{"from":[4,2,14],"to":[12,4,17],"faces":{"north":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"south":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"east":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"west":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"up":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]},"down":{"texture":"#fur","uv":[1.7777777777777777,0.4444444444444444,3.111111111111111,1.7777777777777777]}}}]} diff --git a/DuneRealmsGUI/ecology/models/jerboa_walk_left.json b/DuneRealmsGUI/ecology/models/jerboa_walk_left.json index 201224d6..64db2095 100644 --- a/DuneRealmsGUI/ecology/models/jerboa_walk_left.json +++ b/DuneRealmsGUI/ecology/models/jerboa_walk_left.json @@ -1 +1 @@ -{"ambientocclusion":false,"textures":{"fur":"dunerealms:entity/jerboa"},"elements":[{"from":[5.5,12,5.5],"to":[10.5,16,10.5],"faces":{"west":{"uv":[4.888888888888889,6.222222222222222,7.111111111111111,8],"texture":"#fur"},"north":{"uv":[7.111111111111111,6.222222222222222,9.333333333333334,8],"texture":"#fur"},"east":{"uv":[9.333333333333334,6.222222222222222,11.555555555555555,8],"texture":"#fur"},"south":{"uv":[11.555555555555555,6.222222222222222,13.777777777777779,8],"texture":"#fur"},"up":{"uv":[7.111111111111111,4,9.333333333333334,6.222222222222222],"texture":"#fur"},"down":{"uv":[9.333333333333334,4,11.555555555555555,6.222222222222222],"texture":"#fur"}}},{"from":[6.5,12,3.5],"to":[9.5,14,5.5],"faces":{"west":{"uv":[11.11111111111111,0.8888888888888888,12,1.7777777777777777],"texture":"#fur"},"north":{"uv":[12,0.8888888888888888,13.333333333333334,1.7777777777777777],"texture":"#fur"},"east":{"uv":[13.333333333333334,0.8888888888888888,14.222222222222221,1.7777777777777777],"texture":"#fur"},"south":{"uv":[14.222222222222221,0.8888888888888888,15.555555555555555,1.7777777777777777],"texture":"#fur"},"up":{"uv":[12,0,13.333333333333334,0.8888888888888888],"texture":"#fur"},"down":{"uv":[13.333333333333334,0,14.666666666666666,0.8888888888888888],"texture":"#fur"}}},{"from":[10.5,13,8.5],"to":[11.5,15,9.5],"faces":{"west":{"uv":[5.333333333333333,0.4444444444444444,5.777777777777778,1.3333333333333333],"texture":"#fur"},"north":{"uv":[5.777777777777778,0.4444444444444444,6.222222222222222,1.3333333333333333],"texture":"#fur"},"east":{"uv":[6.222222222222222,0.4444444444444444,6.666666666666667,1.3333333333333333],"texture":"#fur"},"south":{"uv":[6.666666666666667,0.4444444444444444,7.111111111111111,1.3333333333333333],"texture":"#fur"},"up":{"uv":[5.777777777777778,0,6.222222222222222,0.4444444444444444],"texture":"#fur"},"down":{"uv":[6.222222222222222,0,6.666666666666667,0.4444444444444444],"texture":"#fur"}}},{"from":[4.5,13,8.5],"to":[5.5,15,9.5],"faces":{"west":{"uv":[0,0.4444444444444444,0.4444444444444444,1.3333333333333333],"texture":"#fur"},"north":{"uv":[0.4444444444444444,0.4444444444444444,0.8888888888888888,1.3333333333333333],"texture":"#fur"},"east":{"uv":[0.8888888888888888,0.4444444444444444,1.3333333333333333,1.3333333333333333],"texture":"#fur"},"south":{"uv":[1.3333333333333333,0.4444444444444444,1.7777777777777777,1.3333333333333333],"texture":"#fur"},"up":{"uv":[0.4444444444444444,0,0.8888888888888888,0.4444444444444444],"texture":"#fur"},"down":{"uv":[0.8888888888888888,0,1.3333333333333333,0.4444444444444444],"texture":"#fur"}}},{"from":[6,2,6],"to":[10,12,10],"faces":{"west":{"uv":[0,1.7777777777777777,1.7777777777777777,6.222222222222222],"texture":"#fur"},"north":{"uv":[1.7777777777777777,1.7777777777777777,3.5555555555555554,6.222222222222222],"texture":"#fur"},"east":{"uv":[3.5555555555555554,1.7777777777777777,5.333333333333333,6.222222222222222],"texture":"#fur"},"south":{"uv":[5.333333333333333,1.7777777777777777,7.111111111111111,6.222222222222222],"texture":"#fur"},"up":{"uv":[1.7777777777777777,0,3.5555555555555554,1.7777777777777777],"texture":"#fur"},"down":{"uv":[3.5555555555555554,0,5.333333333333333,1.7777777777777777],"texture":"#fur"}}},{"from":[9,6,6],"to":[11,11,8],"faces":{"west":{"uv":[0,9.777777777777779,0.8888888888888888,12],"texture":"#fur"},"north":{"uv":[0.8888888888888888,9.777777777777779,1.7777777777777777,12],"texture":"#fur"},"east":{"uv":[1.7777777777777777,9.777777777777779,2.6666666666666665,12],"texture":"#fur"},"south":{"uv":[2.6666666666666665,9.777777777777779,3.5555555555555554,12],"texture":"#fur"},"up":{"uv":[0.8888888888888888,8.88888888888889,1.7777777777777777,9.777777777777779],"texture":"#fur"},"down":{"uv":[1.7777777777777777,8.88888888888889,2.6666666666666665,9.777777777777779],"texture":"#fur"}},"rotation":{"origin":[8.5,8.5,7.5],"axis":"x","angle":-22.5}},{"from":[5,6,6],"to":[7,11,8],"faces":{"west":{"uv":[5.333333333333333,8.88888888888889,6.222222222222222,11.11111111111111],"texture":"#fur"},"north":{"uv":[6.222222222222222,8.88888888888889,7.111111111111111,11.11111111111111],"texture":"#fur"},"east":{"uv":[7.111111111111111,8.88888888888889,8,11.11111111111111],"texture":"#fur"},"south":{"uv":[8,8.88888888888889,8.88888888888889,11.11111111111111],"texture":"#fur"},"up":{"uv":[6.222222222222222,8,7.111111111111111,8.88888888888889],"texture":"#fur"},"down":{"uv":[7.111111111111111,8,8,8.88888888888889],"texture":"#fur"}},"rotation":{"origin":[5.5,8.5,7.5],"axis":"x","angle":22.5}},{"from":[9.5,1,7],"to":[10.5,5,9.5],"faces":{"west":{"uv":[2.2222222222222223,11.777777777777779,3.3333333333333335,13.555555555555555],"texture":"#fur"},"north":{"uv":[3.3333333333333335,11.777777777777779,3.7777777777777777,13.555555555555555],"texture":"#fur"},"east":{"uv":[3.7777777777777777,11.777777777777779,4.888888888888889,13.555555555555555],"texture":"#fur"},"south":{"uv":[4.888888888888889,11.777777777777779,5.333333333333333,13.555555555555555],"texture":"#fur"},"up":{"uv":[3.3333333333333335,10.666666666666666,3.7777777777777777,11.777777777777779],"texture":"#fur"},"down":{"uv":[3.7777777777777777,10.666666666666666,4.222222222222222,11.777777777777779],"texture":"#fur"}},"rotation":{"origin":[9.5,5,8.5],"axis":"x","angle":22.5}},{"from":[8.5,0,5],"to":[10.5,1,10],"faces":{"west":{"uv":[7.111111111111111,2.2222222222222223,9.333333333333334,2.6666666666666665],"texture":"#fur"},"north":{"uv":[9.333333333333334,2.2222222222222223,10.222222222222221,2.6666666666666665],"texture":"#fur"},"east":{"uv":[10.222222222222221,2.2222222222222223,12.444444444444445,2.6666666666666665],"texture":"#fur"},"south":{"uv":[12.444444444444445,2.2222222222222223,13.333333333333334,2.6666666666666665],"texture":"#fur"},"up":{"uv":[9.333333333333334,0,10.222222222222221,2.2222222222222223],"texture":"#fur"},"down":{"uv":[10.222222222222221,0,11.11111111111111,2.2222222222222223],"texture":"#fur"}},"rotation":{"origin":[9.5,5,8.5],"axis":"x","angle":22.5}},{"from":[5.5,0,5],"to":[7.5,1,10],"faces":{"west":{"uv":[0,8.444444444444445,2.2222222222222223,8.88888888888889],"texture":"#fur"},"north":{"uv":[2.2222222222222223,8.444444444444445,3.111111111111111,8.88888888888889],"texture":"#fur"},"east":{"uv":[3.111111111111111,8.444444444444445,5.333333333333333,8.88888888888889],"texture":"#fur"},"south":{"uv":[5.333333333333333,8.444444444444445,6.222222222222222,8.88888888888889],"texture":"#fur"},"up":{"uv":[2.2222222222222223,6.222222222222222,3.111111111111111,8.444444444444445],"texture":"#fur"},"down":{"uv":[3.111111111111111,6.222222222222222,4,8.444444444444445],"texture":"#fur"}},"rotation":{"origin":[6.5,5,8.5],"axis":"x","angle":-22.5}},{"from":[5.5,1,7],"to":[6.5,5,9.5],"faces":{"west":{"uv":[8.88888888888889,9.11111111111111,10,10.88888888888889],"texture":"#fur"},"north":{"uv":[10,9.11111111111111,10.444444444444445,10.88888888888889],"texture":"#fur"},"east":{"uv":[10.444444444444445,9.11111111111111,11.555555555555555,10.88888888888889],"texture":"#fur"},"south":{"uv":[11.555555555555555,9.11111111111111,12,10.88888888888889],"texture":"#fur"},"up":{"uv":[10,8,10.444444444444445,9.11111111111111],"texture":"#fur"},"down":{"uv":[10.444444444444445,8,10.88888888888889,9.11111111111111],"texture":"#fur"}},"rotation":{"origin":[6.5,5,8.5],"axis":"x","angle":-22.5}},{"from":[7.5,4,10.5],"to":[8.5,9,11.5],"faces":{"west":{"uv":[5.777777777777778,11.555555555555555,6.222222222222222,13.777777777777779],"texture":"#fur"},"north":{"uv":[6.222222222222222,11.555555555555555,6.666666666666667,13.777777777777779],"texture":"#fur"},"east":{"uv":[6.666666666666667,11.555555555555555,7.111111111111111,13.777777777777779],"texture":"#fur"},"south":{"uv":[7.111111111111111,11.555555555555555,7.555555555555555,13.777777777777779],"texture":"#fur"},"up":{"uv":[6.222222222222222,11.11111111111111,6.666666666666667,11.555555555555555],"texture":"#fur"},"down":{"uv":[6.666666666666667,11.11111111111111,7.111111111111111,11.555555555555555],"texture":"#fur"}},"rotation":{"origin":[7.5,6.5,11.5],"axis":"x","angle":45}}]} +{"ambientocclusion":false,"textures":{"fur":"dunerealms:entity/jerboa","particle":"#fur"},"elements":[{"from":[5.5,12,5.5],"to":[10.5,16,10.5],"faces":{"west":{"uv":[4.888888888888889,6.222222222222222,7.111111111111111,8],"texture":"#fur"},"north":{"uv":[7.111111111111111,6.222222222222222,9.333333333333334,8],"texture":"#fur"},"east":{"uv":[9.333333333333334,6.222222222222222,11.555555555555555,8],"texture":"#fur"},"south":{"uv":[11.555555555555555,6.222222222222222,13.777777777777779,8],"texture":"#fur"},"up":{"uv":[7.111111111111111,4,9.333333333333334,6.222222222222222],"texture":"#fur"},"down":{"uv":[9.333333333333334,4,11.555555555555555,6.222222222222222],"texture":"#fur"}}},{"from":[6.5,12,3.5],"to":[9.5,14,5.5],"faces":{"west":{"uv":[11.11111111111111,0.8888888888888888,12,1.7777777777777777],"texture":"#fur"},"north":{"uv":[12,0.8888888888888888,13.333333333333334,1.7777777777777777],"texture":"#fur"},"east":{"uv":[13.333333333333334,0.8888888888888888,14.222222222222221,1.7777777777777777],"texture":"#fur"},"south":{"uv":[14.222222222222221,0.8888888888888888,15.555555555555555,1.7777777777777777],"texture":"#fur"},"up":{"uv":[12,0,13.333333333333334,0.8888888888888888],"texture":"#fur"},"down":{"uv":[13.333333333333334,0,14.666666666666666,0.8888888888888888],"texture":"#fur"}}},{"from":[10.5,13,8.5],"to":[11.5,15,9.5],"faces":{"west":{"uv":[5.333333333333333,0.4444444444444444,5.777777777777778,1.3333333333333333],"texture":"#fur"},"north":{"uv":[5.777777777777778,0.4444444444444444,6.222222222222222,1.3333333333333333],"texture":"#fur"},"east":{"uv":[6.222222222222222,0.4444444444444444,6.666666666666667,1.3333333333333333],"texture":"#fur"},"south":{"uv":[6.666666666666667,0.4444444444444444,7.111111111111111,1.3333333333333333],"texture":"#fur"},"up":{"uv":[5.777777777777778,0,6.222222222222222,0.4444444444444444],"texture":"#fur"},"down":{"uv":[6.222222222222222,0,6.666666666666667,0.4444444444444444],"texture":"#fur"}}},{"from":[4.5,13,8.5],"to":[5.5,15,9.5],"faces":{"west":{"uv":[0,0.4444444444444444,0.4444444444444444,1.3333333333333333],"texture":"#fur"},"north":{"uv":[0.4444444444444444,0.4444444444444444,0.8888888888888888,1.3333333333333333],"texture":"#fur"},"east":{"uv":[0.8888888888888888,0.4444444444444444,1.3333333333333333,1.3333333333333333],"texture":"#fur"},"south":{"uv":[1.3333333333333333,0.4444444444444444,1.7777777777777777,1.3333333333333333],"texture":"#fur"},"up":{"uv":[0.4444444444444444,0,0.8888888888888888,0.4444444444444444],"texture":"#fur"},"down":{"uv":[0.8888888888888888,0,1.3333333333333333,0.4444444444444444],"texture":"#fur"}}},{"from":[6,2,6],"to":[10,12,10],"faces":{"west":{"uv":[0,1.7777777777777777,1.7777777777777777,6.222222222222222],"texture":"#fur"},"north":{"uv":[1.7777777777777777,1.7777777777777777,3.5555555555555554,6.222222222222222],"texture":"#fur"},"east":{"uv":[3.5555555555555554,1.7777777777777777,5.333333333333333,6.222222222222222],"texture":"#fur"},"south":{"uv":[5.333333333333333,1.7777777777777777,7.111111111111111,6.222222222222222],"texture":"#fur"},"up":{"uv":[1.7777777777777777,0,3.5555555555555554,1.7777777777777777],"texture":"#fur"},"down":{"uv":[3.5555555555555554,0,5.333333333333333,1.7777777777777777],"texture":"#fur"}}},{"from":[9,6,6],"to":[11,11,8],"faces":{"west":{"uv":[0,9.777777777777779,0.8888888888888888,12],"texture":"#fur"},"north":{"uv":[0.8888888888888888,9.777777777777779,1.7777777777777777,12],"texture":"#fur"},"east":{"uv":[1.7777777777777777,9.777777777777779,2.6666666666666665,12],"texture":"#fur"},"south":{"uv":[2.6666666666666665,9.777777777777779,3.5555555555555554,12],"texture":"#fur"},"up":{"uv":[0.8888888888888888,8.88888888888889,1.7777777777777777,9.777777777777779],"texture":"#fur"},"down":{"uv":[1.7777777777777777,8.88888888888889,2.6666666666666665,9.777777777777779],"texture":"#fur"}},"rotation":{"origin":[8.5,8.5,7.5],"axis":"x","angle":-22.5}},{"from":[5,6,6],"to":[7,11,8],"faces":{"west":{"uv":[5.333333333333333,8.88888888888889,6.222222222222222,11.11111111111111],"texture":"#fur"},"north":{"uv":[6.222222222222222,8.88888888888889,7.111111111111111,11.11111111111111],"texture":"#fur"},"east":{"uv":[7.111111111111111,8.88888888888889,8,11.11111111111111],"texture":"#fur"},"south":{"uv":[8,8.88888888888889,8.88888888888889,11.11111111111111],"texture":"#fur"},"up":{"uv":[6.222222222222222,8,7.111111111111111,8.88888888888889],"texture":"#fur"},"down":{"uv":[7.111111111111111,8,8,8.88888888888889],"texture":"#fur"}},"rotation":{"origin":[5.5,8.5,7.5],"axis":"x","angle":22.5}},{"from":[9.5,1,7],"to":[10.5,5,9.5],"faces":{"west":{"uv":[2.2222222222222223,11.777777777777779,3.3333333333333335,13.555555555555555],"texture":"#fur"},"north":{"uv":[3.3333333333333335,11.777777777777779,3.7777777777777777,13.555555555555555],"texture":"#fur"},"east":{"uv":[3.7777777777777777,11.777777777777779,4.888888888888889,13.555555555555555],"texture":"#fur"},"south":{"uv":[4.888888888888889,11.777777777777779,5.333333333333333,13.555555555555555],"texture":"#fur"},"up":{"uv":[3.3333333333333335,10.666666666666666,3.7777777777777777,11.777777777777779],"texture":"#fur"},"down":{"uv":[3.7777777777777777,10.666666666666666,4.222222222222222,11.777777777777779],"texture":"#fur"}},"rotation":{"origin":[9.5,5,8.5],"axis":"x","angle":22.5}},{"from":[8.5,0,5],"to":[10.5,1,10],"faces":{"west":{"uv":[7.111111111111111,2.2222222222222223,9.333333333333334,2.6666666666666665],"texture":"#fur"},"north":{"uv":[9.333333333333334,2.2222222222222223,10.222222222222221,2.6666666666666665],"texture":"#fur"},"east":{"uv":[10.222222222222221,2.2222222222222223,12.444444444444445,2.6666666666666665],"texture":"#fur"},"south":{"uv":[12.444444444444445,2.2222222222222223,13.333333333333334,2.6666666666666665],"texture":"#fur"},"up":{"uv":[9.333333333333334,0,10.222222222222221,2.2222222222222223],"texture":"#fur"},"down":{"uv":[10.222222222222221,0,11.11111111111111,2.2222222222222223],"texture":"#fur"}},"rotation":{"origin":[9.5,5,8.5],"axis":"x","angle":22.5}},{"from":[5.5,0,5],"to":[7.5,1,10],"faces":{"west":{"uv":[0,8.444444444444445,2.2222222222222223,8.88888888888889],"texture":"#fur"},"north":{"uv":[2.2222222222222223,8.444444444444445,3.111111111111111,8.88888888888889],"texture":"#fur"},"east":{"uv":[3.111111111111111,8.444444444444445,5.333333333333333,8.88888888888889],"texture":"#fur"},"south":{"uv":[5.333333333333333,8.444444444444445,6.222222222222222,8.88888888888889],"texture":"#fur"},"up":{"uv":[2.2222222222222223,6.222222222222222,3.111111111111111,8.444444444444445],"texture":"#fur"},"down":{"uv":[3.111111111111111,6.222222222222222,4,8.444444444444445],"texture":"#fur"}},"rotation":{"origin":[6.5,5,8.5],"axis":"x","angle":-22.5}},{"from":[5.5,1,7],"to":[6.5,5,9.5],"faces":{"west":{"uv":[8.88888888888889,9.11111111111111,10,10.88888888888889],"texture":"#fur"},"north":{"uv":[10,9.11111111111111,10.444444444444445,10.88888888888889],"texture":"#fur"},"east":{"uv":[10.444444444444445,9.11111111111111,11.555555555555555,10.88888888888889],"texture":"#fur"},"south":{"uv":[11.555555555555555,9.11111111111111,12,10.88888888888889],"texture":"#fur"},"up":{"uv":[10,8,10.444444444444445,9.11111111111111],"texture":"#fur"},"down":{"uv":[10.444444444444445,8,10.88888888888889,9.11111111111111],"texture":"#fur"}},"rotation":{"origin":[6.5,5,8.5],"axis":"x","angle":-22.5}},{"from":[7.5,4,10.5],"to":[8.5,9,11.5],"faces":{"west":{"uv":[5.777777777777778,11.555555555555555,6.222222222222222,13.777777777777779],"texture":"#fur"},"north":{"uv":[6.222222222222222,11.555555555555555,6.666666666666667,13.777777777777779],"texture":"#fur"},"east":{"uv":[6.666666666666667,11.555555555555555,7.111111111111111,13.777777777777779],"texture":"#fur"},"south":{"uv":[7.111111111111111,11.555555555555555,7.555555555555555,13.777777777777779],"texture":"#fur"},"up":{"uv":[6.222222222222222,11.11111111111111,6.666666666666667,11.555555555555555],"texture":"#fur"},"down":{"uv":[6.666666666666667,11.11111111111111,7.111111111111111,11.555555555555555],"texture":"#fur"}},"rotation":{"origin":[7.5,6.5,11.5],"axis":"x","angle":45}}]} diff --git a/DuneRealmsGUI/ecology/models/jerboa_walk_right.json b/DuneRealmsGUI/ecology/models/jerboa_walk_right.json index 67d28424..46a50fc1 100644 --- a/DuneRealmsGUI/ecology/models/jerboa_walk_right.json +++ b/DuneRealmsGUI/ecology/models/jerboa_walk_right.json @@ -1 +1 @@ -{"ambientocclusion":false,"textures":{"fur":"dunerealms:entity/jerboa"},"elements":[{"from":[5.5,12,5.5],"to":[10.5,16,10.5],"faces":{"west":{"uv":[4.888888888888889,6.222222222222222,7.111111111111111,8],"texture":"#fur"},"north":{"uv":[7.111111111111111,6.222222222222222,9.333333333333334,8],"texture":"#fur"},"east":{"uv":[9.333333333333334,6.222222222222222,11.555555555555555,8],"texture":"#fur"},"south":{"uv":[11.555555555555555,6.222222222222222,13.777777777777779,8],"texture":"#fur"},"up":{"uv":[7.111111111111111,4,9.333333333333334,6.222222222222222],"texture":"#fur"},"down":{"uv":[9.333333333333334,4,11.555555555555555,6.222222222222222],"texture":"#fur"}}},{"from":[6.5,12,3.5],"to":[9.5,14,5.5],"faces":{"west":{"uv":[11.11111111111111,0.8888888888888888,12,1.7777777777777777],"texture":"#fur"},"north":{"uv":[12,0.8888888888888888,13.333333333333334,1.7777777777777777],"texture":"#fur"},"east":{"uv":[13.333333333333334,0.8888888888888888,14.222222222222221,1.7777777777777777],"texture":"#fur"},"south":{"uv":[14.222222222222221,0.8888888888888888,15.555555555555555,1.7777777777777777],"texture":"#fur"},"up":{"uv":[12,0,13.333333333333334,0.8888888888888888],"texture":"#fur"},"down":{"uv":[13.333333333333334,0,14.666666666666666,0.8888888888888888],"texture":"#fur"}}},{"from":[10.5,13,8.5],"to":[11.5,15,9.5],"faces":{"west":{"uv":[5.333333333333333,0.4444444444444444,5.777777777777778,1.3333333333333333],"texture":"#fur"},"north":{"uv":[5.777777777777778,0.4444444444444444,6.222222222222222,1.3333333333333333],"texture":"#fur"},"east":{"uv":[6.222222222222222,0.4444444444444444,6.666666666666667,1.3333333333333333],"texture":"#fur"},"south":{"uv":[6.666666666666667,0.4444444444444444,7.111111111111111,1.3333333333333333],"texture":"#fur"},"up":{"uv":[5.777777777777778,0,6.222222222222222,0.4444444444444444],"texture":"#fur"},"down":{"uv":[6.222222222222222,0,6.666666666666667,0.4444444444444444],"texture":"#fur"}}},{"from":[4.5,13,8.5],"to":[5.5,15,9.5],"faces":{"west":{"uv":[0,0.4444444444444444,0.4444444444444444,1.3333333333333333],"texture":"#fur"},"north":{"uv":[0.4444444444444444,0.4444444444444444,0.8888888888888888,1.3333333333333333],"texture":"#fur"},"east":{"uv":[0.8888888888888888,0.4444444444444444,1.3333333333333333,1.3333333333333333],"texture":"#fur"},"south":{"uv":[1.3333333333333333,0.4444444444444444,1.7777777777777777,1.3333333333333333],"texture":"#fur"},"up":{"uv":[0.4444444444444444,0,0.8888888888888888,0.4444444444444444],"texture":"#fur"},"down":{"uv":[0.8888888888888888,0,1.3333333333333333,0.4444444444444444],"texture":"#fur"}}},{"from":[6,2,6],"to":[10,12,10],"faces":{"west":{"uv":[0,1.7777777777777777,1.7777777777777777,6.222222222222222],"texture":"#fur"},"north":{"uv":[1.7777777777777777,1.7777777777777777,3.5555555555555554,6.222222222222222],"texture":"#fur"},"east":{"uv":[3.5555555555555554,1.7777777777777777,5.333333333333333,6.222222222222222],"texture":"#fur"},"south":{"uv":[5.333333333333333,1.7777777777777777,7.111111111111111,6.222222222222222],"texture":"#fur"},"up":{"uv":[1.7777777777777777,0,3.5555555555555554,1.7777777777777777],"texture":"#fur"},"down":{"uv":[3.5555555555555554,0,5.333333333333333,1.7777777777777777],"texture":"#fur"}}},{"from":[9,6,6],"to":[11,11,8],"faces":{"west":{"uv":[0,9.777777777777779,0.8888888888888888,12],"texture":"#fur"},"north":{"uv":[0.8888888888888888,9.777777777777779,1.7777777777777777,12],"texture":"#fur"},"east":{"uv":[1.7777777777777777,9.777777777777779,2.6666666666666665,12],"texture":"#fur"},"south":{"uv":[2.6666666666666665,9.777777777777779,3.5555555555555554,12],"texture":"#fur"},"up":{"uv":[0.8888888888888888,8.88888888888889,1.7777777777777777,9.777777777777779],"texture":"#fur"},"down":{"uv":[1.7777777777777777,8.88888888888889,2.6666666666666665,9.777777777777779],"texture":"#fur"}},"rotation":{"origin":[8.5,8.5,7.5],"axis":"x","angle":22.5}},{"from":[5,6,6],"to":[7,11,8],"faces":{"west":{"uv":[5.333333333333333,8.88888888888889,6.222222222222222,11.11111111111111],"texture":"#fur"},"north":{"uv":[6.222222222222222,8.88888888888889,7.111111111111111,11.11111111111111],"texture":"#fur"},"east":{"uv":[7.111111111111111,8.88888888888889,8,11.11111111111111],"texture":"#fur"},"south":{"uv":[8,8.88888888888889,8.88888888888889,11.11111111111111],"texture":"#fur"},"up":{"uv":[6.222222222222222,8,7.111111111111111,8.88888888888889],"texture":"#fur"},"down":{"uv":[7.111111111111111,8,8,8.88888888888889],"texture":"#fur"}},"rotation":{"origin":[5.5,8.5,7.5],"axis":"x","angle":-22.5}},{"from":[9.5,1,7],"to":[10.5,5,9.5],"faces":{"west":{"uv":[2.2222222222222223,11.777777777777779,3.3333333333333335,13.555555555555555],"texture":"#fur"},"north":{"uv":[3.3333333333333335,11.777777777777779,3.7777777777777777,13.555555555555555],"texture":"#fur"},"east":{"uv":[3.7777777777777777,11.777777777777779,4.888888888888889,13.555555555555555],"texture":"#fur"},"south":{"uv":[4.888888888888889,11.777777777777779,5.333333333333333,13.555555555555555],"texture":"#fur"},"up":{"uv":[3.3333333333333335,10.666666666666666,3.7777777777777777,11.777777777777779],"texture":"#fur"},"down":{"uv":[3.7777777777777777,10.666666666666666,4.222222222222222,11.777777777777779],"texture":"#fur"}},"rotation":{"origin":[9.5,5,8.5],"axis":"x","angle":-22.5}},{"from":[8.5,0,5],"to":[10.5,1,10],"faces":{"west":{"uv":[7.111111111111111,2.2222222222222223,9.333333333333334,2.6666666666666665],"texture":"#fur"},"north":{"uv":[9.333333333333334,2.2222222222222223,10.222222222222221,2.6666666666666665],"texture":"#fur"},"east":{"uv":[10.222222222222221,2.2222222222222223,12.444444444444445,2.6666666666666665],"texture":"#fur"},"south":{"uv":[12.444444444444445,2.2222222222222223,13.333333333333334,2.6666666666666665],"texture":"#fur"},"up":{"uv":[9.333333333333334,0,10.222222222222221,2.2222222222222223],"texture":"#fur"},"down":{"uv":[10.222222222222221,0,11.11111111111111,2.2222222222222223],"texture":"#fur"}},"rotation":{"origin":[9.5,5,8.5],"axis":"x","angle":-22.5}},{"from":[5.5,0,5],"to":[7.5,1,10],"faces":{"west":{"uv":[0,8.444444444444445,2.2222222222222223,8.88888888888889],"texture":"#fur"},"north":{"uv":[2.2222222222222223,8.444444444444445,3.111111111111111,8.88888888888889],"texture":"#fur"},"east":{"uv":[3.111111111111111,8.444444444444445,5.333333333333333,8.88888888888889],"texture":"#fur"},"south":{"uv":[5.333333333333333,8.444444444444445,6.222222222222222,8.88888888888889],"texture":"#fur"},"up":{"uv":[2.2222222222222223,6.222222222222222,3.111111111111111,8.444444444444445],"texture":"#fur"},"down":{"uv":[3.111111111111111,6.222222222222222,4,8.444444444444445],"texture":"#fur"}},"rotation":{"origin":[6.5,5,8.5],"axis":"x","angle":22.5}},{"from":[5.5,1,7],"to":[6.5,5,9.5],"faces":{"west":{"uv":[8.88888888888889,9.11111111111111,10,10.88888888888889],"texture":"#fur"},"north":{"uv":[10,9.11111111111111,10.444444444444445,10.88888888888889],"texture":"#fur"},"east":{"uv":[10.444444444444445,9.11111111111111,11.555555555555555,10.88888888888889],"texture":"#fur"},"south":{"uv":[11.555555555555555,9.11111111111111,12,10.88888888888889],"texture":"#fur"},"up":{"uv":[10,8,10.444444444444445,9.11111111111111],"texture":"#fur"},"down":{"uv":[10.444444444444445,8,10.88888888888889,9.11111111111111],"texture":"#fur"}},"rotation":{"origin":[6.5,5,8.5],"axis":"x","angle":22.5}},{"from":[7.5,4,10.5],"to":[8.5,9,11.5],"faces":{"west":{"uv":[5.777777777777778,11.555555555555555,6.222222222222222,13.777777777777779],"texture":"#fur"},"north":{"uv":[6.222222222222222,11.555555555555555,6.666666666666667,13.777777777777779],"texture":"#fur"},"east":{"uv":[6.666666666666667,11.555555555555555,7.111111111111111,13.777777777777779],"texture":"#fur"},"south":{"uv":[7.111111111111111,11.555555555555555,7.555555555555555,13.777777777777779],"texture":"#fur"},"up":{"uv":[6.222222222222222,11.11111111111111,6.666666666666667,11.555555555555555],"texture":"#fur"},"down":{"uv":[6.666666666666667,11.11111111111111,7.111111111111111,11.555555555555555],"texture":"#fur"}},"rotation":{"origin":[7.5,6.5,11.5],"axis":"x","angle":45}}]} +{"ambientocclusion":false,"textures":{"fur":"dunerealms:entity/jerboa","particle":"#fur"},"elements":[{"from":[5.5,12,5.5],"to":[10.5,16,10.5],"faces":{"west":{"uv":[4.888888888888889,6.222222222222222,7.111111111111111,8],"texture":"#fur"},"north":{"uv":[7.111111111111111,6.222222222222222,9.333333333333334,8],"texture":"#fur"},"east":{"uv":[9.333333333333334,6.222222222222222,11.555555555555555,8],"texture":"#fur"},"south":{"uv":[11.555555555555555,6.222222222222222,13.777777777777779,8],"texture":"#fur"},"up":{"uv":[7.111111111111111,4,9.333333333333334,6.222222222222222],"texture":"#fur"},"down":{"uv":[9.333333333333334,4,11.555555555555555,6.222222222222222],"texture":"#fur"}}},{"from":[6.5,12,3.5],"to":[9.5,14,5.5],"faces":{"west":{"uv":[11.11111111111111,0.8888888888888888,12,1.7777777777777777],"texture":"#fur"},"north":{"uv":[12,0.8888888888888888,13.333333333333334,1.7777777777777777],"texture":"#fur"},"east":{"uv":[13.333333333333334,0.8888888888888888,14.222222222222221,1.7777777777777777],"texture":"#fur"},"south":{"uv":[14.222222222222221,0.8888888888888888,15.555555555555555,1.7777777777777777],"texture":"#fur"},"up":{"uv":[12,0,13.333333333333334,0.8888888888888888],"texture":"#fur"},"down":{"uv":[13.333333333333334,0,14.666666666666666,0.8888888888888888],"texture":"#fur"}}},{"from":[10.5,13,8.5],"to":[11.5,15,9.5],"faces":{"west":{"uv":[5.333333333333333,0.4444444444444444,5.777777777777778,1.3333333333333333],"texture":"#fur"},"north":{"uv":[5.777777777777778,0.4444444444444444,6.222222222222222,1.3333333333333333],"texture":"#fur"},"east":{"uv":[6.222222222222222,0.4444444444444444,6.666666666666667,1.3333333333333333],"texture":"#fur"},"south":{"uv":[6.666666666666667,0.4444444444444444,7.111111111111111,1.3333333333333333],"texture":"#fur"},"up":{"uv":[5.777777777777778,0,6.222222222222222,0.4444444444444444],"texture":"#fur"},"down":{"uv":[6.222222222222222,0,6.666666666666667,0.4444444444444444],"texture":"#fur"}}},{"from":[4.5,13,8.5],"to":[5.5,15,9.5],"faces":{"west":{"uv":[0,0.4444444444444444,0.4444444444444444,1.3333333333333333],"texture":"#fur"},"north":{"uv":[0.4444444444444444,0.4444444444444444,0.8888888888888888,1.3333333333333333],"texture":"#fur"},"east":{"uv":[0.8888888888888888,0.4444444444444444,1.3333333333333333,1.3333333333333333],"texture":"#fur"},"south":{"uv":[1.3333333333333333,0.4444444444444444,1.7777777777777777,1.3333333333333333],"texture":"#fur"},"up":{"uv":[0.4444444444444444,0,0.8888888888888888,0.4444444444444444],"texture":"#fur"},"down":{"uv":[0.8888888888888888,0,1.3333333333333333,0.4444444444444444],"texture":"#fur"}}},{"from":[6,2,6],"to":[10,12,10],"faces":{"west":{"uv":[0,1.7777777777777777,1.7777777777777777,6.222222222222222],"texture":"#fur"},"north":{"uv":[1.7777777777777777,1.7777777777777777,3.5555555555555554,6.222222222222222],"texture":"#fur"},"east":{"uv":[3.5555555555555554,1.7777777777777777,5.333333333333333,6.222222222222222],"texture":"#fur"},"south":{"uv":[5.333333333333333,1.7777777777777777,7.111111111111111,6.222222222222222],"texture":"#fur"},"up":{"uv":[1.7777777777777777,0,3.5555555555555554,1.7777777777777777],"texture":"#fur"},"down":{"uv":[3.5555555555555554,0,5.333333333333333,1.7777777777777777],"texture":"#fur"}}},{"from":[9,6,6],"to":[11,11,8],"faces":{"west":{"uv":[0,9.777777777777779,0.8888888888888888,12],"texture":"#fur"},"north":{"uv":[0.8888888888888888,9.777777777777779,1.7777777777777777,12],"texture":"#fur"},"east":{"uv":[1.7777777777777777,9.777777777777779,2.6666666666666665,12],"texture":"#fur"},"south":{"uv":[2.6666666666666665,9.777777777777779,3.5555555555555554,12],"texture":"#fur"},"up":{"uv":[0.8888888888888888,8.88888888888889,1.7777777777777777,9.777777777777779],"texture":"#fur"},"down":{"uv":[1.7777777777777777,8.88888888888889,2.6666666666666665,9.777777777777779],"texture":"#fur"}},"rotation":{"origin":[8.5,8.5,7.5],"axis":"x","angle":22.5}},{"from":[5,6,6],"to":[7,11,8],"faces":{"west":{"uv":[5.333333333333333,8.88888888888889,6.222222222222222,11.11111111111111],"texture":"#fur"},"north":{"uv":[6.222222222222222,8.88888888888889,7.111111111111111,11.11111111111111],"texture":"#fur"},"east":{"uv":[7.111111111111111,8.88888888888889,8,11.11111111111111],"texture":"#fur"},"south":{"uv":[8,8.88888888888889,8.88888888888889,11.11111111111111],"texture":"#fur"},"up":{"uv":[6.222222222222222,8,7.111111111111111,8.88888888888889],"texture":"#fur"},"down":{"uv":[7.111111111111111,8,8,8.88888888888889],"texture":"#fur"}},"rotation":{"origin":[5.5,8.5,7.5],"axis":"x","angle":-22.5}},{"from":[9.5,1,7],"to":[10.5,5,9.5],"faces":{"west":{"uv":[2.2222222222222223,11.777777777777779,3.3333333333333335,13.555555555555555],"texture":"#fur"},"north":{"uv":[3.3333333333333335,11.777777777777779,3.7777777777777777,13.555555555555555],"texture":"#fur"},"east":{"uv":[3.7777777777777777,11.777777777777779,4.888888888888889,13.555555555555555],"texture":"#fur"},"south":{"uv":[4.888888888888889,11.777777777777779,5.333333333333333,13.555555555555555],"texture":"#fur"},"up":{"uv":[3.3333333333333335,10.666666666666666,3.7777777777777777,11.777777777777779],"texture":"#fur"},"down":{"uv":[3.7777777777777777,10.666666666666666,4.222222222222222,11.777777777777779],"texture":"#fur"}},"rotation":{"origin":[9.5,5,8.5],"axis":"x","angle":-22.5}},{"from":[8.5,0,5],"to":[10.5,1,10],"faces":{"west":{"uv":[7.111111111111111,2.2222222222222223,9.333333333333334,2.6666666666666665],"texture":"#fur"},"north":{"uv":[9.333333333333334,2.2222222222222223,10.222222222222221,2.6666666666666665],"texture":"#fur"},"east":{"uv":[10.222222222222221,2.2222222222222223,12.444444444444445,2.6666666666666665],"texture":"#fur"},"south":{"uv":[12.444444444444445,2.2222222222222223,13.333333333333334,2.6666666666666665],"texture":"#fur"},"up":{"uv":[9.333333333333334,0,10.222222222222221,2.2222222222222223],"texture":"#fur"},"down":{"uv":[10.222222222222221,0,11.11111111111111,2.2222222222222223],"texture":"#fur"}},"rotation":{"origin":[9.5,5,8.5],"axis":"x","angle":-22.5}},{"from":[5.5,0,5],"to":[7.5,1,10],"faces":{"west":{"uv":[0,8.444444444444445,2.2222222222222223,8.88888888888889],"texture":"#fur"},"north":{"uv":[2.2222222222222223,8.444444444444445,3.111111111111111,8.88888888888889],"texture":"#fur"},"east":{"uv":[3.111111111111111,8.444444444444445,5.333333333333333,8.88888888888889],"texture":"#fur"},"south":{"uv":[5.333333333333333,8.444444444444445,6.222222222222222,8.88888888888889],"texture":"#fur"},"up":{"uv":[2.2222222222222223,6.222222222222222,3.111111111111111,8.444444444444445],"texture":"#fur"},"down":{"uv":[3.111111111111111,6.222222222222222,4,8.444444444444445],"texture":"#fur"}},"rotation":{"origin":[6.5,5,8.5],"axis":"x","angle":22.5}},{"from":[5.5,1,7],"to":[6.5,5,9.5],"faces":{"west":{"uv":[8.88888888888889,9.11111111111111,10,10.88888888888889],"texture":"#fur"},"north":{"uv":[10,9.11111111111111,10.444444444444445,10.88888888888889],"texture":"#fur"},"east":{"uv":[10.444444444444445,9.11111111111111,11.555555555555555,10.88888888888889],"texture":"#fur"},"south":{"uv":[11.555555555555555,9.11111111111111,12,10.88888888888889],"texture":"#fur"},"up":{"uv":[10,8,10.444444444444445,9.11111111111111],"texture":"#fur"},"down":{"uv":[10.444444444444445,8,10.88888888888889,9.11111111111111],"texture":"#fur"}},"rotation":{"origin":[6.5,5,8.5],"axis":"x","angle":22.5}},{"from":[7.5,4,10.5],"to":[8.5,9,11.5],"faces":{"west":{"uv":[5.777777777777778,11.555555555555555,6.222222222222222,13.777777777777779],"texture":"#fur"},"north":{"uv":[6.222222222222222,11.555555555555555,6.666666666666667,13.777777777777779],"texture":"#fur"},"east":{"uv":[6.666666666666667,11.555555555555555,7.111111111111111,13.777777777777779],"texture":"#fur"},"south":{"uv":[7.111111111111111,11.555555555555555,7.555555555555555,13.777777777777779],"texture":"#fur"},"up":{"uv":[6.222222222222222,11.11111111111111,6.666666666666667,11.555555555555555],"texture":"#fur"},"down":{"uv":[6.666666666666667,11.11111111111111,7.111111111111111,11.555555555555555],"texture":"#fur"}},"rotation":{"origin":[7.5,6.5,11.5],"axis":"x","angle":45}}]} diff --git a/DuneRealmsGUI/ecology/models/tiny_worm.json b/DuneRealmsGUI/ecology/models/tiny_worm.json index 89fc43b9..c5dd295e 100644 --- a/DuneRealmsGUI/ecology/models/tiny_worm.json +++ b/DuneRealmsGUI/ecology/models/tiny_worm.json @@ -1 +1 @@ -{"ambientocclusion":false,"textures":{"body":"minecraft:block/terracotta","ridge":"minecraft:block/brown_terracotta","mouth":"minecraft:block/black_concrete","throat":"minecraft:block/orange_terracotta","tooth":"minecraft:block/bone_block_side"},"elements":[{"from":[4.5,2,4],"to":[11.5,9,7.2],"faces":{"north":{"texture":"#body","uv":[0,0,16,16]},"south":{"texture":"#body","uv":[0,0,16,16]},"east":{"texture":"#body","uv":[0,0,16,16]},"west":{"texture":"#body","uv":[0,0,16,16]},"up":{"texture":"#body","uv":[0,0,16,16]},"down":{"texture":"#body","uv":[0,0,16,16]}}},{"from":[4.775,2.08,7.2],"to":[11.225,8.45,10.4],"faces":{"north":{"texture":"#ridge","uv":[0,0,16,16]},"south":{"texture":"#ridge","uv":[0,0,16,16]},"east":{"texture":"#ridge","uv":[0,0,16,16]},"west":{"texture":"#ridge","uv":[0,0,16,16]},"up":{"texture":"#ridge","uv":[0,0,16,16]},"down":{"texture":"#ridge","uv":[0,0,16,16]}}},{"from":[5.05,2.16,10.4],"to":[10.95,7.9,13.600000000000001],"faces":{"north":{"texture":"#body","uv":[0,0,16,16]},"south":{"texture":"#body","uv":[0,0,16,16]},"east":{"texture":"#body","uv":[0,0,16,16]},"west":{"texture":"#body","uv":[0,0,16,16]},"up":{"texture":"#body","uv":[0,0,16,16]},"down":{"texture":"#body","uv":[0,0,16,16]}}},{"from":[5.325,2.24,13.600000000000001],"to":[10.675,7.35,16.8],"faces":{"north":{"texture":"#ridge","uv":[0,0,16,16]},"south":{"texture":"#ridge","uv":[0,0,16,16]},"east":{"texture":"#ridge","uv":[0,0,16,16]},"west":{"texture":"#ridge","uv":[0,0,16,16]},"up":{"texture":"#ridge","uv":[0,0,16,16]},"down":{"texture":"#ridge","uv":[0,0,16,16]}}},{"from":[5.6,2.32,16.8],"to":[10.4,6.8,20],"faces":{"north":{"texture":"#body","uv":[0,0,16,16]},"south":{"texture":"#body","uv":[0,0,16,16]},"east":{"texture":"#body","uv":[0,0,16,16]},"west":{"texture":"#body","uv":[0,0,16,16]},"up":{"texture":"#body","uv":[0,0,16,16]},"down":{"texture":"#body","uv":[0,0,16,16]}}},{"from":[5.875,2.4,20],"to":[10.125,6.25,23.2],"faces":{"north":{"texture":"#ridge","uv":[0,0,16,16]},"south":{"texture":"#ridge","uv":[0,0,16,16]},"east":{"texture":"#ridge","uv":[0,0,16,16]},"west":{"texture":"#ridge","uv":[0,0,16,16]},"up":{"texture":"#ridge","uv":[0,0,16,16]},"down":{"texture":"#ridge","uv":[0,0,16,16]}}},{"from":[6.15,2.48,23.200000000000003],"to":[9.85,5.699999999999999,26.400000000000002],"faces":{"north":{"texture":"#body","uv":[0,0,16,16]},"south":{"texture":"#body","uv":[0,0,16,16]},"east":{"texture":"#body","uv":[0,0,16,16]},"west":{"texture":"#body","uv":[0,0,16,16]},"up":{"texture":"#body","uv":[0,0,16,16]},"down":{"texture":"#body","uv":[0,0,16,16]}}},{"from":[3,2,0],"to":[13,11,4],"faces":{"north":{"texture":"#body","uv":[0,0,16,16]},"south":{"texture":"#body","uv":[0,0,16,16]},"east":{"texture":"#body","uv":[0,0,16,16]},"west":{"texture":"#body","uv":[0,0,16,16]},"up":{"texture":"#body","uv":[0,0,16,16]},"down":{"texture":"#body","uv":[0,0,16,16]}}},{"from":[4,3,-0.1],"to":[12,10,0.1],"faces":{"north":{"texture":"#mouth","uv":[0,0,16,16]},"south":{"texture":"#mouth","uv":[0,0,16,16]},"east":{"texture":"#mouth","uv":[0,0,16,16]},"west":{"texture":"#mouth","uv":[0,0,16,16]},"up":{"texture":"#mouth","uv":[0,0,16,16]},"down":{"texture":"#mouth","uv":[0,0,16,16]}}},{"from":[6,5,-0.2],"to":[10,8,0],"faces":{"north":{"texture":"#throat","uv":[0,0,16,16]},"south":{"texture":"#throat","uv":[0,0,16,16]},"east":{"texture":"#throat","uv":[0,0,16,16]},"west":{"texture":"#throat","uv":[0,0,16,16]},"up":{"texture":"#throat","uv":[0,0,16,16]},"down":{"texture":"#throat","uv":[0,0,16,16]}}},{"from":[4.5,3,-0.4],"to":[5.3,4.5,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[4.5,8.5,-0.4],"to":[5.3,10,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[6.3,3,-0.4],"to":[7.1,4.5,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[6.3,8.5,-0.4],"to":[7.1,10,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[8.1,3,-0.4],"to":[8.9,4.5,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[8.1,8.5,-0.4],"to":[8.9,10,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[9.9,3,-0.4],"to":[10.7,4.5,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[9.9,8.5,-0.4],"to":[10.7,10,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}}]} +{"ambientocclusion":false,"textures":{"body":"minecraft:block/terracotta","ridge":"minecraft:block/brown_terracotta","mouth":"minecraft:block/black_concrete","throat":"minecraft:block/orange_terracotta","tooth":"minecraft:block/bone_block_side","particle":"#body"},"elements":[{"from":[4.5,2,4],"to":[11.5,9,7.2],"faces":{"north":{"texture":"#body","uv":[0,0,16,16]},"south":{"texture":"#body","uv":[0,0,16,16]},"east":{"texture":"#body","uv":[0,0,16,16]},"west":{"texture":"#body","uv":[0,0,16,16]},"up":{"texture":"#body","uv":[0,0,16,16]},"down":{"texture":"#body","uv":[0,0,16,16]}}},{"from":[4.775,2.08,7.2],"to":[11.225,8.45,10.4],"faces":{"north":{"texture":"#ridge","uv":[0,0,16,16]},"south":{"texture":"#ridge","uv":[0,0,16,16]},"east":{"texture":"#ridge","uv":[0,0,16,16]},"west":{"texture":"#ridge","uv":[0,0,16,16]},"up":{"texture":"#ridge","uv":[0,0,16,16]},"down":{"texture":"#ridge","uv":[0,0,16,16]}}},{"from":[5.05,2.16,10.4],"to":[10.95,7.9,13.600000000000001],"faces":{"north":{"texture":"#body","uv":[0,0,16,16]},"south":{"texture":"#body","uv":[0,0,16,16]},"east":{"texture":"#body","uv":[0,0,16,16]},"west":{"texture":"#body","uv":[0,0,16,16]},"up":{"texture":"#body","uv":[0,0,16,16]},"down":{"texture":"#body","uv":[0,0,16,16]}}},{"from":[5.325,2.24,13.600000000000001],"to":[10.675,7.35,16.8],"faces":{"north":{"texture":"#ridge","uv":[0,0,16,16]},"south":{"texture":"#ridge","uv":[0,0,16,16]},"east":{"texture":"#ridge","uv":[0,0,16,16]},"west":{"texture":"#ridge","uv":[0,0,16,16]},"up":{"texture":"#ridge","uv":[0,0,16,16]},"down":{"texture":"#ridge","uv":[0,0,16,16]}}},{"from":[5.6,2.32,16.8],"to":[10.4,6.8,20],"faces":{"north":{"texture":"#body","uv":[0,0,16,16]},"south":{"texture":"#body","uv":[0,0,16,16]},"east":{"texture":"#body","uv":[0,0,16,16]},"west":{"texture":"#body","uv":[0,0,16,16]},"up":{"texture":"#body","uv":[0,0,16,16]},"down":{"texture":"#body","uv":[0,0,16,16]}}},{"from":[5.875,2.4,20],"to":[10.125,6.25,23.2],"faces":{"north":{"texture":"#ridge","uv":[0,0,16,16]},"south":{"texture":"#ridge","uv":[0,0,16,16]},"east":{"texture":"#ridge","uv":[0,0,16,16]},"west":{"texture":"#ridge","uv":[0,0,16,16]},"up":{"texture":"#ridge","uv":[0,0,16,16]},"down":{"texture":"#ridge","uv":[0,0,16,16]}}},{"from":[6.15,2.48,23.200000000000003],"to":[9.85,5.699999999999999,26.400000000000002],"faces":{"north":{"texture":"#body","uv":[0,0,16,16]},"south":{"texture":"#body","uv":[0,0,16,16]},"east":{"texture":"#body","uv":[0,0,16,16]},"west":{"texture":"#body","uv":[0,0,16,16]},"up":{"texture":"#body","uv":[0,0,16,16]},"down":{"texture":"#body","uv":[0,0,16,16]}}},{"from":[3,2,0],"to":[13,11,4],"faces":{"north":{"texture":"#body","uv":[0,0,16,16]},"south":{"texture":"#body","uv":[0,0,16,16]},"east":{"texture":"#body","uv":[0,0,16,16]},"west":{"texture":"#body","uv":[0,0,16,16]},"up":{"texture":"#body","uv":[0,0,16,16]},"down":{"texture":"#body","uv":[0,0,16,16]}}},{"from":[4,3,-0.1],"to":[12,10,0.1],"faces":{"north":{"texture":"#mouth","uv":[0,0,16,16]},"south":{"texture":"#mouth","uv":[0,0,16,16]},"east":{"texture":"#mouth","uv":[0,0,16,16]},"west":{"texture":"#mouth","uv":[0,0,16,16]},"up":{"texture":"#mouth","uv":[0,0,16,16]},"down":{"texture":"#mouth","uv":[0,0,16,16]}}},{"from":[6,5,-0.2],"to":[10,8,0],"faces":{"north":{"texture":"#throat","uv":[0,0,16,16]},"south":{"texture":"#throat","uv":[0,0,16,16]},"east":{"texture":"#throat","uv":[0,0,16,16]},"west":{"texture":"#throat","uv":[0,0,16,16]},"up":{"texture":"#throat","uv":[0,0,16,16]},"down":{"texture":"#throat","uv":[0,0,16,16]}}},{"from":[4.5,3,-0.4],"to":[5.3,4.5,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[4.5,8.5,-0.4],"to":[5.3,10,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[6.3,3,-0.4],"to":[7.1,4.5,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[6.3,8.5,-0.4],"to":[7.1,10,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[8.1,3,-0.4],"to":[8.9,4.5,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[8.1,8.5,-0.4],"to":[8.9,10,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[9.9,3,-0.4],"to":[10.7,4.5,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}},{"from":[9.9,8.5,-0.4],"to":[10.7,10,0.1],"faces":{"north":{"texture":"#tooth","uv":[0,0,16,16]},"south":{"texture":"#tooth","uv":[0,0,16,16]},"east":{"texture":"#tooth","uv":[0,0,16,16]},"west":{"texture":"#tooth","uv":[0,0,16,16]},"up":{"texture":"#tooth","uv":[0,0,16,16]},"down":{"texture":"#tooth","uv":[0,0,16,16]}}}]} diff --git a/DuneRealmsGUI/network-artwork.json b/DuneRealmsGUI/network-artwork.json index 5c3b6474..91181b12 100644 --- a/DuneRealmsGUI/network-artwork.json +++ b/DuneRealmsGUI/network-artwork.json @@ -1,18 +1,29 @@ { - "version": 2, - "url": "https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v2.zip", - "sha1": "c87a26957d9a23f73a88a5ff727ca4a28a8e8c06", - "sha256": "fb837e7ee3a5afdda60fd8c73d817255c286adef0886f85312ba1ce1fb58a711", - "delivery": "Lobby only; native MCGUI renderer remains a separate lobby layer", - "sources": [ - "DuneRealms-GUI-Houses-1.21.8-v8.zip", - "DuneRealms-Ecology-Items-v2.zip", - "DuneRealms-Arrakis-Creatures-v3.zip", - "DuneRealms-Materials-guild-v2.zip (sand textures and credits only)" - ], - "builder": "tools/build-network-artwork-pack.py", + "version": 4, + "delivery": "World and lobby use scope-specific network artwork under one stable ID; separate planet material layer.", + "packId": "a7b5ab7d-d8d8-5b51-b016-71a5f4c00008", + "world": { + "filename": "DuneRealms-Network-Artwork-v4.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v4.zip", + "sha1": "ec3848da559768e5ac3aeec631f10035ac44c055", + "sha256": "bee9f66ab9356450594da308124db3ee921566c44cb190c4246e522be7dd2e81", + "bytes": 29918832, + "entries": 800 + }, + "lobby": { + "filename": "DuneRealms-Network-Artwork-Lobby-v4.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-Lobby-v4.zip", + "sha1": "c0c2e36a438242b253cdaaeeec36529210cf4220", + "sha256": "6150c394a79a54c85686a55140ae18ae64f7d881c04242be4bb786cf3985fbb4", + "bytes": 30016942, + "entries": 830 + }, + "baselineNetworkSha256": "15dfd24bbb1760e04a1df1e0556c15b759353be705fbf2bcc9b377704abcf560", + "builder": "tools/build-resourcepack-repair.py", + "manifest": "DuneRealmsGUI/resourcepack-repair/manifest.json", "creatureCarriers": { - "jerboa": "GOLD rabbit", - "wormPet": "SNOWY wolf" + "jerboa": "GOLD rabbit (legacy lobby only)", + "wormPet": "SNOWY wolf (legacy lobby only)", + "arrakis": "Native item-display geometry, unchanged" } } diff --git a/DuneRealmsGUI/resourcepack-repair/README.md b/DuneRealmsGUI/resourcepack-repair/README.md new file mode 100644 index 00000000..a63216a0 --- /dev/null +++ b/DuneRealmsGUI/resourcepack-repair/README.md @@ -0,0 +1,69 @@ +# Java 26.3 artwork and planet-layer repair + +This release corrects delivery and render references, not game mechanics. +Java 26.3 uses resource-pack format 97.1. The published network v3 and +materials v2 / Arrakis v4 archives advertised a maximum of 97.0. In addition, +the GUI plugin offered the network artwork exclusively in the Guild lobby; +planet material packs use a distinct UUID and do not contain equipment models. +Arrakis v4 includes the original jerboa PNG and item-display geometry, but the +entity sprite is not in either vanilla model atlas and the models omit particle +references. + +The repair builds two immutable network packs from the exact, SHA-256-pinned +v3 archive. The world pack retains the existing custom namespace, item models, +spice carrier, fonts, and GUI artwork; lobby-only sand and vanilla entity +overrides are excluded. The lobby variant preserves every v3 asset as-is. +Every material pack retains its existing block/item pixels. Arrakis v5 only +adds the sprite to both model atlases, fixes particle aliases, and corrects +metadata; all five fauna models retain their exact element geometry, face UVs +and original jerboa PNG. No equipment definitions are repainted. + +## Rebuild and test + +Download the two immutable input archives from the existing public downloads: +`DuneRealms-Network-Artwork-v3.zip` and +`DuneRealms-Materials-arrakis-v4.zip`. The seven other profile inputs are +checked-in material v2 archives. From the repository root: + +```sh +python3 tools/build-resourcepack-repair.py INPUT/DuneRealms-Network-Artwork-v3.zip INPUT/DuneRealms-Materials-arrakis-v4.zip OUTPUT +DUNE_REPAIR_BASELINE_DIR=INPUT python3 tools/test_resourcepack_repair.py -v +gradle --no-daemon -p DuneRealmsGUI test jar +``` + +Optional `DUNE_REPAIR_CLIENT_JAR` points to a local Java 26.3 client JAR, +enabling validation of all custom item/model references against actual vanilla +files. Stored ZIP entries, fixed order and timestamps make the archive hashes +independent of the compressor implementation. The checked-in manifest is the +source of the immutable URL and hash pins. The new resourcepack CI performs +the same baseline check and builds an artifact after the approved merge. + +## Publication (only after approval) + +1. Verify all artifact SHA-1 and SHA-256 values against this manifest. Publish + every archive at its new URL, never overwrite a previous immutable download. + Verify each public URL returns the entire exact pinned archive before changing + plugin/configuration. +2. Confirm the active lobby and five planet backend locations from the current + proxy inventory. Confirm installed GUI plugin versions, existing material + aliases, pack pins, and previously configured pack IDs; backup each actual + target file. Preserve existing gameplay plugins and unrelated settings. +3. Deploy the tested GUI plugin on each Java backend. Keep the world and lobby + artwork configurations separate; the new bundled defaults upgrade the + known old network configuration, while exact old material pins upgrade + without changing enabled flags or custom aliases. If the lobby sends the + base pack during vanilla configuration, change its `server.properties` + network URL and SHA-1 to the **lobby** manifest pin with the same network UUID + to avoid an old/new double offer. Do not configure the planet pack as the + global network pack. Bedrock and the lobby's native MCGUI renderer are unchanged. +4. Verify real 26.3 Java joins and proxy transfers: Guild → Arrakis → Kaladam → + Giedermark → Kaiterhof → Sigmadraken IV → Guild; also the two configured + dimension profiles. Client logs must show the network pack UUID and the + current material UUID, both loaded with no missing jerboa sprite/particle + warnings. Inspect live jerboa standing/walking/curled geometry, tiny worm, + equipment icons, correct spice tools and compressed spice, walls and distinct + planet textures. No manual legacy DuneResourcePack.zip should be required. + Verify the Bedrock fallback and existing native lobby menus. + +Do not claim a live repair from the archive tests alone. Before owner-approved +publication, the new immutable URLs are intentionally unpublished. diff --git a/DuneRealmsGUI/resourcepack-repair/manifest.json b/DuneRealmsGUI/resourcepack-repair/manifest.json new file mode 100644 index 00000000..fa7dc077 --- /dev/null +++ b/DuneRealmsGUI/resourcepack-repair/manifest.json @@ -0,0 +1,169 @@ +{ + "resourcePackVersion": [ + 97, + 1 + ], + "baseId": "a7b5ab7d-d8d8-5b51-b016-71a5f4c00008", + "planetId": "59f34b30-6a86-5e58-a813-6e776f726c64", + "baseline": { + "networkSha256": "15dfd24bbb1760e04a1df1e0556c15b759353be705fbf2bcc9b377704abcf560", + "arrakisSha256": "4a906b4e292221997d7870d63d70303d37d7cd41d872cba6bb7c2a170bd88adc" + }, + "base": { + "world": { + "filename": "DuneRealms-Network-Artwork-v4.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v4.zip", + "sha1": "ec3848da559768e5ac3aeec631f10035ac44c055", + "sha256": "bee9f66ab9356450594da308124db3ee921566c44cb190c4246e522be7dd2e81", + "bytes": 29918832, + "entries": 800 + }, + "lobby": { + "filename": "DuneRealms-Network-Artwork-Lobby-v4.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-Lobby-v4.zip", + "sha1": "c0c2e36a438242b253cdaaeeec36529210cf4220", + "sha256": "6150c394a79a54c85686a55140ae18ae64f7d881c04242be4bb786cf3985fbb4", + "bytes": 30016942, + "entries": 830 + } + }, + "planets": { + "guild": { + "filename": "DuneRealms-Materials-guild-v3.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-guild-v3.zip", + "sha1": "2e37e41aaeb80f6eac97fb40dc08572708d2644f", + "sha256": "fbe7be9aadb62805ab68ec86603aeacb7b49b56da6685ba36052b97562d7835c", + "bytes": 895047, + "entries": 1445, + "name": "Vaerkring", + "aliases": [ + "guild_lobby" + ], + "previous": { + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-guild-v2.zip", + "sha1": "c26c95ae25146fca3e3aec11a703919a001de607" + } + }, + "arrakis": { + "filename": "DuneRealms-Materials-arrakis-v5.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v5.zip", + "sha1": "d9daf43f4589374a881928e631465556cb6dfaf6", + "sha256": "5eae8062fb13b7f5ef48ba32b8ea2cf732e589d407f45bf4e44680cacb84a9b0", + "bytes": 2046201, + "entries": 1464, + "name": "Arrakduin", + "aliases": [ + "arrakis", + "arrakduin" + ], + "previous": { + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v4.zip", + "sha1": "694cad97caf75ac00f4e6f819a7172a0cf1b83ef" + } + }, + "caladan": { + "filename": "DuneRealms-Materials-caladan-v3.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-caladan-v3.zip", + "sha1": "13b7b5862925c081965ee3e591d050d3a65e515a", + "sha256": "bf35f6a3ff72528e9ca93d7d55220c5a6d8ee844abcfc02ef80dcab7277b2c4a", + "bytes": 896122, + "entries": 1447, + "name": "Kaladam", + "aliases": [ + "caladan", + "kaladam" + ], + "previous": { + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-caladan-v2.zip", + "sha1": "3f5b1674dfeb5761a9253ae411463a3e7a2e6b32" + } + }, + "giedi_prime": { + "filename": "DuneRealms-Materials-giedi_prime-v3.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime-v3.zip", + "sha1": "171ea53dbcc90c98c630ea78ed74c1e478314dd8", + "sha256": "efc67c17911a3bb719f8749a384f5ac14eeb92eca6b5402df8a1372448c19a4c", + "bytes": 896018, + "entries": 1448, + "name": "Giedermark", + "aliases": [ + "giedi_prime", + "giedermark" + ], + "previous": { + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime-v2.zip", + "sha1": "f7c734ee98086e5b96cd566599640c6514377f81" + } + }, + "kaitain": { + "filename": "DuneRealms-Materials-kaitain-v3.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-kaitain-v3.zip", + "sha1": "a7082cb260ce3e1bd2f134fabcfa925f615c312b", + "sha256": "0147e9852c9ea28106a0d803490afa10fddc9f51d734d7e4f6dbdb752273269a", + "bytes": 896010, + "entries": 1447, + "name": "Kaiterhof", + "aliases": [ + "kaitain", + "kaiterhof" + ], + "previous": { + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-kaitain-v2.zip", + "sha1": "b06c9dc895c99aae2ccaaddfac0ffcba4ba6a534" + } + }, + "sigma_draconis_iv": { + "filename": "DuneRealms-Materials-sigma_draconis_iv-v3.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv-v3.zip", + "sha1": "ed1ca07f8cfa759f3f1059ab785c03bb6a54ff77", + "sha256": "9a04f3aa972ac376a36cd879f7218e66a90270411a20cda99f4858d31f64dacf", + "bytes": 896420, + "entries": 1448, + "name": "Sigmadraken IV", + "aliases": [ + "sigma_draconis_iv", + "sigmadraken_iv", + "sigmadraken iv" + ], + "previous": { + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv-v2.zip", + "sha1": "ede1901098d763738d713e5a71508c9b53680989" + } + }, + "giedi_prime_nether": { + "filename": "DuneRealms-Materials-giedi_prime_nether-v3.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime_nether-v3.zip", + "sha1": "12a51f0d19ffd5493e6be8c4395a2d3df2742736", + "sha256": "ea18019727964503cd3c60e50fe29aa92288d6f9a19a3504a846df25cf616065", + "bytes": 895453, + "entries": 1446, + "name": "Giedermark Nether", + "aliases": [ + "giedi_prime_nether", + "giedermark_nether" + ], + "previous": { + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime_nether-v2.zip", + "sha1": "67b0119916a21130dd8000df62a2e8d718888bac" + } + }, + "sigma_draconis_iv_the_end": { + "filename": "DuneRealms-Materials-sigma_draconis_iv_the_end-v3.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv_the_end-v3.zip", + "sha1": "a8a23316a0537176dc65072204544d5d5cb8376b", + "sha256": "9cd3be10c7e12f63a794e4731c3b97457ab73e9ba578f4f277b58d4c9d70e00d", + "bytes": 895066, + "entries": 1445, + "name": "Sigmadraken IV End", + "aliases": [ + "sigma_draconis_iv_the_end", + "sigmadraken_iv_the_end", + "sigmadraken_iv_end" + ], + "previous": { + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv_the_end-v2.zip", + "sha1": "26fcb853b3f71a1c126cd0ed6c19a00a7bea5cb1" + } + } + } +} diff --git a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/DuneGUI.java b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/DuneGUI.java index a05cecc3..466cbd05 100644 --- a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/DuneGUI.java +++ b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/DuneGUI.java @@ -43,13 +43,13 @@ public final class DuneGUI extends JavaPlugin implements Listener,CommandExecuto private final GuildBookings bookings=new GuildBookings(); private final Set boarding=new HashSet<>(); private final Set guiPackLoaded=new HashSet<>(); - private record Pack(UUID id,String url,String hash){} - private static final Pack DEFAULT_PACK=new Pack(UUID.fromString("a7b5ab7d-d8d8-5b51-b016-71a5f4c00008"),"https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v2.zip","c87a26957d9a23f73a88a5ff727ca4a28a8e8c06"); - private Pack guiPack(){ - var file=new java.io.File(getDataFolder(),"gui-pack.yml");if(!file.isFile())return DEFAULT_PACK; + private final Map offeredGuiPacks=new HashMap<>(); + private NetworkArtworkPolicy.Pack guiPack(Player player){ + boolean inLobby=lobby(player); + var file=new java.io.File(getDataFolder(),"gui-pack.yml");if(!file.isFile())return NetworkArtworkPolicy.select(inLobby,null,null); var data=org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(file); - try{String url=data.getString("url",""),hash=data.getString("sha1","");if(!url.matches("https://www\\.dunerealms\\.com/downloads/DuneRealms-(?:GUI-Houses-1\\.21\\.8|Network-Artwork)-v[0-9]+\\.zip")||!hash.matches("[0-9a-f]{40}"))throw new IllegalArgumentException();return new Pack(UUID.fromString(data.getString("id","")),url,hash);} - catch(IllegalArgumentException invalid){getLogger().warning("Invalid gui-pack.yml; using the bundled pack definition.");return DEFAULT_PACK;} + String prefix=inLobby?"lobby.":"world."; + return NetworkArtworkPolicy.select(inLobby,data.getString(prefix+"url"),data.getString(prefix+"sha1")); } private long lastDepartureNotice=-1; static final int[] CENTRES={10,13,16,29,33}; @@ -175,28 +175,33 @@ public final class DuneGUI extends JavaPlugin implements Listener,CommandExecuto @EventHandler public void scoreboardCommand(PlayerCommandPreprocessEvent e){String command=e.getMessage().trim();if(command.equalsIgnoreCase("/scoreboard")){e.setCancelled(true);toggleSidebar(e.getPlayer());}} @EventHandler(priority=EventPriority.HIGHEST) public void oldNavigator(PlayerInteractEvent e){if(e.getHand()!=EquipmentSlot.HAND||e.getItem()==null||!e.getItem().hasItemMeta()||!e.getAction().isRightClick())return;var data=e.getItem().getItemMeta().getPersistentDataContainer();for(var key:data.getKeys())if(data.has(key,PersistentDataType.STRING)&&"menu_opener".equals(data.get(key,PersistentDataType.STRING))){e.setCancelled(true);organisations.console(e.getPlayer());return;}} @EventHandler(priority=EventPriority.LOWEST,ignoreCancelled=true) public void legacyTravel(PlayerCommandPreprocessEvent e){String[] args=e.getMessage().substring(1).trim().toLowerCase(Locale.ROOT).split("\\s+");String label=args[0].replaceFirst("^[^:]+:","");if(label.equals("balance")||label.equals("bal")||label.equals("money")){e.setCancelled(true);if(!sidebar.enabled(e.getPlayer()))sidebar.toggle(e.getPlayer());refreshSidebar(e.getPlayer());return;}if(label.equals("exchange")){e.setCancelled(true);exchange.open(e.getPlayer());return;}if(label.equals("server")||label.equals("duneess")&&args.length>1&&args[1].equals("travel")){e.setCancelled(true);openGuild(e.getPlayer(),null);}} - private void offerGuiPack(Player p){ - if(!lobby(p)){p.sendMessage("Visit Spacing Guild lobby to update your DuneRealms artwork.");return;} + private void offerGuiPack(Player p){offerGuiPack(p,true);} + private void offerGuiPack(Player p,boolean force){ + if(!p.isOnline()||BedrockForms.isBedrock(p))return; + var pack=guiPack(p); + if(!force&&pack.equals(offeredGuiPacks.get(p.getUniqueId())))return; guiPackLoaded.remove(p.getUniqueId()); - var pack=guiPack();p.addResourcePack(pack.id(),pack.url(),java.util.HexFormat.of().parseHex(pack.hash()),"DuneRealms menus and item artwork",true); - MCGUIMenus.offerPack(p); - ecologyArtwork.offer(p); + // Replace only the network pack, never the separately managed planet pack. + offeredGuiPacks.put(p.getUniqueId(),pack); + p.addResourcePack(NetworkArtworkPolicy.PACK_ID,pack.url(),java.util.HexFormat.of().parseHex(pack.hash()),"DuneRealms menus and item artwork",true); + if(lobby(p)){MCGUIMenus.offerPack(p);ecologyArtwork.offer(p);} } @EventHandler public void join(PlayerJoinEvent e){Bukkit.getScheduler().runTaskLater(this,()->{ Player p=e.getPlayer();if(!p.isOnline())return; // Offer once in the play phase too: configuration-phase pack loading may finish // before the ordinary Bukkit player status event is available. The hash reuses cache. - if(lobby(p)&&!BedrockForms.isBedrock(p)){if(!guiPackLoaded.contains(p.getUniqueId()))offerGuiPack(p);else ecologyArtwork.offer(p);} + offerGuiPack(p,false); giveCodex(p,false); if(sidebar.enabled(p))refreshSidebar(p); },40L);} @EventHandler public void packStatus(PlayerResourcePackStatusEvent e){ - if(!guiPack().id().equals(e.getID()))return; + if(!NetworkArtworkPolicy.PACK_ID.equals(e.getID()))return; getLogger().info("GUI pack status for "+e.getPlayer().getName()+": "+e.getStatus()); if(e.getStatus()==PlayerResourcePackStatusEvent.Status.SUCCESSFULLY_LOADED){guiPackLoaded.add(e.getPlayer().getUniqueId());e.getPlayer().sendMessage(Component.text("DuneRealms artwork loaded. Reopen your menu.",NamedTextColor.GREEN));return;} guiPackLoaded.remove(e.getPlayer().getUniqueId()); + if(Set.of("FAILED_DOWNLOAD","FAILED_RELOAD","INVALID_URL","DECLINED","DISCARDED").contains(e.getStatus().name()))offeredGuiPacks.remove(e.getPlayer().getUniqueId()); } - @EventHandler public void world(PlayerChangedWorldEvent e){bookings.cancel(e.getPlayer().getUniqueId());boarding.remove(e.getPlayer().getUniqueId());sidebar.hide(e.getPlayer());records.remove(e.getPlayer().getUniqueId());if(sidebar.enabled(e.getPlayer()))refreshSidebar(e.getPlayer());} + @EventHandler public void world(PlayerChangedWorldEvent e){offerGuiPack(e.getPlayer(),false);bookings.cancel(e.getPlayer().getUniqueId());boarding.remove(e.getPlayer().getUniqueId());sidebar.hide(e.getPlayer());records.remove(e.getPlayer().getUniqueId());if(sidebar.enabled(e.getPlayer()))refreshSidebar(e.getPlayer());} static String selection(JsonObject data){if(!data.has("selection")||data.get("selection").isJsonNull())return null;String value=data.get("selection").getAsString();return HOUSE_IDS.contains(value)?value:null;} private String houseName(JsonObject data,String id){for(var entry:data.getAsJsonArray("choices")){var h=entry.getAsJsonObject();if(h.get("id").getAsString().equals(id))return h.get("name").getAsString();}throw new IllegalArgumentException("Unknown House");} private void select(Player p,JsonObject data,String picked){ @@ -254,7 +259,7 @@ public final class DuneGUI extends JavaPlugin implements Listener,CommandExecuto } @EventHandler public void drag(InventoryDragEvent e){if(e.getView().getTopInventory().getHolder() instanceof Screen)e.setCancelled(true);} @EventHandler public void close(InventoryCloseEvent e){if(e.getInventory().getHolder() instanceof Screen s)s.gate.expire();} - @EventHandler public void quit(PlayerQuitEvent e){MCGUIMenus.forget(e.getPlayer().getUniqueId());guiPackLoaded.remove(e.getPlayer().getUniqueId());bookings.cancel(e.getPlayer().getUniqueId());boarding.remove(e.getPlayer().getUniqueId());requests.remove(e.getPlayer().getUniqueId());records.remove(e.getPlayer().getUniqueId());sidebar.hide(e.getPlayer());departure.removePlayer(e.getPlayer());} + @EventHandler public void quit(PlayerQuitEvent e){MCGUIMenus.forget(e.getPlayer().getUniqueId());guiPackLoaded.remove(e.getPlayer().getUniqueId());offeredGuiPacks.remove(e.getPlayer().getUniqueId());bookings.cancel(e.getPlayer().getUniqueId());boarding.remove(e.getPlayer().getUniqueId());requests.remove(e.getPlayer().getUniqueId());records.remove(e.getPlayer().getUniqueId());sidebar.hide(e.getPlayer());departure.removePlayer(e.getPlayer());} private void ensureRegistrar(){World world=Bukkit.getWorld("guild_lobby");if(world==null)return;Location at=world.getSpawnLocation().clone().add(2,0,0);at.getChunk().load(); for(Entity entity:world.getEntities())if(entity.getPersistentDataContainer().has(registrar,PersistentDataType.BYTE))return; Villager npc=world.spawn(at,Villager.class);npc.setAI(false);npc.setInvulnerable(true);npc.setPersistent(true);npc.setSilent(true);npc.setCollidable(false);npc.setProfession(Villager.Profession.LIBRARIAN);npc.customName(Component.text("House Registrar · Choose your House",NamedTextColor.GOLD));npc.setCustomNameVisible(true);npc.getPersistentDataContainer().set(registrar,PersistentDataType.BYTE,(byte)1); diff --git a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/NetworkArtworkPolicy.java b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/NetworkArtworkPolicy.java new file mode 100644 index 00000000..84399c51 --- /dev/null +++ b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/NetworkArtworkPolicy.java @@ -0,0 +1,20 @@ +package com.dunerealms.gui; + +import java.util.UUID; + +/** The shared artwork and per-planet material layers use independent pack IDs. */ +final class NetworkArtworkPolicy { + static final UUID PACK_ID=UUID.fromString("a7b5ab7d-d8d8-5b51-b016-71a5f4c00008"); + static final Pack WORLD=new Pack("https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v4.zip","ec3848da559768e5ac3aeec631f10035ac44c055"); + static final Pack LOBBY=new Pack("https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-Lobby-v4.zip","c0c2e36a438242b253cdaaeeec36529210cf4220"); + record Pack(String url,String hash){} + private NetworkArtworkPolicy(){} + static Pack select(boolean lobby,String url,String hash){ + Pack fallback=lobby?LOBBY:WORLD; + // Old lobby-only pins are not valid global artwork. Only accept a new, + // explicit scope-specific immutable release override. + String pattern="https://www\\.dunerealms\\.com/downloads/DuneRealms-Network-Artwork"+(lobby?"-Lobby":"")+"-v(?:[4-9]|[1-9][0-9]+)\\.zip"; + if(url!=null&&hash!=null&&url.matches(pattern)&&hash.matches("[0-9a-f]{40}"))return new Pack(url,hash); + return fallback; + } +} diff --git a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetMaterialPolicy.java b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetMaterialPolicy.java index 7b576ff4..4ba21b9a 100644 --- a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetMaterialPolicy.java +++ b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetMaterialPolicy.java @@ -2,8 +2,10 @@ package com.dunerealms.gui; import java.util.Locale; import java.util.Map; +import java.util.UUID; final class PlanetMaterialPolicy { + static final UUID PACK_ID=UUID.fromString("59f34b30-6a86-5e58-a813-6e776f726c64"); private PlanetMaterialPolicy(){} static String profile(String world,Map aliases){return aliases.get(world.toLowerCase(Locale.ROOT));} static void validate(String key,String url,String hash){ diff --git a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetTexturePacks.java b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetTexturePacks.java index d8b8e6ec..da101cff 100644 --- a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetTexturePacks.java +++ b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetTexturePacks.java @@ -1,6 +1,8 @@ package com.dunerealms.gui; import java.io.File; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.HexFormat; import java.util.Locale; @@ -19,7 +21,7 @@ import org.bukkit.plugin.java.JavaPlugin; /** One replaceable vanilla-material layer. Never clears GUI or Dune artwork packs. */ final class PlanetTexturePacks implements Listener { - static final UUID PACK_ID=UUID.fromString("59f34b30-6a86-5e58-a813-6e776f726c64"); + static final UUID PACK_ID=PlanetMaterialPolicy.PACK_ID; private final JavaPlugin plugin; private final Map packs=new HashMap<>(); private final Map worlds=new HashMap<>(); @@ -32,6 +34,8 @@ final class PlanetTexturePacks implements Listener { File file=new File(plugin.getDataFolder(),"planet-textures.yml"); if(!file.exists())plugin.saveResource("planet-textures.yml",false); var config=YamlConfiguration.loadConfiguration(file); + var bundled=YamlConfiguration.loadConfiguration(new InputStreamReader( + java.util.Objects.requireNonNull(plugin.getResource("planet-textures.yml")),StandardCharsets.UTF_8)); boolean valid=true; try{ var section=config.getConfigurationSection("packs"); @@ -39,6 +43,13 @@ final class PlanetTexturePacks implements Listener { for(String key:section.getKeys(false)){ String url=section.getString(key+".url",""),hash=section.getString(key+".sha1",""),name=section.getString(key+".name",key); PlanetMaterialPolicy.validate(key,url,hash); + // Upgrade only exactly identified old release pins, retaining custom profiles, + // custom world aliases and the administrator's enabled flag. + String prefix="packs."+key+"."; + if(bundled.getStringList(prefix+"previous-pins").contains(url+"|"+hash)){ + url=bundled.getString(prefix+"url","");hash=bundled.getString(prefix+"sha1",""); + PlanetMaterialPolicy.validate(key,url,hash); + } packs.put(key,new Pack(url,hash,name)); for(String alias:section.getStringList(key+".worlds")){ String previous=worlds.put(alias.toLowerCase(Locale.ROOT),key); diff --git a/DuneRealmsGUI/src/main/resources/gui-pack.yml b/DuneRealmsGUI/src/main/resources/gui-pack.yml index b9686087..b3f50026 100644 --- a/DuneRealmsGUI/src/main/resources/gui-pack.yml +++ b/DuneRealmsGUI/src/main/resources/gui-pack.yml @@ -1,3 +1,8 @@ +# Shared and per-world packs have different UUIDs. Publish all pinned archives before deploying this plugin. id: a7b5ab7d-d8d8-5b51-b016-71a5f4c00008 -url: https://www.dunerealms.com/downloads/DuneRealms-GUI-Houses-1.21.8-v8.zip -sha1: e4612a6ba0a95d1f031298a0d0a666e7fa2f109f +world: + url: https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v4.zip + sha1: ec3848da559768e5ac3aeec631f10035ac44c055 +lobby: + url: https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-Lobby-v4.zip + sha1: c0c2e36a438242b253cdaaeeec36529210cf4220 diff --git a/DuneRealmsGUI/src/main/resources/planet-textures.yml b/DuneRealmsGUI/src/main/resources/planet-textures.yml index c617787f..30c488af 100644 --- a/DuneRealmsGUI/src/main/resources/planet-textures.yml +++ b/DuneRealmsGUI/src/main/resources/planet-textures.yml @@ -1,48 +1,54 @@ -# Enable after publishing every pinned ZIP from planet-artwork/release-v1/. -# Java material layer only. Geyser/Bedrock requires its own converted pack. +# Enable only after publishing the pinned archives. Java material layer; Bedrock separate. enabled: false -# Optional exact world-name mappings, e.g. world: arrakis worlds: {} packs: guild: name: "Vaerkring" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-guild-v2.zip - sha1: c26c95ae25146fca3e3aec11a703919a001de607 + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-guild-v3.zip + sha1: 2e37e41aaeb80f6eac97fb40dc08572708d2644f worlds: ["guild_lobby"] + previous-pins: ["https://www.dunerealms.com/downloads/DuneRealms-Materials-guild-v2.zip|c26c95ae25146fca3e3aec11a703919a001de607"] arrakis: name: "Arrakduin" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v2.zip - sha1: b00859f576801967c0c6478fd4fb562820772f49 + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v5.zip + sha1: d9daf43f4589374a881928e631465556cb6dfaf6 worlds: ["arrakis","arrakduin"] + previous-pins: ["https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v4.zip|694cad97caf75ac00f4e6f819a7172a0cf1b83ef","https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v2.zip|b00859f576801967c0c6478fd4fb562820772f49","https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v3.zip|53dd4e0488000a0f229b25cd766aa0fd53dbbafc"] caladan: name: "Kaladam" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-caladan-v2.zip - sha1: 3f5b1674dfeb5761a9253ae411463a3e7a2e6b32 + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-caladan-v3.zip + sha1: 13b7b5862925c081965ee3e591d050d3a65e515a worlds: ["caladan","kaladam"] + previous-pins: ["https://www.dunerealms.com/downloads/DuneRealms-Materials-caladan-v2.zip|3f5b1674dfeb5761a9253ae411463a3e7a2e6b32"] giedi_prime: name: "Giedermark" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime-v2.zip - sha1: f7c734ee98086e5b96cd566599640c6514377f81 + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime-v3.zip + sha1: 171ea53dbcc90c98c630ea78ed74c1e478314dd8 worlds: ["giedi_prime","giedermark"] + previous-pins: ["https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime-v2.zip|f7c734ee98086e5b96cd566599640c6514377f81"] kaitain: name: "Kaiterhof" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-kaitain-v2.zip - sha1: b06c9dc895c99aae2ccaaddfac0ffcba4ba6a534 + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-kaitain-v3.zip + sha1: a7082cb260ce3e1bd2f134fabcfa925f615c312b worlds: ["kaitain","kaiterhof"] + previous-pins: ["https://www.dunerealms.com/downloads/DuneRealms-Materials-kaitain-v2.zip|b06c9dc895c99aae2ccaaddfac0ffcba4ba6a534"] sigma_draconis_iv: name: "Sigmadraken IV" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv-v2.zip - sha1: ede1901098d763738d713e5a71508c9b53680989 + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv-v3.zip + sha1: ed1ca07f8cfa759f3f1059ab785c03bb6a54ff77 worlds: ["sigma_draconis_iv","sigmadraken_iv","sigmadraken iv"] + previous-pins: ["https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv-v2.zip|ede1901098d763738d713e5a71508c9b53680989"] giedi_prime_nether: name: "Giedermark Nether" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime_nether-v2.zip - sha1: 67b0119916a21130dd8000df62a2e8d718888bac + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime_nether-v3.zip + sha1: 12a51f0d19ffd5493e6be8c4395a2d3df2742736 worlds: ["giedi_prime_nether","giedermark_nether"] + previous-pins: ["https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime_nether-v2.zip|67b0119916a21130dd8000df62a2e8d718888bac"] sigma_draconis_iv_the_end: name: "Sigmadraken IV End" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv_the_end-v2.zip - sha1: 26fcb853b3f71a1c126cd0ed6c19a00a7bea5cb1 + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv_the_end-v3.zip + sha1: a8a23316a0537176dc65072204544d5d5cb8376b worlds: ["sigma_draconis_iv_the_end","sigmadraken_iv_the_end","sigmadraken_iv_end"] + previous-pins: ["https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv_the_end-v2.zip|26fcb853b3f71a1c126cd0ed6c19a00a7bea5cb1"] diff --git a/DuneRealmsGUI/src/main/resources/plugin.yml b/DuneRealmsGUI/src/main/resources/plugin.yml index 53dd7a00..529dc6a8 100644 --- a/DuneRealmsGUI/src/main/resources/plugin.yml +++ b/DuneRealmsGUI/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ name: DunerealmsGUI main: com.dunerealms.gui.DuneGUI -version: 1.1.29 +version: 1.1.30 api-version: '1.21.8' depend: [JarvisTranslator] softdepend: [MCGUI, DecentHolograms, DuneLobby, DuneCore, DuneEss, DuneNPC, Vault, floodgate, ViaVersion] diff --git a/DuneRealmsGUI/src/test/java/com/dunerealms/gui/NetworkArtworkPolicyTest.java b/DuneRealmsGUI/src/test/java/com/dunerealms/gui/NetworkArtworkPolicyTest.java new file mode 100644 index 00000000..a75f92e1 --- /dev/null +++ b/DuneRealmsGUI/src/test/java/com/dunerealms/gui/NetworkArtworkPolicyTest.java @@ -0,0 +1,28 @@ +package com.dunerealms.gui; + +import org.junit.jupiter.api.Test; +import static org.junit.jupiter.api.Assertions.*; + +class NetworkArtworkPolicyTest { + @Test void worldAndLobbyHaveSeparateArtworkButSameStableNetworkId(){ + assertNotEquals(NetworkArtworkPolicy.PACK_ID,PlanetMaterialPolicy.PACK_ID); + assertEquals(NetworkArtworkPolicy.WORLD,NetworkArtworkPolicy.select(false,null,null)); + assertEquals(NetworkArtworkPolicy.LOBBY,NetworkArtworkPolicy.select(true,null,null)); + assertNotEquals(NetworkArtworkPolicy.WORLD,NetworkArtworkPolicy.LOBBY); + } + @Test void oldLobbyPackAndOtherScopeCannotBecomeWorldPack(){ + String old="https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v3.zip"; + String oldHash="39283662019d919c40aa1e855b3a53075303b448"; + assertEquals(NetworkArtworkPolicy.WORLD,NetworkArtworkPolicy.select(false,old,oldHash)); + assertEquals(NetworkArtworkPolicy.LOBBY,NetworkArtworkPolicy.select(true,old,oldHash)); + assertEquals(NetworkArtworkPolicy.WORLD,NetworkArtworkPolicy.select(false,NetworkArtworkPolicy.LOBBY.url(),NetworkArtworkPolicy.LOBBY.hash())); + assertEquals(NetworkArtworkPolicy.LOBBY,NetworkArtworkPolicy.select(true,NetworkArtworkPolicy.WORLD.url(),NetworkArtworkPolicy.WORLD.hash())); + } + @Test void validScopePinCanBeUpdatedButMalformedPinFallsBack(){ + String url="https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v5.zip"; + String hash="0123456789abcdef0123456789abcdef01234567"; + assertEquals(new NetworkArtworkPolicy.Pack(url,hash),NetworkArtworkPolicy.select(false,url,hash)); + assertEquals(NetworkArtworkPolicy.WORLD,NetworkArtworkPolicy.select(false,url,"invalid")); + assertEquals(NetworkArtworkPolicy.WORLD,NetworkArtworkPolicy.select(false,url+"?x=1",hash)); + } +} diff --git a/tools/build-arrakis-fauna-pack.mjs b/tools/build-arrakis-fauna-pack.mjs index 0e967f74..65160f07 100644 --- a/tools/build-arrakis-fauna-pack.mjs +++ b/tools/build-arrakis-fauna-pack.mjs @@ -3,9 +3,13 @@ import path from 'node:path'; import {fileURLToPath} from 'node:url'; import {createHash} from 'node:crypto'; import {textureEntries,zip} from './build-planet-texture-packs.mjs'; -import {faunaModels} from './build-fauna-models.mjs'; +import {faunaModels,faunaSpriteAtlasEntries} from './build-fauna-models.mjs'; export function build(output){ const entries=textureEntries('arrakis'); + const metadata=JSON.parse(entries.get('pack.mcmeta')); + Object.assign(metadata.pack,{supported_formats:{min_inclusive:64,max_inclusive:97},max_format:[97,1]}); + entries.set('pack.mcmeta',Buffer.from(JSON.stringify(metadata))); + for(const [name,bytes] of faunaSpriteAtlasEntries())entries.set(name,bytes); for(const [name,model]of Object.entries(faunaModels())){ entries.set(`assets/dunerealms/models/entity/${name}.json`,Buffer.from(JSON.stringify({ambientocclusion:false,...model}))); entries.set(`assets/dunerealms/items/entity/${name}.json`,Buffer.from(JSON.stringify({model:{type:'minecraft:model',model:`dunerealms:entity/${name}`}}))); @@ -16,7 +20,9 @@ export function build(output){ entries.set('licenses/Runes-and-Dunes-MIT.txt',fs.readFileSync(path.join(path.dirname(fileURLToPath(import.meta.url)),'../DuneRealmsGUI/ecology/vendor/runes-and-dunes/NOTICE.txt'))); // Local Windows checkouts and Linux release workers must produce equal bytes. for(const [name,bytes]of entries)if(/\.(?:txt|md)$/.test(name))entries.set(name,Buffer.from(bytes.toString('utf8').replaceAll('\r\n','\n'))); - const filename='DuneRealms-Materials-arrakis-v4.zip',bytes=zip(entries); + // v5 is the separately pinned, byte-preserving repair of published v4. + // Generated future candidates must not replace either immutable release. + const filename='DuneRealms-Materials-arrakis-v6.zip',bytes=zip(entries); fs.mkdirSync(output,{recursive:true});fs.writeFileSync(path.join(output,filename),bytes); const digest=algorithm=>createHash(algorithm).update(bytes).digest('hex'); const record={filename,url:'https://www.dunerealms.com/downloads/'+filename,sha1:digest('sha1'),sha256:digest('sha256'),bytes:bytes.length,entries:entries.size}; diff --git a/tools/build-fauna-models.mjs b/tools/build-fauna-models.mjs index c3a20e2c..7dd709d2 100644 --- a/tools/build-fauna-models.mjs +++ b/tools/build-fauna-models.mjs @@ -11,11 +11,18 @@ export function faunaModels(){ for(let i=0;i<7;i++){const width=7-i*.55,z=4+i*3.2;worm.push(box([8-width/2,2+i*.08,z],[8+width/2,2+width,z+3.2],i%2?'ridge':'body'));} worm.push(box([3,2,0],[13,11,4],'body'),box([4,3,-.1],[12,10,.1],'mouth'),box([6,5,-.2],[10,8,0],'throat')); for(let i=0;i<4;i++){worm.push(box([4.5+i*1.8,3,-.4],[5.3+i*1.8,4.5,.1],'tooth'),box([4.5+i*1.8,8.5,-.4],[5.3+i*1.8,10,.1],'tooth'));} - return { + const models={ ...meerkatModels(), jerboa_curled:{textures:{fur:'dunerealms:entity/jerboa'},elements:[box([3,1,4],[13,10,15],'fur'),box([2,3,5],[14,8,14],'fur'),box([5,0,6],[11,2,13],'fur'),box([4,3,2],[12,8,6],'fur'),box([4,2,14],[12,4,17],'fur')].map(e=>({...e,faces:Object.fromEntries(Object.entries(e.faces).map(([face,data])=>[face,{...data,uv:[4,1,7,4].map(v=>v*16/36)}]))}))}, tiny_worm:{textures:{body:'minecraft:block/terracotta',ridge:'minecraft:block/brown_terracotta',mouth:'minecraft:block/black_concrete',throat:'minecraft:block/orange_terracotta',tooth:'minecraft:block/bone_block_side'},elements:worm} }; + for(const [name,model] of Object.entries(models))model.textures.particle=name==='tiny_worm'?'#body':'#fur'; + return models; +} +export function faunaSpriteAtlasEntries(){ + const sprite='dunerealms:entity/jerboa'; + const source={sources:[{type:'minecraft:single',resource:sprite,sprite}]}; + return new Map(['blocks','items'].map(atlas=>[`assets/minecraft/atlases/${atlas}.json`,Buffer.from(JSON.stringify(source))])); } export async function buildFaunaModels(output=root){await mkdir(output,{recursive:true});for(const [name,model]of Object.entries(faunaModels()))await writeFile(path.join(output,name+'.json'),JSON.stringify({ambientocclusion:false,...model})+'\n');} if(process.argv[1]&&path.resolve(process.argv[1])===fileURLToPath(import.meta.url))await buildFaunaModels(); diff --git a/tools/build-resourcepack-repair.py b/tools/build-resourcepack-repair.py new file mode 100644 index 00000000..fe700c52 --- /dev/null +++ b/tools/build-resourcepack-repair.py @@ -0,0 +1,118 @@ +"""Build the Java 26.3 resourcepack repair from the exact published artwork. +No artwork is resampled or regenerated. New immutable URLs are mandatory. +""" +import argparse +import hashlib +import json +import pathlib +import re +import zipfile + +ROOT = pathlib.Path(__file__).resolve().parents[1] +OLD_PLANETS = ROOT / 'DuneRealmsGUI/planet-artwork/release-v2' +OLD_NETWORK = '15dfd24bbb1760e04a1df1e0556c15b759353be705fbf2bcc9b377704abcf560' +OLD_ARRAKIS = '4a906b4e292221997d7870d63d70303d37d7cd41d872cba6bb7c2a170bd88adc' +BASE_ID = 'a7b5ab7d-d8d8-5b51-b016-71a5f4c00008' +PLANET_ID = '59f34b30-6a86-5e58-a813-6e776f726c64' +PREFIX = 'https://www.dunerealms.com/downloads/' +FAUNA = ('jerboa', 'jerboa_walk_left', 'jerboa_walk_right', 'jerboa_curled', 'tiny_worm') +SPRITE = 'dunerealms:entity/jerboa' +SAND = re.compile(r'^assets/minecraft/textures/block/(?:red_sand|sand|suspicious_sand_[0-3])(?:_[ns])?\.png$') + +def digest(data, algorithm='sha256'): + return hashlib.new(algorithm, data).hexdigest() + +def read_pack(path, expected): + data = path.read_bytes() + if digest(data) != expected: + raise ValueError(f'Unexpected baseline SHA256: {path.name}') + with zipfile.ZipFile(path) as pack: + entries = {} + for name in pack.namelist(): + if name.endswith('/'): + continue + if name in entries or name.startswith('/') or '..' in pathlib.PurePosixPath(name).parts: + raise ValueError(f'Unsafe or duplicate entry: {name}') + entries[name] = pack.read(name) + return entries + +def encode(value): + return (json.dumps(value, separators=(',', ':'), ensure_ascii=True) + '\n').encode() + +def compatibility(entries, description=None): + result = dict(entries) + meta = json.loads(result['pack.mcmeta']) + meta['pack'].update(pack_format=64, supported_formats={'min_inclusive':64, 'max_inclusive':97}, + min_format=64, max_format=[97,1]) + if description: meta['pack']['description'] = description + result['pack.mcmeta'] = encode(meta) + return result + +def world_artwork(entries): + # Planet-specific native sand/mob overrides belong to the lobby/material layer, + # not the shared item/font/GUI pack; keep the reserved dried-kelp spice carrier. + return compatibility({name:data for name,data in entries.items() + if not SAND.match(name) and not name.startswith('assets/minecraft/textures/entity/')}, + 'DuneRealms network artwork') + +def arrange_fauna(entries): + result = compatibility(entries) + assert result['assets/dunerealms/textures/entity/jerboa.png'].startswith(b'\x89PNG') + for name in FAUNA: + key = f'assets/dunerealms/models/entity/{name}.json' + model = json.loads(result[key]) + model['textures']['particle'] = '#body' if name == 'tiny_worm' else '#fur' + result[key] = encode(model) + # 26.3 separates item and block atlases. JSON display models using entity/ + # sprites must explicitly include the sprite in either render context. + for atlas in ('blocks','items'): + key = f'assets/minecraft/atlases/{atlas}.json' + spec = json.loads(result.get(key, b'{"sources":[]}')) + source = {'type':'minecraft:single','resource':SPRITE,'sprite':SPRITE} + if source not in spec['sources']: spec['sources'].append(source) + result[key] = encode(spec) + return result + +def write_pack(output, filename, entries): + path = output / filename + # PNGs are already compressed. Store entries so pin bytes are independent + # of differences between Windows and Linux zlib builds. + with zipfile.ZipFile(path, 'w', compression=zipfile.ZIP_STORED) as pack: + for name,data in sorted(entries.items()): + info = zipfile.ZipInfo(name, (2026,11,25,0,0,0)) + info.compress_type = zipfile.ZIP_STORED + info.create_system = 0 + pack.writestr(info, data) + data = path.read_bytes() + return {'filename':filename,'url':PREFIX+filename,'sha1':digest(data,'sha1'), + 'sha256':digest(data),'bytes':len(data),'entries':len(entries)} + +def build(network, arrakis, output): + output.mkdir(parents=True, exist_ok=True) + base = read_pack(network, OLD_NETWORK) + old = json.loads((OLD_PLANETS/'manifest.json').read_text()) + manifest = {'resourcePackVersion':[97,1], 'baseId':BASE_ID, 'planetId':PLANET_ID, + 'baseline':{'networkSha256':OLD_NETWORK,'arrakisSha256':OLD_ARRAKIS}, + 'base':{},'planets':{}} + manifest['base']['world'] = write_pack(output,'DuneRealms-Network-Artwork-v4.zip',world_artwork(base)) + manifest['base']['lobby'] = write_pack(output,'DuneRealms-Network-Artwork-Lobby-v4.zip', + compatibility(base,'DuneRealms network artwork · Spacing Guild lobby')) + for key,record in old['packs'].items(): + if key == 'arrakis': + data = arrange_fauna(read_pack(arrakis, OLD_ARRAKIS)); version=5 + previous = {'url':PREFIX+'DuneRealms-Materials-arrakis-v4.zip','sha1':'694cad97caf75ac00f4e6f819a7172a0cf1b83ef'} + else: + data = compatibility(read_pack(OLD_PLANETS/record['filename'],record['sha256']));version=3 + previous = {'url':record['url'],'sha1':record['sha1']} + manifest['planets'][key] = {**write_pack(output,f'DuneRealms-Materials-{key}-v{version}.zip',data), + 'name':record['name'],'aliases':record['aliases'],'previous':previous} + (output/'manifest.json').write_text(json.dumps(manifest,indent=2)+'\n', encoding='utf-8',newline='\n') + return manifest + +if __name__ == '__main__': + parser=argparse.ArgumentParser(description=__doc__) + parser.add_argument('network',type=pathlib.Path) + parser.add_argument('arrakis',type=pathlib.Path) + parser.add_argument('output',type=pathlib.Path) + args=parser.parse_args() + print(json.dumps(build(args.network,args.arrakis,args.output),indent=2)) diff --git a/tools/test_resourcepack_repair.py b/tools/test_resourcepack_repair.py new file mode 100644 index 00000000..617dbed0 --- /dev/null +++ b/tools/test_resourcepack_repair.py @@ -0,0 +1,130 @@ +"""Offline regression check. Set DUNE_REPAIR_BASELINE_DIR for the two pinned +published ZIPs and DUNE_REPAIR_CLIENT_JAR for an installed 26.3 client JAR.""" +import importlib.util +import json +import os +import pathlib +import tempfile +import unittest +import zipfile + +ROOT = pathlib.Path(__file__).resolve().parents[1] +SPEC = importlib.util.spec_from_file_location('repair', ROOT/'tools/build-resourcepack-repair.py') +repair = importlib.util.module_from_spec(SPEC); SPEC.loader.exec_module(repair) + +def unpack(path): + with zipfile.ZipFile(path) as z: + assert z.testzip() is None + return {name:z.read(name) for name in z.namelist() if not name.endswith('/')} + +def texture_path(ref): + namespace,leaf = ref.split(':',1) if ':' in ref else ('minecraft',ref) + return f'assets/{namespace}/textures/{leaf}.png' + +def model_path(ref): + namespace,leaf = ref.split(':',1) if ':' in ref else ('minecraft',ref) + return f'assets/{namespace}/models/{leaf}.json' + +def model_refs(value): + if isinstance(value,dict): + for key,child in value.items(): + if key=='model' and isinstance(child,str) and value.get('type') in ('model','minecraft:model'): + yield child + else: + yield from model_refs(child) + elif isinstance(value,list): + for item in value: + yield from model_refs(item) + +class RepairTest(unittest.TestCase): + def test_delivery_pins_match_the_immutable_manifest(self): + manifest=json.loads((ROOT/'DuneRealmsGUI/resourcepack-repair/manifest.json').read_text()) + resources=ROOT/'DuneRealmsGUI/src/main/resources' + java=ROOT/'DuneRealmsGUI/src/main/java/com/dunerealms/gui' + network=(resources/'gui-pack.yml').read_text() + policy=(java/'NetworkArtworkPolicy.java').read_text() + material=(resources/'planet-textures.yml').read_text() + self.assertNotEqual(manifest['baseId'],manifest['planetId']) + for scope,record in manifest['base'].items(): + self.assertIn(scope+':',network) + for text in (network,policy): + self.assertIn(record['url'],text); self.assertIn(record['sha1'],text) + for key,record in manifest['planets'].items(): + self.assertIn(' '+key+':',material) + self.assertIn(record['url'],material); self.assertIn(record['sha1'],material) + self.assertIn(record['previous']['url']+'|'+record['previous']['sha1'],material) + + def test_world_art_preserves_custom_assets_and_spice_but_not_planet_mobs_or_sand(self): + baseline={'pack.mcmeta':b'{"pack":{"pack_format":64}}', + 'assets/dunerealms/items/equipment/foo.json':b'item', + 'assets/minecraft/textures/block/dried_kelp_top.png':b'spice', + 'assets/minecraft/textures/block/sand.png':b'sand', + 'assets/minecraft/textures/entity/rabbit/gold.png':b'mob'} + result=repair.world_artwork(baseline) + self.assertEqual(result['assets/dunerealms/items/equipment/foo.json'],b'item') + self.assertEqual(result['assets/minecraft/textures/block/dried_kelp_top.png'],b'spice') + self.assertNotIn('assets/minecraft/textures/block/sand.png',result) + self.assertNotIn('assets/minecraft/textures/entity/rabbit/gold.png',result) + self.assertEqual(json.loads(result['pack.mcmeta'])['pack']['max_format'],[97,1]) + + def test_fauna_fixes_particle_and_both_atlases_without_modifying_geometry(self): + baseline={'pack.mcmeta':b'{"pack":{"pack_format":64}}', + 'assets/dunerealms/textures/entity/jerboa.png':b'\x89PNGoriginal', + 'assets/minecraft/atlases/items.json':b'{"sources":[{"type":"single","resource":"old:existing"}]}'} + for name in repair.FAUNA: + baseline[f'assets/dunerealms/models/entity/{name}.json']=json.dumps( + {'textures':{'fur':repair.SPRITE,'body':'minecraft:block/terracotta'},'elements':[{'from':[1,2,3]}]}).encode() + result=repair.arrange_fauna(baseline) + for name in repair.FAUNA: + file=f'assets/dunerealms/models/entity/{name}.json' + fixed=json.loads(result[file]) + self.assertEqual(fixed['textures'].pop('particle'),'#body' if name=='tiny_worm' else '#fur') + self.assertEqual(fixed,json.loads(baseline[file])) + for atlas in ('blocks','items'): + sources=json.loads(result[f'assets/minecraft/atlases/{atlas}.json'])['sources'] + self.assertIn({'type':'minecraft:single','resource':repair.SPRITE,'sprite':repair.SPRITE},sources) + self.assertEqual(json.loads(result['assets/minecraft/atlases/items.json'])['sources'][0]['resource'],'old:existing') + + @unittest.skipUnless(os.environ.get('DUNE_REPAIR_BASELINE_DIR'),'pinned release archives not supplied') + def test_published_baselines_preserved_and_manifest_pins_match(self): + base=pathlib.Path(os.environ['DUNE_REPAIR_BASELINE_DIR']) + network=base/'DuneRealms-Network-Artwork-v3.zip' + arrakis=base/'DuneRealms-Materials-arrakis-v4.zip' + old=unpack(network); old_arrakis=unpack(arrakis) + with tempfile.TemporaryDirectory() as tmp: + out=pathlib.Path(tmp); manifest=repair.build(network,arrakis,out) + self.assertEqual(manifest,json.loads((ROOT/'DuneRealmsGUI/resourcepack-repair/manifest.json').read_text())) + world=unpack(out/manifest['base']['world']['filename']) + lobby=unpack(out/manifest['base']['lobby']['filename']) + self.assertEqual({k:v for k,v in lobby.items() if k!='pack.mcmeta'},{k:v for k,v in old.items() if k!='pack.mcmeta'}) + self.assertEqual({k:v for k,v in world.items() if k!='pack.mcmeta'},{k:v for k,v in old.items() if k!='pack.mcmeta' and not repair.SAND.match(k) and not k.startswith('assets/minecraft/textures/entity/')}) + self.assertEqual(len([k for k in world if k.startswith('assets/dunerealms/items/equipment/')]),64) + for key,desc in manifest['planets'].items(): + current=unpack(out/desc['filename']) + self.assertEqual(json.loads(current['pack.mcmeta'])['pack']['max_format'],[97,1]) + if key=='arrakis': + changes={'pack.mcmeta',*(f'assets/dunerealms/models/entity/{n}.json' for n in repair.FAUNA)} + for name, data in old_arrakis.items(): + if name not in changes: self.assertEqual(current[name],data,name) + for n in repair.FAUNA: + file=f'assets/dunerealms/models/entity/{n}.json' + model=json.loads(current[file]); model['textures'].pop('particle') + self.assertEqual(model,json.loads(old_arrakis[file]),n) + else: + previous=unpack(repair.OLD_PLANETS/f'DuneRealms-Materials-{key}-v2.zip') + self.assertEqual({k:v for k,v in current.items() if k!='pack.mcmeta'},{k:v for k,v in previous.items() if k!='pack.mcmeta'}) + jar=os.environ.get('DUNE_REPAIR_CLIENT_JAR') + if jar: + with zipfile.ZipFile(jar) as vanilla: + self.assertEqual(json.loads(vanilla.read('version.json'))['pack_version']['resource_minor'],1) + available=set(vanilla.namelist())|set(world) + for file, data in world.items(): + if file.startswith('assets/dunerealms/items/') and file.endswith('.json'): + for ref in model_refs(json.loads(data)): + self.assertIn(model_path(ref),available,(file,ref)) + if file.startswith('assets/dunerealms/models/') and file.endswith('.json'): + for ref in json.loads(data).get('textures',{}).values(): + if isinstance(ref,str) and not ref.startswith('#'): + self.assertIn(texture_path(ref),available,(file,ref)) + +if __name__=='__main__': unittest.main()