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
  •  
  •  
  •  
27 changes: 14 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Electric Advantage 1.10 CI
name: baseElectric 1.10 CI

on:
push:
Expand All @@ -13,7 +13,7 @@ permissions:
contents: read

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

jobs:
Expand All @@ -23,7 +23,7 @@ jobs:
timeout-minutes: 75

steps:
- name: Check out ElectricAdvantage
- name: Check out baseElectric
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Check out pinned OreSpawn
Expand All @@ -33,11 +33,11 @@ jobs:
ref: 5a50df1158e948c8db55814e819090b34c12d765
path: .ci-dependencies/OreSpawn

- name: Check out pinned PowerAdvantage
- name: Check out pinned basePower
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/PowerAdvantage
ref: 2443eaae7c666b8d54a5c9c30091892b79e80994
repository: MinecraftModDevelopmentMods/basePower
ref: 425af862ef5b41b61d3e1f7e665d1d691852ff4b
path: .ci-dependencies/PowerAdvantage

- name: Install Java 8 toolchain
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
test -f "$jar"
echo "jar=$jar" >> "$GITHUB_OUTPUT"

- name: Build pinned PowerAdvantage development jar
- name: Build pinned basePower development jar
id: poweradvantage
shell: bash
run: |
Expand All @@ -86,8 +86,9 @@ jobs:
-PoreSpawnDeobfJar="${{ steps.orespawn.outputs.jar }}" \
--no-daemon --stacktrace
)
jar="$dependency/build/libs-dev/PowerAdvantage-2.4.3.110021-deobf.jar"
jar="$dependency/build/libs-dev/basePower-2.4.4.110021-deobf.jar"
test -f "$jar"
echo "2992F2CADC30D8F61A17216DF9AB02BDF8E8211BB8B494A6CCED70A3267F69FE $jar" | sha256sum --check --strict
echo "jar=$jar" >> "$GITHUB_OUTPUT"

- name: Make the wrapper executable
Expand All @@ -104,21 +105,21 @@ jobs:
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: ElectricAdvantage-1.10.2-${{ github.sha }}
name: baseElectric-1.10.2-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/ElectricAdvantage-2.2.5.110021.jar
build/libs/ElectricAdvantage-2.2.5.110021-sources.jar
build/libs/ElectricAdvantage-2.2.5.110021-javadoc.jar
build/libs/baseElectric-2.2.6.110021.jar
build/libs/baseElectric-2.2.6.110021-sources.jar
build/libs/baseElectric-2.2.6.110021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt

- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: ElectricAdvantage-1.10.2-diagnostics-${{ github.sha }}
name: baseElectric-1.10.2-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
timeout-minutes: 60

steps:
- name: Check out ElectricAdvantage
- name: Check out baseElectric
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Check out pinned OreSpawn
Expand All @@ -33,11 +33,11 @@ jobs:
ref: 5a50df1158e948c8db55814e819090b34c12d765
path: .ci-dependencies/OreSpawn

- name: Check out pinned PowerAdvantage
- name: Check out pinned basePower
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/PowerAdvantage
ref: 2443eaae7c666b8d54a5c9c30091892b79e80994
repository: MinecraftModDevelopmentMods/basePower
ref: 425af862ef5b41b61d3e1f7e665d1d691852ff4b
path: .ci-dependencies/PowerAdvantage

- name: Install Java 8 toolchain
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
test -f "$jar"
echo "jar=$jar" >> "$GITHUB_OUTPUT"

- name: Build pinned PowerAdvantage development jar
- name: Build pinned basePower development jar
id: poweradvantage
shell: bash
run: |
Expand All @@ -86,16 +86,17 @@ jobs:
-PoreSpawnDeobfJar="${{ steps.orespawn.outputs.jar }}" \
--no-daemon --stacktrace
)
jar="$dependency/build/libs-dev/PowerAdvantage-2.4.3.110021-deobf.jar"
jar="$dependency/build/libs-dev/basePower-2.4.4.110021-deobf.jar"
test -f "$jar"
echo "2992F2CADC30D8F61A17216DF9AB02BDF8E8211BB8B494A6CCED70A3267F69FE $jar" | sha256sum --check --strict
echo "jar=$jar" >> "$GITHUB_OUTPUT"

- name: Initialize CodeQL
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
with:
languages: java-kotlin

