Skip to content

Commit bb70238

Browse files
authored
Merge pull request #19 from SkyBlade1978/feature/basepower-1.17.1-identity-migration
Bring basePower to Minecraft 1.17.1
2 parents c310d0c + 5dfebd0 commit bb70238

932 files changed

Lines changed: 42667 additions & 8085 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: Power Advantage 1.16 CI
1+
name: basePower 1.17 CI
22

33
on:
44
push:
5-
branches: [master-1.16.5, 'feature/**']
5+
branches: [master-1.17.1, 'feature/**']
66
pull_request:
7-
branches: [master-1.16.5]
7+
branches: [master-1.17.1]
88

99
permissions:
1010
contents: read
1111

1212
concurrency:
13-
group: poweradvantage-1.16-${{ github.workflow }}-${{ github.ref }}
13+
group: poweradvantage-1.17-${{ github.workflow }}-${{ github.ref }}
1414
cancel-in-progress: true
1515

1616
jobs:
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
2626
with:
2727
repository: MinecraftModDevelopmentMods/OreSpawn
28-
ref: a113e5d767169189f0e35ade1e173a12d550b00e
28+
ref: b56e2b62a1a6ea4d1dd96f8646a87801a817dbdf
2929
path: .ci-dependencies/OreSpawn
3030
- name: Use canonical LF dependency inputs
3131
# Use the same source bytes on hosted and local dependency builds.
@@ -34,14 +34,19 @@ jobs:
3434
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
3535
with:
3636
repository: MinecraftModDevelopmentMods/BaseMetals
37-
ref: 995f6cc4dd2d5eecc628a42e5c43fa5390c24bca
37+
ref: 0deeeeecdbbc1fbcdecf910c59477de8efe164d7
3838
path: .ci-dependencies/BaseMetals
3939
- name: Install pinned Java 25 Mavenizer runtime
4040
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
4141
with:
4242
distribution: temurin
4343
java-version: '25.0.3+9.0.LTS'
44-
- name: Install Java 8 toolchain
44+
- name: Install Java 16 production toolchain
45+
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
46+
with:
47+
distribution: temurin
48+
java-version: '16.0.2+7'
49+
- name: Install Java 8 renamer runtime
4550
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
4651
with:
4752
distribution: temurin
@@ -55,7 +60,7 @@ jobs:
5560
# These are Gradle project properties, not JVM system properties.
5661
shell: bash
5762
run: >-
58-
echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64
63+
echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_16_X64,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64
5964
-Porg.gradle.java.installations.auto-detect=false
6065
-Porg.gradle.java.installations.auto-download=false" >> "$GITHUB_ENV"
6166
- name: Set up Gradle
@@ -70,8 +75,8 @@ jobs:
7075
chmod +x "$orespawn/gradlew" "$basemetals/gradlew"
7176
(cd "$orespawn" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace)
7277
(cd "$basemetals" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace)
73-
osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.116051-deobf.jar"
74-
bmjar="$basemetals/build/libs-dev/BaseMetals-3.1.1.116051-deobf.jar"
78+
osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.117011-deobf.jar"
79+
bmjar="$basemetals/build/libs-dev/BaseMetals-3.1.1.117011-deobf.jar"
7580
test -f "$osjar" && test -f "$bmjar"
7681
echo "orespawn=$osjar" >> "$GITHUB_OUTPUT"
7782
echo "basemetals=$bmjar" >> "$GITHUB_OUTPUT"
@@ -85,20 +90,20 @@ jobs:
8590
- name: Upload audited release candidate
8691
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
8792
with:
88-
name: PowerAdvantage-1.16.5-${{ github.sha }}
93+
name: PowerAdvantage-1.17.1-${{ github.sha }}
8994
if-no-files-found: error
9095
retention-days: 30
9196
path: |
92-
build/libs/PowerAdvantage-2.4.7.116051.jar
93-
build/libs/PowerAdvantage-2.4.7.116051-sources.jar
94-
build/libs/PowerAdvantage-2.4.7.116051-javadoc.jar
97+
build/libs/basePower-2.4.9.117011.jar
98+
build/libs/basePower-2.4.9.117011-sources.jar
99+
build/libs/basePower-2.4.9.117011-javadoc.jar
95100
build/release/SHA256SUMS
96101
CHANGELOG.txt
97102
- name: Upload diagnostics on failure
98103
if: failure()
99104
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
100105
with:
101-
name: PowerAdvantage-1.16.5-diagnostics-${{ github.sha }}
106+
name: PowerAdvantage-1.17.1-diagnostics-${{ github.sha }}
102107
if-no-files-found: ignore
103108
retention-days: 14
104109
path: |

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CodeQL
22

