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: 32 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
contents: read

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

jobs:
Expand All @@ -30,18 +30,33 @@ jobs:
- name: Use canonical LF dependency inputs
# Base Metals predates archive text normalization; its LF artifact is separately pinned.
run: git config --global core.autocrlf false
- name: Read dependency source pins
id: pins
shell: bash
run: |
set -euo pipefail
bm=$(sed -n 's/^basemetals_source_commit=//p' gradle.properties)
power=$(sed -n 's/^basepower_source_ref=//p' gradle.properties)
[[ "$bm" =~ ^[a-f0-9]{40}$ && "$power" =~ ^[a-f0-9]{40}$ ]]
echo "basemetals=$bm" >> "$GITHUB_OUTPUT"
echo "power=$power" >> "$GITHUB_OUTPUT"
- name: Check out pinned Base Metals
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/BaseMetals
ref: 1376a20d7d5ba22d3abc77dc34b49a2c88943697
ref: ${{ steps.pins.outputs.basemetals }}
path: .ci-dependencies/BaseMetals
- name: Check out PowerAdvantage 1.13.2
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/PowerAdvantage
ref: 6a845ad68eb1e34dcdd793dceb9cb528be22cedf
repository: MinecraftModDevelopmentMods/basePower
ref: ${{ steps.pins.outputs.power }}
path: .ci-dependencies/PowerAdvantage
- name: Install Java 25 for Mavenizer
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '25.0.3+9.0.LTS'
- name: Install Java 8 toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
Expand All @@ -64,42 +79,44 @@ jobs:
power="$GITHUB_WORKSPACE/.ci-dependencies/PowerAdvantage"
chmod +x "$orespawn/gradlew" "$basemetals/gradlew" "$power/gradlew"
(cd "$orespawn" && ./gradlew jar --no-daemon --stacktrace)
(cd "$basemetals" && ./gradlew jar --no-daemon --stacktrace)
mirror="$RUNNER_TEMP/orespawn-mirror"
(cd "$basemetals" && bash gradle/stage-orespawn-release.sh "$mirror" &&
./gradlew jar "-PorespawnVerificationRepository=$mirror" --no-daemon --stacktrace)
osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.113021-deobf.jar"
bmjar="$basemetals/build/libs-dev/BaseMetals-3.0.1.113021-deobf.jar"
(cd "$power" && ./gradlew jar verifyReleaseDependencies -PbaseMetalsDeobfJar="$bmjar" -PoreSpawnDeobfJar="$osjar" --no-daemon --stacktrace)
powerjar="$power/build/libs-dev/PowerAdvantage-2.4.4.113021-deobf.jar"
bm_version=$(sed -n 's/^basemetals_version=//p' gradle.properties)
bmjar="$basemetals/build/libs-dev/BaseMetals-$bm_version-deobf.jar"
(cd "$power" && ./gradlew jar verifyReleaseDependencies \
-PbaseMetalsDeobfJar="$bmjar" -PoreSpawnDeobfJar="$osjar" --no-daemon --stacktrace)
powerjar="$power/build/libs-dev/basePower-2.4.5.113021-deobf.jar"
test -f "$osjar" && test -f "$bmjar" && test -f "$powerjar"
echo "orespawn=$osjar" >> "$GITHUB_OUTPUT"
echo "basemetals=$bmjar" >> "$GITHUB_OUTPUT"
echo "power=$powerjar" >> "$GITHUB_OUTPUT"
echo "power_ref=$(git -C "$power" rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Build and audit release artifacts
run: >-
./gradlew clean check build javadoc verifyReleaseDependencies verifyReleaseArtifacts
writeReleaseChecksums verifyEclipseProductionClasspath
-PpowerAdvantageDeobfJar=${{ steps.dependencies.outputs.power }}
-Ppoweradvantage_source_ref=${{ steps.dependencies.outputs.power_ref }}
-PbaseMetalsDeobfJar=${{ steps.dependencies.outputs.basemetals }}
-PoreSpawnDeobfJar=${{ steps.dependencies.outputs.orespawn }}
--no-daemon --stacktrace
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: ElectricAdvantage-1.13.2-${{ github.sha }}
name: baseElectric-1.13.2-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/ElectricAdvantage-2.2.5.113021.jar
build/libs/ElectricAdvantage-2.2.5.113021-sources.jar
build/libs/ElectricAdvantage-2.2.5.113021-javadoc.jar
build/libs/baseElectric-2.2.7.113021.jar
build/libs/baseElectric-2.2.7.113021-sources.jar
build/libs/baseElectric-2.2.7.113021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt
- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: ElectricAdvantage-1.13.2-diagnostics-${{ github.sha }}
name: baseElectric-1.13.2-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
35 changes: 26 additions & 9 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,33 @@ jobs:
- name: Use canonical LF dependency inputs
# Base Metals predates archive text normalization; its LF artifact is separately pinned.
run: git config --global core.autocrlf false
- name: Read dependency source pins
id: pins
shell: bash
run: |
set -euo pipefail
bm=$(sed -n 's/^basemetals_source_commit=//p' gradle.properties)
power=$(sed -n 's/^basepower_source_ref=//p' gradle.properties)
[[ "$bm" =~ ^[a-f0-9]{40}$ && "$power" =~ ^[a-f0-9]{40}$ ]]
echo "basemetals=$bm" >> "$GITHUB_OUTPUT"
echo "power=$power" >> "$GITHUB_OUTPUT"
- name: Check out pinned Base Metals
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/BaseMetals
ref: 1376a20d7d5ba22d3abc77dc34b49a2c88943697
ref: ${{ steps.pins.outputs.basemetals }}
path: .ci-dependencies/BaseMetals
- name: Check out PowerAdvantage 1.13.2
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
repository: MinecraftModDevelopmentMods/PowerAdvantage
ref: 6a845ad68eb1e34dcdd793dceb9cb528be22cedf
repository: MinecraftModDevelopmentMods/basePower
ref: ${{ steps.pins.outputs.power }}
path: .ci-dependencies/PowerAdvantage
- name: Install Java 25 for Mavenizer
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '25.0.3+9.0.LTS'
- name: Install Java 8 toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
Expand All @@ -64,16 +79,19 @@ jobs:
power="$GITHUB_WORKSPACE/.ci-dependencies/PowerAdvantage"
chmod +x "$orespawn/gradlew" "$basemetals/gradlew" "$power/gradlew"
(cd "$orespawn" && ./gradlew jar --no-daemon --stacktrace)
(cd "$basemetals" && ./gradlew jar --no-daemon --stacktrace)
mirror="$RUNNER_TEMP/orespawn-mirror"
(cd "$basemetals" && bash gradle/stage-orespawn-release.sh "$mirror" &&
./gradlew jar "-PorespawnVerificationRepository=$mirror" --no-daemon --stacktrace)
osjar="$orespawn/build/libs-dev/OreSpawn-4.1.0.113021-deobf.jar"
bmjar="$basemetals/build/libs-dev/BaseMetals-3.0.1.113021-deobf.jar"
(cd "$power" && ./gradlew jar verifyReleaseDependencies -PbaseMetalsDeobfJar="$bmjar" -PoreSpawnDeobfJar="$osjar" --no-daemon --stacktrace)
powerjar="$power/build/libs-dev/PowerAdvantage-2.4.4.113021-deobf.jar"
bm_version=$(sed -n 's/^basemetals_version=//p' gradle.properties)
bmjar="$basemetals/build/libs-dev/BaseMetals-$bm_version-deobf.jar"
(cd "$power" && ./gradlew jar verifyReleaseDependencies \
-PbaseMetalsDeobfJar="$bmjar" -PoreSpawnDeobfJar="$osjar" --no-daemon --stacktrace)
powerjar="$power/build/libs-dev/basePower-2.4.5.113021-deobf.jar"
test -f "$osjar" && test -f "$bmjar" && test -f "$powerjar"
echo "orespawn=$osjar" >> "$GITHUB_OUTPUT"
echo "basemetals=$bmjar" >> "$GITHUB_OUTPUT"
echo "power=$powerjar" >> "$GITHUB_OUTPUT"
echo "power_ref=$(git -C "$power" rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Initialize CodeQL
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
with:
Expand All @@ -83,7 +101,6 @@ jobs:
chmod +x ./gradlew
./gradlew clean classes --rerun-tasks --no-build-cache --no-daemon --stacktrace \
-PpowerAdvantageDeobfJar=${{ steps.dependencies.outputs.power }} \
-Ppoweradvantage_source_ref=${{ steps.dependencies.outputs.power_ref }} \
-PbaseMetalsDeobfJar=${{ steps.dependencies.outputs.basemetals }} \
-PoreSpawnDeobfJar=${{ steps.dependencies.outputs.orespawn }}
- name: Analyze
Expand Down
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
6 changes: 6 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2.2.7.113021 - baseElectric for Minecraft 1.13.2

