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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 20 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Power Advantage 1.16 CI
name: basePower 1.17 CI

on:
push:
branches: [master-1.16.5, 'feature/**']
branches: [master-1.17.1, 'feature/**']
pull_request:
branches: [master-1.16.5]
branches: [master-1.17.1]

permissions:
contents: read

concurrency:
group: poweradvantage-1.16-${{ github.workflow }}-${{ github.ref }}
group: poweradvantage-1.17-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/OreSpawn
ref: a113e5d767169189f0e35ade1e173a12d550b00e
ref: b56e2b62a1a6ea4d1dd96f8646a87801a817dbdf
path: .ci-dependencies/OreSpawn
- name: Use canonical LF dependency inputs
# Use the same source bytes on hosted and local dependency builds.
Expand All @@ -34,14 +34,19 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/BaseMetals
ref: 995f6cc4dd2d5eecc628a42e5c43fa5390c24bca
ref: 0deeeeecdbbc1fbcdecf910c59477de8efe164d7
path: .ci-dependencies/BaseMetals
- name: Install pinned Java 25 Mavenizer runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '25.0.3+9.0.LTS'
- name: Install Java 8 toolchain
- name: Install Java 16 production toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '16.0.2+7'
- name: Install Java 8 renamer runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
Expand All @@ -55,7 +60,7 @@ jobs:
# These are Gradle project properties, not JVM system properties.
shell: bash
run: >-
echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64
echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_16_X64,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64
-Porg.gradle.java.installations.auto-detect=false
-Porg.gradle.java.installations.auto-download=false" >> "$GITHUB_ENV"
- name: Set up Gradle
Expand All @@ -70,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.116051-deobf.jar"
bmjar="$basemetals/build/libs-dev/BaseMetals-3.1.1.116051-deobf.jar"
osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.117011-deobf.jar"
bmjar="$basemetals/build/libs-dev/BaseMetals-3.1.1.117011-deobf.jar"
test -f "$osjar" && test -f "$bmjar"
echo "orespawn=$osjar" >> "$GITHUB_OUTPUT"
echo "basemetals=$bmjar" >> "$GITHUB_OUTPUT"
Expand All @@ -85,20 +90,20 @@ jobs:
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: PowerAdvantage-1.16.5-${{ github.sha }}
name: PowerAdvantage-1.17.1-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/PowerAdvantage-2.4.7.116051.jar
build/libs/PowerAdvantage-2.4.7.116051-sources.jar
build/libs/PowerAdvantage-2.4.7.116051-javadoc.jar
build/libs/basePower-2.4.9.117011.jar
build/libs/basePower-2.4.9.117011-sources.jar
build/libs/basePower-2.4.9.117011-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt
- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: PowerAdvantage-1.16.5-diagnostics-${{ github.sha }}
name: PowerAdvantage-1.17.1-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
21 changes: 13 additions & 8 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.16.5, 'feature/**']
branches: [master-1.17.1, 'feature/**']
pull_request:
branches: [master-1.16.5]
branches: [master-1.17.1]
schedule:
- cron: '47 7 * * 4'

Expand All @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/OreSpawn
ref: a113e5d767169189f0e35ade1e173a12d550b00e
ref: b56e2b62a1a6ea4d1dd96f8646a87801a817dbdf
path: .ci-dependencies/OreSpawn
- name: Use canonical LF dependency inputs
# Use the same source bytes on hosted and local dependency builds.
Expand All @@ -34,14 +34,19 @@ jobs:
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/BaseMetals
ref: 995f6cc4dd2d5eecc628a42e5c43fa5390c24bca
ref: 0deeeeecdbbc1fbcdecf910c59477de8efe164d7
path: .ci-dependencies/BaseMetals
- name: Install pinned Java 25 Mavenizer runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '25.0.3+9.0.LTS'
- name: Install Java 8 toolchain
- name: Install Java 16 production toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '16.0.2+7'
- name: Install Java 8 renamer runtime
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
Expand All @@ -55,7 +60,7 @@ jobs:
# These are Gradle project properties, not JVM system properties.
shell: bash
run: >-
echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64
echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_16_X64,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64
-Porg.gradle.java.installations.auto-detect=false
-Porg.gradle.java.installations.auto-download=false" >> "$GITHUB_ENV"
- name: Set up Gradle
Expand All @@ -70,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)
echo "orespawn=$orespawn/build/libs-dev/OreSpawn-4.1.0.116051-deobf.jar" >> "$GITHUB_OUTPUT"
echo "basemetals=$basemetals/build/libs-dev/BaseMetals-3.1.1.116051-deobf.jar" >> "$GITHUB_OUTPUT"
echo "orespawn=$orespawn/build/libs-dev/OreSpawn-4.1.0.117011-deobf.jar" >> "$GITHUB_OUTPUT"
echo "basemetals=$basemetals/build/libs-dev/BaseMetals-3.1.1.117011-deobf.jar" >> "$GITHUB_OUTPUT"
- name: Initialize CodeQL
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate Power Advantage release tag
name: Validate basePower release tag

