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
22 changes: 17 additions & 5 deletions .github/verify-published-pins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,25 @@ set -euo pipefail

value() { sed -n "s/^$1=//p" gradle.properties | tr -d '\r'; }

if [[ "$(value poweradvantage_pin_state)" != 'MERGED_SOURCE' ]]; then
echo '::error::This local port has no merged and public basePower release pin.' >&2
exit 1
fi
for dependency in poweradvantage basemetals orespawn; do
id="$(value "${dependency}_public_file_id")"
if [[ ! "$id" =~ ^[1-9][0-9]*$ ]]; then
echo "::error::A verified public $dependency file ID is required before hosted builds." >&2
exit 1
fi
done

require_merged() {
local repo="$1" ref="$2" status
[[ "$ref" =~ ^[a-f0-9]{40}$ ]]
status="$(gh api "repos/MinecraftModDevelopmentMods/$repo/compare/$ref...master-1.20.6" --jq '.status')"
status="$(gh api "repos/MinecraftModDevelopmentMods/$repo/compare/$ref...master-1.21.1" --jq '.status')"
case "$status" in
identical|ahead) ;;
*) echo "::error::$repo $ref is not on upstream master-1.20.6 ($status)."; exit 1 ;;
*) echo "::error::$repo $ref is not on upstream master-1.21.1 ($status)."; exit 1 ;;
esac
}

Expand All @@ -36,7 +48,7 @@ require_merged basePower "$power_ref"
require_merged BaseMetals "$(value basemetals_source_commit)"
require_merged OreSpawn "$orespawn_ref"

inputs="${RUNNER_TEMP:?}/forge50-release-dependencies"
inputs="${RUNNER_TEMP:?}/forge52-release-dependencies"
mkdir -p "$inputs"
power="$inputs/basePower-$(value poweradvantage_version).jar"
metals="$inputs/BaseMetals-$(value basemetals_version).jar"
Expand All @@ -45,8 +57,8 @@ public_jar basePower 1780140 "$(value poweradvantage_public_file_id)" "$(value p
public_jar BaseMetals 240967 "$(value basemetals_public_file_id)" "$(value basemetals_deobf_sha256)" "$metals"
public_jar OreSpawn 245586 "$(value orespawn_public_file_id)" "$(value orespawn_deobf_sha256)" "$orespawn"

