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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/verify-published-pins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ value() { sed -n "s/^$1=//p" gradle.properties | tr -d '\r'; }

require_merged() {
local repo="$1" ref="$2" status
[[ "$ref" =~ ^[a-f0-9]{40}$ ]]
status="$(gh api "repos/MinecraftModDevelopmentMods/$repo/compare/$ref...master-1.20.6" --jq '.status')"
if [[ ! "$ref" =~ ^[a-f0-9]{40}$ ]]; then
echo "::error::$repo needs an exact source pin. A pending local candidate is not a public dependency."
exit 1
fi
status="$(gh api "repos/MinecraftModDevelopmentMods/$repo/compare/$ref...master-1.21.1" --jq '.status')"
case "$status" in
identical|ahead) ;;
*) echo "::error::$repo $ref is not on upstream master-1.20.6 ($status)."; exit 1 ;;
*) echo "::error::$repo $ref is not on upstream master-1.21.1 ($status)."; exit 1 ;;
esac
}

Expand All @@ -36,7 +39,7 @@ require_merged basePower "$power_ref"
require_merged BaseMetals "$(value basemetals_source_commit)"
require_merged OreSpawn "$orespawn_ref"

inputs="${RUNNER_TEMP:?}/forge50-release-dependencies"
inputs="${RUNNER_TEMP:?}/forge52-release-dependencies"
mkdir -p "$inputs"
power="$inputs/basePower-$(value poweradvantage_version).jar"
metals="$inputs/BaseMetals-$(value basemetals_version).jar"
Expand All @@ -45,8 +48,8 @@ public_jar basePower 1780140 "$(value poweradvantage_public_file_id)" "$(value p
public_jar BaseMetals 240967 "$(value basemetals_public_file_id)" "$(value basemetals_deobf_sha256)" "$metals"
public_jar OreSpawn 245586 "$(value orespawn_public_file_id)" "$(value orespawn_deobf_sha256)" "$orespawn"

