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
  •  
  •  
  •  
54 changes: 21 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Base Metals 1.21.11 CI
name: Base Metals 26.1.2 CI

on:
push:
branches:
- master-1.21.11
- master-26.1.2
- 'feature/**'
pull_request:
branches:
- master-1.21.11
- master-26.1.2

permissions:
contents: read

concurrency:
group: basemetals-1.21.11-${{ github.workflow }}-${{ github.ref }}
group: basemetals-26.1.2-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand All @@ -26,24 +26,12 @@ jobs:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Install Java 25 for Mavenizer
- name: Install pinned Java 25 runtime and toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '25.0.3+9.0.LTS'

- name: Install Java 8 for the development launcher helper
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '8.0.502+7'

- name: Install pinned Java 21 runtime and toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '21.0.7+6.0.LTS'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6

Expand Down Expand Up @@ -71,19 +59,19 @@ jobs:
--no-daemon --stacktrace
first="$RUNNER_TEMP/basemetals-first"
mkdir -p "$first"
cp build/libs/BaseMetals-3.1.1.121111.jar "$first/"
cp build/libs/BaseMetals-3.1.1.121111-sources.jar "$first/"
cp build/libs/BaseMetals-3.1.1.121111-javadoc.jar "$first/"
cp build/libs/BaseMetals-3.1.1.2601021.jar "$first/"
cp build/libs/BaseMetals-3.1.1.2601021-sources.jar "$first/"
cp build/libs/BaseMetals-3.1.1.2601021-javadoc.jar "$first/"
cp build/release/SHA256SUMS "$first/"

- name: Rebuild and prove byte-identical archives
run: |
./gradlew clean assemble verifyReleaseArtifacts writeReleaseChecksums \
-PorespawnVerificationRepository="${{ steps.orespawn.outputs.repository }}" \
--no-daemon --stacktrace
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.121111.jar" build/libs/BaseMetals-3.1.1.121111.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.121111-sources.jar" build/libs/BaseMetals-3.1.1.121111-sources.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.121111-javadoc.jar" build/libs/BaseMetals-3.1.1.121111-javadoc.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.2601021.jar" build/libs/BaseMetals-3.1.1.2601021.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.2601021-sources.jar" build/libs/BaseMetals-3.1.1.2601021-sources.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.2601021-javadoc.jar" build/libs/BaseMetals-3.1.1.2601021-javadoc.jar
cmp "$RUNNER_TEMP/basemetals-first/SHA256SUMS" build/release/SHA256SUMS