- name: Compile ElectricAdvantage production code
- name: Compile baseElectric production code
run: |
chmod +x ./gradlew
./gradlew clean classes --rerun-tasks --no-build-cache --no-daemon --stacktrace \
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate Electric Advantage release tag
name: Validate baseElectric release tag

on:
push:
Expand All @@ -10,13 +10,13 @@ permissions:
contents: read

concurrency:
group: electricadvantage-release-tag-${{ github.ref_name }}
group: baseelectric-release-tag-${{ github.ref_name }}
cancel-in-progress: false

jobs:
validate-release-tag:
name: Validate tag for manual release confirmation
if: github.repository == 'MinecraftModDevelopmentMods/ElectricAdvantage'
if: github.repository == 'MinecraftModDevelopmentMods/baseElectric'
runs-on: ubuntu-latest
timeout-minutes: 10

Expand All @@ -37,6 +37,11 @@ jobs:
minecraft_version="$(value minecraft_version)"
loader_name="$(value loader_name)"
loader_code="$(value loader_code)"
curseforge_project_id="$(value curseforge_project_id)"
if [[ ! "$curseforge_project_id" =~ ^[1-9][0-9]*$ || "$curseforge_project_id" == 240985 ]]; then
echo "baseElectric publication is disabled until its own CurseForge project is assigned" >&2
exit 1
fi

IFS=. read -r mc_major mc_minor mc_patch extra <<<"$minecraft_version"
if [[ -n "${extra:-}" || -z "${mc_major:-}" || -z "${mc_minor:-}" ]]; then
Expand Down
12 changes: 11 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
Unreleased
baseElectric 2.2.6.110021

- Rename the Minecraft 1.10.2 candidate to baseElectric 2.2.6.110021 with mod ID baseelectric and implementation namespace zone.moddev.mc.baseelectric.
- Require basePower 2.4.4.110021 or newer while retaining the stable cyano.poweradvantage.api public API.
- Remap released Cyano Electric Advantage block and item identities; retain old tile and hydroturbine reads while writing new canonical IDs.
- Copy the original configuration when the new one is absent, and preserve custom loot tables without duplicate injection.
- Use basePower's early, backed-up OreSpawn identity migration for new provider/rule/block IDs; retire consumed legacy inputs to avoid duplicate generation and abort on ambiguous authority.
- Move assets, translations, build metadata, workflows, and distribution relations to the new identity without changing gameplay or balance.
- Keep publication disabled until baseElectric has an assigned, authorized CurseForge project.
- Pin the exact basePower source commit and development-jar checksum in the build and CI.
- Update the installation and migration notes with the copied-world and operating test coverage.

- Check generator redstone before the first power pulse so a disabled solar panel cannot produce a startup burst.
- Charge the moved electric drill its existing 250-unit track cost before saving its replacement, instead of charging the removed drill.
Expand Down
56 changes: 47 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,40 @@
# ElectricAdvantage
# baseElectric

Electric Advantage adds electrical generation, storage, and machines to Power Advantage for Minecraft 1.10.2.
baseElectric continues DrCyano's Electric Advantage, adding generators, batteries, wiring and electrically powered machines to basePower for Minecraft 1.10.2.

The maintained implementation namespace is `zone.moddev.mc.electricadvantage`. This coordinated
release requires Power Advantage `2.4.3.110021` or newer; update the two mods together. Runtime
registry, tile/entity, asset, configuration, and saved-world identities are unchanged.
Version `2.2.6.110021` uses mod ID `baseelectric`, artifact `baseElectric`, and implementation
namespace `zone.moddev.mc.baseelectric`. It requires basePower `2.4.4.110021` or newer; update
the two mods together. The public `cyano.poweradvantage.api` remains unchanged.