on:
push:
Expand All @@ -16,7 +16,7 @@ concurrency:
jobs:
validate-release-tag:
name: Validate tag for manual release confirmation
if: github.repository == 'MinecraftModDevelopmentMods/PowerAdvantage'
if: github.repository == 'MinecraftModDevelopmentMods/basePower'
runs-on: ubuntu-latest
timeout-minutes: 10

Expand Down
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.16.5
- master-1.17.1
- 'feature/**'
pull_request:
branches:
- master-1.16.5
- master-1.17.1

permissions:
contents: read
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
basePower 2.4.9.117011 (Minecraft 1.17.1)

- Bring basePower to Minecraft 1.17.1 with one shared tab for the three mods.
- Keep existing base* machines and map legacy Advantage blocks, items, fluids and saved state.
- Carry old Advantage mod and data pack names forward when opening an existing world with the replacement mods installed.
- Fix Eclipse refreshes when ForgeGradle reuses an existing launch.

Power Advantage 2.4.8.117011 (Minecraft 1.17.1)

- Move to Forge 37.1.1 and Java 16, keeping the existing block, item, fluid and saved-state names.
- Use native block-entity factories and tickers for machines and conveyors, retaining their saved position and facing.
- Supply configured rubber and solder aliases through an additive server data pack instead of replacing vanilla tag readers.
- Preserve legacy entity state in both terrain chunks and the separate 1.17 entity storage.
- Use the 1.17 ingredient-predicate format so unrelated items do not unlock recipes.
- Save machine timers, progress and externally supplied energy after an autosave, without sending extra comparator or client updates.
- Remap old grass-path blocks/items and the berry-picking sound when loading older Forge registry snapshots.
- Carry forward the finite-input, cold-restart, migration and rendered GUI checks; automated and manual acceptance remain separate.

Power Advantage 2.4.7.116051 (Minecraft 1.16.5)

- Charge energy sources only for what consumers accept, retaining rejected energy for the next machine.
Expand Down
99 changes: 42 additions & 57 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,13 @@
# PowerAdvantage
# basePower

**Minecraft 1.16.5, version 2.4.7.116051. Source port candidate.**
**Minecraft 1.17.1, version 2.4.9.117011. Local test candidate.**

See the [1.16 port record](docs/1.16/PORT-STATUS.md) for current checks and remaining
work. The accepted [1.15 test record](docs/1.15/CURRENT-QUALIFICATION.md) is retained
as historical evidence, not a pass for this version. Manual 1.16 acceptance is
still required.
See the [1.17 port record](docs/1.17/PORT-STATUS.md) for this candidate's
validation status. The retained 1.16 and earlier reports are historical evidence,
not passes for 1.17. Manual testing follows the current automated qualification.

The [test-suite review](docs/1.16/TEST-SUITE-AUDIT.md) separates operating checks
from saved-state and presence checks. It records the remaining machine coverage
gaps; a green build does not qualify every machine setup.

The follow-up [machine operating checks](docs/1.16/OPERATING-TESTS.md) use finite
inputs, real server ticks, blocked and starved controls, and full-process
restarts. They check useful output and retained resources, not just animation
or a rising progress counter.

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

