diff --git a/DuneRealmsGUI/build.gradle.kts b/DuneRealmsGUI/build.gradle.kts index c52f7631..ec625971 100644 --- a/DuneRealmsGUI/build.gradle.kts +++ b/DuneRealmsGUI/build.gradle.kts @@ -1,6 +1,6 @@ plugins { java } group = "com.dunerealms" -version = "1.1.26" +version = "1.1.27" 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/network-artwork.json b/DuneRealmsGUI/network-artwork.json index f6e937ab..5c3b6474 100644 --- a/DuneRealmsGUI/network-artwork.json +++ b/DuneRealmsGUI/network-artwork.json @@ -1,13 +1,14 @@ { - "version": 1, - "url": "https://www.dunerealms.com/downloads/DuneRealms-Network-Artwork-v1.zip", - "sha1": "f1bc7d4851f1b361f14f96d260d5a91f769aa966", - "sha256": "56071a96d6ea9b117ea5cf2c8a76c5dd4c1f471bf840992345f5d1b234cb5b44", + "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-Arrakis-Creatures-v3.zip", + "DuneRealms-Materials-guild-v2.zip (sand textures and credits only)" ], "builder": "tools/build-network-artwork-pack.py", "creatureCarriers": { diff --git a/DuneRealmsGUI/planet-artwork/.gitattributes b/DuneRealmsGUI/planet-artwork/.gitattributes index 6cb3b6cf..4e7a2966 100644 --- a/DuneRealmsGUI/planet-artwork/.gitattributes +++ b/DuneRealmsGUI/planet-artwork/.gitattributes @@ -4,3 +4,7 @@ release-v1/*.zip -text release-v1/*.json text eol=lf release-v1/*.yml text eol=lf profiles.json text eol=lf +release-v2/*.zip -text +release-v2/*.json text eol=lf +release-v2/*.yml text eol=lf +flat-sand/*.png -text diff --git a/DuneRealmsGUI/planet-artwork/README.md b/DuneRealmsGUI/planet-artwork/README.md index b7995340..1a1f788c 100644 --- a/DuneRealmsGUI/planet-artwork/README.md +++ b/DuneRealmsGUI/planet-artwork/README.md @@ -84,3 +84,9 @@ still causes a client resource reload; it is not a zero-cost palette switch. Java packs are skipped for Floodgate players. A Bedrock/Geyser conversion is not included or claimed. Live client rendering and proxy-transfer verification must follow activation; local compilation is not that verification. + +## Revision 2 + +All active material layers share low-contrast flat sand based on the credited Luanti tile. Spice and red sand retain its exact grain at 93% brightness. Flat normal maps and rough specular maps suppress relief from lower-priority shader packs. Kaitain uses warm gold, Giedi Prime polluted grey-brown, Caladan soft sand; the other planets retain matching regional palettes. + +Two separate dimension profiles are included: `giedi_prime_nether` uses soot-dark industrial masonry; `sigma_draconis_iv_the_end` uses pale cold stone and existing violet End materials. Only exact configured dimension aliases select them. No terrain, block IDs, drops or dimension generation are changed. diff --git a/DuneRealmsGUI/planet-artwork/flat-sand/CREDITS.txt b/DuneRealmsGUI/planet-artwork/flat-sand/CREDITS.txt new file mode 100644 index 00000000..01c4ada6 --- /dev/null +++ b/DuneRealmsGUI/planet-artwork/flat-sand/CREDITS.txt @@ -0,0 +1,4 @@ +Flat sand source: Minetest Game / Luanti default_sand.png, contributors listed in LICENSE-Sand-Luanti.txt. +https://github.com/luanti-org/minetest_game/tree/9e895af6e9feb98332fa1a778001442f5669bc20/mods/default +License: CC BY-SA 3.0. https://creativecommons.org/licenses/by-sa/3.0/ +DuneRealms modifications: low-contrast planet-specific palette, seven-percent darker spice sand, constant flat normal and rough specular maps. Tile layout and grain preserved. diff --git a/DuneRealmsGUI/planet-artwork/flat-sand/LICENSE.txt b/DuneRealmsGUI/planet-artwork/flat-sand/LICENSE.txt new file mode 100644 index 00000000..625f0f86 --- /dev/null +++ b/DuneRealmsGUI/planet-artwork/flat-sand/LICENSE.txt @@ -0,0 +1,158 @@ +License of source code +---------------------- + +GNU Lesser General Public License, version 2.1 +Copyright (C) 2011-2018 celeron55, Perttu Ahola +Copyright (C) 2011-2018 Various Minetest Game developers and contributors + +This program is free software; you can redistribute it and/or modify it under the terms +of the GNU Lesser General Public License as published by the Free Software Foundation; +either version 2.1 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; +without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +See the GNU Lesser General Public License for more details: +https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html + + +Licenses of media (textures, models and sounds) +----------------------------------------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2010-2023: + + celeron55, Perttu Ahola + Cisoun + G4JC + VanessaE + RealBadAngel + Calinou + MirceaKitsune + Jordach + PilzAdam + jojoa1997 + InfinityProject + Splizard + Zeg9 + paramat + BlockMen + sofar + Neuromancer + Gambit + asl97 + KevDoy + Mito551 + GreenXenith + kaeza + kilbith + tobyplowy + CloudyProton + TumeniNodes + Mossmanikin + random-geek + Extex101 + An0n3m0us + Lopano + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ + +----------------------- + +Attribution 3.0 Unported (CC BY 3.0) + +Copyright (C) 2009 cmusounddesign +Copyright (C) 2010 Tomlija +Copyright (C) 2010 lsprice +Copyright (C) 2014 sonictechtonic +Copyright (C) 2015 yadronoff +Copyright (C) 2007 HerbertBoland +Copyright (C) 2006 AGFX + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by/3.0/ + +----------------------- + +CC0 1.0 Universal (CC0 1.0) Public Domain Dedication + +Iwan Gabovitch +Ottomaani138 +Ogrebane +blukotek +Sevin7 +Yoyodaman234 +Ryding + +No Copyright + +The person who associated a work with this deed has dedicated the work to the +public domain by waiving all of his or her rights to the work worldwide under +copyright law, including all related and neighboring rights, to the extent +allowed by law. + +You can copy, modify, distribute and perform the work, even for commercial +purposes, all without asking permission. See Other Information below. + +Other Information: + +In no way are the patent or trademark rights of any person affected by CC0, nor +are the rights that other persons may have in the work or in how the work is +used, such as publicity or privacy rights. + +Unless expressly stated otherwise, the person who associated a work with this +deed makes no warranties about the work, and disclaims liability for all uses +of the work, to the fullest extent permitted by applicable law. + +When using or citing the work, you should not imply endorsement by the author +or the affirmer. + +For more details: +https://creativecommons.org/publicdomain/zero/1.0/ diff --git a/DuneRealmsGUI/planet-artwork/flat-sand/default_sand.png b/DuneRealmsGUI/planet-artwork/flat-sand/default_sand.png new file mode 100644 index 00000000..645a3004 Binary files /dev/null and b/DuneRealmsGUI/planet-artwork/flat-sand/default_sand.png differ diff --git a/DuneRealmsGUI/planet-artwork/profiles.json b/DuneRealmsGUI/planet-artwork/profiles.json index fa435125..cd37b58a 100644 --- a/DuneRealmsGUI/planet-artwork/profiles.json +++ b/DuneRealmsGUI/planet-artwork/profiles.json @@ -1,8 +1,139 @@ { - "guild": {"name":"Vaerkring", "feel":"Neutral, handcrafted materials at the Spacing Guild port", "aliases":["guild_lobby"], "blocks":{}}, - "arrakis": {"name":"Arrakduin", "feel":"Warm desert rock, eroded masonry and dry timber", "aliases":["arrakis","arrakduin"], "blocks":{"stone":"granite","andesite":"granite","cobblestone":"sandstone","stone_bricks":"cut_sandstone","mossy_stone_bricks":"sandstone","mossy_cobblestone":"sandstone","dirt":"coarse_dirt","oak_planks":"acacia_planks","deepslate":"basalt_side","cobbled_deepslate":"blackstone"}}, - "caladan": {"name":"Kaladam", "feel":"Wet coastal rock, jungle earth and mossy ruins", "aliases":["caladan","kaladam"], "blocks":{"stone":"andesite","cobblestone":"mossy_cobblestone","stone_bricks":"mossy_stone_bricks","dirt":"coarse_dirt","oak_planks":"spruce_planks","deepslate":"blackstone","cobbled_deepslate":"mossy_cobblestone"}}, - "giedi_prime": {"name":"Giedermark", "feel":"Soot-dark industrial masonry, basalt and heavy timber", "aliases":["giedi_prime","giedermark"], "blocks":{"stone":"blackstone","andesite":"basalt_side","diorite":"basalt_top","granite":"polished_blackstone_bricks","cobblestone":"blackstone","stone_bricks":"polished_blackstone_bricks","mossy_stone_bricks":"cracked_polished_blackstone_bricks","mossy_cobblestone":"blackstone","dirt":"coarse_dirt","oak_planks":"dark_oak_planks","deepslate":"basalt_side","cobbled_deepslate":"blackstone","polished_deepslate":"polished_blackstone"}}, - "kaitain": {"name":"Kaiterhof", "feel":"Pale imperial stone, orderly masonry and light court timber", "aliases":["kaitain","kaiterhof"], "blocks":{"stone":"polished_diorite","andesite":"polished_andesite","cobblestone":"stone_bricks","stone_bricks":"quartz_block_side","mossy_stone_bricks":"quartz_block_side","mossy_cobblestone":"stone_bricks","oak_planks":"birch_planks","deepslate":"polished_andesite","cobbled_deepslate":"stone_bricks"}}, - "sigma_draconis_iv": {"name":"Sigmadraken IV", "feel":"Cold grey rock, snow, ice and dark northern timber", "aliases":["sigma_draconis_iv","sigmadraken_iv","sigmadraken iv"], "blocks":{"stone":"stone","andesite":"diorite","cobblestone":"andesite","stone_bricks":"polished_andesite","dirt":"gravel","oak_planks":"spruce_planks","deepslate":"basalt_side","cobbled_deepslate":"blackstone","polished_deepslate":"basalt_top"}} + "guild": { + "name": "Vaerkring", + "feel": "Neutral, handcrafted materials at the Spacing Guild port", + "aliases": [ + "guild_lobby" + ], + "blocks": {} + }, + "arrakis": { + "name": "Arrakduin", + "feel": "Warm desert rock, eroded masonry and dry timber", + "aliases": [ + "arrakis", + "arrakduin" + ], + "blocks": { + "stone": "granite", + "andesite": "granite", + "cobblestone": "sandstone", + "stone_bricks": "cut_sandstone", + "mossy_stone_bricks": "sandstone", + "mossy_cobblestone": "sandstone", + "dirt": "coarse_dirt", + "oak_planks": "acacia_planks", + "deepslate": "basalt_side", + "cobbled_deepslate": "blackstone" + } + }, + "caladan": { + "name": "Kaladam", + "feel": "Wet coastal rock, jungle earth and mossy ruins", + "aliases": [ + "caladan", + "kaladam" + ], + "blocks": { + "stone": "andesite", + "cobblestone": "mossy_cobblestone", + "stone_bricks": "mossy_stone_bricks", + "dirt": "coarse_dirt", + "oak_planks": "spruce_planks", + "deepslate": "blackstone", + "cobbled_deepslate": "mossy_cobblestone" + } + }, + "giedi_prime": { + "name": "Giedermark", + "feel": "Soot-dark industrial masonry, basalt and heavy timber", + "aliases": [ + "giedi_prime", + "giedermark" + ], + "blocks": { + "stone": "blackstone", + "andesite": "basalt_side", + "diorite": "basalt_top", + "granite": "polished_blackstone_bricks", + "cobblestone": "blackstone", + "stone_bricks": "polished_blackstone_bricks", + "mossy_stone_bricks": "cracked_polished_blackstone_bricks", + "mossy_cobblestone": "blackstone", + "dirt": "coarse_dirt", + "oak_planks": "dark_oak_planks", + "deepslate": "basalt_side", + "cobbled_deepslate": "blackstone", + "polished_deepslate": "polished_blackstone" + } + }, + "kaitain": { + "name": "Kaiterhof", + "feel": "Pale imperial stone, orderly masonry and light court timber", + "aliases": [ + "kaitain", + "kaiterhof" + ], + "blocks": { + "stone": "polished_diorite", + "andesite": "polished_andesite", + "cobblestone": "stone_bricks", + "stone_bricks": "quartz_block_side", + "mossy_stone_bricks": "quartz_block_side", + "mossy_cobblestone": "stone_bricks", + "oak_planks": "birch_planks", + "deepslate": "polished_andesite", + "cobbled_deepslate": "stone_bricks" + } + }, + "sigma_draconis_iv": { + "name": "Sigmadraken IV", + "feel": "Cold grey rock, snow, ice and dark northern timber", + "aliases": [ + "sigma_draconis_iv", + "sigmadraken_iv", + "sigmadraken iv" + ], + "blocks": { + "stone": "stone", + "andesite": "diorite", + "cobblestone": "andesite", + "stone_bricks": "polished_andesite", + "dirt": "gravel", + "oak_planks": "spruce_planks", + "deepslate": "basalt_side", + "cobbled_deepslate": "blackstone", + "polished_deepslate": "basalt_top" + } + }, + "giedi_prime_nether": { + "name": "Giedermark Nether", + "feel": "Industrial darkness, soot-black stone and ominous molten foundries", + "aliases": [ + "giedi_prime_nether", + "giedermark_nether" + ], + "blocks": { + "netherrack": "blackstone", + "nether_bricks": "polished_blackstone_bricks", + "red_nether_bricks": "cracked_polished_blackstone_bricks", + "nether_gold_ore": "gilded_blackstone", + "basalt_top": "blackstone_top", + "smooth_basalt": "blackstone", + "soul_soil": "coarse_dirt" + } + }, + "sigma_draconis_iv_the_end": { + "name": "Sigmadraken IV End", + "feel": "Cold alien stone, pale End islands and muted violet ruins", + "aliases": [ + "sigma_draconis_iv_the_end", + "sigmadraken_iv_the_end", + "sigmadraken_iv_end" + ], + "blocks": { + "end_stone": "diorite", + "end_stone_bricks": "polished_diorite" + } + } } diff --git a/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-arrakis-v2.zip b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-arrakis-v2.zip new file mode 100644 index 00000000..c8f94839 Binary files /dev/null and b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-arrakis-v2.zip differ diff --git a/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-caladan-v2.zip b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-caladan-v2.zip new file mode 100644 index 00000000..c637a6c3 Binary files /dev/null and b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-caladan-v2.zip differ diff --git a/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-giedi_prime-v2.zip b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-giedi_prime-v2.zip new file mode 100644 index 00000000..5860cc07 Binary files /dev/null and b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-giedi_prime-v2.zip differ diff --git a/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-giedi_prime_nether-v2.zip b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-giedi_prime_nether-v2.zip new file mode 100644 index 00000000..7dbcfff2 Binary files /dev/null and b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-giedi_prime_nether-v2.zip differ diff --git a/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-guild-v2.zip b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-guild-v2.zip new file mode 100644 index 00000000..b28e2432 Binary files /dev/null and b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-guild-v2.zip differ diff --git a/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-kaitain-v2.zip b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-kaitain-v2.zip new file mode 100644 index 00000000..89fa8cd4 Binary files /dev/null and b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-kaitain-v2.zip differ diff --git a/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-sigma_draconis_iv-v2.zip b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-sigma_draconis_iv-v2.zip new file mode 100644 index 00000000..2b6b48a6 Binary files /dev/null and b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-sigma_draconis_iv-v2.zip differ diff --git a/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-sigma_draconis_iv_the_end-v2.zip b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-sigma_draconis_iv_the_end-v2.zip new file mode 100644 index 00000000..252125ed Binary files /dev/null and b/DuneRealmsGUI/planet-artwork/release-v2/DuneRealms-Materials-sigma_draconis_iv_the_end-v2.zip differ diff --git a/DuneRealmsGUI/planet-artwork/release-v2/manifest.json b/DuneRealmsGUI/planet-artwork/release-v2/manifest.json new file mode 100644 index 00000000..a0fc16a2 --- /dev/null +++ b/DuneRealmsGUI/planet-artwork/release-v2/manifest.json @@ -0,0 +1,113 @@ +{ + "version": 2, + "sourceCommit": "28e38cab7c1f03f86364ef704f705bebcc13cb3d", + "license": "CC-BY-SA-4.0", + "packId": "59f34b30-6a86-5e58-a813-6e776f726c64", + "packs": { + "guild": { + "name": "Vaerkring", + "filename": "DuneRealms-Materials-guild-v2.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-guild-v2.zip", + "sha1": "c26c95ae25146fca3e3aec11a703919a001de607", + "sha256": "21df08fed7f13dcf6bee488f2103cbee44da157a3fa581e2d76a47edb090348f", + "bytes": 739556, + "entries": 1445, + "aliases": [ + "guild_lobby" + ] + }, + "arrakis": { + "name": "Arrakduin", + "filename": "DuneRealms-Materials-arrakis-v2.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v2.zip", + "sha1": "b00859f576801967c0c6478fd4fb562820772f49", + "sha256": "350014780c1c0b83e0713cc308e5227a43345169a7c1128a235dc1065583672d", + "bytes": 740437, + "entries": 1447, + "aliases": [ + "arrakis", + "arrakduin" + ] + }, + "caladan": { + "name": "Kaladam", + "filename": "DuneRealms-Materials-caladan-v2.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-caladan-v2.zip", + "sha1": "3f5b1674dfeb5761a9253ae411463a3e7a2e6b32", + "sha256": "729102252e911d2b8a242e083b128e4d1fe0d5d5a8333e2fe3be3de16794242a", + "bytes": 740635, + "entries": 1447, + "aliases": [ + "caladan", + "kaladam" + ] + }, + "giedi_prime": { + "name": "Giedermark", + "filename": "DuneRealms-Materials-giedi_prime-v2.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime-v2.zip", + "sha1": "f7c734ee98086e5b96cd566599640c6514377f81", + "sha256": "4b7a1dae736dbd924bb2e7b3009b8e07bff6b73a136d5aafb410529eae71cd74", + "bytes": 740528, + "entries": 1448, + "aliases": [ + "giedi_prime", + "giedermark" + ] + }, + "kaitain": { + "name": "Kaiterhof", + "filename": "DuneRealms-Materials-kaitain-v2.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-kaitain-v2.zip", + "sha1": "b06c9dc895c99aae2ccaaddfac0ffcba4ba6a534", + "sha256": "d9a8c34cb3750593d4273160e69ef83649c62a42abc182370cbed22d4b535866", + "bytes": 740513, + "entries": 1447, + "aliases": [ + "kaitain", + "kaiterhof" + ] + }, + "sigma_draconis_iv": { + "name": "Sigmadraken IV", + "filename": "DuneRealms-Materials-sigma_draconis_iv-v2.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv-v2.zip", + "sha1": "ede1901098d763738d713e5a71508c9b53680989", + "sha256": "b32ac3cf3fc668c065067df7a2d8d23785efe1a20c55d96cd4f8acae20c013ae", + "bytes": 740935, + "entries": 1448, + "aliases": [ + "sigma_draconis_iv", + "sigmadraken_iv", + "sigmadraken iv" + ] + }, + "giedi_prime_nether": { + "name": "Giedermark Nether", + "filename": "DuneRealms-Materials-giedi_prime_nether-v2.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime_nether-v2.zip", + "sha1": "67b0119916a21130dd8000df62a2e8d718888bac", + "sha256": "1336a0bddebee93a34c2c01298b7c4663ed4d8cd4933feaf3192a8e4ab4469d1", + "bytes": 739943, + "entries": 1446, + "aliases": [ + "giedi_prime_nether", + "giedermark_nether" + ] + }, + "sigma_draconis_iv_the_end": { + "name": "Sigmadraken IV End", + "filename": "DuneRealms-Materials-sigma_draconis_iv_the_end-v2.zip", + "url": "https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv_the_end-v2.zip", + "sha1": "26fcb853b3f71a1c126cd0ed6c19a00a7bea5cb1", + "sha256": "8ab33f9dd5fcdddcf45807ae0da66f762466bf0927b85765f7543760456b6022", + "bytes": 739567, + "entries": 1445, + "aliases": [ + "sigma_draconis_iv_the_end", + "sigmadraken_iv_the_end", + "sigmadraken_iv_end" + ] + } + } +} diff --git a/DuneRealmsGUI/planet-artwork/release-v2/planet-textures.yml b/DuneRealmsGUI/planet-artwork/release-v2/planet-textures.yml new file mode 100644 index 00000000..c617787f --- /dev/null +++ b/DuneRealmsGUI/planet-artwork/release-v2/planet-textures.yml @@ -0,0 +1,48 @@ +# Enable after publishing every pinned ZIP from planet-artwork/release-v1/. +# Java material layer only. Geyser/Bedrock requires its own converted pack. +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 + worlds: ["guild_lobby"] + arrakis: + name: "Arrakduin" + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v2.zip + sha1: b00859f576801967c0c6478fd4fb562820772f49 + worlds: ["arrakis","arrakduin"] + caladan: + name: "Kaladam" + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-caladan-v2.zip + sha1: 3f5b1674dfeb5761a9253ae411463a3e7a2e6b32 + worlds: ["caladan","kaladam"] + giedi_prime: + name: "Giedermark" + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime-v2.zip + sha1: f7c734ee98086e5b96cd566599640c6514377f81 + worlds: ["giedi_prime","giedermark"] + kaitain: + name: "Kaiterhof" + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-kaitain-v2.zip + sha1: b06c9dc895c99aae2ccaaddfac0ffcba4ba6a534 + worlds: ["kaitain","kaiterhof"] + sigma_draconis_iv: + name: "Sigmadraken IV" + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv-v2.zip + sha1: ede1901098d763738d713e5a71508c9b53680989 + worlds: ["sigma_draconis_iv","sigmadraken_iv","sigmadraken iv"] + giedi_prime_nether: + name: "Giedermark Nether" + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime_nether-v2.zip + sha1: 67b0119916a21130dd8000df62a2e8d718888bac + worlds: ["giedi_prime_nether","giedermark_nether"] + 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 + worlds: ["sigma_draconis_iv_the_end","sigmadraken_iv_the_end","sigmadraken_iv_end"] diff --git a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/DuneGUI.java b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/DuneGUI.java index fb12f458..803f1a7e 100644 --- a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/DuneGUI.java +++ b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/DuneGUI.java @@ -43,7 +43,7 @@ public final class DuneGUI extends JavaPlugin implements Listener,CommandExecuto 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-v1.zip","f1bc7d4851f1b361f14f96d260d5a91f769aa966"); + 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; var data=org.bukkit.configuration.file.YamlConfiguration.loadConfiguration(file); @@ -253,7 +253,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){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());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/MCGUIMenus.java b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/MCGUIMenus.java index fb567d4a..f610165b 100644 --- a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/MCGUIMenus.java +++ b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/MCGUIMenus.java @@ -16,6 +16,7 @@ final class MCGUIMenus implements AutoCloseable { private static MCGUIMenus active; private final JavaPlugin plugin; private final Map sessions=new HashMap<>(); + private final Set closeHints=new HashSet<>(); private final ExecutorService drawings=Executors.newSingleThreadExecutor(r->{Thread t=new Thread(r,"DuneRealms-menu-render");t.setDaemon(true);return t;}); private Plugin engine;private Object framework,loader,none;private Class contentType,optionsType;private Object defaultOptions; private Method makeCanvas,openView,hasPack,pageOf,render,draw,hoverState; @@ -47,6 +48,7 @@ final class MCGUIMenus implements AutoCloseable { static boolean show(Player p,String title,String description,Inventory inventory,Map actions,GuiSession gate){ return active!=null&&active.present(p,title,description,inventory,actions,gate); } + static void forget(UUID player){if(active!=null)active.closeHints.remove(player);} static void offerPack(Player p){if(active!=null&&!BedrockForms.isBedrock(p))active.sendPack(p);} private void sendPack(Player p){if(!p.getWorld().getName().equals("guild_lobby"))return;p.addResourcePack(packId,packUrl,packHash,"DuneRealms interactive menus",true);} private boolean present(Player p,String title,String description,Inventory inventory,Map actions,GuiSession suppliedGate){ @@ -81,7 +83,7 @@ final class MCGUIMenus implements AutoCloseable { String html=MenuDocument.html(title,description,player.getName(),cards,selected,base.getParent());Object page=pageOf.invoke(null,html,base,loader); Object paintState=none;Object document=page.getClass().getField("document").get(page);String selector=expected<=-100?"[data-pick=\""+(-100-expected)+"\"]":"[data-slot=\""+expected+"\"]";Object element=document.getClass().getMethod("selectFirst",String.class).invoke(document,selector);if(element!=null)paintState=hoverState.invoke(null,element,null);Object next=render.invoke(null,page,1536,896,1.5,offset,paintState); if(!alive)return;draw.invoke(canvas,next.getClass().getMethod("image").invoke(next),0,0);frame=next; - Bukkit.getScheduler().runTask(plugin,()->{if(!current())return;if(view==null)try{Object proxy=Proxy.newProxyInstance(contentType.getClassLoader(),new Class[]{contentType},this);view=openView.invoke(framework,player,proxy,defaultOptions);}catch(Exception e){finish();sessions.remove(player.getUniqueId());player.sendMessage("The menu could not open. Load the menu pack and reopen your Codex.");plugin.getLogger().warning("MC GUI view failed: "+e.getClass().getSimpleName());}}); + Bukkit.getScheduler().runTask(plugin,()->{if(!current())return;if(view==null)try{Object proxy=Proxy.newProxyInstance(contentType.getClassLoader(),new Class[]{contentType},this);view=openView.invoke(framework,player,proxy,defaultOptions);if(closeHints.add(player.getUniqueId()))player.sendMessage("Press Shift to close this menu.");}catch(Exception e){finish();sessions.remove(player.getUniqueId());player.sendMessage("The menu could not open. Load the menu pack and reopen your Codex.");plugin.getLogger().warning("MC GUI view failed: "+e.getClass().getSimpleName());}}); }catch(Exception|LinkageError e){if(alive){plugin.getLogger().log(java.util.logging.Level.WARNING,"MC GUI render failed",e);Bukkit.getScheduler().runTask(plugin,()->{if(current()){finish();sessions.remove(player.getUniqueId(),this);player.sendMessage("The new menu could not be drawn. Please retry /menu.");}});}} finally{queued.set(false);if(alive&&(expected!=hovered||selected!=picked||offset!=scroll))schedule();} });} diff --git a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetMaterialPolicy.java b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetMaterialPolicy.java index 5a935750..7b576ff4 100644 --- a/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetMaterialPolicy.java +++ b/DuneRealmsGUI/src/main/java/com/dunerealms/gui/PlanetMaterialPolicy.java @@ -7,7 +7,7 @@ final class PlanetMaterialPolicy { 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){ - if(!key.matches("guild|arrakis|caladan|giedi_prime|kaitain|sigma_draconis_iv")|| + if(!key.matches("guild|arrakis|caladan|giedi_prime|giedi_prime_nether|kaitain|sigma_draconis_iv|sigma_draconis_iv_the_end")|| !url.matches("https://www\\.dunerealms\\.com/downloads/DuneRealms-Materials-"+key+"-v[1-9][0-9]*\\.zip")|| !hash.matches("[0-9a-f]{40}"))throw new IllegalArgumentException("Invalid material pack pin"); } diff --git a/DuneRealmsGUI/src/main/resources/planet-textures.yml b/DuneRealmsGUI/src/main/resources/planet-textures.yml index 012f2992..c617787f 100644 --- a/DuneRealmsGUI/src/main/resources/planet-textures.yml +++ b/DuneRealmsGUI/src/main/resources/planet-textures.yml @@ -8,31 +8,41 @@ worlds: {} packs: guild: name: "Vaerkring" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-guild-v1.zip - sha1: 958b0bc07e49c33427d262a2621b1b154f9c9fa5 + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-guild-v2.zip + sha1: c26c95ae25146fca3e3aec11a703919a001de607 worlds: ["guild_lobby"] arrakis: name: "Arrakduin" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v1.zip - sha1: c85b84125bad0e913f795b4aeb8364a7caab8d8d + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-arrakis-v2.zip + sha1: b00859f576801967c0c6478fd4fb562820772f49 worlds: ["arrakis","arrakduin"] caladan: name: "Kaladam" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-caladan-v1.zip - sha1: b21aafb4263c2f499540c28f382d1c8984786313 + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-caladan-v2.zip + sha1: 3f5b1674dfeb5761a9253ae411463a3e7a2e6b32 worlds: ["caladan","kaladam"] giedi_prime: name: "Giedermark" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime-v1.zip - sha1: 5e0b691fda32ad0f8f3bc00bd477cdc5c538cdef + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime-v2.zip + sha1: f7c734ee98086e5b96cd566599640c6514377f81 worlds: ["giedi_prime","giedermark"] kaitain: name: "Kaiterhof" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-kaitain-v1.zip - sha1: 95f77e0e32c8e9920d45b6dff0115a45b0198cb1 + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-kaitain-v2.zip + sha1: b06c9dc895c99aae2ccaaddfac0ffcba4ba6a534 worlds: ["kaitain","kaiterhof"] sigma_draconis_iv: name: "Sigmadraken IV" - url: https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv-v1.zip - sha1: 2631a5dee656d5f12f936b2e5dea665137817b84 + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv-v2.zip + sha1: ede1901098d763738d713e5a71508c9b53680989 worlds: ["sigma_draconis_iv","sigmadraken_iv","sigmadraken iv"] + giedi_prime_nether: + name: "Giedermark Nether" + url: https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime_nether-v2.zip + sha1: 67b0119916a21130dd8000df62a2e8d718888bac + worlds: ["giedi_prime_nether","giedermark_nether"] + 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 + worlds: ["sigma_draconis_iv_the_end","sigmadraken_iv_the_end","sigmadraken_iv_end"] diff --git a/DuneRealmsGUI/src/main/resources/plugin.yml b/DuneRealmsGUI/src/main/resources/plugin.yml index 7e264508..22f39a31 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.26 +version: 1.1.27 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/PlanetMaterialPolicyTest.java b/DuneRealmsGUI/src/test/java/com/dunerealms/gui/PlanetMaterialPolicyTest.java index d0aa20b6..5e9e1206 100644 --- a/DuneRealmsGUI/src/test/java/com/dunerealms/gui/PlanetMaterialPolicyTest.java +++ b/DuneRealmsGUI/src/test/java/com/dunerealms/gui/PlanetMaterialPolicyTest.java @@ -4,6 +4,20 @@ import org.junit.jupiter.api.Test; import static org.junit.jupiter.api.Assertions.*; class PlanetMaterialPolicyTest { + @Test void ordosEndHasAnExplicitIndependentStyle(){ + var aliases=Map.of("sigma_draconis_iv","sigma_draconis_iv","sigma_draconis_iv_the_end","sigma_draconis_iv_the_end"); + assertEquals("sigma_draconis_iv_the_end",PlanetMaterialPolicy.profile("sigma_draconis_iv_the_end",aliases)); + assertEquals("sigma_draconis_iv",PlanetMaterialPolicy.profile("sigma_draconis_iv",aliases)); + assertNull(PlanetMaterialPolicy.profile("giedi_prime_the_end",aliases)); + assertDoesNotThrow(()->PlanetMaterialPolicy.validate("sigma_draconis_iv_the_end","https://www.dunerealms.com/downloads/DuneRealms-Materials-sigma_draconis_iv_the_end-v2.zip","0123456789abcdef0123456789abcdef01234567")); + } + @Test void harkonnenNetherUsesItsOwnPinnedStyleWithoutChangingOtherDimensions(){ + var aliases=Map.of("giedi_prime","giedi_prime","giedi_prime_nether","giedi_prime_nether"); + assertEquals("giedi_prime_nether",PlanetMaterialPolicy.profile("Giedi_Prime_Nether",aliases)); + assertEquals("giedi_prime",PlanetMaterialPolicy.profile("giedi_prime",aliases)); + assertNull(PlanetMaterialPolicy.profile("caladan_nether",aliases)); + assertDoesNotThrow(()->PlanetMaterialPolicy.validate("giedi_prime_nether","https://www.dunerealms.com/downloads/DuneRealms-Materials-giedi_prime_nether-v2.zip","0123456789abcdef0123456789abcdef01234567")); + } @Test void exactWorldAliasesDoNotLeakPlanetTexturesIntoNetherOrUnknownWorlds(){ var aliases=Map.of("arrakduin","arrakis","guild_lobby","guild","world","caladan"); assertEquals("arrakis",PlanetMaterialPolicy.profile("Arrakduin",aliases)); diff --git a/tools/build-network-artwork-pack.py b/tools/build-network-artwork-pack.py index 197b78c7..eb11f6eb 100644 --- a/tools/build-network-artwork-pack.py +++ b/tools/build-network-artwork-pack.py @@ -5,7 +5,7 @@ worlds' normal rabbits and wolves retain their vanilla appearance. """ import hashlib,json,pathlib,sys,zipfile -def build(gui,items,creatures,output): +def build(gui,items,creatures,output,sand=None): entries={} for path in (gui,items): with zipfile.ZipFile(path) as pack: @@ -22,6 +22,13 @@ def build(gui,items,creatures,output): 'entity/wolf/wolf_snowy.png','entity/wolf/wolf_snowy_tame.png','entity/wolf/wolf_snowy_angry.png', 'entity/camel/camel.png','entity/camel/camel_baby.png'): key='assets/minecraft/textures/'+name;entries[key]=pack.read(key) + if sand is not None: + names=('sand','red_sand','suspicious_sand_0','suspicious_sand_1','suspicious_sand_2','suspicious_sand_3') + with zipfile.ZipFile(sand) as pack: + for name in names: + for suffix in ('','_n','_s'): + key='assets/minecraft/textures/block/'+name+suffix+'.png';entries[key]=pack.read(key) + for key in ('LICENSE-Sand-Luanti.txt','CREDITS-Sand.txt'):entries[key]=pack.read(key) output.parent.mkdir(parents=True,exist_ok=True) with zipfile.ZipFile(output,'w',zipfile.ZIP_DEFLATED) as pack: for key,data in sorted(entries.items()): diff --git a/tools/build-planet-texture-packs.mjs b/tools/build-planet-texture-packs.mjs index d19b4bea..65640d14 100644 --- a/tools/build-planet-texture-packs.mjs +++ b/tools/build-planet-texture-packs.mjs @@ -4,6 +4,7 @@ import path from 'node:path'; import {fileURLToPath} from 'node:url'; import {createHash} from 'node:crypto'; import {deflateRawSync} from 'node:zlib'; +import {sandEntries} from './flat-sand.mjs'; const root=path.resolve(path.dirname(fileURLToPath(import.meta.url)),'..'); const art=path.join(root,'DuneRealmsGUI/planet-artwork'); @@ -47,6 +48,9 @@ export function textureEntries(planet){ entries.set(key,fs.readFileSync(src));entries.delete(key+'.mcmeta'); if(fs.existsSync(src+'.mcmeta'))entries.set(key+'.mcmeta',fs.readFileSync(src+'.mcmeta')); } + for(const [name,bytes] of sandEntries(planet)){entries.set(name,bytes);entries.delete(name+'.mcmeta');} + entries.set('LICENSE-Sand-Luanti.txt',fs.readFileSync(path.join(art,'flat-sand/LICENSE.txt'))); + entries.set('CREDITS-Sand.txt',fs.readFileSync(path.join(art,'flat-sand/CREDITS.txt'))); entries.set('pack.mcmeta',Buffer.from(JSON.stringify({pack:{pack_format:64,supported_formats:[64,97],min_format:64,max_format:97,description:'DuneRealms '+profile.name+' · '+profile.feel}}))); entries.set('LICENSE-Pixel-Perfection-CE.md',fs.readFileSync(path.join(source,'LICENSE.md'))); entries.set('CREDITS.txt',Buffer.from('Pixel Perfection CE by XSSheep and community contributors (Athemis, StonePendant, freejusticehere, Stingraych, Nova_Wostra, lazerl0rd).\nhttps://github.com/Athemis/PixelPerfectionCE\nSource commit: 28e38cab7c1f03f86364ef704f705bebcc13cb3d\nTextures and DuneRealms material remappings: CC-BY-SA-4.0. https://creativecommons.org/licenses/by-sa/4.0/\nDuneRealms changes: block/item-only extraction, modern pack metadata, named material remappings; original pixels preserved. No endorsement implied.\n')); @@ -54,9 +58,9 @@ export function textureEntries(planet){ } export function build(output){ - fs.mkdirSync(output,{recursive:true});const manifest={version:1,sourceCommit:'28e38cab7c1f03f86364ef704f705bebcc13cb3d',license:'CC-BY-SA-4.0',packId:'59f34b30-6a86-5e58-a813-6e776f726c64',packs:{}}; + fs.mkdirSync(output,{recursive:true});const manifest={version:2,sourceCommit:'28e38cab7c1f03f86364ef704f705bebcc13cb3d',license:'CC-BY-SA-4.0',packId:'59f34b30-6a86-5e58-a813-6e776f726c64',packs:{}}; for(const [planet,profile] of Object.entries(profiles)){ - const entries=textureEntries(planet),bytes=zip(entries),filename=`DuneRealms-Materials-${planet}-v1.zip`; + const entries=textureEntries(planet),bytes=zip(entries),filename=`DuneRealms-Materials-${planet}-v2.zip`; fs.writeFileSync(path.join(output,filename),bytes); manifest.packs[planet]={name:profile.name,filename,url:'https://www.dunerealms.com/downloads/'+filename,sha1:digest('sha1',bytes),sha256:digest('sha256',bytes),bytes:bytes.length,entries:entries.size,aliases:profile.aliases}; } diff --git a/tools/build-planet-texture-packs.test.mjs b/tools/build-planet-texture-packs.test.mjs index f4503c23..40768834 100644 --- a/tools/build-planet-texture-packs.test.mjs +++ b/tools/build-planet-texture-packs.test.mjs @@ -6,6 +6,20 @@ import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path'; import {build,profiles,textureEntries,protectedTextures} from './build-planet-texture-packs.mjs'; +import {sandPalettes} from './flat-sand.mjs'; + +function chunks(png,type){const found=[];for(let i=8;i{ + for(const planet of Object.keys(sandPalettes)){ + const entries=textureEntries(planet),get=n=>entries.get('assets/minecraft/textures/block/'+n+'.png'); + const sand=get('sand'),spice=get('suspicious_sand_0');assert.deepEqual(chunks(sand,'IDAT'),chunks(spice,'IDAT')); + const a=chunks(sand,'PLTE'),b=chunks(spice,'PLTE');for(let i=0;ix===0)); + } + } +}); function readZip(bytes){ const result=new Map();let offset=0; @@ -29,7 +43,7 @@ test('each planet has distinct stone, readable ordinary items, and no custom-art for(const name of protectedTextures)assert.equal(entries.has('assets/minecraft/textures/block/'+name+'.png'),false,'Dune spice carrier must remain unchanged'); assert(entries.has('LICENSE-Pixel-Perfection-CE.md')); assert.match(entries.get('CREDITS.txt').toString(),/28e38cab7c1f03f86364ef704f705bebcc13cb3d/); - if(key!=='guild')stones.push(createHash('sha256').update(entries.get('assets/minecraft/textures/block/stone.png')).digest('hex')); + if(key!=='guild'&&!key.endsWith('_nether')&&!key.endsWith('_the_end'))stones.push(createHash('sha256').update(entries.get('assets/minecraft/textures/block/stone.png')).digest('hex')); for(const name of entries.keys())if(name.endsWith('.mcmeta')&&name!=='pack.mcmeta')assert(entries.has(name.slice(0,-7))); } assert.equal(new Set(stones).size,5,'All five planets must have visibly distinct stone textures'); diff --git a/tools/flat-sand.mjs b/tools/flat-sand.mjs new file mode 100644 index 00000000..81b7194a --- /dev/null +++ b/tools/flat-sand.mjs @@ -0,0 +1,26 @@ +import fs from 'node:fs'; +import {fileURLToPath} from 'node:url'; + +const source=fs.readFileSync(fileURLToPath(new URL('../DuneRealmsGUI/planet-artwork/flat-sand/default_sand.png',import.meta.url))); +const table=Array.from({length:256},(_,n)=>{for(let i=0;i<8;i++)n=(n&1)?0xedb88320^(n>>>1):n>>>1;return n>>>0;}); +function crc(bytes){let n=0xffffffff;for(const b of bytes)n=table[(n^b)&255]^(n>>>8);return (n^0xffffffff)>>>0;} +// Palette-only build transform: preserve the source's exact grain and seamless tile. +export function palette(rgb,contrast=.3,darken=1){ + const out=Buffer.from(source);if(out[25]!==3)throw Error('Pinned indexed sand PNG required'); + for(let i=8;i