installer="$inputs/forge-1.20.6-50.2.0-installer.jar"
download 'https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.6-50.2.0/forge-1.20.6-50.2.0-installer.jar' \
installer="$inputs/forge-1.21.1-52.1.0-installer.jar"
download 'https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.1-52.1.0/forge-1.21.1-52.1.0-installer.jar' \
"$(value forge_installer_sha256)" "$installer"
{
printf 'power_ref=%s\n' "$power_ref"
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: baseSteam 1.20.6 CI
name: baseSteam 1.21.1 CI

on:
push:
branches: [master-1.20.6, 'feature/**']
branches: [master-1.21.1, 'feature/**']
pull_request:
branches: [master-1.20.6]
branches: [master-1.21.1]

permissions:
contents: read

concurrency:
group: basesteam-1.20.6-${{ github.workflow }}-${{ github.ref }}
group: basesteam-1.21.1-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
-Porg.gradle.java.installations.auto-download=false" >> "$GITHUB_ENV"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
- name: Verify the Forge 50 build inputs
- name: Verify the Forge 52 build inputs
shell: bash
env:
ORESPAWN_REF: ${{ steps.public-pins.outputs.orespawn_ref }}
Expand All @@ -74,15 +74,15 @@ jobs:
test "$(git -C "$orespawn" rev-parse HEAD)" = "$ORESPAWN_REF"
test "$(git -C "$power" rev-parse HEAD)" = "$POWER_REF"
mavenizer="$orespawn/ci-fixtures/tools/minecraft-mavenizer-0.5.21-orespawn-compat.jar"
printf '%s %s\n' '4B14145595E900F178A082F2253A756F63897E6F61C2B8B5E7C819B82CD79E8C' "$mavenizer" | sha256sum -c -
printf '%s %s\n' '019032A4A26ECB473D403EF017054D5892CE59A9904E8831B452287CD756397E' "$mavenizer" | sha256sum -c -
echo "MAVENIZER=$mavenizer" >> "$GITHUB_ENV"
- name: Build the released basePower test bootstrap
shell: bash
run: |
set -euo pipefail
power="$GITHUB_WORKSPACE/.ci-dependencies/basePower"
(cd "$power" && bash ./gradlew $MMD_GRADLE_TOOLCHAINS unitBootstrapJar \
"-Pforge50MavenizerJar=$MAVENIZER" "-PbaseMetalsDeobfJar=$METALS_PLAYER" "-PoreSpawnDeobfJar=$ORESPAWN_PLAYER" --no-daemon)
"-Pforge52MavenizerJar=$MAVENIZER" "-PbaseMetalsDeobfJar=$METALS_PLAYER" "-PoreSpawnDeobfJar=$ORESPAWN_PLAYER" --no-daemon)
echo "POWER_BOOTSTRAP=$power/build/unit-bootstrap/forge-native-unit-bootstrap.jar" >> "$GITHUB_ENV"
echo "POWER_BOOTSTRAP_SOURCE=$power/test-rig/unit-bootstrap/ForgeCapabilityBootstrap.java" >> "$GITHUB_ENV"
echo "POWER_REGISTRY_SOURCE=$power/test-rig/unit-support/zone/moddev/mc/advantageworks/unit/ForgeUnitRegistries.java" >> "$GITHUB_ENV"
Expand All @@ -91,27 +91,27 @@ jobs:
run: |
./gradlew $MMD_GRADLE_TOOLCHAINS clean check build javadoc verifyReleaseDependencies verifyReleaseArtifacts \
writeReleaseChecksums verifyEclipseProductionClasspath --no-build-cache --no-daemon --stacktrace \
"-Pforge50MavenizerJar=$MAVENIZER" "-PpowerAdvantageDeobfJar=$POWER_PLAYER" \
"-Pforge52MavenizerJar=$MAVENIZER" "-PpowerAdvantageDeobfJar=$POWER_PLAYER" \
"-PbaseMetalsDeobfJar=$METALS_PLAYER" "-PoreSpawnDeobfJar=$ORESPAWN_PLAYER" \
"-PforgeCapabilityBootstrapJar=$POWER_BOOTSTRAP" "-PforgeCapabilityBootstrapSource=$POWER_BOOTSTRAP_SOURCE" \
"-PforgeUnitRegistriesSource=$POWER_REGISTRY_SOURCE"
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: baseSteam-1.20.6-${{ github.sha }}
name: baseSteam-1.21.1-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/baseSteam-2.2.14.120061.jar
build/libs/baseSteam-2.2.14.120061-sources.jar
build/libs/baseSteam-2.2.14.120061-javadoc.jar
build/libs/baseSteam-2.2.15.121011.jar
build/libs/baseSteam-2.2.15.121011-sources.jar
build/libs/baseSteam-2.2.15.121011-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt
- name: Upload diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: baseSteam-1.20.6-diagnostics-${{ github.sha }}
name: baseSteam-1.21.1-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name: CodeQL

on:
push:
branches: [master-1.20.6, 'feature/**']
branches: [master-1.21.1, 'feature/**']
pull_request:
branches: [master-1.20.6]
branches: [master-1.21.1]

permissions:
contents: read
actions: read
security-events: write

concurrency:
group: basesteam-1.20.6-${{ github.workflow }}-${{ github.ref }}
group: basesteam-1.21.1-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
-Porg.gradle.java.installations.auto-download=false" >> "$GITHUB_ENV"
- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6
- name: Verify the Forge 50 build inputs
- name: Verify the Forge 52 build inputs
shell: bash
env:
ORESPAWN_REF: ${{ steps.public-pins.outputs.orespawn_ref }}
Expand All @@ -76,7 +76,7 @@ jobs:
test "$(git -C "$orespawn" rev-parse HEAD)" = "$ORESPAWN_REF"
test "$(git -C "$power" rev-parse HEAD)" = "$POWER_REF"
mavenizer="$orespawn/ci-fixtures/tools/minecraft-mavenizer-0.5.21-orespawn-compat.jar"
printf '%s %s\n' '4B14145595E900F178A082F2253A756F63897E6F61C2B8B5E7C819B82CD79E8C' "$mavenizer" | sha256sum -c -
printf '%s %s\n' '019032A4A26ECB473D403EF017054D5892CE59A9904E8831B452287CD756397E' "$mavenizer" | sha256sum -c -
echo "MAVENIZER=$mavenizer" >> "$GITHUB_ENV"
- name: Initialize CodeQL
uses: github/codeql-action/init@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
Expand All @@ -87,7 +87,7 @@ jobs:
shell: bash
run: |
./gradlew $MMD_GRADLE_TOOLCHAINS classes verifyReleaseDependencies --rerun-tasks --no-build-cache --no-daemon --stacktrace \
"-Pforge50MavenizerJar=$MAVENIZER" "-PpowerAdvantageDeobfJar=$POWER_PLAYER" \
"-Pforge52MavenizerJar=$MAVENIZER" "-PpowerAdvantageDeobfJar=$POWER_PLAYER" \
"-PbaseMetalsDeobfJar=$METALS_PLAYER" "-PoreSpawnDeobfJar=$ORESPAWN_PLAYER"
- name: Analyze
uses: github/codeql-action/analyze@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 # v4
5 changes: 5 additions & 0 deletions .github/workflows/release-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ jobs:
minecraft_version="$(value minecraft_version)"
loader_name="$(value loader_name)"
loader_code="$(value loader_code)"
if [[ "$minecraft_version" != '1.21.1' || "$(value forge_version)" != '52.1.0' ||
"$(value mapping_version)" != '1.21.1' || "$(value mcp_version)" != '20240808.132146' ]]; then
echo 'Expected the exact Minecraft 1.21.1 Forge 52.1.0 release target' >&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
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.20.6
- master-1.21.1
- 'feature/**'
pull_request:
branches:
- master-1.20.6
- master-1.21.1

