simplify tools: shared harness setup (pipeline, block proxy, render job, framing, record copy, label cells, contact sheets) for the standalone renderers and the benchmark, block-entity scenes as name/yaw records, one dump pipeline for mob and avatar renderers with a shared submit helper, transform record and jem/entry/subset helpers, posed block entities from direct layer constants, pptest scenes registered once with settle-tick and resolution tables and put() for all blocks, jdk detection and full error log in the dump script, pptest jar rebuilt instead of updated, gradle task printing the tool classpath, comments trimmed
This commit is contained in:
1 parent
b242adb6d2
commit
02e052787c
11 files changed
+1449
-1686
No files matched your search
+15
-21
@@ -1,12 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Updates the bundled CEM entity-model set (the only asset PixelPics vendors itself).
|
||||
#
|
||||
# Source: the CEM Template Loader data (Ewan Howell / wynem) — vanilla Java entity models as JSON,
|
||||
# already correctly posed. These ultimately mirror Mojang's hardcoded Java EntityModel classes.
|
||||
#
|
||||
# NOTE: this set is now only the FALLBACK (rest-pose geometry) for entity types missing from the vanilla
|
||||
# client dump (+ the elytra fallback). Mob AND block-entity models come from that dump — regenerate it
|
||||
# with tools/update-vanilla-models.sh <version> on every Minecraft update.
|
||||
# Updates the vendored CEM template model set (Ewan Howell / wynem: vanilla Java entity models as JSON). It is
|
||||
# only the rest-pose FALLBACK for entity types missing from the vanilla client dump (+ the elytra fallback);
|
||||
# mob and block-entity models come from tools/update-vanilla-models.sh.
|
||||
#
|
||||
# Usage: tools/update-cem-models.sh # update if newer
|
||||
# tools/update-cem-models.sh --force # always overwrite
|
||||
@@ -20,21 +15,20 @@ trap 'rm -f "$TMP"' EXIT
|
||||
echo "Fetching $URL ..."
|
||||
curl -fsSL "$URL" -o "$TMP"
|
||||
|
||||
# Validate + read versions/counts.
|
||||
read -r NEW_VER NEW_COUNT < <(python3 -c "
|
||||
import json,sys
|
||||
d=json.load(open('$TMP'))
|
||||
assert 'models' in d and len(d['models'])>50, 'unexpected structure'
|
||||
print(d.get('version','?'), len(d['models']))
|
||||
")
|
||||
|
||||
CUR_VER="(none)"
|
||||
if [ -f "$DEST" ]; then
|
||||
CUR_VER="$(python3 -c "import json;print(json.load(open('$DEST')).get('version','?'))" 2>/dev/null || echo '?')"
|
||||
fi
|
||||
# Validates the download, prints "<new version> <model count> <current version>".
|
||||
read -r NEW_VER NEW_COUNT CUR_VER < <(python3 - "$TMP" "$DEST" <<'PY'
|
||||
import json, os, sys
|
||||
d = json.load(open(sys.argv[1]))
|
||||
assert 'models' in d and len(d['models']) > 50, 'unexpected structure'
|
||||
cur = '(none)'
|
||||
if os.path.exists(sys.argv[2]):
|
||||
try: cur = json.load(open(sys.argv[2])).get('version', '?')
|
||||
except Exception: cur = '?'
|
||||
print(d.get('version', '?'), len(d['models']), cur)
|
||||
PY
|
||||
)
|
||||
|
||||
echo "Current: $CUR_VER Remote: $NEW_VER ($NEW_COUNT models)"
|
||||
|
||||
if [ "${1:-}" != "--force" ] && [ "$CUR_VER" = "$NEW_VER" ]; then
|
||||
echo "Already up to date. (use --force to overwrite)"
|
||||
exit 0
|
||||
|
||||
Reference in new issue
Block a user