- name: Run all required GameTests
Expand All @@ -95,14 +83,14 @@ jobs:
- name: Install official Forge packaged runtimes
id: forge-runtimes
run: |
server_runtime="$RUNNER_TEMP/forge-1.21.11-61.1.0-server"
client_runtime="$RUNNER_TEMP/forge-1.21.11-61.1.0-client"
installer="$RUNNER_TEMP/forge-1.21.11-61.1.0-installer.jar"
server_runtime="$RUNNER_TEMP/forge-26.1.2-64.0.9-server"
client_runtime="$RUNNER_TEMP/forge-26.1.2-64.0.9-client"
installer="$RUNNER_TEMP/forge-26.1.2-64.0.9-installer.jar"
mkdir -p "$server_runtime" "$client_runtime"
curl --fail --location --retry 3 \
--output "$installer" \
https://maven.minecraftforge.net/net/minecraftforge/forge/1.21.11-61.1.0/forge-1.21.11-61.1.0-installer.jar
echo "8BD1724EAEAF26F51DACFB7FDC46D79E9B640705B70D5F0019ED38907145EB48 $installer" | sha256sum --check --strict
https://maven.minecraftforge.net/net/minecraftforge/forge/26.1.2-64.0.9/forge-26.1.2-64.0.9-installer.jar
echo "608BC9F028A0EF8DCD1A49C6EB85DDFCFA3B3BCD8AE27FC1B2AE02888ED8CB0A $installer" | sha256sum --check --strict
(
cd "$server_runtime"
java -jar "$installer" --installServer
Expand Down Expand Up @@ -147,21 +135,21 @@ jobs:
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: BaseMetals-1.21.11-${{ github.sha }}
name: BaseMetals-26.1.2-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/BaseMetals-3.1.1.121111.jar
build/libs/BaseMetals-3.1.1.121111-sources.jar
build/libs/BaseMetals-3.1.1.121111-javadoc.jar
build/libs/BaseMetals-3.1.1.2601021.jar
build/libs/BaseMetals-3.1.1.2601021-sources.jar
build/libs/BaseMetals-3.1.1.2601021-javadoc.jar
build/release/SHA256SUMS
CHANGELOG.txt

- name: Upload bounded diagnostics on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: BaseMetals-1.21.11-diagnostics-${{ github.sha }}
name: BaseMetals-26.1.2-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: CodeQL
on:
push:
branches:
- master-1.21.11
- master-26.1.2
- 'feature/**'
pull_request:
branches:
- master-1.21.11
- master-26.1.2

permissions:
actions: read
Expand All @@ -24,24 +24,12 @@ jobs:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7

- name: Install Java 25 for Mavenizer
- name: Install pinned Java 25 runtime and toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '25.0.3+9.0.LTS'

- name: Install Java 8 for the development launcher helper
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '8.0.502+7'

- name: Install pinned Java 21 runtime and toolchain
uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5
with:
distribution: temurin
java-version: '21.0.7+6.0.LTS'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@9c971963bec38e04b3d30dcc455b5382be2fdbfb # v6

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.21.11
- master-26.1.2
- 'feature/**'
pull_request:
branches:
- master-1.21.11
- master-26.1.2

permissions:
contents: read
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
Base Metals 3.1.1.2601021

- Port the released 1.21.11 version to Minecraft 26.1.2, Forge 64 and Java 25.
- Keep raw metals, Kiri's ore overlays, filled buckets, High/Low Fantasy and the existing gameplay fixes.
- Move smith offers to Minecraft's data-driven trades, keeping their prices, quantities and profession levels.
- Update recipe codecs, configuration drawing and fluid rendering for the newer APIs.
- Keep legacy Forge ingredient tags working through the current common tags.
- Prepare legacy inventories before Minecraft moves player and dimension files into the new world layout.
- Keep current player data and native world-capability files authoritative during upgrades.
- Use published OreSpawn 4.1.0.2601021 with the same eleven rules and copper defaults.

Base Metals 3.1.1.121111

- Port the released 1.21.1 version to Minecraft 1.21.11 and Forge 61, keeping Java 21.
Expand Down
36 changes: 17 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![Discord](https://img.shields.io/badge/Discord-MMD-green.svg?style=flat&logo=Discord)](https://discord.moddev.zone)
[![CurseForge downloads](https://cf.way2muchnoise.eu/full_base-metals_downloads.svg)](https://www.curseforge.com/minecraft/mc-mods/base-metals)
[![Supported Minecraft versions](https://cf.way2muchnoise.eu/versions/Minecraft_base-metals_all.svg)](https://www.curseforge.com/minecraft/mc-mods/base-metals)
[![Build, test, and audit](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml/badge.svg?branch=master-1.21.11)](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml?query=branch%3Amaster-1.21.11)
[![Build, test, and audit](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml/badge.svg?branch=master-26.1.2)](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml?query=branch%3Amaster-26.1.2)

# Base Metals

Expand All @@ -12,23 +12,23 @@ shields, bows, crossbows, arrows, and bolts. The mod also includes Crack
Hammers, scythes, metal anvils, the human detector, villager trades,
advancements, and structure loot.

This is the Minecraft 1.21.11 Forge version, `3.1.1.121111`. It keeps the
fixes and features from the released 1.21.1 version, including raw metals, ore
This is the Minecraft 26.1.2 Forge version, `3.1.1.2601021`. It keeps the
fixes and features from the released 1.21.11 version, including raw metals, ore
texture overlays and High/Low Fantasy modes. Existing Base Metals items and
blocks keep their registry IDs. OreSpawn handles ore generation; MMDLib and
Additional Loot Tables are no longer needed.

## Requirements

- Minecraft `1.21.11`
- Forge `61.1.0` or newer in the Minecraft 1.21.11 Forge 61 line
- A current Java 21 runtime
- OreSpawn `[4.1.0.121111,5.0.0)` on both client and server
- Minecraft `26.1.2`
- Forge `64.0.9` or newer in the Minecraft 26.1.2 Forge 64 line
- A current Java 25 runtime
- OreSpawn `[4.1.0.2601021,5.0.0)` on both client and server

The port has also been checked against Forge `61.2.4`.
The build uses Forge `64.0.9` and is also tested on `64.1.5`.

This version uses OreSpawn `4.1.0.121111`. Put
`BaseMetals-3.1.1.121111.jar` and a compatible OreSpawn JAR in the `mods`
This version uses OreSpawn `4.1.0.2601021`. Put
`BaseMetals-3.1.1.2601021.jar` and a compatible OreSpawn JAR in the `mods`
directory. MMDLib and Additional Loot Tables must not be carried forward from
an older installation. Mineralogy is optional.

Expand All @@ -42,9 +42,9 @@ Base Metals provides 22 materials:
- Fantasy materials: Adamantine, Aquarium, Cold Iron, Mithril, and Starsteel.

All existing items and blocks stay registered, including when Low Fantasy
limits which items you can make. Recipes use Forge tags, so compatible ores,
ingots, powders, plates, rods, gears and other components from different mods
can be used together.
limits which items you can make. Recipes use shared common tags, with legacy
Forge tag names kept as aliases. Compatible ores, ingots, powders, plates,
rods, gears and other components from different mods can be used together.

Where vanilla has the same copper forms, recipes now produce vanilla ingots,
blocks, nuggets, tools, armour, horse armour, bars, doors, trapdoors, cut-copper
Expand Down Expand Up @@ -150,7 +150,7 @@ Forge item, block, and fluid tags are Base Metals' public compatibility API.

Compatible tags and the existing recipe data for Mekanism, Thermal, Tinkers'
Construct and Ender IO are retained, but their Java integrations are not enabled
in this Forge 1.21.11 port. Do not add jars made for older Minecraft versions or
in this Forge 26.1.2 port. Do not add jars made for older Minecraft versions or
NeoForge to this instance. No optional integration API is required to compile
or launch Base Metals.

Expand All @@ -164,9 +164,7 @@ contracts.
## Building and contributing

Base Metals uses ForgeGradle `7.0.34`, Gradle `9.6.1`, official Minecraft
mappings, and the Java 21 toolchain. Initial Minecraft setup also uses Java 25
for Mavenizer. ForgeGradle also needs Java 8 for its setup helper; it does not
compile the mod or run Minecraft with Java 8. A normal command-line
mappings, and Java 25 for the build tools and Minecraft. A normal command-line
build resolves the published OreSpawn release from CurseMaven:

```text
Expand All @@ -179,7 +177,7 @@ Generate and verify Eclipse launches with:
./gradlew prepareEclipse
```

IntelliJ users can import the Gradle project with Java 21 and run
IntelliJ users can import the Gradle project with Java 25 and run
`./gradlew prepareIntelliJ` to add client and server configurations. Both IDEs
use the same Gradle-managed Forge bootstrap and assets.

Expand All @@ -203,7 +201,7 @@ early splash window. Minecraft still opens its game window and runs the full
world check. Ordinary client launches keep the normal splash screen.

Release artifacts use Maven coordinate
`zone.moddev.mc.basemetals:BaseMetals:3.1.1.121111`.
`zone.moddev.mc.basemetals:BaseMetals:3.1.1.2601021`.

Report defects and compatibility problems through the
[Base Metals issue tracker](https://github.com/MinecraftModDevelopmentMods/BaseMetals/issues).
Expand Down
27 changes: 18 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ plugins {
ext.mavenizerCompatibilityJar = layout.projectDirectory.file(
'ci-fixtures/tools/minecraft-mavenizer-0.5.21-orespawn-compat.jar')
ext.mavenizerCompatibilitySha256 =
'B36CA046DB72E30F27BD38E02B4AE34274ADB51AE1D65BAF9E1D07763755682E'
'BB0DACB3DEB2A711CA67DD402D5FDAB5A9847C37C7B9B596DEC7CF37378FA085'

ext.mavenizerFixtureChecksums = [
'minecraft-mavenizer-0.5.21-orespawn-compat.jar': mavenizerCompatibilitySha256,
'minecraft-source-compatibility.json': '88F2EE4C6B7C903EB1C7D693C0BEEFC0EFC601C1023FB197F7CBA187B1142DB7',
'minecraft-mavenizer-0.5.21-orespawn-compat.patch': '88F9035C8545CF1CBC7342C14F2F95076C4E415EDB7A74D585409CFC3F1BDD5C',
'minecraft-source-compatibility.json': '21D1F5984E735BCEA1B1EFB9F965655796B39538FC91AAED1C3474004710423D',
'minecraft-mavenizer-0.5.21-orespawn-compat.patch': '7C8EC895E79DF31AFD2CA3B505B43573C7052718A24050832189AAA2D3CC6137',
'LICENSE-MAVENIZER.txt': '20C17D8B8C48A600800DFD14F95D5CB9FF47066A9641DDEAB48DC54AEC96E331',
'README.md': 'A097E126C606BDC86B34F5DDFB9580228A7C5BC866C6509C6BB362152EBACED7'
'README.md': '7686880D2B0F6BD6ACAFA4F0AB7585189767813174BC36DB675FEC0142440A77'
]
// Mavenizer runs during configuration, so verify its inputs before configuring Forge.
mavenizerFixtureChecksums.each { name, expected ->
Expand All @@ -27,7 +27,7 @@ mavenizerFixtureChecksums.each { name, expected ->
}
}

// Forge 61 needs no source repairs. The sealed fixture records that result
// Forge 64 needs no source repairs. The sealed fixture records that result
// and stays separate from the mod and its runtime dependencies.
fgtools.configure('mavenizer') {
classpath.from(mavenizerCompatibilityJar)
Expand Down Expand Up @@ -67,20 +67,28 @@ ext.release_tag = project.mod_version

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(25)
vendor = JvmVendorSpec.ADOPTIUM
}
withSourcesJar()
withJavadocJar()
}

// Keep the development launcher on the same JDK as Minecraft and Gradle.
fgtools.configure('slimelauncher') {
javaLauncher.set(javaToolchains.launcherFor {
languageVersion = JavaLanguageVersion.of(25)
vendor = JvmVendorSpec.ADOPTIUM
})
}

tasks.withType(JavaCompile).configureEach {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(25)
vendor = JvmVendorSpec.ADOPTIUM
}
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
options.encoding = 'UTF-8'
options.compilerArgs.addAll(['-Xmaxerrs', '1000'])
}
Expand Down Expand Up @@ -369,6 +377,7 @@ sourceSets.main.resources {
}

// Keep the top-level build readable; each script owns one build concern.
apply from: 'gradle/ide/merged-output.gradle'
apply from: 'gradle/dependencies.gradle'
apply from: 'gradle/release/artifacts.gradle'
apply from: 'gradle/release/publishing.gradle'
Expand Down
8 changes: 4 additions & 4 deletions ci-fixtures/tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This directory contains a build-only derivative of MinecraftForge's
MinecraftMavenizer `0.5.21`. It is used only while ForgeGradle prepares the
exact Forge `1.21.11-61.1.0` development dependency and is excluded from every
exact Forge `26.1.2-64.0.9` development dependency and is excluded from every
OreSpawn publication artifact.

## Provenance and licence
Expand All @@ -21,14 +21,14 @@ declaration and one accessor in that record. Missing, partial, duplicate or
ambiguous states fail preparation. Targets without an explicit rule set are
left unchanged.

Forge `1.21.11-61.1.0` compiles without source compatibility edits. Its explicit
Forge `26.1.2-64.0.9` compiles without source compatibility edits. Its explicit
zero-rule entry proves that result is intentional and target-qualified rather
than an accidental fall-through. A marker beside Mavenizer's output records
the target and manifest SHA-256. Reprocessing the same source is idempotent.

The derivative also propagates Gradle offline mode when the build sets
`ORESPAWN_MAVENIZER_OFFLINE=true`. Mavenizer itself runs on Java 25; OreSpawn
and Minecraft 1.21.11 continue to compile for Java 21.
`ORESPAWN_MAVENIZER_OFFLINE=true`. Mavenizer, OreSpawn and Minecraft 26.1.2 all
run and compile with Java 25.

## Rebuild

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ index 0000000..702d759
+{
+ "schema": 1,
+ "targets": {
+ "net.minecraftforge:forge:1.21.11-61.1.0": {
+ "net.minecraftforge:forge:26.1.2-64.0.9": {
+ "expectedApplications": 0,
+ "rules": []
+ }
Expand Down
2 changes: 1 addition & 1 deletion ci-fixtures/tools/minecraft-source-compatibility.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schema": 1,
"targets": {
"net.minecraftforge:forge:1.21.11-61.1.0": {
"net.minecraftforge:forge:26.1.2-64.0.9": {
"expectedApplications": 0,
"rules": []
}
Expand Down
Loading
Loading