33
on:
44
push:
5-
branches: [master-1.16.5, 'feature/**']
5+
branches: [master-1.17.1, 'feature/**']
66
pull_request:
7-
branches: [master-1.16.5]
7+
branches: [master-1.17.1]
88
schedule:
99
- cron: '47 7 * * 4'
1010

@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
2626
with:
2727
repository: MinecraftModDevelopmentMods/OreSpawn
28-
ref: a113e5d767169189f0e35ade1e173a12d550b00e
28+
ref: b56e2b62a1a6ea4d1dd96f8646a87801a817dbdf
2929
path: .ci-dependencies/OreSpawn
3030
- name: Use canonical LF dependency inputs
3131
# Use the same source bytes on hosted and local dependency builds.
@@ -34,14 +34,19 @@ jobs:
3434
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
3535
with:
3636
repository: MinecraftModDevelopmentMods/BaseMetals
37-
ref: 995f6cc4dd2d5eecc628a42e5c43fa5390c24bca
37+
ref: 0deeeeecdbbc1fbcdecf910c59477de8efe164d7
3838
path: .ci-dependencies/BaseMetals
3939
- name: Install pinned Java 25 Mavenizer runtime
4040
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
4141
with:
4242
distribution: temurin
4343
java-version: '25.0.3+9.0.LTS'
44-
- name: Install Java 8 toolchain
44+
- name: Install Java 16 production toolchain
45+
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
46+
with:
47+
distribution: temurin
48+
java-version: '16.0.2+7'
49+
- name: Install Java 8 renamer runtime
4550
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
4651
with:
4752
distribution: temurin
@@ -55,7 +60,7 @@ jobs:
5560
# These are Gradle project properties, not JVM system properties.
5661
shell: bash
5762
run: >-
58-
echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64
63+
echo "MMD_GRADLE_TOOLCHAINS=-Porg.gradle.java.installations.paths=$JAVA_HOME,$JAVA_HOME_16_X64,$JAVA_HOME_8_X64,$JAVA_HOME_25_X64
5964
-Porg.gradle.java.installations.auto-detect=false
6065
-Porg.gradle.java.installations.auto-download=false" >> "$GITHUB_ENV"
6166
- name: Set up Gradle
@@ -70,8 +75,8 @@ jobs:
7075
chmod +x "$orespawn/gradlew" "$basemetals/gradlew"
7176
(cd "$orespawn" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace)
7277
(cd "$basemetals" && ./gradlew $MMD_GRADLE_TOOLCHAINS jar --no-daemon --stacktrace)
73-
echo "orespawn=$orespawn/build/libs-dev/OreSpawn-4.1.0.116051-deobf.jar" >> "$GITHUB_OUTPUT"
74-
echo "basemetals=$basemetals/build/libs-dev/BaseMetals-3.1.1.116051-deobf.jar" >> "$GITHUB_OUTPUT"
78+
echo "orespawn=$orespawn/build/libs-dev/OreSpawn-4.1.0.117011-deobf.jar" >> "$GITHUB_OUTPUT"
79+
echo "basemetals=$basemetals/build/libs-dev/BaseMetals-3.1.1.117011-deobf.jar" >> "$GITHUB_OUTPUT"
7580
- name: Initialize CodeQL
7681
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
7782
with:

‎.github/workflows/release-on-tag.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Validate Power Advantage release tag
1+
name: Validate basePower release tag
22

