forked from unimatrix/web
Add native crossplay menus and organic Arrakis highlands
Recovered from the attached four-commit source patch (original tip 1686291). Includes native Java/Bedrock menus, minimal Essentials, organic highlands, finite Dense Spice, desert villages, Harkonnen fortress and three personal highland sietches. Original validation reports 50 passing tests on Java 21/Paper 1.21.8. Live Paper/Velocity/Bedrock/ViaVersion staging remains pending. Existing world, configuration and player data must be preserved.
This commit is contained in:
parent
c692949a78
commit
d988ea2983
3 changed files with 2005 additions and 138 deletions
46
tools/crossplay-lock.json
Normal file
46
tools/crossplay-lock.json
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
[
|
||||
{
|
||||
"project": "geyser",
|
||||
"version": "2.12.0",
|
||||
"build": 1267,
|
||||
"platform": "spigot",
|
||||
"name": "Geyser-Spigot.jar",
|
||||
"sha256": "70e4653cd69c771dc456c20d7c909d3ce1542114981023c9e95ea3dc2edd3648",
|
||||
"url": "https://download.geysermc.org/v2/projects/geyser/versions/2.12.0/builds/1267/downloads/spigot"
|
||||
},
|
||||
{
|
||||
"project": "geyser",
|
||||
"version": "2.12.0",
|
||||
"build": 1267,
|
||||
"platform": "velocity",
|
||||
"name": "Geyser-Velocity.jar",
|
||||
"sha256": "5ae8fc19790f28d9e779882713602a645ff3f7ee3389ac355209473a9aa07798",
|
||||
"url": "https://download.geysermc.org/v2/projects/geyser/versions/2.12.0/builds/1267/downloads/velocity"
|
||||
},
|
||||
{
|
||||
"project": "floodgate",
|
||||
"version": "2.2.5",
|
||||
"build": 141,
|
||||
"platform": "spigot",
|
||||
"name": "floodgate-spigot.jar",
|
||||
"sha256": "21570aff9ce17d6983928e8552777760e1ede5050026b04c686b0ae112e6fd7e",
|
||||
"url": "https://download.geysermc.org/v2/projects/floodgate/versions/2.2.5/builds/141/downloads/spigot"
|
||||
},
|
||||
{
|
||||
"project": "floodgate",
|
||||
"version": "2.2.5",
|
||||
"build": 141,
|
||||
"platform": "velocity",
|
||||
"name": "floodgate-velocity.jar",
|
||||
"sha256": "649835022de37ff09255fc626d4bfe7bc2a3b926d07b0dfaf1f51e12bf37001d",
|
||||
"url": "https://download.geysermc.org/v2/projects/floodgate/versions/2.2.5/builds/141/downloads/velocity"
|
||||
},
|
||||
{
|
||||
"project": "viaversion",
|
||||
"version": "5.12.1",
|
||||
"platform": "universal",
|
||||
"name": "ViaVersion-5.12.1.jar",
|
||||
"sha256": "b8033807e7182c35003a45962352dd642c1e91880ca281da3a43cb6f481a95a2",
|
||||
"url": "https://github.com/ViaVersion/ViaVersion/releases/download/5.12.1/ViaVersion-5.12.1.jar"
|
||||
}
|
||||
]
|
||||
36
tools/download-crossplay.py
Normal file
36
tools/download-crossplay.py
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Download the pinned official crossplay plugins and verify every SHA-256."""
|
||||
import hashlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
import urllib.request
|
||||
import zipfile
|
||||
import argparse
|
||||
|
||||
|
||||
def download(destination):
|
||||
lock = json.loads(Path(__file__).with_name('crossplay-lock.json').read_text())
|
||||
destination = Path(destination)
|
||||
for entry in lock:
|
||||
folder = destination / entry['platform']
|
||||
folder.mkdir(parents=True, exist_ok=True)
|
||||
target = folder / entry['name']
|
||||
if not target.exists():
|
||||
request = urllib.request.Request(entry['url'], headers={'User-Agent': 'DuneRealms-build/1.0'})
|
||||
with urllib.request.urlopen(request, timeout=120) as response:
|
||||
data = response.read()
|
||||
else:
|
||||
data = target.read_bytes()
|
||||
if hashlib.sha256(data).hexdigest() != entry['sha256']:
|
||||
raise ValueError('Checksum mismatch: ' + entry['name'])
|
||||
target.write_bytes(data)
|
||||
if not zipfile.is_zipfile(target):
|
||||
raise ValueError('Invalid JAR: ' + entry['name'])
|
||||
print('Verified', entry['project'], entry['version'], entry.get('build', ''), entry['platform'])
|
||||
(destination / 'crossplay-lock.json').write_text(json.dumps(lock, indent=2) + '\n')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('destination')
|
||||
download(parser.parse_args().destination)
|
||||
60
tools/package-server.py
Normal file
60
tools/package-server.py
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Build the single plugin-JAR ZIP after all five Gradle builds have passed."""
|
||||
from pathlib import Path
|
||||
import hashlib
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import urllib.request
|
||||
import zipfile
|
||||
|
||||
ROOT=Path(__file__).resolve().parents[1]
|
||||
DEST=ROOT/'build/server-package'
|
||||
JARS={'DuneRealms-minecraft-only':'Core','DuneEss':'Essentials','DuneTerrain':'Terrain','DuneNPC':'NPC','DuneLobby':'Lobby'}
|
||||
for module,name in JARS.items():
|
||||
jar=ROOT/module/'build/libs'/f'DuneRealms-{name}.jar'
|
||||
if not jar.is_file(): raise RuntimeError(f'Missing compiled JAR: {jar}')
|
||||
with zipfile.ZipFile(jar) as archive:
|
||||
if archive.testzip() is not None: raise ValueError(f'Invalid compiled JAR: {jar}')
|
||||
DEST.mkdir(parents=True,exist_ok=True)
|
||||
for module,name in JARS.items():
|
||||
shutil.copy2(ROOT/module/'build/libs'/f'DuneRealms-{name}.jar',DEST)
|
||||
subprocess.run([sys.executable,str(ROOT/'tools/download-crossplay.py'),str(DEST/'crossplay')],check=True)
|
||||
vault=DEST/'Vault-2.5.0.jar'
|
||||
with urllib.request.urlopen('https://github.com/Foulest/Vault/releases/download/2.5.0/Vault-2.5.0.jar',timeout=120) as response:
|
||||
data=response.read()
|
||||
if hashlib.sha256(data).hexdigest()!='3efb1c893d35807c0f3945068858a96af0f131020eee37545bdddb330044b2d9':
|
||||
raise ValueError('Vault SHA-256 mismatch')
|
||||
vault.write_bytes(data)
|
||||
with urllib.request.urlopen('https://raw.githubusercontent.com/Foulest/Vault/2.5.0/LICENSE',timeout=120) as response:
|
||||
(DEST/'Vault-LICENSE.txt').write_bytes(response.read())
|
||||
datapack=ROOT/'DuneTerrain/build/distributions/DuneRealms-Dune-Highlands-Datapack.zip'
|
||||
if not datapack.is_file(): raise RuntimeError('Build DuneTerrain including its biome/loot datapack first')
|
||||
with zipfile.ZipFile(datapack) as archive:
|
||||
if archive.testzip() is not None: raise ValueError('Invalid Arrakis datapack')
|
||||
shutil.copy2(datapack,DEST/datapack.name)
|
||||
shutil.copy2(ROOT/'DuneTerrain/README.md',DEST/'Arrakis-Update.md')
|
||||
shutil.copy2(ROOT/'docs/Arrakis-Update-Validation.md',DEST/'Arrakis-Validation.md')
|
||||
shutil.copy2(ROOT/'docs/Native-GUI.md',DEST/'Native-GUI.md')
|
||||
shutil.copy2(ROOT/'docs/Native-GUI-Validation.md',DEST/'Validation.md')
|
||||
with (DEST/'DuneRealms-Source-Changes.patch').open('wb') as patch:
|
||||
subprocess.run(['git','format-patch','--stdout','origin/main..HEAD'],cwd=ROOT,stdout=patch,check=True)
|
||||
shutil.copy2(ROOT/'README.md',DEST/'Project-README.md')
|
||||
(DEST/'README.txt').write_text('DuneRealms Essentials / native GUI staging build. Paper 1.21.8, Java 21.\n'
|
||||
'Read Native-GUI.md before installing. Replace old project JARs while stopped; keep all existing data folders.\n'
|
||||
'Crossplay JARs are separated by platform. Do not install both Geyser variants on the same network.\n'
|
||||
'No worlds, player data, private keys, or generated configurations are included.\n'
|
||||
'No resource pack or client mod is required. Live cross-client staging verification is still required.\n')
|
||||
lines=[]
|
||||
for path in sorted(DEST.rglob('*')):
|
||||
if path.is_file() and path.name!='SHA256SUMS.txt':
|
||||
lines.append(hashlib.sha256(path.read_bytes()).hexdigest()+' '+str(path.relative_to(DEST)))
|
||||
(DEST/'SHA256SUMS.txt').write_text('\n'.join(lines)+'\n')
|
||||
output=ROOT/'build/DuneRealms-All-Server-Jars.zip'
|
||||
with zipfile.ZipFile(output,'w',zipfile.ZIP_DEFLATED) as archive:
|
||||
for path in sorted(DEST.rglob('*')):
|
||||
if path.is_file(): archive.write(path,path.relative_to(DEST))
|
||||
with zipfile.ZipFile(output) as archive:
|
||||
assert archive.testzip() is None
|
||||
assert len([name for name in archive.namelist() if name.endswith('.jar')])==11
|
||||
print(output)
|
||||
Loading…
Reference in a new issue

Staff