Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/verify-base-metals-pin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
set -euo pipefail

commit="$(sed -n 's/^basemetals_source_commit=//p' gradle.properties)"
if [[ ! "$commit" =~ ^[0-9a-f]{40}$ ]]; then
echo "::error::Expected a full Base Metals source commit in gradle.properties"
exit 1
fi

branch=master-1.20.1
if ! status="$(gh api "repos/MinecraftModDevelopmentMods/BaseMetals/compare/$commit...$branch" --jq '.status')"; then
echo "::error::Could not verify Base Metals $commit on upstream $branch"
exit 1
fi
case "$status" in
identical|ahead) printf 'commit=%s\n' "$commit" >> "$GITHUB_OUTPUT" ;;
*) echo "::error::Base Metals $commit is not on upstream $branch ($status). Local-only pins cannot qualify hosted CI."
exit 1 ;;
esac
38 changes: 21 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: basePower 1.19 CI
name: basePower 1.20.1 CI

on:
push:
branches: [master-1.19.4, 'feature/**']
branches: [master-1.20.1, 'feature/**']
pull_request:
branches: [master-1.19.4]
branches: [master-1.20.1]

permissions:
contents: read

concurrency:
group: basepower-1.19-${{ github.workflow }}-${{ github.ref }}
group: basepower-1.20.1-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -21,20 +21,24 @@ jobs:
steps:
- name: Check out PowerAdvantage
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Require the Base Metals pin on upstream master-1.20.1
id: base-metals-pin
env:
GH_TOKEN: ${{ github.token }}
run: bash .github/verify-base-metals-pin.sh
- name: Use canonical LF dependency inputs
run: git config --global core.autocrlf false
- name: Check out pinned OreSpawn
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/OreSpawn
ref: 444d86ef48db2bf54422901b067c51d5832197fc
ref: 9d9db6cd315c9fce542808aa2551c94bf9267e93
path: .ci-dependencies/OreSpawn
- name: Use canonical LF dependency inputs
# Use the same source bytes on hosted and local dependency builds.
run: git config --global core.autocrlf false
- name: Check out pinned Base Metals
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/BaseMetals
ref: a9fdd6842f2a2e1e2e5b9a0abf9178d5675df044
ref: ${{ steps.base-metals-pin.outputs.commit }}
path: .ci-dependencies/BaseMetals
- name: Install pinned Java 25 Mavenizer runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
Expand Down Expand Up @@ -71,8 +75,8 @@ jobs:
chmod +x "$orespawn/gradlew" "$basemetals/gradlew"
(cd "$orespawn" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace)
(cd "$basemetals" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace)
osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.119041-deobf.jar"
bmjar="$basemetals/build/libs-dev/BaseMetals-3.1.2.119041-deobf.jar"
osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.120011-deobf.jar"
bmjar="$basemetals/build/libs-dev/BaseMetals-3.1.2.120011-deobf.jar"
test -f "$osjar" && test -f "$bmjar"
echo "orespawn=$osjar" >> "$GITHUB_OUTPUT"
echo "basemetals=$bmjar" >> "$GITHUB_OUTPUT"
Expand All @@ -83,25 +87,25 @@ jobs:
writeReleaseChecksums verifyEclipseProductionClasspath
-PbaseMetalsDeobfJar=${{ steps.dependencies.outputs.basemetals }}
-PoreSpawnDeobfJar=${{ steps.dependencies.outputs.orespawn }}
-Pforge45MavenizerJar=${{ steps.dependencies.outputs.mavenizer }}
-Pforge47MavenizerJar=${{ steps.dependencies.outputs.mavenizer }}
--no-daemon --stacktrace
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: basePower-1.19.4-${{ github.sha }}
name: basePower-1.20.1-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/basePower-2.4.11.119041.jar
build/libs/basePower-2.4.11.119041-sources.jar
build/libs/basePower-2.4.11.119041-javadoc.jar
build/libs/basePower-2.4.12.120011.jar
build/libs/basePower-2.4.12.120011-sources.jar
build/libs/basePower-2.4.12.120011-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt
- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: basePower-1.19.4-diagnostics-${{ github.sha }}
name: basePower-1.20.1-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
27 changes: 16 additions & 11 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CodeQL

on:
push:
branches: [master-1.19.4, 'feature/**']
branches: [master-1.20.1, 'feature/**']
pull_request:
branches: [master-1.19.4]
branches: [master-1.20.1]
schedule:
- cron: '47 7 * * 4'

