Skip to content

Commit 5ec2058

Browse files
authored
Bring Base Metals to Minecraft 1.20.1
Keep the existing features and save compatibility, update the optional integrations and fix the Forge login stall. All PR checks and the local client/server mode tests passed.
2 parents 6265129 + 6760b54 commit 5ec2058

118 files changed

Lines changed: 1088 additions & 433 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
name: Base Metals 1.19.4 CI
1+
name: Base Metals 1.20.1 CI
22

33
on:
44
push:
55
branches:
6-
- master-1.19.4
6+
- master-1.20.1
77
- 'feature/**'
88
pull_request:
99
branches:
10-
- master-1.19.4
10+
- master-1.20.1
1111

1212
permissions:
1313
contents: read
1414

1515
concurrency:
16-
group: basemetals-1.19.4-${{ github.workflow }}-${{ github.ref }}
16+
group: basemetals-1.20.1-${{ github.workflow }}-${{ github.ref }}
1717
cancel-in-progress: true
1818

1919
jobs:
@@ -50,19 +50,19 @@ jobs:
5050
--no-daemon --stacktrace
5151
first="$RUNNER_TEMP/basemetals-first"
5252
mkdir -p "$first"
53-
cp build/libs/BaseMetals-3.1.0.119041.jar "$first/"
54-
cp build/libs/BaseMetals-3.1.0.119041-sources.jar "$first/"
55-
cp build/libs/BaseMetals-3.1.0.119041-javadoc.jar "$first/"
53+
cp build/libs/BaseMetals-3.1.0.120011.jar "$first/"
54+
cp build/libs/BaseMetals-3.1.0.120011-sources.jar "$first/"
55+
cp build/libs/BaseMetals-3.1.0.120011-javadoc.jar "$first/"
5656
cp build/release/SHA256SUMS "$first/"
5757
5858
- name: Rebuild and prove byte-identical archives
5959
run: |
6060
./gradlew clean assemble verifyReleaseArtifacts writeReleaseChecksums \
6161
-PorespawnVerificationRepository="${{ steps.orespawn.outputs.repository }}" \
6262
--no-daemon --stacktrace
63-
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.119041.jar" build/libs/BaseMetals-3.1.0.119041.jar
64-
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.119041-sources.jar" build/libs/BaseMetals-3.1.0.119041-sources.jar
65-
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.119041-javadoc.jar" build/libs/BaseMetals-3.1.0.119041-javadoc.jar
63+
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120011.jar" build/libs/BaseMetals-3.1.0.120011.jar
64+
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120011-sources.jar" build/libs/BaseMetals-3.1.0.120011-sources.jar
65+
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.120011-javadoc.jar" build/libs/BaseMetals-3.1.0.120011-javadoc.jar
6666
cmp "$RUNNER_TEMP/basemetals-first/SHA256SUMS" build/release/SHA256SUMS
6767
6868
- name: Run all required GameTests
@@ -74,14 +74,14 @@ jobs:
7474
- name: Install official Forge packaged runtimes
7575
id: forge-runtimes
7676
run: |
77-
server_runtime="$RUNNER_TEMP/forge-1.19.4-45.4.0-server"
78-
client_runtime="$RUNNER_TEMP/forge-1.19.4-45.4.0-client"
79-
installer="$RUNNER_TEMP/forge-1.19.4-45.4.0-installer.jar"
77+
server_runtime="$RUNNER_TEMP/forge-1.20.1-47.4.10-server"
78+
client_runtime="$RUNNER_TEMP/forge-1.20.1-47.4.10-client"
79+
installer="$RUNNER_TEMP/forge-1.20.1-47.4.10-installer.jar"
8080
mkdir -p "$server_runtime" "$client_runtime"
8181
curl --fail --location --retry 3 \
8282
--output "$installer" \
83-
https://maven.minecraftforge.net/net/minecraftforge/forge/1.19.4-45.4.0/forge-1.19.4-45.4.0-installer.jar
84-
echo "6643bb8c21f409cc528ff656daf60c206d304cc77bf529bbbab4b336004dfc53 $installer" | sha256sum --check --strict
83+
https://maven.minecraftforge.net/net/minecraftforge/forge/1.20.1-47.4.10/forge-1.20.1-47.4.10-installer.jar
84+
echo "1912760B4CB6B803D8A826DE603C9076B1DA71EC2765E9A1F8C1CA78F65278E3 $installer" | sha256sum --check --strict
8585
(
8686
cd "$server_runtime"
8787
java -jar "$installer" --installServer
@@ -124,21 +124,21 @@ jobs:
124124
- name: Upload audited release candidate
125125
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
126126
with:
127-
name: BaseMetals-1.19.4-${{ github.sha }}
127+
name: BaseMetals-1.20.1-${{ github.sha }}
128128
if-no-files-found: error
129129
retention-days: 30
130130
path: |
131-
build/libs/BaseMetals-3.1.0.119041.jar
132-
build/libs/BaseMetals-3.1.0.119041-sources.jar
133-
build/libs/BaseMetals-3.1.0.119041-javadoc.jar
131+
build/libs/BaseMetals-3.1.0.120011.jar
132+
build/libs/BaseMetals-3.1.0.120011-sources.jar
133+
build/libs/BaseMetals-3.1.0.120011-javadoc.jar
134134
build/release/SHA256SUMS
135135
CHANGELOG.txt
136136
137137
- name: Upload bounded diagnostics on failure
138138
if: failure()
139139
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
140140
with:
141-
name: BaseMetals-1.19.4-diagnostics-${{ github.sha }}
141+
name: BaseMetals-1.20.1-diagnostics-${{ github.sha }}
142142
if-no-files-found: ignore
143143
retention-days: 14
144144
path: |

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: CodeQL
33
on:
44
push:
55
branches:
6-
- master-1.19.4
6+
- master-1.20.1
77
- 'feature/**'
88
pull_request:
99
branches:
10-
- master-1.19.4
10+
- master-1.20.1
1111

1212
permissions:
1313
actions: read

‎.github/workflows/validate-gradle-build.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ name: Validate Gradle Wrapper
33
on:
44
push:
55
branches:
6-
- master-1.19.4
6+
- master-1.20.1
77
- 'feature/**'
88
pull_request:
99
branches:
10-
- master-1.19.4
10+
- master-1.20.1
1111

1212
permissions:
1313
contents: read

‎.gitignore‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ classes
5555
!/libs/README.txt
5656

5757
.DS_Store
58-
Thumbs.db
59-
Desktop.ini
58+
[Tt]humbs.db
59+
[Dd]esktop.ini
6060

6161
# python
6262
__pycache__/

‎CHANGELOG.txt‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
Base Metals 3.1.0.120011
2+
3+
- Port the 1.19.4 version to Minecraft 1.20.1 and Forge 47.4.10.
4+
- Keep raw metals, Kiri's ore overlays, filled buckets, High/Low Fantasy modes and the earlier fixes.
5+
- Update creative tabs, configuration drawing, loot and networking for the newer APIs.
6+
- Fix an intermittent Forge login stall by keeping socket read changes on Netty's event loop.
7+
- Use the published OreSpawn 4.1.0.120011 release, with the same ore rules and copper defaults.
8+
- Update optional integrations for their 1.20.1 APIs and keep them in a separate development profile.
9+
- Preserve existing blocks, items, configuration keys and old-world conversion backups.
10+
- Build sources and Javadocs as UTF-8 on every platform.
11+
112
Base Metals 3.1.0.119041
213

314
- Port the 1.18 version to Minecraft 1.19.4 and Forge 45.4.0.

‎README.md‎

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[![Discord](https://img.shields.io/badge/Discord-MMD-green.svg?style=flat&logo=Discord)](https://discord.moddev.zone)
22
[![CurseForge downloads](https://cf.way2muchnoise.eu/full_base-metals_downloads.svg)](https://www.curseforge.com/minecraft/mc-mods/base-metals)
33
[![Supported Minecraft versions](https://cf.way2muchnoise.eu/versions/Minecraft_base-metals_all.svg)](https://www.curseforge.com/minecraft/mc-mods/base-metals)
4-
[![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)
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)
55

66
# Base Metals
77

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

15-
This is the Minecraft 1.19.4 Forge version, `3.1.0.119041`. It brings over the
16-
fixes and features from 1.18, including raw metals, ore texture
15+
This is the Minecraft 1.20.1 Forge version, `3.1.0.120011`. It keeps the
16+
fixes and features from 1.19.4, including raw metals, ore texture
1717
overlays and High/Low Fantasy modes. Existing Base Metals items and blocks keep
1818
their registry IDs. OreSpawn handles ore generation; MMDLib and Additional Loot
1919
Tables are no longer needed.
2020

2121
## Requirements
2222

23-
- Minecraft `1.19.4`
24-
- Forge `45.4.0` or newer in the Minecraft 1.19.4 Forge 45 line
25-
- Java 17
26-
- OreSpawn `[4.1.0.119041,5.0.0)` on both client and server
23+
- Minecraft `1.20.1`
24+
- Forge `47.4.10` or newer in the Minecraft 1.20.1 Forge 47 line
25+
- A current Java 17 runtime
26+
- OreSpawn `[4.1.0.120011,5.0.0)` on both client and server
2727

28-
This version uses OreSpawn `4.1.0.119041`. Put
29-
`BaseMetals-3.1.0.119041.jar` and a compatible OreSpawn JAR in the `mods`
28+
This version uses OreSpawn `4.1.0.120011`. Put
29+
`BaseMetals-3.1.0.120011.jar` and a compatible OreSpawn JAR in the `mods`
3030
directory. MMDLib and Additional Loot Tables must not be carried forward from
3131
an older installation. Mineralogy is optional.
3232

@@ -134,10 +134,13 @@ original. Read [Migration](docs/MIGRATION.md) before starting an upgraded world.
134134

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

137-
The integration data from 1.18 is retained, but Mekanism, Thermal Expansion,
138-
Tinkers' Construct and Ender IO do not currently publish Forge 1.19.4 builds.
139-
Those integrations are not qualified for this version. Use mods built for
140-
Minecraft 1.19.4; jars for 1.19.2 or 1.20.1 cannot be substituted.
137+
Integration data is included for Mekanism, Thermal Expansion, Tinkers' Construct
138+
and Ender IO. These mods are optional. Use their Minecraft 1.20.1 builds; jars
139+
for other Minecraft versions cannot be substituted.
140+
141+
The normal development client loads only Base Metals and OreSpawn. Use the
142+
separate optional-mod client profile when working on integrations. Its exact
143+
dependencies and checksums are listed in `gradle/optional-mods.json`.
141144

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

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

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

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

168174
Use the Gradle **generateResources** task when changing recipes, models or
@@ -177,7 +183,7 @@ artifacts. GameTests, smoke probes, migration fixtures, and reference sources
177183
are isolated from the published JAR.
178184

179185
Release artifacts use Maven coordinate
180-
`zone.moddev.mc.basemetals:BaseMetals:3.1.0.119041`.
186+
`zone.moddev.mc.basemetals:BaseMetals:3.1.0.120011`.
181187

182188
Report defects and compatibility problems through the
183189
[Base Metals issue tracker](https://github.com/MinecraftModDevelopmentMods/BaseMetals/issues).

‎build.gradle‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ plugins {
1010
ext.mavenizerCompatibilityJar = layout.projectDirectory.file(
1111
'ci-fixtures/tools/minecraft-mavenizer-0.5.21-orespawn-compat.jar')
1212
ext.mavenizerCompatibilitySha256 =
13-
'341B3FB10ABA6EA7DC612FBE519DC290A1C81867AED5DD320ACD783688AC49DE'
13+
'416DCA4797BC55826F0DDCF03FDC405F1990FC15C2133FA27A1F143BF7976177'
1414

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

3030
// OreSpawn's sealed Mavenizer fixture fixes duplicate record accessors in
31-
// Forge 45's decompiled sources. It is build tooling, not part of the mod.
31+
// Forge 47's decompiled sources. It is build tooling, not part of the mod.
3232
fgtools.configure('mavenizer') {
3333
classpath.from(mavenizerCompatibilityJar)
3434
mainClass.set('net.minecraftforge.mcmaven.cli.Main')
@@ -93,6 +93,8 @@ tasks.withType(Javadoc).configureEach {
9393
failOnError = false
9494
options.encoding = 'UTF-8'
9595
options.addStringOption('Xdoclint:none', '-quiet')
96+
options.addStringOption('docencoding', 'UTF-8')
97+
options.addStringOption('charset', 'UTF-8')
9698
options.addBooleanOption('notimestamp', true)
9799
}
98100

@@ -236,6 +238,8 @@ minecraft {
236238
if (providers.gradleProperty('integratedWorldSmoke').isPresent()) {
237239
workingDir.set(layout.projectDirectory.dir('run-integrated-smoke'))
238240
systemProperty 'basemetals.integratedWorldSmoke', 'true'
241+
systemProperty 'basemetals.expectedSmokeMods', 'minecraft,forge,basemetals,orespawn'
242+
systemProperty 'basemetals.allowExtraSmokeMods', providers.gradleProperty('compatSmoke').isPresent().toString()
239243
systemProperty 'basemetals.integratedWorldSmokeName',
240244
providers.gradleProperty('integratedWorldSmokeName').getOrElse('basemetals-integrated-smoke')
241245
mods {

‎ci-fixtures/tools/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Forge 1.19.4 Mavenizer compatibility fixture
1+
# Forge 1.20.1 Mavenizer compatibility fixture
22

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

7-
Forge 45's decompiler emits eight duplicate record accessors in Holder.Direct,
7+
Forge 47's decompiler emits eight duplicate record accessors in Holder.Direct,
88
OptionInstance and MemoryCondition. The target-specific rules in
99
`minecraft-source-compatibility.json` remove only those accessors; Java
1010
generates the same public methods automatically. Missing or ambiguous source
@@ -22,4 +22,4 @@ It is checksum-verified by the build and excluded from every Base Metals artifac
2222
MinecraftMavenizer remains licensed LGPL-2.1-only; see `LICENSE-MAVENIZER.txt`.
2323

2424
SHA-256:
25-
`341B3FB10ABA6EA7DC612FBE519DC290A1C81867AED5DD320ACD783688AC49DE`
25+
`416DCA4797BC55826F0DDCF03FDC405F1990FC15C2133FA27A1F143BF7976177`
9 Bytes
Binary file not shown.

‎ci-fixtures/tools/minecraft-source-compatibility.json‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
{
22
"schema": 1,
33
"targets": {
4-
"net.minecraftforge:forge:1.19.4-45.4.0": {
4+
"net.minecraftforge:forge:1.20.1-47.4.10": {
55
"expectedApplications": 8,
66
"rules": [
77
{
8-
"id": "forge-1.19.4-holder-direct-value",
8+
"id": "forge-1.20.1-holder-direct-value",
99
"file": "net/minecraft/core/Holder.java",
1010
"recordDeclaration": "public static record Direct<T>(T value) implements Holder<T>",
1111
"accessor": "\n public T value() {\n return this.value;\n }\n"
1212
},
1313
{
14-
"id": "forge-1.19.4-option-alt-enum-value-setter",
14+
"id": "forge-1.20.1-option-alt-enum-value-setter",
1515
"file": "net/minecraft/client/OptionInstance.java",
1616
"recordDeclaration": "public static record AltEnum<T>(List<T> values, List<T> altValues, BooleanSupplier altCondition, OptionInstance.CycleableValueSet.ValueSetter<T> valueSetter, Codec<T> codec)",
1717
"accessor": "\n public OptionInstance.CycleableValueSet.ValueSetter<T> valueSetter() {\n return this.valueSetter;\n }\n"
1818
},
1919
{
20-
"id": "forge-1.19.4-option-alt-enum-codec",
20+
"id": "forge-1.20.1-option-alt-enum-codec",
2121
"file": "net/minecraft/client/OptionInstance.java",
2222
"recordDeclaration": "public static record AltEnum<T>(List<T> values, List<T> altValues, BooleanSupplier altCondition, OptionInstance.CycleableValueSet.ValueSetter<T> valueSetter, Codec<T> codec)",
2323
"accessor": "\n public Codec<T> codec() {\n return this.codec;\n }\n"
2424
},
2525
{
26-
"id": "forge-1.19.4-option-enum-codec",
26+
"id": "forge-1.20.1-option-enum-codec",
2727
"file": "net/minecraft/client/OptionInstance.java",
2828
"recordDeclaration": "public static record Enum<T>(List<T> values, Codec<T> codec)",
2929
"accessor": "\n public Codec<T> codec() {\n return this.codec;\n }\n"
3030
},
3131
{
32-
"id": "forge-1.19.4-option-lazy-enum-codec",
32+
"id": "forge-1.20.1-option-lazy-enum-codec",
3333
"file": "net/minecraft/client/OptionInstance.java",
3434
"recordDeclaration": "public static record LazyEnum<T>(Supplier<List<T>> values, Function<T, Optional<T>> validateValue, Codec<T> codec)",
3535
"accessor": "\n public Codec<T> codec() {\n return this.codec;\n }\n"
3636
},
3737
{
38-
"id": "forge-1.19.4-memory-absent-memory",
38+
"id": "forge-1.20.1-memory-absent-memory",
3939
"file": "net/minecraft/world/entity/ai/behavior/declarative/MemoryCondition.java",
4040
"recordDeclaration": "public static record Absent<Value>(MemoryModuleType<Value> memory)",
4141
"accessor": "\n public MemoryModuleType<Value> memory() {\n return this.memory;\n }\n"
4242
},
4343
{
44-
"id": "forge-1.19.4-memory-present-memory",
44+
"id": "forge-1.20.1-memory-present-memory",
4545
"file": "net/minecraft/world/entity/ai/behavior/declarative/MemoryCondition.java",
4646
"recordDeclaration": "public static record Present<Value>(MemoryModuleType<Value> memory)",
4747
"accessor": "\n public MemoryModuleType<Value> memory() {\n return this.memory;\n }\n"
4848
},
4949
{
50-
"id": "forge-1.19.4-memory-registered-memory",
50+
"id": "forge-1.20.1-memory-registered-memory",
5151
"file": "net/minecraft/world/entity/ai/behavior/declarative/MemoryCondition.java",
5252
"recordDeclaration": "public static record Registered<Value>(MemoryModuleType<Value> memory)",
5353
"accessor": "\n public MemoryModuleType<Value> memory() {\n return this.memory;\n }\n"

0 commit comments

Comments
 (0)