permissions:
contents: read
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
baseSteam 2.2.15.121011 (Minecraft 1.21.1 / Forge)

- Target Forge 52.1.0 and Java 21 with basePower 2.4.14.121011.
- Keep machine balance, saved state, recipes and the whole fluid gauges unchanged.
- Move musket enchantments to native data while retaining all four IDs and effects.
- Pin the released basePower, Base Metals and OreSpawn jars used for the upgrade tests.

baseSteam 2.2.14.120061 (Minecraft 1.20.6 / Forge)

- Target Minecraft 1.20.6, Forge 50.2.0 and Java 21 with basePower 2.4.13.120061.
Expand Down
92 changes: 38 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,31 @@
# baseSteam

**Minecraft 1.20.6 (Forge), version 2.2.14.120061.**
**Minecraft 1.21.1 (Forge), version 2.2.15.121011.**

baseSteam, formerly Steam Advantage, adds boilers, steam-powered machines,
pumps, storage, elevators and a blackpowder musket to basePower. Items and
blocks use the shared basePower creative tab.
baseSteam adds boilers, steam-powered machines, pumps, storage, elevators
and a blackpowder musket to basePower. Items and blocks share the basePower
creative tab. The mod ID and resource namespace remain `basesteam`.

## Build Target
## Build

Minecraft 1.20.6, Forge 50.2.0, official mappings and MCP 20240429.135109.
ForgeGradle 7.0.34 and the Gradle 9.6.1 wrapper use Temurin 21.0.7+6.
Mavenizer uses Java 25 and the checksum-verified fixture from the local OreSpawn
1.20.6 checkout. Set `-Pforge50MavenizerJar=<path>` for a different layout.
ForgeGradle's Slime Launcher also locates a Java 8 toolchain while generating
runs. The game itself runs on Java 21.
Target: Forge 52.1.0, official Minecraft 1.21.1 mappings and MCP
20240808.132146. ForgeGradle 7.0.34 and the checksum-pinned Gradle 9.6.1
wrapper use Temurin 21.0.7+6. Mavenizer uses Java 25; the launcher helper
also needs Java 8. Minecraft itself runs on Java 21.

