#!/usr/bin/env bash # Builds the edge-case test plugin (PPTest.jar) against the compiled PixelPics classes. # Usage: ./gradlew compileJava && tools/edgecase-plugin/build.sh [out.jar] # (classpath = paper-api + its deps, e.g. the Gradle compileClasspath joined with ":") # Then drop the jar into the TEST server's plugins/ (never production), start the server and run # `pptest all` (or `pptest `) in its console; renders land in plugins/PPTest/.png. # Scenes are built at world (5000 + i*64, 200, 5000) on stone platforms; see PPTest#onEnable. set -euo pipefail ROOT="$(cd "$(dirname "$0")/../.." && pwd)" API="${1:?compile classpath (paper-api + deps)}" OUT="${2:-$ROOT/build/PPTest.jar}" JAVAC="${JAVAC:-javac}" TMP="$(mktemp -d)" trap 'rm -rf "$TMP"' EXIT "$JAVAC" -nowarn -d "$TMP" -cp "$ROOT/build/classes/java/main:$API" "$ROOT/tools/edgecase-plugin/pptest/PPTest.java" cp "$ROOT/tools/edgecase-plugin/plugin.yml" "$TMP/" (cd "$TMP" && zip -q -r "$OUT" .) echo "Wrote $OUT"