- Bring baseElectric to Forge 1.13.2. Keep your machines and wiring when moving from Electric Advantage or an earlier baseElectric release.
- Keep battery charge, drill directions and the saved link between each turbine and its generator.
- Find the machines and parts on the shared basePower creative tab.

Unreleased

- Check generator redstone before the first power pulse so a disabled solar panel cannot produce a startup burst.
Expand Down
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# ElectricAdvantage
# baseElectric for Minecraft 1.13.2

Electric Advantage adds electric machines, generation, storage, automation, and defence to Power Advantage for Minecraft 1.13.2.
baseElectric continues DrCyano's Electric Advantage, adding generators, batteries, wiring and electric machines to basePower.

Every crafting and vanilla smelting variant has an ingredient-triggered recipe-book discovery. See the [shared material checklist and discovery tests](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.13.2/docs/1.13/RECIPE-DISCOVERY.md) and [manufacturing progression audit](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.13.2/docs/1.13/MANUFACTURING-PROGRESSION.md). Regenerate unlock JSON after recipe changes with `node tools/generate-recipe-unlocks.js`; `check` audits recipe coverage and criteria. Custom machine and crushing recipes are not crafting-book entries.
Use basePower `2.4.5.113021` and Base Metals `3.0.2.113021` for Forge 1.13.2. baseElectric's machines and parts are on the shared **basePower** creative tab. Back up the world and config, then replace the old jars together and test on a copy. Save, close Minecraft completely, and reopen the copy to check your machines.