33
on:
44
push:
@@ -16,7 +16,7 @@ concurrency:
1616
jobs:
1717
validate-release-tag:
1818
name: Validate tag for manual release confirmation
19-
if: github.repository == 'MinecraftModDevelopmentMods/PowerAdvantage'
19+
if: github.repository == 'MinecraftModDevelopmentMods/basePower'
2020
runs-on: ubuntu-latest
2121
timeout-minutes: 10
2222

‎.github/workflows/validate-gradle-build.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Validate Gradle Wrapper
33
on:
44
push:
55
branches:
6-
- master-1.16.5
6+
- master-1.17.1
77
- 'feature/**'
88
pull_request:
99
branches:
10-
- master-1.16.5
10+
- master-1.17.1
1111

1212
permissions:
1313
contents: read

‎CHANGELOG.txt‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
basePower 2.4.9.117011 (Minecraft 1.17.1)
2+
3+
- Bring basePower to Minecraft 1.17.1 with one shared tab for the three mods.
4+
- Keep existing base* machines and map legacy Advantage blocks, items, fluids and saved state.
5+
- Carry old Advantage mod and data pack names forward when opening an existing world with the replacement mods installed.
6+
- Fix Eclipse refreshes when ForgeGradle reuses an existing launch.
7+
8+
Power Advantage 2.4.8.117011 (Minecraft 1.17.1)
9+
10+
- Move to Forge 37.1.1 and Java 16, keeping the existing block, item, fluid and saved-state names.
11+
- Use native block-entity factories and tickers for machines and conveyors, retaining their saved position and facing.
12+
- Supply configured rubber and solder aliases through an additive server data pack instead of replacing vanilla tag readers.
13+
- Preserve legacy entity state in both terrain chunks and the separate 1.17 entity storage.
14+
- Use the 1.17 ingredient-predicate format so unrelated items do not unlock recipes.
15+
- Save machine timers, progress and externally supplied energy after an autosave, without sending extra comparator or client updates.
16+
- Remap old grass-path blocks/items and the berry-picking sound when loading older Forge registry snapshots.
17+
- Carry forward the finite-input, cold-restart, migration and rendered GUI checks; automated and manual acceptance remain separate.
18+
119
Power Advantage 2.4.7.116051 (Minecraft 1.16.5)
220

321
- Charge energy sources only for what consumers accept, retaining rejected energy for the next machine.

‎README.md‎

Lines changed: 42 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
1-
# PowerAdvantage
1+
# basePower
22

3-
**Minecraft 1.16.5, version 2.4.7.116051. Source port candidate.**
3+
**Minecraft 1.17.1, version 2.4.9.117011. Local test candidate.**
44

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

10-
The [test-suite review](docs/1.16/TEST-SUITE-AUDIT.md) separates operating checks
11-
from saved-state and presence checks. It records the remaining machine coverage
12-
gaps; a green build does not qualify every machine setup.
13-
14-
The follow-up [machine operating checks](docs/1.16/OPERATING-TESTS.md) use finite
15-
inputs, real server ticks, blocked and starved controls, and full-process
16-
restarts. They check useful output and retained resources, not just animation
17-
or a rising progress counter.
18-
19-
Power Advantage provides shared power, fluids, item transport and compatibility APIs for Steam Advantage and Electric Advantage.
9+
basePower continues DrCyano's Power Advantage. It provides shared power,
10+
fluids and item transport for baseSteam and baseElectric.
2011

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

3021
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.
3122

32-
## Building Minecraft 1.16.5
23+
## Building Minecraft 1.17.1
3324

34-
The `master-1.16.5` build uses Forge 36.2.34, official `1.16.5` mappings,
35-
MCP `20210115.111550`, ForgeGradle 7.0.34 and Gradle 9.6.1.
36-
Run Gradle with Java 17 and compile production code with Java 8. Mavenizer also
37-
needs Java 25. CI pins all three JDKs. Pass the installed homes using
38-
`-Porg.gradle.java.installations.paths=<java8>,<java17>,<java25>` and disable
25+
The `master-1.17.1` build uses Forge 37.1.1, official `1.17.1` mappings,
26+
MCP `20210706.113038`, ForgeGradle 7.0.34 and Gradle 9.6.1.
27+
Run Gradle with Java 17 and compile and run production code with Java 16. Mavenizer also
28+
needs Java 25. CI pins these JDKs and Java 8 for the legacy renamer. Pass the installed homes using
29+
`-Porg.gradle.java.installations.paths=<java8>,<java16>,<java17>,<java25>` and disable
3930
automatic discovery and downloads for a reproducibility check.
4031

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

