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
40 changes: 20 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.19.4 CI
name: Base Metals 1.20.1 CI

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

permissions:
contents: read

concurrency:
group: basemetals-1.19.4-${{ github.workflow }}-${{ github.ref }}
group: basemetals-1.20.1-${{ 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.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/libs/BaseMetals-3.1.0.120011.jar "$first/"
cp build/libs/BaseMetals-3.1.0.120011-sources.jar "$first/"
cp build/libs/BaseMetals-3.1.0.120011-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.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/BaseMetals-3.1.0.120011.jar" build/libs/BaseMetals-3.1.0.120011.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120011-sources.jar" build/libs/BaseMetals-3.1.0.120011-sources.jar
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120011-javadoc.jar" build/libs/BaseMetals-3.1.0.120011-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.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"
server_runtime="$RUNNER_TEMP/forge-1.20.1-47.4.10-server"
client_runtime="$RUNNER_TEMP/forge-1.20.1-47.4.10-client"
installer="$RUNNER_TEMP/forge-1.20.1-47.4.10-installer.jar"
mkdir -p "$server_runtime" "$client_runtime"
curl --fail --location --retry 3 \
--output "$installer" \
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
https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.4.10/forge-1.20.1-47.4.10-installer.jar
echo "1912760B4CB6B803D8A826DE603C9076B1DA71EC2765E9A1F8C1CA78F65278E3 $installer" | sha256sum --check --strict
(
cd "$server_runtime"
java -jar "$installer" --installServer
Expand Down Expand Up @@ -124,21 +124,21 @@ jobs:
- name: Upload audited release candidate
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: BaseMetals-1.19.4-${{ github.sha }}
name: BaseMetals-1.20.1-${{ github.sha }}
if-no-files-found: error
retention-days: 30
path: |
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/libs/BaseMetals-3.1.0.120011.jar
build/libs/BaseMetals-3.1.0.120011-sources.jar
build/libs/BaseMetals-3.1.0.120011-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.19.4-diagnostics-${{ github.sha }}
name: BaseMetals-1.20.1-diagnostics-${{ github.sha }}
if-no-files-found: ignore
retention-days: 14
path: |
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.19.4
- master-1.20.1
- 'feature/**'
pull_request:
branches:
- master-1.19.4
- master-1.20.1

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.19.4
- master-1.20.1
- 'feature/**'
pull_request:
branches:
- master-1.19.4
- master-1.20.1

permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ classes
!/libs/README.txt

.DS_Store
Thumbs.db
Desktop.ini
[Tt]humbs.db
[Dd]esktop.ini

# python
__pycache__/
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.120011

- Port the 1.19.4 version to Minecraft 1.20.1 and Forge 47.4.10.
- Keep raw metals, Kiri's ore overlays, filled buckets, High/Low Fantasy modes and the earlier fixes.
- Update creative tabs, configuration drawing, loot and networking for the newer APIs.
- Fix an intermittent Forge login stall by keeping socket read changes on Netty's event loop.
- Use the published OreSpawn 4.1.0.120011 release, with the same ore rules and copper defaults.
- Update optional integrations for their 1.20.1 APIs and keep them in a separate development profile.
- Preserve existing blocks, items, configuration keys and old-world conversion backups.
- Build sources and Javadocs as UTF-8 on every platform.

Base Metals 3.1.0.119041

- Port the 1.18 version to Minecraft 1.19.4 and Forge 45.4.0.
Expand Down
40 changes: 23 additions & 17 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.19.4)](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml?query=branch%3Amaster-1.19.4)
[![Build, test, and audit](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml/badge.svg?branch=master-1.20.1)](https://github.com/MinecraftModDevelopmentMods/BaseMetals/actions/workflows/ci.yml?query=branch%3Amaster-1.20.1)

# 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.19.4 Forge version, `3.1.0.119041`. It brings over the
fixes and features from 1.18, including raw metals, ore texture
This is the Minecraft 1.20.1 Forge version, `3.1.0.120011`. It keeps the
fixes and features from 1.19.4, 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.19.4`
- Forge `45.4.0` or newer in the Minecraft 1.19.4 Forge 45 line
- Java 17
- OreSpawn `[4.1.0.119041,5.0.0)` on both client and server
- Minecraft `1.20.1`
- Forge `47.4.10` or newer in the Minecraft 1.20.1 Forge 47 line
- A current Java 17 runtime
- OreSpawn `[4.1.0.120011,5.0.0)` on both client and server

This version uses OreSpawn `4.1.0.119041`. Put
`BaseMetals-3.1.0.119041.jar` and a compatible OreSpawn JAR in the `mods`
This version uses OreSpawn `4.1.0.120011`. Put
`BaseMetals-3.1.0.120011.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 @@ -134,10 +134,13 @@ original. Read [Migration](docs/MIGRATION.md) before starting an upgraded world.

Forge item, block, and fluid tags are Base Metals' public compatibility API.

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.
Integration data is included for Mekanism, Thermal Expansion, Tinkers' Construct
and Ender IO. These mods are optional. Use their Minecraft 1.20.1 builds; jars
for other Minecraft versions cannot be substituted.

The normal development client loads only Base Metals and OreSpawn. Use the
separate optional-mod client profile when working on integrations. Its exact
dependencies and checksums are listed in `gradle/optional-mods.json`.

See [Compatibility](docs/COMPATIBILITY.md) for the supported processing chains,
tag aliases, copper rules, and intentionally retired legacy integrations. See
Expand All @@ -147,8 +150,9 @@ contracts.
## Building and contributing

Base Metals uses ForgeGradle `7.0.34`, Gradle `9.6.1`, official Minecraft
mappings, and the Java 17 toolchain. A normal command-line build resolves the
qualified OreSpawn release from CurseMaven:
mappings, and the Java 17 toolchain. Initial Minecraft setup also uses Java 25
for Mavenizer; Minecraft and the mod still run on Java 17. A normal command-line
build resolves the published OreSpawn release from CurseMaven:

```text
./gradlew clean check build javadoc
Expand All @@ -162,7 +166,9 @@ Generate and verify Eclipse launches with:

Use **runClient** for normal testing with Base Metals and OreSpawn only.
**runClientOptionalMods** uses a separate `run-optional-mods` folder for
compatibility testing. No optional mods are added automatically on 1.19.4.
compatibility testing with Mekanism, Mantle, Tinkers' Construct and CoFH Core.
Thermal and Ender IO are tested with packaged jars instead: their embedded
dependencies cannot be remapped by the development launcher.
Both profiles are available in Eclipse and through Gradle tasks.

Use the Gradle **generateResources** task when changing recipes, models or
Expand All @@ -177,7 +183,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.119041`.
`zone.moddev.mc.basemetals:BaseMetals:3.1.0.120011`.

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

ext.mavenizerFixtureChecksums = [
'minecraft-mavenizer-0.5.21-orespawn-compat.jar': mavenizerCompatibilitySha256,
'minecraft-source-compatibility.json': '33A3217261EBB8F37D45F50BD2F8CE70B221C014A5C15F4C5F8F9091AD6D1EC8',
'minecraft-source-compatibility.json': '8945511DFF53B8F1A91EE44B14AF9EC7DB34C373617EA37A608C6958BFEEB22E',
'minecraft-mavenizer-0.5.21-orespawn-compat.patch': 'D856190DEF5574716C5E4F4379912C451B1F5952B0B111576651A98EECF58544',
'LICENSE-MAVENIZER.txt': '20C17D8B8C48A600800DFD14F95D5CB9FF47066A9641DDEAB48DC54AEC96E331'
]
Expand All @@ -28,7 +28,7 @@ mavenizerFixtureChecksums.each { name, expected ->
}

// OreSpawn's sealed Mavenizer fixture fixes duplicate record accessors in
// Forge 45's decompiled sources. It is build tooling, not part of the mod.
// Forge 47'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 @@ -93,6 +93,8 @@ tasks.withType(Javadoc).configureEach {
failOnError = false
options.encoding = 'UTF-8'
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('docencoding', 'UTF-8')
options.addStringOption('charset', 'UTF-8')
options.addBooleanOption('notimestamp', true)
}

Expand Down Expand Up @@ -236,6 +238,8 @@ minecraft {
if (providers.gradleProperty('integratedWorldSmoke').isPresent()) {
workingDir.set(layout.projectDirectory.dir('run-integrated-smoke'))
systemProperty 'basemetals.integratedWorldSmoke', 'true'
systemProperty 'basemetals.expectedSmokeMods', 'minecraft,forge,basemetals,orespawn'
systemProperty 'basemetals.allowExtraSmokeMods', providers.gradleProperty('compatSmoke').isPresent().toString()
systemProperty 'basemetals.integratedWorldSmokeName',
providers.gradleProperty('integratedWorldSmokeName').getOrElse('basemetals-integrated-smoke')
mods {
Expand Down
6 changes: 3 additions & 3 deletions ci-fixtures/tools/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Forge 1.19.4 Mavenizer compatibility fixture
# Forge 1.20.1 Mavenizer compatibility fixture

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

Forge 45's decompiler emits eight duplicate record accessors in Holder.Direct,
Forge 47'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
Expand All @@ -22,4 +22,4 @@ It is checksum-verified by the build and excluded from every Base Metals artifac
MinecraftMavenizer remains licensed LGPL-2.1-only; see `LICENSE-MAVENIZER.txt`.

SHA-256:
`341B3FB10ABA6EA7DC612FBE519DC290A1C81867AED5DD320ACD783688AC49DE`
`416DCA4797BC55826F0DDCF03FDC405F1990FC15C2133FA27A1F143BF7976177`
Binary file modified ci-fixtures/tools/minecraft-mavenizer-0.5.21-orespawn-compat.jar
Binary file not shown.
18 changes: 9 additions & 9 deletions ci-fixtures/tools/minecraft-source-compatibility.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
{
"schema": 1,
"targets": {
"net.minecraftforge:forge:1.19.4-45.4.0": {
"net.minecraftforge:forge:1.20.1-47.4.10": {
"expectedApplications": 8,
"rules": [
{
"id": "forge-1.19.4-holder-direct-value",
"id": "forge-1.20.1-holder-direct-value",
"file": "net/minecraft/core/Holder.java",
"recordDeclaration": "public static record Direct<T>(T value) implements Holder<T>",
"accessor": "\n public T value() {\n return this.value;\n }\n"
},
{
"id": "forge-1.19.4-option-alt-enum-value-setter",
"id": "forge-1.20.1-option-alt-enum-value-setter",
"file": "net/minecraft/client/OptionInstance.java",
"recordDeclaration": "public static record AltEnum<T>(List<T> values, List<T> altValues, BooleanSupplier altCondition, OptionInstance.CycleableValueSet.ValueSetter<T> valueSetter, Codec<T> codec)",
"accessor": "\n public OptionInstance.CycleableValueSet.ValueSetter<T> valueSetter() {\n return this.valueSetter;\n }\n"
},
{
"id": "forge-1.19.4-option-alt-enum-codec",
"id": "forge-1.20.1-option-alt-enum-codec",
"file": "net/minecraft/client/OptionInstance.java",
"recordDeclaration": "public static record AltEnum<T>(List<T> values, List<T> altValues, BooleanSupplier altCondition, OptionInstance.CycleableValueSet.ValueSetter<T> valueSetter, Codec<T> codec)",
"accessor": "\n public Codec<T> codec() {\n return this.codec;\n }\n"
},
{
"id": "forge-1.19.4-option-enum-codec",
"id": "forge-1.20.1-option-enum-codec",
"file": "net/minecraft/client/OptionInstance.java",
"recordDeclaration": "public static record Enum<T>(List<T> values, Codec<T> codec)",
"accessor": "\n public Codec<T> codec() {\n return this.codec;\n }\n"
},
{
"id": "forge-1.19.4-option-lazy-enum-codec",
"id": "forge-1.20.1-option-lazy-enum-codec",
"file": "net/minecraft/client/OptionInstance.java",
"recordDeclaration": "public static record LazyEnum<T>(Supplier<List<T>> values, Function<T, Optional<T>> validateValue, Codec<T> codec)",
"accessor": "\n public Codec<T> codec() {\n return this.codec;\n }\n"
},
{
"id": "forge-1.19.4-memory-absent-memory",
"id": "forge-1.20.1-memory-absent-memory",
"file": "net/minecraft/world/entity/ai/behavior/declarative/MemoryCondition.java",
"recordDeclaration": "public static record Absent<Value>(MemoryModuleType<Value> memory)",
"accessor": "\n public MemoryModuleType<Value> memory() {\n return this.memory;\n }\n"
},
{
"id": "forge-1.19.4-memory-present-memory",
"id": "forge-1.20.1-memory-present-memory",
"file": "net/minecraft/world/entity/ai/behavior/declarative/MemoryCondition.java",
"recordDeclaration": "public static record Present<Value>(MemoryModuleType<Value> memory)",
"accessor": "\n public MemoryModuleType<Value> memory() {\n return this.memory;\n }\n"
},
{
"id": "forge-1.19.4-memory-registered-memory",
"id": "forge-1.20.1-memory-registered-memory",
"file": "net/minecraft/world/entity/ai/behavior/declarative/MemoryCondition.java",
"recordDeclaration": "public static record Registered<Value>(MemoryModuleType<Value> memory)",
"accessor": "\n public MemoryModuleType<Value> memory() {\n return this.memory;\n }\n"
Expand Down
Loading
Loading