Expand All @@ -21,20 +21,24 @@ jobs:
steps:
- name: Check out PowerAdvantage
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Require the Base Metals pin on upstream master-1.20.1
id: base-metals-pin
env:
GH_TOKEN: ${{ github.token }}
run: bash .github/verify-base-metals-pin.sh
- name: Use canonical LF dependency inputs
run: git config --global core.autocrlf false
- name: Check out pinned OreSpawn
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/OreSpawn
ref: 444d86ef48db2bf54422901b067c51d5832197fc
ref: 9d9db6cd315c9fce542808aa2551c94bf9267e93
path: .ci-dependencies/OreSpawn
- name: Use canonical LF dependency inputs
# Use the same source bytes on hosted and local dependency builds.
run: git config --global core.autocrlf false
- name: Check out pinned Base Metals
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/BaseMetals
ref: a9fdd6842f2a2e1e2e5b9a0abf9178d5675df044
ref: ${{ steps.base-metals-pin.outputs.commit }}
path: .ci-dependencies/BaseMetals
- name: Install pinned Java 25 Mavenizer runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
Expand Down Expand Up @@ -71,19 +75,20 @@ jobs:
chmod +x "$orespawn/gradlew" "$basemetals/gradlew"
(cd "$orespawn" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace)
(cd "$basemetals" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace)
echo "orespawn=$orespawn/build/libs-dev/OreSpawn-4.1.0.119041-deobf.jar" >> "$GITHUB_OUTPUT"
echo "basemetals=$basemetals/build/libs-dev/BaseMetals-3.1.2.119041-deobf.jar" >> "$GITHUB_OUTPUT"
echo "orespawn=$orespawn/build/libs-dev/OreSpawn-4.1.0.120011-deobf.jar" >> "$GITHUB_OUTPUT"
echo "basemetals=$basemetals/build/libs-dev/BaseMetals-3.1.2.120011-deobf.jar" >> "$GITHUB_OUTPUT"
echo "mavenizer=$mavenizer" >> "$GITHUB_OUTPUT"
- name: Initialize CodeQL
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
with:
languages: java-kotlin
build-mode: manual
- name: Compile production code
run: |
chmod +x ./gradlew
./gradlew $MMD_GRADLE_TOOLCHAINS clean classes --rerun-tasks --no-build-cache --no-daemon --stacktrace \
./gradlew $MMD_GRADLE_TOOLCHAINS clean classes verifyReleaseDependencies --rerun-tasks --no-build-cache --no-daemon --stacktrace \
-PbaseMetalsDeobfJar=${{ steps.dependencies.outputs.basemetals }} \
-PoreSpawnDeobfJar=${{ steps.dependencies.outputs.orespawn }} \
-Pforge45MavenizerJar=${{ steps.dependencies.outputs.mavenizer }}
-Pforge47MavenizerJar=${{ steps.dependencies.outputs.mavenizer }}
- name: Analyze
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
13 changes: 7 additions & 6 deletions .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ jobs:
exit 1
fi

successful_ci="$(gh api \
"repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/check-runs?per_page=100" \
--jq '[.check_runs[] | select(.name == "Build, test, and audit" and .conclusion == "success")] | length')"
successful_ci="$(gh api --method GET \
"repos/$GITHUB_REPOSITORY/actions/workflows/ci.yml/runs" \
-f head_sha="$GITHUB_SHA" -f branch="master-$minecraft_version" \
-f event=push -f status=success --jq '.total_count')"
if [[ "$successful_ci" -lt 1 ]]; then
echo "The tagged commit has no successful Build, test, and audit check" >&2
echo "The tagged commit has no successful push CI on master-$minecraft_version" >&2
exit 1
fi

Expand All @@ -80,10 +81,10 @@ jobs:
{
echo "## Release candidate validated"
echo
echo "Tag \`$GITHUB_REF_NAME\` matches this target and has a successful Build, test, and audit check."
echo "Tag \`$GITHUB_REF_NAME\` matches this target and has successful push CI on its release branch."
echo
echo "**Nothing has been published.**"
echo
echo "Live publication requires \`deploy-release.yml\` on the repository default branch."
echo "Once that guarded dispatcher is installed, continue at: $RELEASE_WORKFLOW_URL"
echo "After the exact CI artifact is approved and registered, continue at: $RELEASE_WORKFLOW_URL"
} >> "$GITHUB_STEP_SUMMARY"
4 changes: 2 additions & 2 deletions .github/workflows/validate-gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: Validate Gradle Wrapper
on:
push:
branches:
- master-1.19.4
- master-1.20.1
- 'feature/**'
pull_request:
branches:
- master-1.19.4
- master-1.20.1