Forge 50 uses official names at runtime. Steam does not run an SRG renamer.
Install [basePower 2.4.13.120061](https://www.curseforge.com/minecraft/mc-mods/basepower/files/9545972)
for Minecraft 1.20.6. CurseForge also installs
[Base Metals](https://www.curseforge.com/minecraft/mc-mods/base-metals); this
build was tested with 3.1.2.120061 and OreSpawn 4.1.0.120061. The same native
jars are used for play and development, and none are bundled.
The mod ID, data namespace, and registry paths remain `basesteam`.
The default dependency paths use the coordinated 1.21.1 checkouts. This
version needs the released basePower 2.4.14.121011, Base Metals 3.1.2.121011 and
OreSpawn 4.1.0.121011 as separate native jars, not bundled copies.
Exact source, public file, jar and test-bootstrap pins are in `gradle.properties`.
They are checked before compilation and tests. CurseForge, Maven and GitHub
releases use the same checked player jar.

## Local Verification
The Mavenizer fixture comes from OreSpawn's OS1211 checkout. Another layout
can use `-Pforge52MavenizerJar=<path>`. The `*DeobfJar` and `*PlayerJar`
properties select separate development and packaged inputs; both must
satisfy the committed checksums.

The default paths point to the coordinated local 1.20.6 checkouts, including
the Base Metals shared-hook checkout. The
`*DeobfJar` project properties remain accepted path overrides even though the
target uses native jars. For packaged checks, the `*PlayerJar` overrides
are separate. Both paths must satisfy the pins in `gradle.properties`.
The unit gate also verifies the Power bootstrap jar and both source hashes.
Absent or mismatched inputs fail closed.

From this checkout in PowerShell, with the pinned local JDKs installed:
With the pinned local dependencies available:

```powershell
$env:JAVA_HOME = "$env:USERPROFILE/.jdks/temurin-21.0.7+6"
Expand All @@ -43,37 +35,29 @@ $toolchains = @("-Porg.gradle.java.installations.paths=$jdks",
'-Porg.gradle.java.installations.auto-detect=false',
'-Porg.gradle.java.installations.auto-download=false')
./gradlew.bat @toolchains check build deobfJar verifyReleaseArtifacts writeReleaseChecksums
./gradlew.bat @toolchains verifyEclipseProductionClasspath
./gradlew.bat @toolchains -PsteamGameTestRunId=candidate verifyPlayerDependencies runGameTestServer
./tools/run-packaged-server-smoke.ps1 -ForgeInstall $env:FORGE_1206_SERVER_INSTALL -RunId candidate-with-basemetals
./tools/run-packaged-server-smoke.ps1 -ForgeInstall $env:FORGE_1211_SERVER_INSTALL -RunId candidate-with-metals
./tools/run-packaged-server-smoke.ps1 -ForgeInstall $env:FORGE_1211_SERVER_INSTALL -RunId candidate-without-metals -WithoutBaseMetals
```

The GameTest run uses `build/steam-gametest-<id>` and a validation-only source
set. It checks drill-bit packets, legacy musket componentization, the shared
durability migration, and loaded recipe, advancement, and loot resources.
The packaged dedicated smoke is a separate gate. It checks the official Forge
server shim and the pinned player jars, then boots a fresh loopback-only world
under `evidence/packaged-server-<RunId>`. Use a new run ID on each attempt.
The optional no-Base-Metals profile uses `-WithoutBaseMetals` and retains
OreSpawn because basePower requires it.
`node tools/verify-native-port.js` and
`node tools/generate-recipe-unlocks.js --check` are independent source checks.
See the [1.20.6 notes](docs/PORT1206-STATUS.md) for save compatibility and test coverage.
Independent source checks: `node tools/verify-native-port.js` and
`node tools/generate-recipe-unlocks.js --check`.
Hosted CI and CodeQL require merged sources and checksum-matching public
downloads before compiling. Pending local pins cannot pass that gate.

## Upgrading a World
## Old Worlds

Back up the world and upgrade a disposable copy. Do not install both Steam
Back up worlds and upgrade disposable copies. Do not install both Steam
Advantage and baseSteam or reopen an upgraded world on an older Minecraft
version. Use basePower's coordinated migration rig for whole-world checks.
Existing `basesteam-common.toml` settings take precedence over legacy settings.
version. Existing `basesteam-common.toml` settings take precedence.

Vanilla's data fixer moves 1.20.1 item wear into the damage component and
retains the musket's loaded byte in custom data. The shared migration hook
also recognizes the old `steamadvantage:musket` ID and top-level wear.
Steam's load cycle changes only its loaded byte. Machines retain their
registry IDs, persistent keys, aliases and native factory coordinates.
Steam retains machine IDs and saved fields, drill directions, musket wear
and loading, and all four musket enchantments. The singular datapack folders
do not change logical recipe or advancement identities.

Before accepting the port, check boilers, crusher/furnace restart and
redstone, drill movement in all six directions, pumps, stills, elevator rides,
GUI captions, track transparency, and musket load, wear, and effects in-game.
Client presentation and multiplayer behavior need manual acceptance even
when automated checks pass. Earlier-version receipts do not qualify this port.
Use basePower's migration rig for whole-world checks. Before accepting the
port, check machines, restarts, redstone, all drill directions, elevators,
GUI captions, whole fluid gauges, track transparency and musket effects
in-game. Automated, packaged and manual acceptance are separate gates.
See the [1.21.1 notes](docs/PORT1211-STATUS.md).
Loading
Loading