installer="$inputs/forge-1.20.6-50.2.0-installer.jar"
download 'https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.2.0/forge-1.20.6-50.2.0-installer.jar' \
installer="$inputs/forge-1.21.1-52.1.0-installer.jar"
download 'https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.0/forge-1.21.1-52.1.0-installer.jar' \
"$(value forge_installer_sha256)" "$installer"
{
printf 'power_ref=%s\n' "$power_ref"
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: baseElectric 1.20.6 CI
name: baseElectric 1.21.1 CI

on:
push:
branches: [master-1.20.6, 'feature/**']
branches: [master-1.21.1, 'feature/**']
pull_request:
branches: [master-1.20.6]
branches: [master-1.21.1]

permissions:
contents: read

concurrency:
group: baseelectric-1.20.6-${{ github.workflow }}-${{ github.ref }}
group: baseelectric-1.21.1-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
-Porg.gradle.java.installations.auto-download=false" >> "$GITHUB_ENV"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
- name: Verify the Forge 50 build inputs
- name: Verify the Forge 52 build inputs
shell: bash
env:
ORESPAWN_REF: ${{ steps.public-pins.outputs.orespawn_ref }}
Expand All @@ -74,33 +74,33 @@ jobs:
test "$(git -C "$orespawn" rev-parse HEAD)" = "$ORESPAWN_REF"
test "$(git -C "$power" rev-parse HEAD)" = "$POWER_REF"
mavenizer="$orespawn/ci-fixtures/tools/minecraft-mavenizer-0.5.21-orespawn-compat.jar"
printf '%s %s\n' '4B14145595E900F178A082F2253A756F63897E6F61C2B8B5E7C819B82CD79E8C' "$mavenizer" | sha256sum -c -
printf '%s %s\n' '019032A4A26ECB473D403EF017054D5892CE59A9904E8831B452287CD756397E' "$mavenizer" | sha256sum -c -
echo "MAVENIZER=$mavenizer" >> "$GITHUB_ENV"
- name: Build and audit release artifacts
shell: bash
run: |
./gradlew $MMD_GRADLE_TOOLCHAINS clean check build javadoc verifyReleaseDependencies verifyReleaseArtifacts \
writeReleaseChecksums verifyEclipseProductionClasspath --no-build-cache --no-daemon --stacktrace \
"-Pforge50MavenizerJar=$MAVENIZER" "-PpowerAdvantageDeobfJar=$POWER_PLAYER" \
"-Pforge52MavenizerJar=$MAVENIZER" "-PpowerAdvantageDeobfJar=$POWER_PLAYER" \
"-PbaseMetalsDeobfJar=$METALS_PLAYER" "-PoreSpawnDeobfJar=$ORESPAWN_PLAYER" \
"-PforgeInstallerJar=$FORGE_INSTALLER"
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: baseElectric-1.20.6-${{ github.sha }}
name: baseElectric-1.21.1-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/baseElectric-2.2.14.120061.jar
build/libs/baseElectric-2.2.14.120061-sources.jar
build/libs/baseElectric-2.2.14.120061-javadoc.jar
build/libs/baseElectric-2.2.15.121011.jar
build/libs/baseElectric-2.2.15.121011-sources.jar
build/libs/baseElectric-2.2.15.121011-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt
- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: baseElectric-1.20.6-diagnostics-${{ github.sha }}
name: baseElectric-1.21.1-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name: CodeQL

on:
push:
branches: [master-1.20.6, 'feature/**']
branches: [master-1.21.1, 'feature/**']
pull_request:
branches: [master-1.20.6]
branches: [master-1.21.1]

permissions:
contents: read
actions: read
security-events: write

concurrency:
group: baseelectric-1.20.6-${{ github.workflow }}-${{ github.ref }}
group: baseelectric-1.21.1-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
-Porg.gradle.java.installations.auto-download=false" >> "$GITHUB_ENV"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
- name: Verify the Forge 50 build inputs
- name: Verify the Forge 52 build inputs
shell: bash
env:
ORESPAWN_REF: ${{ steps.public-pins.outputs.orespawn_ref }}
Expand All @@ -76,7 +76,7 @@ jobs:
test "$(git -C "$orespawn" rev-parse HEAD)" = "$ORESPAWN_REF"
test "$(git -C "$power" rev-parse HEAD)" = "$POWER_REF"
mavenizer="$orespawn/ci-fixtures/tools/minecraft-mavenizer-0.5.21-orespawn-compat.jar"
printf '%s %s\n' '4B14145595E900F178A082F2253A756F63897E6F61C2B8B5E7C819B82CD79E8C' "$mavenizer" | sha256sum -c -
printf '%s %s\n' '019032A4A26ECB473D403EF017054D5892CE59A9904E8831B452287CD756397E' "$mavenizer" | sha256sum -c -
echo "MAVENIZER=$mavenizer" >> "$GITHUB_ENV"
- name: Initialize CodeQL
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
Expand All @@ -87,7 +87,7 @@ jobs:
shell: bash
run: |
./gradlew $MMD_GRADLE_TOOLCHAINS classes verifyReleaseDependencies --rerun-tasks --no-build-cache --no-daemon --stacktrace \
"-Pforge50MavenizerJar=$MAVENIZER" "-PpowerAdvantageDeobfJar=$POWER_PLAYER" \
"-Pforge52MavenizerJar=$MAVENIZER" "-PpowerAdvantageDeobfJar=$POWER_PLAYER" \
"-PbaseMetalsDeobfJar=$METALS_PLAYER" "-PoreSpawnDeobfJar=$ORESPAWN_PLAYER"
- name: Analyze
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
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.20.6
- master-1.21.1
- 'feature/**'
pull_request:
branches:
- master-1.20.6
- master-1.21.1

permissions:
contents: read
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
baseElectric 2.2.15.121011 (Minecraft 1.21.1 / Forge)

- Bring baseElectric to Minecraft 1.21.1 with basePower 2.4.14.121011.
- Keep machine settings, saved data, battery charge and legacy world aliases.
- Use the native recipe, data-pack and rendering APIs without changing recipe IDs.
- Pin the released basePower, Base Metals and OreSpawn jars used for the upgrade tests.

baseElectric 2.2.14.120061 (Minecraft 1.20.6 / Forge)

- Bring baseElectric to Minecraft 1.20.6 and Java 21 with basePower 2.4.13.120061.
Expand Down
37 changes: 20 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ baseElectric continues DrCyano's Electric Advantage. It adds electric machines,
generation, storage, automation and defence to basePower. Its equipment appears
in the shared basePower creative tab.

This version targets Minecraft **1.20.6**, Forge **50.2.0**, official mappings,
ForgeGradle **7.0.34**, and Java **21**. The version is **2.2.14.120061**.
Install [basePower 2.4.13.120061](https://www.curseforge.com/minecraft/mc-mods/basepower/files/9545972)
for Minecraft 1.20.6. CurseForge also installs
[Base Metals](https://www.curseforge.com/minecraft/mc-mods/base-metals); this
build was tested with 3.1.2.120061 and OreSpawn 4.1.0.120061.
See the [1.20.6 notes](docs/NATIVE1206.md) for save compatibility and test coverage.
This version targets Minecraft **1.21.1**, Forge **52.1.0**, official mappings
with MCP **20240808.132146**, ForgeGradle **7.0.34**, Gradle **9.6.1**, and Java
**21**. The version is **2.2.15.121011**. It requires basePower **2.4.14.121011**.
The coordinated dependencies are Base Metals **3.1.2.121011** and OreSpawn
**4.1.0.121011**. All three dependency pins use merged source and verified public
downloads. CurseForge, Maven and GitHub releases use the same checked player jar.
See the [1.21.1 notes](docs/NATIVE1211.md) for compatibility and verification status.

Back up your world and try the upgrade on a copy. Replace Electric Advantage
and Power Advantage with baseElectric and basePower; do not install both sets.
Expand All @@ -25,32 +25,35 @@ if Gradle cannot discover all three.
The independent Forge/resource checks do not require sibling jars:

```text
./gradlew --offline nativeResourceChecks verifyRecipeTagGuards processResources
./gradlew --offline nativeResourceChecks compileNativeApiDiagnostics verifyRecipeTagGuards processResources
node tools/verify-native-port.js
node tools/generate-recipe-unlocks.js --check
```

For the full local build, supply the files matching the pins in `gradle.properties`:
For a full local build, supply files matching the exact coordinated source
and jar pins recorded in `gradle.properties`. The current basePower pin is an
approved local commit, not merged or publicly released:

```text
-PpowerAdvantageRuntimeJar=/path/to/basePower-2.4.13.120061.jar
-PbaseMetalsRuntimeJar=/path/to/BaseMetals-3.1.2.120061.jar
-PforgeInstallerJar=/path/to/forge-1.20.6-50.2.0-installer.jar
-PpowerAdvantageRuntimeJar=/path/to/basePower-2.4.14.121011.jar
-PbaseMetalsRuntimeJar=/path/to/BaseMetals-3.1.2.121011.jar
-PforgeInstallerJar=/path/to/forge-1.21.1-52.1.0-installer.jar
```

Forge 50 uses the ordinary native jar for both play and development. The former
Forge 52 uses the ordinary native jar for both play and development. The former
`*DeobfJar` path flags remain aliases for the same bytes. OreSpawn and the
Mavenizer fixture default to the sibling `MinecraftMineralogy/OS1206/OreSpawn`
checkout. Use `-PoreSpawnRuntimeJar` and `-Pforge50MavenizerJar` to override paths.
Mavenizer fixture default to the sibling `MinecraftMineralogy/OS1211/OreSpawn`
checkout. Use `-PoreSpawnRuntimeJar` and `-Pforge52MavenizerJar` to override paths.
For the prepared cache, use `--offline` with `ORESPAWN_MAVENIZER_OFFLINE=true`.

```text
./gradlew check build javadoc verifyLocalRuntimeInputs writeReleaseChecksums verifyEclipseProductionClasspath --no-build-cache
```

Use `gradlew.bat` on Windows. Output jars go to `build/libs`. Dependencies
remain separate mods. The 1.20.6 CI jobs check against the pinned Forge 50
runtime and public dependencies.
remain separate mods. The 1.21.1 CI and CodeQL jobs require merged source pins
and checksum-matching public dependencies before checkout or compilation.
Local jars do not satisfy that gate.

## Verification

Expand Down
Loading
Loading