permissions:
contents: read
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
basePower 2.4.12.120011 (Minecraft 1.20.1, Forge 47)

- Bring basePower to Forge 47 with the same blocks, items, and machine data.
- Use Minecraft's current screen rendering, creative tabs, and block properties.
- Keep all three mods on one creative tab and retain the old recipe unlocks.
- Keep the shared world upgrade hook so old machine facings, item wear and contents can be read before Minecraft converts the chunks.
- Map the renamed vanilla pottery and sound entries so 1.19.4 worlds open without a missing registry warning.
- Requires MMD OreSpawn 4.1.0.120011. If your world already uses Base Metals, keep it installed and upgrade to 3.1.2.120011 before opening a copy of the world.

basePower 2.4.11.119041 (Minecraft 1.19.4)

- Bring basePower to Forge 45 and Java 17 without renaming existing machines or items.
Expand Down
49 changes: 31 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,76 @@
# basePower

**Minecraft 1.19.4, version 2.4.11.119041.**
**Minecraft 1.20.1, Forge 47.4.10, Java 17.**

See the [1.19 port record](docs/1.19/PORT-STATUS.md) for the current checks.
This branch prepares basePower `2.4.12.120011`. It is not a download announcement.

See the [1.20.1 port record](docs/1.20.1/PORT-STATUS.md) for the current checks.
Results from earlier versions do not qualify this build.

basePower continues DrCyano's Power Advantage. It provides shared power,
fluids and item transport for baseSteam and baseElectric.

## Playing On 1.20.1