The cross-mod [Advantage Works 1.10.2 Handbook](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.10.2/docs/1.10/README.md) includes the Electrician's Handbook, rated figures, commissioning layouts, and persistence tests. The [MMD material and fluid compatibility specification](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.10.2/docs/1.10/mmd-material-fluid-compatibility.md) defines sulfur/lithium ownership, migration, and Ore Dictionary aliases.
This version is not published. The [cross-mod qualification notes](https://github.com/MinecraftModDevelopmentMods/basePower/blob/master-1.10.2/docs/1.10/base-qualification.md)
record the exact jars used for local unit tests, original-release migration fixtures, operating
cases and full restarts. Not every machine has a 30-minute endurance run, and manual gameplay
acceptance remains separate from those automated checks.

The cross-mod [Advantage Works 1.10.2 Handbook](https://github.com/MinecraftModDevelopmentMods/basePower/blob/master-1.10.2/docs/1.10/README.md) includes the Electrician's Handbook, rated figures, commissioning layouts, and persistence tests. The [MMD material and fluid compatibility specification](https://github.com/MinecraftModDevelopmentMods/basePower/blob/master-1.10.2/docs/1.10/mmd-material-fluid-compatibility.md) defines sulfur/lithium ownership, migration, and Ore Dictionary aliases.

## Released-World Migration

The supported input is an original released Cyano Electric Advantage 1.10 world, not every
unpublished implementation identity. Back up the world and configuration before upgrading;
qualify migration on disposable copies. See [the migration contract](docs/identity-migration.md).

Released `electricadvantage` blocks and items load as `baseelectric`. Original tile and
hydroturbine IDs remain read aliases; subsequent saves use the new canonical IDs.
An existing `baseelectric.cfg` wins; otherwise `electricadvantage.cfg` is copied unchanged.
Custom additional-loot tables are imported with owned item IDs updated, then the old JSON
files are archived outside the loader's `.json` suffix so they cannot inject duplicate loot.
Existing new loot tables are never overwritten by generated defaults.

basePower migrates both mods' OreSpawn configuration and selected-world profiles before
OreSpawn reads them. Provider, rule and owned block IDs become `baseelectric`; old active
provider IDs cannot be retained with the pinned engine. Original config bytes are backed up,
and consumed legacy input is retired to prevent duplicate generation. Ambiguous or failed
migrations stop startup instead of silently using fresh defaults.

No recipes, machine rates, energy capacities, crop behavior, or ore placement settings are
changed by this identity migration. Existing bug fixes and regression tests from baseline
`c0f8424665f3810eb2d6d1a06b2cba85c5322e9a` are retained.

## Drill Reload Fix

Expand All @@ -18,7 +46,7 @@ The regression tests cover resumed progress and full server restarts.

The `master-1.10.2` build uses ForgeGradle 7.0.34 and Gradle 9.6.1. Run Gradle with Java 17; Gradle resolves the Java 8 toolchain used for compilation.

Build the pinned OreSpawn commit `5a50df1158e948c8db55814e819090b34c12d765` first. Then build the pinned sibling PowerAdvantage development jar:
Build the pinned OreSpawn commit `5a50df1158e948c8db55814e819090b34c12d765` first. Then build the pinned sibling basePower development jar:

```text
cd ..\..\PowerAdvantage
Expand All @@ -27,7 +55,7 @@ gradlew.bat deobfJar

The dependency locations can be overridden with `-PoreSpawnDeobfJar=<path>` and `-PpowerAdvantageDeobfJar=<path>`.

Then build and audit ElectricAdvantage:
Then build and audit baseElectric:

```text
gradlew.bat clean check build javadoc verifyReleaseDependencies verifyReleaseArtifacts writeReleaseChecksums
Expand All @@ -41,4 +69,14 @@ For Eclipse, import this repository as an existing Gradle project and run:
gradlew.bat cleanEclipse verifyEclipseProductionClasspath
```

Power Advantage `2.4.3.110021` or newer and OreSpawn are required at compile time and runtime but are never bundled. Base Metals remains a required distribution dependency while its integrations stay reflection-based and absent from the compile classpath.
basePower `2.4.4.110021` or newer and OreSpawn are required at compile time and runtime but are never bundled. Base Metals remains a required distribution dependency while its integrations stay reflection-based and absent from the compile classpath. CurseForge relations are `basepower`, `base-metals`, and `mmd-orespawn`.

The build pins basePower source commit `425af862ef5b41b61d3e1f7e665d1d691852ff4b` and development-jar SHA-256
`2992F2CADC30D8F61A17216DF9AB02BDF8E8211BB8B494A6CCED70A3267F69FE` in properties, audits and
both dependency-building workflows. CI builds that exact MMD basePower source and checks the
resulting jar before compiling baseElectric. Do not substitute an old jar or a moving branch.

CurseForge project ID `0` means the new project's ID has not been configured in this build.
Maven publication, prepared release validation, and release-tag
validation refuse unassigned IDs and the old Electric Advantage project ID. Local builds
and checks are separate from publication approval.
Loading
Loading