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
  •  
  •  
  •  
47 changes: 36 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ permissions:
contents: read

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

jobs:
Expand All @@ -29,10 +29,18 @@ jobs:
- name: Check out pinned PowerAdvantage
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/PowerAdvantage
ref: 40811a0be37174a0633998eb3d820d95755d35e8
repository: MinecraftModDevelopmentMods/basePower
ref: 1fc2fb3a409a5cf86a4133ee4d313002a5b8611e
path: .ci-dependencies/PowerAdvantage

- name: Check out pinned OreSpawn
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/OreSpawn
ref: 72205b9bb6bfff17cf69715c0d5bd4d2efd3b148
path: .ci-dependencies/OreSpawn
persist-credentials: false

- name: Install Java 8 toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
Expand All @@ -48,8 +56,23 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6

- name: Build pinned OreSpawn development jar
id: orespawn
shell: bash
run: |
set -euo pipefail
dependency="$GITHUB_WORKSPACE/.ci-dependencies/OreSpawn"
chmod +x "$dependency/gradlew"
(
cd "$dependency"
./gradlew deobfJar --no-daemon --stacktrace
)
jar="$dependency/build/libs-dev/OreSpawn-4.1.3.112021-deobf.jar"
test -f "$jar"
echo "jar=$jar" >> "$GITHUB_OUTPUT"

- name: Build pinned PowerAdvantage development jar
id: poweradvantage
id: basepower
shell: bash
run: |
set -euo pipefail
Expand All @@ -60,37 +83,39 @@ jobs:
cd "$dependency"
bash gradle/stage-reborncore-release.sh "$mirror"
./gradlew deobfJar verifyReleaseDependencies \
-PoreSpawnDeobfJar="${{ steps.orespawn.outputs.jar }}" \
-PrebornCoreVerificationRepository="$mirror" --no-daemon --stacktrace
)
jar="$dependency/build/libs-dev/PowerAdvantage-2.4.1.112021-deobf.jar"
jar="$dependency/build/libs-dev/basePower-2.4.4.112021-deobf.jar"
test -f "$jar"
echo "jar=$jar" >> "$GITHUB_OUTPUT"

- name: Build and audit release artifacts
run: >-
./gradlew clean check build javadoc verifyReleaseDependencies verifyReleaseArtifacts
writeReleaseChecksums verifyEclipseProductionClasspath
-PpowerAdvantageDeobfJar=${{ steps.poweradvantage.outputs.jar }}
-PoreSpawnDeobfJar="${{ steps.orespawn.outputs.jar }}"
-PpowerAdvantageDeobfJar=${{ steps.basepower.outputs.jar }}
--no-daemon --stacktrace

- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: ElectricAdvantage-1.12.2-${{ github.sha }}
name: baseElectric-1.12.2-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/ElectricAdvantage-2.2.3.112021.jar
build/libs/ElectricAdvantage-2.2.3.112021-sources.jar
build/libs/ElectricAdvantage-2.2.3.112021-javadoc.jar
build/libs/baseElectric-2.2.6.112021.jar
build/libs/baseElectric-2.2.6.112021-sources.jar
build/libs/baseElectric-2.2.6.112021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt

- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: ElectricAdvantage-1.12.2-diagnostics-${{ github.sha }}
name: baseElectric-1.12.2-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
35 changes: 30 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,18 @@ jobs:
- name: Check out pinned PowerAdvantage
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/PowerAdvantage
ref: 40811a0be37174a0633998eb3d820d95755d35e8
repository: MinecraftModDevelopmentMods/basePower
ref: 1fc2fb3a409a5cf86a4133ee4d313002a5b8611e
path: .ci-dependencies/PowerAdvantage

- name: Check out pinned OreSpawn
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/OreSpawn
ref: 72205b9bb6bfff17cf69715c0d5bd4d2efd3b148
path: .ci-dependencies/OreSpawn
persist-credentials: false

- name: Install Java 8 toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
Expand All @@ -48,8 +56,23 @@ jobs:
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6

- name: Build pinned OreSpawn development jar
id: orespawn
shell: bash
run: |
set -euo pipefail
dependency="$GITHUB_WORKSPACE/.ci-dependencies/OreSpawn"
chmod +x "$dependency/gradlew"
(
cd "$dependency"
./gradlew deobfJar --no-daemon --stacktrace
)
jar="$dependency/build/libs-dev/OreSpawn-4.1.3.112021-deobf.jar"
test -f "$jar"
echo "jar=$jar" >> "$GITHUB_OUTPUT"