**Back up the entire world before upgrading. Test only disposable copies.**
The port retains existing registry names and legacy migration code. Upgrade tests
Expand All @@ -29,21 +20,20 @@ Recipe-book discovery now follows relevant ingredients. See the [all-Advantage m

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.16.5
## Building Minecraft 1.17.1

The `master-1.16.5` build uses Forge 36.2.34, official `1.16.5` mappings,
MCP `20210115.111550`, ForgeGradle 7.0.34 and Gradle 9.6.1.
Run Gradle with Java 17 and compile production code with Java 8. Mavenizer also
needs Java 25. CI pins all three JDKs. Pass the installed homes using
`-Porg.gradle.java.installations.paths=<java8>,<java17>,<java25>` and disable
The `master-1.17.1` build uses Forge 37.1.1, official `1.17.1` mappings,
MCP `20210706.113038`, ForgeGradle 7.0.34 and Gradle 9.6.1.
Run Gradle with Java 17 and compile and run production code with Java 16. 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>,<java16>,<java17>,<java25>` and disable
automatic discovery and downloads for a reproducibility check.

Build the pinned Base Metals `3.1.1.116051` and OreSpawn `4.1.0.116051` deobf jars first.
The exact Base Metals source is
`995f6cc4dd2d5eecc628a42e5c43fa5390c24bca`. CI builds that dependency first;
the checksums and complete source pins are in `gradle.properties`.
Build the pinned Base Metals `3.1.1.117011` and OreSpawn `4.1.0.117011` deobf jars first.
Use Base Metals 3.1.1 for its 1.17.1 startup fix. The build pins the exact
dependency source and checksums in `gradle.properties`.

Then run from `D:\PowerAdvantage\PA116\PowerAdvantage`:
Then run from the repository root:

```text
gradlew.bat clean check build javadoc verifyReleaseDependencies verifyReleaseArtifacts writeReleaseChecksums verifyEclipseProductionClasspath
Expand All @@ -52,8 +42,8 @@ gradlew.bat clean check build javadoc verifyReleaseDependencies verifyReleaseArt
The default dependency jars are:

```text
D:\BaseMetals\BaseMetals 116\BaseMetals\build\libs-dev\BaseMetals-3.1.1.116051-deobf.jar
D:\MinecraftMineralogy\OS116\OreSpawn\build\libs-dev\OreSpawn-4.1.0.116051-deobf.jar
D:\BaseMetals\BaseMetals 117\BaseMetals\build\libs-dev\BaseMetals-3.1.1.117011-deobf.jar
D:\MinecraftMineralogy\OS117\OreSpawn\build\libs-dev\OreSpawn-4.1.0.117011-deobf.jar
```

Other layouts can pass `-PbaseMetalsDeobfJar=<path>` and `-PoreSpawnDeobfJar=<path>`.
Expand All @@ -75,40 +65,35 @@ 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 Steam/Electric `2.2.8.116051` deobf jars,
To prepare a combined client, build the baseSteam and baseElectric `2.2.10.117011` deobf jars,
run `gradlew.bat prepareCombinedEclipseLaunch`, refresh Eclipse, then launch
`runClientAllAdvantage.launch`. Inputs must match
`test-rig/profiles/native116/dev-core.json`; alternative layouts can pass
`test-rig/profiles/native117/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.

The local GUI corrections have separate input hashes, keeping the earlier machine
test profiles unchanged. To prepare that combined preview, run
`gradlew.bat prepareCombinedEclipseLaunch -PadvantageDevelopmentProfile=docs/1.16/gui-development-inputs.json`.
See the [GUI checks](docs/1.16/GUI-CHECKS.md) for coverage and the repeatable command.

`check` and Eclipse preparation also run `verifyDevelopmentRuntimeArchives`,
which reads every development runtime jar entry and checks its size and CRC.
This catches damaged cached dependencies before the next test launch.

Client-resource and recipe-book checks must use the exact 1.16 candidate. Manual
visual and interaction acceptance remains separate.

The migration test fixtures do not import restricted JDK internals. A plain ECJ
batch compile does not apply Eclipse's JRE access rules automatically. After
`eclipseClasspath` and `test`, run `tools/verification/Verify-EclipseCompilation.ps1`
with `-Compiler <ecj.jar>`, `-Java17Home <jdk17>`, `-Java8Home <jdk8>` and
`-Evidence <new-directory>` to compile fresh main/test classes with restricted
references treated as errors, then run the tests on Java 8. Keep Eclipse's
access-restriction checks enabled.
Client-resource and recipe-book checks must use the exact 1.17 candidate.
See the [client test instructions](test-rig/client-resources/README.md).
Manual visual and interaction acceptance remains separate. The retained Java 8
Eclipse compiler script is historical tooling, not a 1.17 verification command.
Keep Eclipse's access-restriction checks enabled and use Java 16 for its project
JRE and Minecraft launches.
The [native Eclipse compiler check](tools/verification/native117/README.md)
compiles fresh production and test outputs, then runs the complete unit-test
inventory on Java 16 without replacing the built mod jars.

## Compatibility

The implementation namespace remains `zone.moddev.mc.poweradvantage`, with the
historical `cyano.poweradvantage.api` package retained. The port keeps registry,
fluid, tile, NBT and provider identities. The current test record distinguishes
machine preservation, actual operation and vanilla migration differences.
The implementation namespace is `zone.moddev.mc.basepower`. The historical
`cyano.poweradvantage.api` package remains available. The port keeps basePower's
registry names and saved machine data and maps the older Power Advantage names.
The test record distinguishes state preservation, real operation and changes
made by Minecraft itself.

The upgrade path prepares stored items before vanilla flattening and converts
entities individually, so a mod entity cannot prevent a nearby pet's UUID and
Expand All @@ -118,13 +103,13 @@ silently discarded.
Legacy Forge swimming speed, name-tag distance, gravity and player reach use
their native registry names without discarding saved values or modifiers.

The 1.16 port uses native dimension registry keys, tile save/load methods and
matrix-based menus. Config-dependent material aliases are resolved during the
server's native tag load and synchronized to clients. The shared pre-flattening
migration hook remains necessary; its presence is not proof that an upgrade is safe.
The port uses native dimension registry keys, block-entity factories and tickers,
capabilities and menus. Config-dependent material aliases are additive server
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) and
[Advantage Works rig](test-rig/README.md) describe the earlier protocols.
The [1.16 status](docs/1.16/PORT-STATUS.md) tracks this port's qualification.
The [legacy migration guide](docs/1.13/MIGRATION.md) describes the earlier protocols.
Use the [native Advantage Works guide](test-rig/NATIVE117.md) for this checkout.
The [1.17 status](docs/1.17/PORT-STATUS.md) tracks this port's qualification.

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