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
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ src/generated/**/*.json text eol=lf
*.md text eol=lf
/gradlew text eol=lf
/gradlew.bat text eol=lf

# Keep the original whitespace in checksum-verified patch files.
/ci-fixtures/tools/*.patch whitespace=-blank-at-eol,-blank-at-eof
44 changes: 24 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Base Metals 1.18.2 CI
name: Base Metals 1.19.4 CI

on:
push:
branches:
- master-1.18
- master-1.19.4
- 'feature/**'
pull_request:
branches:
- master-1.18
- master-1.19.4

permissions:
contents: read

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

jobs:
Expand Down Expand Up @@ -50,19 +50,19 @@ jobs:
--no-daemon --stacktrace
first="$RUNNER_TEMP/basemetals-first"
mkdir -p "$first"
cp build/libs/BaseMetals-3.1.0.118021.jar "$first/"
cp build/libs/BaseMetals-3.1.0.118021-sources.jar "$first/"
cp build/libs/BaseMetals-3.1.0.118021-javadoc.jar "$first/"
cp build/libs/BaseMetals-3.1.0.119041.jar "$first/"
cp build/libs/BaseMetals-3.1.0.119041-sources.jar "$first/"
cp build/libs/BaseMetals-3.1.0.119041-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.0.118021.jar" build/libs/BaseMetals-3.1.0.118021.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.118021-sources.jar" build/libs/BaseMetals-3.1.0.118021-sources.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.118021-javadoc.jar" build/libs/BaseMetals-3.1.0.118021-javadoc.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.119041.jar" build/libs/BaseMetals-3.1.0.119041.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.119041-sources.jar" build/libs/BaseMetals-3.1.0.119041-sources.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.119041-javadoc.jar" build/libs/BaseMetals-3.1.0.119041-javadoc.jar
cmp "$RUNNER_TEMP/basemetals-first/SHA256SUMS" build/release/SHA256SUMS

- name: Run all required GameTests
Expand All @@ -74,14 +74,14 @@ jobs:
- name: Install official Forge packaged runtimes
id: forge-runtimes
run: |
server_runtime="$RUNNER_TEMP/forge-1.18.2-40.3.0-server"
client_runtime="$RUNNER_TEMP/forge-1.18.2-40.3.0-client"
installer="$RUNNER_TEMP/forge-1.18.2-40.3.0-installer.jar"
server_runtime="$RUNNER_TEMP/forge-1.19.4-45.4.0-server"
client_runtime="$RUNNER_TEMP/forge-1.19.4-45.4.0-client"
installer="$RUNNER_TEMP/forge-1.19.4-45.4.0-installer.jar"
mkdir -p "$server_runtime" "$client_runtime"
curl --fail --location --retry 3 \
--output "$installer" \
https://maven.minecraftforge.net/net/minecraftforge/forge/1.18.2-40.3.0/forge-1.18.2-40.3.0-installer.jar
echo "9434c29790504dcd11ce97cb30dd8891b4b18848982357bc1b5abfa79fb95103 $installer" | sha256sum --check --strict
https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.4-45.4.0/forge-1.19.4-45.4.0-installer.jar
echo "6643bb8c21f409cc528ff656daf60c206d304cc77bf529bbbab4b336004dfc53 $installer" | sha256sum --check --strict
(
cd "$server_runtime"
java -jar "$installer" --installServer
Expand Down Expand Up @@ -124,28 +124,32 @@ jobs:
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: BaseMetals-1.18.2-${{ github.sha }}
name: BaseMetals-1.19.4-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
build/libs/BaseMetals-3.1.0.118021.jar
build/libs/BaseMetals-3.1.0.118021-sources.jar
build/libs/BaseMetals-3.1.0.118021-javadoc.jar
build/libs/BaseMetals-3.1.0.119041.jar
build/libs/BaseMetals-3.1.0.119041-sources.jar
build/libs/BaseMetals-3.1.0.119041-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.18.2-diagnostics-${{ github.sha }}
name: BaseMetals-1.19.4-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
build/test-results/**
build/reports/**
run/logs/**
run/crash-reports/**
run-gametest/logs/**
run-gametest/crash-reports/**
run-integrated-smoke/logs/**
run-integrated-smoke/crash-reports/**
run-data/logs/**
build/problems/**
build/packaged-server-run/logs/**
Expand Down
4 changes: 2 additions & 2 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.18
- master-1.19.4
- 'feature/**'
pull_request:
branches:
- master-1.18
- master-1.19.4

permissions:
actions: read
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.18
- master-1.19.4
- 'feature/**'
pull_request:
branches:
- master-1.18
- master-1.19.4

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.0.119041

- Port the 1.18 version to Minecraft 1.19.4 and Forge 45.4.0.
- Keep raw metals, Kiri's ore overlays, High/Low Fantasy modes and the fixes from 1.18.
- Use the new creative tabs and fluid types. Filled molten-metal buckets remain visible and searchable.
- Update door models, recipes, loot, configuration screens and save conversion for the newer Minecraft APIs.
- Save configuration-screen changes together so quick edits aren't lost.
- Remove obsolete vanilla biome registry snapshots during upgrades, with a backup. Keep modded biome snapshots untouched.
- Require the published OreSpawn 4.1.0.119041 release, keeping the same ore rules and copper defaults.
- Keep unsupported optional-mod jars out of development launches. Their integration data is retained for future compatibility work.

Base Metals 3.1.0.118021

- Bring raw metals, ore overlays and High/Low Fantasy modes to Minecraft 1.18.2, along with the fixes from the earlier ports.
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.18)](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml?query=branch%3Amaster-1.18)
[![Build, test, and audit](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml/badge.svg?branch=master-1.19.4)](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml?query=branch%3Amaster-1.19.4)

# Base Metals

Expand All @@ -12,21 +12,21 @@ 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.18.2 Forge version, `3.1.0.118021`. It brings over the
fixes and features from the earlier ports, including raw metals, ore texture
This is the Minecraft 1.19.4 Forge version, `3.1.0.119041`. It brings over the
fixes and features from 1.18, 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.18.2`
- Forge `40.3.0` or newer in the Minecraft 1.18.2 Forge 40 line
- Minecraft `1.19.4`
- Forge `45.4.0` or newer in the Minecraft 1.19.4 Forge 45 line
- Java 17
- OreSpawn `[4.1.0.118021,5.0.0)` on both client and server
- OreSpawn `[4.1.0.119041,5.0.0)` on both client and server

This version uses OreSpawn `4.1.0.118021`. Put
`BaseMetals-3.1.0.118021.jar` and a compatible OreSpawn JAR in the `mods`
This version uses OreSpawn `4.1.0.119041`. Put
`BaseMetals-3.1.0.119041.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 Down Expand Up @@ -121,7 +121,7 @@ default distributions, and data-pack override guidance.
## Updating an old world

The port supports direct upgrades from Base Metals 1.10 and 1.12, including the
original Cyano 2.4 line and the later MMD 2.5 line. The first 1.18 launch makes
original Cyano 2.4 line and the later MMD 2.5 line. The first upgrade makes
world-local backups before converting legacy numeric chunks, registry aliases,
inventories, equipment, block entities, fluids, and OreSpawn 3 configuration.
Migration stops instead of guessing when required legacy registry information
Expand All @@ -133,12 +133,11 @@ original. Read [Migration](docs/MIGRATION.md) before starting an upgraded world.
## Mod and data-pack compatibility

Forge item, block, and fluid tags are Base Metals' public compatibility API.
Conditional data is included for:

- Mekanism 10.2
- Thermal Expansion 9
- Tinkers' Construct 3.7
- Ender IO 6 alpha
The integration data from 1.18 is retained, but Mekanism, Thermal Expansion,
Tinkers' Construct and Ender IO do not currently publish Forge 1.19.4 builds.
Those integrations are not qualified for this version. Use mods built for
Minecraft 1.19.4; jars for 1.19.2 or 1.20.1 cannot be substituted.

See [Compatibility](docs/COMPATIBILITY.md) for the supported processing chains,
tag aliases, copper rules, and intentionally retired legacy integrations. See
Expand All @@ -162,10 +161,9 @@ Generate and verify Eclipse launches with:
```

Use **runClient** for normal testing with Base Metals and OreSpawn only.
**runClientOptionalMods** adds Tinkers' Construct and Mantle for compatibility
testing. It uses `run-optional-mods`, keeping its settings and saves separate
from the normal client's `run` folder. Both profiles are available in Eclipse
and through Gradle tasks.
**runClientOptionalMods** uses a separate `run-optional-mods` folder for
compatibility testing. No optional mods are added automatically on 1.19.4.
Both profiles are available in Eclipse and through Gradle tasks.

Use the Gradle **generateResources** task when changing recipes, models or
translations. It updates the checked-in data; ordinary builds only check for
Expand All @@ -179,7 +177,7 @@ artifacts. GameTests, smoke probes, migration fixtures, and reference sources
are isolated from the published JAR.

Release artifacts use Maven coordinate
`zone.moddev.mc.basemetals:BaseMetals:3.1.0.118021`.
`zone.moddev.mc.basemetals:BaseMetals:3.1.0.119041`.

Report defects and compatibility problems through the
[Base Metals issue tracker](https://github.com/MinecraftModDevelopmentMods/BaseMetals/issues).
Expand Down
33 changes: 25 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,27 @@ plugins {
}

ext.mavenizerCompatibilityJar = layout.projectDirectory.file(
'ci-fixtures/tools/minecraft-mavenizer-0.5.21-orespawn-1.18.jar')
'ci-fixtures/tools/minecraft-mavenizer-0.5.21-orespawn-compat.jar')
ext.mavenizerCompatibilitySha256 =
'28A6697BDF6D9500EC0AF9C1C949B9F3ED7DDFDA649CB5CAC4BEEA2E9567570A'
'341B3FB10ABA6EA7DC612FBE519DC290A1C81867AED5DD320ACD783688AC49DE'

// ForgeGradle 7's Mavenizer recompilation rejects a redundant accessor emitted
// by Forge 40's 1.18.2 decompiler. This checksum-sealed build-only derivative
// removes that accessor; Base Metals itself remains Java 17 bytecode.
ext.mavenizerFixtureChecksums = [
'minecraft-mavenizer-0.5.21-orespawn-compat.jar': mavenizerCompatibilitySha256,
'minecraft-source-compatibility.json': '33A3217261EBB8F37D45F50BD2F8CE70B221C014A5C15F4C5F8F9091AD6D1EC8',
'minecraft-mavenizer-0.5.21-orespawn-compat.patch': 'D856190DEF5574716C5E4F4379912C451B1F5952B0B111576651A98EECF58544',
'LICENSE-MAVENIZER.txt': '20C17D8B8C48A600800DFD14F95D5CB9FF47066A9641DDEAB48DC54AEC96E331'
]
// Mavenizer runs during configuration, so verify its inputs before configuring Forge.
mavenizerFixtureChecksums.each { name, expected ->
File fixture = file("ci-fixtures/tools/${name}")
if (!fixture.isFile() || java.security.MessageDigest.getInstance('SHA-256')
.digest(fixture.bytes).encodeHex().toString().toUpperCase(Locale.ROOT) != expected) {
throw new GradleException("Missing or altered Mavenizer fixture: ${name}")
}
}

// OreSpawn's sealed Mavenizer fixture fixes duplicate record accessors in
// Forge 45's decompiled sources. It is build tooling, not part of the mod.
fgtools.configure('mavenizer') {
classpath.from(mavenizerCompatibilityJar)
mainClass.set('net.minecraftforge.mcmaven.cli.Main')
Expand Down Expand Up @@ -165,7 +179,8 @@ configurations {

println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
// Official mappings are part of the qualified 1.18.2 release identity.
if (gradle.startParameter.offline) mavenizerArguments.add('--cache-only')
// Use the official mappings for the selected Minecraft target.
mappings channel: mapping_channel, version: mapping_version

runs {
Expand Down Expand Up @@ -219,6 +234,7 @@ minecraft {
client {
systemProperty 'forge.enabledGameTestNamespaces', mod_id
if (providers.gradleProperty('integratedWorldSmoke').isPresent()) {
workingDir.set(layout.projectDirectory.dir('run-integrated-smoke'))
systemProperty 'basemetals.integratedWorldSmoke', 'true'
systemProperty 'basemetals.integratedWorldSmokeName',
providers.gradleProperty('integratedWorldSmokeName').getOrElse('basemetals-integrated-smoke')
Expand Down Expand Up @@ -259,6 +275,7 @@ minecraft {

// Runs the isolated validation source set and exits when the suite completes.
gameTestServer {
workingDir.set(layout.projectDirectory.dir('run-gametest'))
systemProperty 'forge.enabledGameTestNamespaces', mod_id
mods {
"${mod_id}" {
Expand All @@ -277,7 +294,7 @@ minecraft {
}
}

// Forge 40 expects each mod's classes and resources under one physical root.
// Forge expects each mod's classes and resources under one physical root.
// These merged development outputs also keep validation-only classes out of
// ordinary client/server runs and every distributable archive.
def registerRunModOutput = { String taskName, SourceSet validationSourceSet ->
Expand Down Expand Up @@ -326,7 +343,7 @@ tasks.withType(JavaExec).configureEach { JavaExec runTask ->

tasks.register('runClientOptionalMods') {
group = 'forgegradle runs'
description = 'Runs the client with Tinkers, Mantle and any selected compatibility mods.'
description = 'Runs the client in a separate folder for optional-mod testing.'
dependsOn 'runOptionalModsClient'
}

Expand Down
20 changes: 11 additions & 9 deletions ci-fixtures/tools/README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# Forge 1.18.2 Mavenizer compatibility fixture
# Forge 1.19.4 Mavenizer compatibility fixture

`minecraft-mavenizer-0.5.21-orespawn-1.18.jar` is a build-only derivative of
`minecraft-mavenizer-0.5.21-orespawn-compat.jar` is a build-only derivative of
MinecraftForge MinecraftMavenizer `0.5.21`, source commit
`6968241ce7a0a902cdc1c534b976e8373a423091`.

Forge 40's 1.18.2 decompiler emits a redundant explicit `Holder.Direct#value`
record accessor. The complete patched Minecraft source tree is rejected by
modern `javac`; removing that method is safe because the record generates the
same public accessor automatically. The derivative also honors
Forge 45's decompiler emits eight duplicate record accessors in Holder.Direct,
OptionInstance and MemoryCondition. The target-specific rules in
`minecraft-source-compatibility.json` remove only those accessors; Java
generates the same public methods automatically. Missing or ambiguous source
matches stop the build. The derivative also honors
`ORESPAWN_MAVENIZER_OFFLINE=true` by adding Mavenizer's native `--offline`
argument. This closes ForgeGradle 7's failure to propagate Gradle offline mode
to the subprocess; it does not alter normal online builds.

`minecraft-1.18-holder-accessor.patch` documents the complete two-file source
change.
`minecraft-mavenizer-0.5.21-orespawn-compat.patch` contains OreSpawn's source
changes. Apply it to the pinned upstream commit with `git am` to rebuild the
fixture using Temurin 25.0.3+9 and the upstream Gradle 9.1.0 wrapper.

The fixture is used only while ForgeGradle prepares the development dependency.
It is checksum-verified by the build and excluded from every Base Metals artifact.
MinecraftMavenizer remains licensed LGPL-2.1-only; see `LICENSE-MAVENIZER.txt`.

SHA-256:
`28A6697BDF6D9500EC0AF9C1C949B9F3ED7DDFDA649CB5CAC4BEEA2E9567570A`
`341B3FB10ABA6EA7DC612FBE519DC290A1C81867AED5DD320ACD783688AC49DE`
Loading
Loading