The recipe book unlocks crafting and smelting recipes when you pick up the ingredients. See the [material checklist](https://github.com/MinecraftModDevelopmentMods/basePower/blob/master-1.13.2/docs/1.13/RECIPE-DISCOVERY.md) for where to start. Custom machine recipes aren't shown in the crafting book. After changing recipes, run `node tools/generate-recipe-unlocks.js` and `check`.

## Building Minecraft 1.13.2

The `master-1.13.2` build uses ForgeGradle 7.0.34 and Gradle 9.6.1. Run Gradle with Java 17; production code is compiled for Java 8.

Build the pinned PowerAdvantage, Base Metals, and OreSpawn deobf jars first.
Exact source commits and checksums are recorded in `gradle.properties`; CI builds the same commits.
Build the pinned basePower, Base Metals and OreSpawn development jars first. The source commits and checksums in `gradle.properties` keep local and CI builds on the same inputs.
With the standard sibling layout:

```text
Expand All @@ -25,6 +26,8 @@ gradlew.bat clean check build javadoc verifyReleaseDependencies verifyReleaseArt

Alternative layouts may pass `-PpowerAdvantageDeobfJar=<path>`, `-PbaseMetalsDeobfJar=<path>`, and `-PoreSpawnDeobfJar=<path>`. None of those dependencies is embedded.

For publishing, use the [MMD release workflow](https://github.com/MinecraftModDevelopmentMods/baseElectric/actions/workflows/deploy-release.yml). It publishes the same checked jar to CurseForge and MMD Maven.

For Eclipse, import this repository as an existing Gradle project and run:

```text
Expand All @@ -42,7 +45,7 @@ records measured machine work, restart checks, repaired windows and remaining li

For an all-Advantage play-test, run `prepareCombinedEclipseLaunch` in the sibling PowerAdvantage checkout and select its `runClientAllAdvantage.launch`. The [native resource probe](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.13.2/test-rig/client-resources/README.md) checks models, textures and names across all three mods. These resource checks do not replace gameplay testing.

The implementation namespace is `zone.moddev.mc.electricadvantage`. Runtime identities, registries, tile/entity IDs, NBT, recipes, tags, OreSpawn provider IDs, and assets remain stable. Electric registers its legacy state, tile, and hydroturbine aliases with PowerAdvantage's shared migration hook.
The implementation namespace is `zone.moddev.mc.baseelectric`. Electric registers its legacy block, tile and hydroturbine mappings with basePower. Old Electric Advantage and baseElectric worlds are converted to the new IDs while carrying over saved batteries, inventories, fluids, and machine state.

The RF- and Tech Reborn-labelled converters belong to Power Advantage and now use Forge Energy.
Read the [1.13 migration guide](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.13.2/docs/1.13/MIGRATION.md) before upgrading, and always use a backup. The [qualification notes](https://github.com/MinecraftModDevelopmentMods/PowerAdvantage/blob/master-1.13.2/docs/1.13/CURRENT-QUALIFICATION.md) list the tested scenarios and remaining gaps.
Expand Down
Loading
Loading