46-
Then run from `D:\PowerAdvantage\PA116\PowerAdvantage`:
36+
Then run from the repository root:
4737

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

5444
```text
55-
D:\BaseMetals\BaseMetals 116\BaseMetals\build\libs-dev\BaseMetals-3.1.1.116051-deobf.jar
56-
D:\MinecraftMineralogy\OS116\OreSpawn\build\libs-dev\OreSpawn-4.1.0.116051-deobf.jar
45+
D:\BaseMetals\BaseMetals 117\BaseMetals\build\libs-dev\BaseMetals-3.1.1.117011-deobf.jar
46+
D:\MinecraftMineralogy\OS117\OreSpawn\build\libs-dev\OreSpawn-4.1.0.117011-deobf.jar
5747
```
5848

5949
Other layouts can pass `-PbaseMetalsDeobfJar=<path>` and `-PoreSpawnDeobfJar=<path>`.
@@ -75,40 +65,35 @@ Refresh the project in Eclipse, allow its Java build to finish, and launch the g
7565

7666
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).
7767

78-
To prepare a combined client, build the Steam/Electric `2.2.8.116051` deobf jars,
68+
To prepare a combined client, build the baseSteam and baseElectric `2.2.10.117011` deobf jars,
7969
run `gradlew.bat prepareCombinedEclipseLaunch`, refresh Eclipse, then launch
8070
`runClientAllAdvantage.launch`. Inputs must match
81-
`test-rig/profiles/native116/dev-core.json`; alternative layouts can pass
71+
`test-rig/profiles/native117/dev-core.json`; alternative layouts can pass
8272
`-PsteamAdvantageDeobfJar=<path>` and `-PelectricAdvantageDeobfJar=<path>`.
8373
The ordinary `runClient.launch` remains Power-only. Both use the `run` directory;
8474
preparing a launch does not copy, open or qualify a save.
8575

86-
The local GUI corrections have separate input hashes, keeping the earlier machine
87-
test profiles unchanged. To prepare that combined preview, run
88-
`gradlew.bat prepareCombinedEclipseLaunch -PadvantageDevelopmentProfile=docs/1.16/gui-development-inputs.json`.
89-
See the [GUI checks](docs/1.16/GUI-CHECKS.md) for coverage and the repeatable command.
90-
9176
`check` and Eclipse preparation also run `verifyDevelopmentRuntimeArchives`,
9277
which reads every development runtime jar entry and checks its size and CRC.
9378
This catches damaged cached dependencies before the next test launch.
9479

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

10690
## Compatibility
10791

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

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

121-
The 1.16 port uses native dimension registry keys, tile save/load methods and
122-
matrix-based menus. Config-dependent material aliases are resolved during the
123-
server's native tag load and synchronized to clients. The shared pre-flattening
124-
migration hook remains necessary; its presence is not proof that an upgrade is safe.
106+
The port uses native dimension registry keys, block-entity factories and tickers,
107+
capabilities and menus. Config-dependent material aliases are additive server
108+
data-pack tags. The shared pre-flattening migration hook remains necessary;
109+
its presence is not proof that an upgrade is safe.
125110

126-
The [legacy migration guide](docs/1.13/MIGRATION.md) and
127-
[Advantage Works rig](test-rig/README.md) describe the earlier protocols.
128-
The [1.16 status](docs/1.16/PORT-STATUS.md) tracks this port's qualification.
111+
The [legacy migration guide](docs/1.13/MIGRATION.md) describes the earlier protocols.
112+
Use the [native Advantage Works guide](test-rig/NATIVE117.md) for this checkout.
113+
The [1.17 status](docs/1.17/PORT-STATUS.md) tracks this port's qualification.
129114

130115
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).

0 commit comments

Comments
 (0)