From 2f62e113f69350fbdc35b3e9aa2cc965f953e1b6 Mon Sep 17 00:00:00 2001 From: MrSphay Date: Mon, 4 May 2026 12:00:13 +0200 Subject: [PATCH] Add decompile runner workflow --- .codex/project.md | 60 ++++++++++++++++++++++++++++++++++ .gitea/workflows/decompile.yml | 52 +++++++++++++++++++++++++++++ .gitignore | 17 ++++++++++ AGENTS.md | 42 ++++++++++++++++++++++++ 4 files changed, 171 insertions(+) create mode 100644 .codex/project.md create mode 100644 .gitea/workflows/decompile.yml create mode 100644 .gitignore create mode 100644 AGENTS.md diff --git a/.codex/project.md b/.codex/project.md new file mode 100644 index 0000000..5b78d04 --- /dev/null +++ b/.codex/project.md @@ -0,0 +1,60 @@ +# Codex Project Notes + +## Project + +`Explosion Overhaul` is a private porting workspace for moving the upstream Forge 1.20.1 mod `Explosion Overhaul: A new level of destruction` to NeoForge `21.1.228` for Minecraft `1.21.1`. + +Repository: + +```text +MrSphay/Explosion-Overhaul +``` + +## Commands + +Local Java is not available in the current Codex environment, so Java tasks should run on the Gitea runner until a local JDK is configured. + +Planned commands: + +```text +./gradlew build +./gradlew runClient +``` + +Windows equivalents: + +```text +gradlew.bat build +gradlew.bat runClient +``` + +## Stack + +Minecraft mod, Java 21, NeoForge `21.1.228`, Minecraft `1.21.1`. + +## Build Artifacts + +Release artifacts are produced in: + +```text +build/libs +``` + +Expected files: + +```text +explosionoverhaul-*.jar +``` + +## Security And License Rules + +- Treat the decompiled upstream source as private porting material. +- Do not publish or redistribute the port without permission from the original author. +- Keep tokens and registry credentials out of the repository. +- External network calls currently used by runner workflows: + - Modrinth CDN for the upstream jar. + - CFR website for the decompiler jar. + +## Current Porting State + +The cloned repository initially contained the Codex Agent Repository Kit, not mod source. The first runner step is `.gitea/workflows/decompile.yml`, which creates a decompiled-source artifact for reconstruction. diff --git a/.gitea/workflows/decompile.yml b/.gitea/workflows/decompile.yml new file mode 100644 index 0000000..b48434e --- /dev/null +++ b/.gitea/workflows/decompile.yml @@ -0,0 +1,52 @@ +name: Decompile upstream jar + +on: + workflow_dispatch: + +jobs: + decompile: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: '21' + + - name: Download upstream mod and CFR + shell: bash + run: | + mkdir -p upstream tools build/decompiled + curl --fail-with-body --location \ + --output upstream/Explosion-Overhaul-0.2.3.0-forge.jar \ + "https://cdn.modrinth.com/data/sOxnTLKl/versions/93XGK0uB/Explosion-Overhaul-0.2.3.0-forge-.jar" + curl --fail-with-body --location \ + --output tools/cfr.jar \ + "https://www.benf.org/other/cfr/cfr-0.152.jar" + + - name: Decompile + shell: bash + run: | + java -jar tools/cfr.jar upstream/Explosion-Overhaul-0.2.3.0-forge.jar \ + --outputdir build/decompiled \ + --silent false \ + --comments false \ + --caseinsensitivefs true + + - name: Copy metadata + shell: bash + run: | + unzip -p upstream/Explosion-Overhaul-0.2.3.0-forge.jar META-INF/mods.toml > build/decompiled/mods.toml + unzip -p upstream/Explosion-Overhaul-0.2.3.0-forge.jar explosionoverhaul.mixins.json > build/decompiled/explosionoverhaul.mixins.json + find build/decompiled -maxdepth 3 -type f | sort > build/decompiled-file-list.txt + + - name: Upload decompiled sources + uses: actions/upload-artifact@v3 + with: + name: explosion-overhaul-decompiled-0.2.3.0-forge + path: | + build/decompiled/** + build/decompiled-file-list.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..59b227a --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +.gradle/ +build/ +run/ +out/ + +_mdk/ +tools/ +upstream/ +decompiled/ + +*.class +*.jar +*.log + +.idea/ +.vscode/ +*.iml diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..b81ce8f --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,42 @@ +# Agent Instructions + +## Project + +Explosion Overhaul private NeoForge port. + +## Repository Rules + +- This repository is for a private 1.21.1 NeoForge port of Explosion Overhaul. +- Do not publish the decompiled upstream source or release artifacts publicly unless the original author grants permission. +- Use the Gitea runner for Java/Gradle/decompiler work when local Java is unavailable. +- Preserve unrelated user changes. +- Do not commit secrets, `.env` files, private keys, certificates, or tokens. +- Do not create a public release unless explicitly requested. + +## Commands + +Use these commands when the NeoForge project is present: + +```bash +./gradlew build +./gradlew runClient +``` + +On Windows: + +```bat +gradlew.bat build +gradlew.bat runClient +``` + +## Artifacts + +Expected mod jars will be produced in: + +```text +build/libs +``` + +## Runner + +The workflow `.gitea/workflows/decompile.yml` decompiles the upstream 1.20.1 Forge jar into an Actions artifact. Use it before reconstructing the NeoForge source tree.