- Install [MMD OreSpawn 4.1.0.120011](https://www.curseforge.com/minecraft/mc-mods/mmd-orespawn/files/9175609) on both client and server.
- Base Metals is optional for a new basePower world. For a world that already
uses Base Metals, keep it installed and use the matching Forge 1.20.1 build
`3.1.2.120011`. Older Base Metals builds do not have the shared upgrade hook.
- baseSteam and baseElectric are separate mods. Use only their matching
1.20.1 builds. Additional Loot Tables is not needed on 1.20.1.

**Back up the entire world before upgrading. Test only disposable copies.**
The port keeps existing registry names and machine data. The upgrade checks
use disposable copies of original Advantage and released base* saves, including
connected machines, and check them again after a full restart. Check that the
other mods in your world support 1.19.4 before you upgrade.
other mods in your world support 1.20.1 before you upgrade.
The accepted [1.14 results](docs/1.14/BROADER-QUALIFICATION.md) are historical
evidence, not qualification of this port or a whole modpack.

Recipe-book discovery now follows relevant ingredients. See the [all-Advantage material checklist and automated discovery tests](docs/1.13/RECIPE-DISCOVERY.md). To regenerate the checked-in unlock JSON after changing recipes, run `node tools/generate-recipe-unlocks.js`; `check` rejects missing or stale ingredient criteria.

The [manufacturing progression audit](docs/1.13/MANUFACTURING-PROGRESSION.md) traces survival parts from raw resources, including configured material aliases, processing, loot-only parts and automated restart checks.

## Building Minecraft 1.19.4
## Building Minecraft 1.20.1

The build uses Forge 45.4.0, official `1.19.4` mappings,
MCP `20230314.122934`, ForgeGradle 7.0.34 and Gradle 9.6.1.
The build uses Forge 47.4.10, official `1.20.1` mappings,
MCP `20230612.114412`, ForgeGradle 7.0.34 and Gradle 9.6.1.
Use Java 17 for Gradle, compilation and Minecraft. Mavenizer also
needs Java 25. CI pins these JDKs and Java 8 for the legacy renamer. Pass the installed homes using
`-Porg.gradle.java.installations.paths=<java8>,<java17>,<java25>` and disable
automatic discovery and downloads for a reproducibility check.

Build the pinned Base Metals `3.1.2.119041` and OreSpawn `4.1.0.119041` deobf jars first.
Build the pinned Base Metals `3.1.2.120011` and OreSpawn `4.1.0.120011` deobf jars first.
The source pins and checksums are in `gradle.properties`.
Forge 45 also needs the Mavenizer compatibility jar in the pinned OreSpawn
Forge 47 also needs the Mavenizer compatibility jar in the pinned OreSpawn
checkout's `ci-fixtures/tools/` directory. It fixes decompiled Forge sources
on a clean build and uses Java 25. It is not part of the mod or game runtime.
Set `-Pforge45MavenizerJar=<path>` when that checkout is in another location.
Use Base Metals 3.1.2 if it is installed when upgrading a world. It lets
Set `-Pforge47MavenizerJar=<path>` when that checkout is in another location.
If Base Metals is installed, use the pinned 3.1.2 build when testing an upgrade. It lets
both mods preserve old items and machines before Minecraft converts the
chunk. An older Base Metals jar is not a substitute for this upgrade path.

Then run from the repository root:

```text
gradlew.bat clean check build javadoc verifyReleaseDependencies verifyReleaseArtifacts writeReleaseChecksums verifyEclipseProductionClasspath
gradlew.bat clean check build javadoc genEclipseRuns eclipse isolateEclipseProductionRuns verifyReleaseDependencies verifyReleaseArtifacts writeReleaseChecksums verifyEclipseProductionClasspath
```

The default dependency jars are:

```text
D:\BaseMetals\BaseMetals 119\BaseMetals\build\libs-dev\BaseMetals-3.1.2.119041-deobf.jar
D:\MinecraftMineralogy\OS119\OreSpawn\build\libs-dev\OreSpawn-4.1.0.119041-deobf.jar
D:\BaseMetals\BaseMetals 1201\BaseMetals\build\libs-dev\BaseMetals-3.1.2.120011-deobf.jar
D:\MinecraftMineralogy\OS1201\OreSpawn\build\libs-dev\OreSpawn-4.1.0.120011-deobf.jar
```

Other layouts can pass `-PbaseMetalsDeobfJar=<path>` and `-PoreSpawnDeobfJar=<path>`.
Dependencies are never embedded in PowerAdvantage artifacts.

Dependency checksums and source commits are recorded in `gradle.properties`.
Unknown artifacts fail the dependency audit. Archives use reproducible ordering,
LF text and no empty directories, so fresh checkouts produce the same bytes.
Unknown artifacts fail the dependency audit. The release audit also rejects a
player jar that differs from the frozen test kit. Hosted CI requires the Base
Metals pin to be on its upstream `master-1.20.1` branch; a locally tested pin
does not qualify a hosted build.

Release jars are written to `build/libs`; `deobfJar` writes the sibling-development jar to `build/libs-dev`.

Expand All @@ -71,10 +84,10 @@ Refresh the project in Eclipse, allow its Java build to finish, and launch the g

Eclipse copies production resources from `build/resources/main`, not directly from `src/main/resources`. This prevents its builder from overwriting the expanded `mods.toml` with raw `${version}` placeholders. After updating this setup, use **Gradle > Refresh Gradle Project**, then **Project > Clean** before relaunching. After editing resources or version properties, run `processResources` or refresh the Gradle project before the Eclipse build. See the [metadata regression notes](docs/1.13/ECLIPSE-METADATA.md).

To prepare a combined client, build the baseSteam and baseElectric `2.2.12.119041` deobf jars,
To prepare a combined client, build the baseSteam and baseElectric `2.2.13.120011` deobf jars,
run `gradlew.bat prepareCombinedEclipseLaunch`, refresh Eclipse, then launch
`runClientAllAdvantage.launch`. Inputs must match
`test-rig/profiles/native119/dev-core.json`; alternative layouts can pass
`test-rig/profiles/native1201/dev-core.json`; alternative layouts can pass
`-PsteamAdvantageDeobfJar=<path>` and `-PelectricAdvantageDeobfJar=<path>`.
The ordinary `runClient.launch` remains Power-only. Both use the `run` directory;
preparing a launch does not copy, open or qualify a save.
Expand Down Expand Up @@ -109,6 +122,6 @@ data-pack tags. The shared pre-flattening migration hook remains necessary;
its presence is not proof that an upgrade is safe.

The [legacy migration guide](docs/1.13/MIGRATION.md) describes the earlier protocols.
The [1.19 status](docs/1.19/PORT-STATUS.md) tracks this port's qualification.
The [Advantage Works 1.20.1 guide](test-rig/NATIVE1201.md) lists the automated checks.

The historical 1.10 handbook remains on the [1.10.2 branch](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.10.2/docs/1.10/README.md).
Loading
Loading