- name: Build pinned PowerAdvantage development jar
id: poweradvantage
id: basepower
shell: bash
run: |
set -euo pipefail
Expand All @@ -60,9 +83,10 @@ jobs:
cd "$dependency"
bash gradle/stage-reborncore-release.sh "$mirror"
./gradlew deobfJar verifyReleaseDependencies \
-PoreSpawnDeobfJar="${{ steps.orespawn.outputs.jar }}" \
-PrebornCoreVerificationRepository="$mirror" --no-daemon --stacktrace
)
jar="$dependency/build/libs-dev/PowerAdvantage-2.4.1.112021-deobf.jar"
jar="$dependency/build/libs-dev/basePower-2.4.4.112021-deobf.jar"
test -f "$jar"
echo "jar=$jar" >> "$GITHUB_OUTPUT"

Expand All @@ -75,7 +99,8 @@ jobs:
run: |
chmod +x ./gradlew
./gradlew clean classes --rerun-tasks --no-build-cache --no-daemon --stacktrace \
-PpowerAdvantageDeobfJar=${{ steps.poweradvantage.outputs.jar }}
-PoreSpawnDeobfJar="${{ steps.orespawn.outputs.jar }}" \
-PpowerAdvantageDeobfJar=${{ steps.basepower.outputs.jar }}

- name: Analyze
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
4 changes: 2 additions & 2 deletions .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 Down
9 changes: 8 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
Unreleased
2.2.6.112021 - baseElectric for Minecraft 1.12.2

- Build against the released basePower 2.4.4.112021.
- Bring baseElectric to Forge 1.12.2. Move worlds from Electric Advantage or baseElectric 1.10.2 and keep your machines, wiring and turbines.
- Move sulfur and lithium generation to OreSpawn 4 without replacing your saved choices.
- Keep the fixes for saved drill progress, turbine links, greenhouse growth and blocked fluid outputs.

Earlier 1.12.2 test-coverage repairs

- 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
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# ElectricAdvantage
# baseElectric for Minecraft 1.12.2

Electric Advantage adds electric machines, generators, automation, and infrastructure to Power Advantage for Minecraft 1.12.2.
baseElectric continues DrCyano's Electric Advantage, adding generators, batteries, wiring, greenhouses and electric machines to basePower.

## Drill Reload Fix
## Upgrading a world

Version `2.2.3.112021` keeps unfinished drill work when a chunk or world reloads.
Existing inventories, energy, orientation and saved-world names are unchanged.
The regression tests cover resumed progress and full server restarts.
Install [basePower 2.4.4 for Forge 1.12.2](https://www.curseforge.com/minecraft/mc-mods/basepower/files/9452029) and Base Metals. Use the 1.12.2 builds of all mods in your workshop.

baseElectric replaces Electric Advantage on 1.12.2 and can read worlds from Electric Advantage or baseElectric on 1.10.2. Back up your world and config, then replace the old Advantage mods together on a copy of the world. Check battery charge, machine contents and your turbines. Save, close Minecraft completely, and check again after reopening the copy.

[World upgrade guide](https://github.com/MinecraftModDevelopmentMods/basePower/blob/master-1.12.2/docs/1.12-upgrade.md) | [CurseForge](https://www.curseforge.com/minecraft/mc-mods/baseelectric)

## Building Minecraft 1.12.2

The `master-1.12.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.

First build the pinned sibling PowerAdvantage development jar:
First build the pinned OreSpawn and sibling basePower development jars:

```text
cd ..\..\PowerAdvantage
gradlew.bat deobfJar
```

Then build and audit ElectricAdvantage:
Back in the baseElectric checkout, build and audit the release:

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

Power Advantage is required at compile time and runtime but is never bundled. Base Metals remains a required distribution dependency while its integrations stay reflection-based and absent from the compile classpath.
basePower is required at compile time and runtime but is never bundled. For a different checkout layout, supply `-PpowerAdvantageDeobfJar=<path>` and `-PoreSpawnDeobfJar=<path>`. The expected commits and hashes are in `gradle.properties`. Base Metals remains a distribution dependency, but its integrations do not require it at compile time.

## Hydroturbine Persistence

Expand Down
Loading
Loading