Skip to content

Commit 36db6af

Browse files
authored
Merge the 1.20.1 world migration fix
Release 3.1.1.120011 with safer existing-world detection and tested legacy upgrades.
2 parents 5ec2058 + dfca3f8 commit 36db6af

16 files changed

Lines changed: 675 additions & 95 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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.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/"
53+
cp build/libs/BaseMetals-3.1.1.120011.jar "$first/"
54+
cp build/libs/BaseMetals-3.1.1.120011-sources.jar "$first/"
55+
cp build/libs/BaseMetals-3.1.1.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.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
63+
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.120011.jar" build/libs/BaseMetals-3.1.1.120011.jar
64+
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.120011-sources.jar" build/libs/BaseMetals-3.1.1.120011-sources.jar
65+
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.120011-javadoc.jar" build/libs/BaseMetals-3.1.1.120011-javadoc.jar
6666
cmp "$RUNNER_TEMP/basemetals-first/SHA256SUMS" build/release/SHA256SUMS
6767
6868
- name: Run all required GameTests
@@ -128,9 +128,9 @@ jobs:
128128
if-no-files-found: error
129129
retention-days: 30
130130
path: |
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
131+
build/libs/BaseMetals-3.1.1.120011.jar
132+
build/libs/BaseMetals-3.1.1.120011-sources.jar
133+
build/libs/BaseMetals-3.1.1.120011-javadoc.jar
134134
build/release/SHA256SUMS
135135
CHANGELOG.txt
136136

‎CHANGELOG.txt‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
Base Metals 3.1.1.120011
2+
3+
- Fix startup failures when Base Metals is added to an existing modern world, including worlds with external chunks or empty region files.
4+
- Stop old level.dat_old backups from replacing current player data or enabling legacy terrain protection.
5+
- Keep genuine legacy upgrades, reloads and later-opened chunks supported, including chunks in nested custom dimensions.
6+
17
Base Metals 3.1.0.120011
28

39
- Port the 1.19.4 version to Minecraft 1.20.1 and Forge 47.4.10.

‎README.md‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ 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.20.1 Forge version, `3.1.0.120011`. It keeps the
15+
This is the Minecraft 1.20.1 Forge version, `3.1.1.120011`. It keeps the
1616
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
@@ -26,7 +26,7 @@ Tables are no longer needed.
2626
- OreSpawn `[4.1.0.120011,5.0.0)` on both client and server
2727

2828
This version uses OreSpawn `4.1.0.120011`. Put
29-
`BaseMetals-3.1.0.120011.jar` and a compatible OreSpawn JAR in the `mods`
29+
`BaseMetals-3.1.1.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

@@ -130,6 +130,10 @@ is unavailable.
130130
Always perform the first upgrade on a copy of the world and keep the untouched
131131
original. Read [Migration](docs/MIGRATION.md) before starting an upgraded world.
132132

133+
Adding Base Metals to a modern world does not trigger the old numeric-ID
134+
conversion just because an older backup is present. Existing player data stays
135+
in place; genuine legacy upgrades still make backups before changing saved data.
136+
133137
## Mod and data-pack compatibility
134138

135139
Forge item, block, and fluid tags are Base Metals' public compatibility API.
@@ -183,7 +187,7 @@ artifacts. GameTests, smoke probes, migration fixtures, and reference sources
183187
are isolated from the published JAR.
184188

185189
Release artifacts use Maven coordinate
186-
`zone.moddev.mc.basemetals:BaseMetals:3.1.0.120011`.
190+
`zone.moddev.mc.basemetals:BaseMetals:3.1.1.120011`.
187191

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

‎docs/MIGRATION.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,19 @@ dimensions, and heights.
102102
The generated manifests at `data/basemetals/registry_manifest_1_12.json` and
103103
`data/basemetals/registry_manifest.json` document the runtime baseline,
104104
restored content, and explicit 1.18 additions.
105+
106+
## Existing modern worlds
107+
108+
Modern worlds do not need the old numeric-ID conversion. Base Metals only runs
109+
it after confirming an older source save. A leftover `level.dat_old` does not
110+
replace the current player or turn on legacy terrain protection.
111+
112+
For a genuine upgrade, the original single-player record is captured before
113+
Minecraft reads it. The world-local migration sidecar keeps the source version
114+
and saved registry map for reloads and chunks opened later; it does not store
115+
a player record. A saved registry map from an earlier upgrade takes precedence
116+
over an older backup.
117+
118+
Chunk reading uses Minecraft's supported region formats. Empty region files
119+
are left alone, and backups include external chunk files when their region
120+
needs conversion.

‎docs/VERSIONS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Supported versions
22

3-
Base Metals `3.1.0.120011` targets Minecraft 1.20.1, Forge 47.4.10 and Java 17.
3+
Base Metals `3.1.1.120011` targets Minecraft 1.20.1, Forge 47.4.10 and Java 17.
44
OreSpawn `4.1.0.120011` is the exact build and test dependency. Clients and
55
servers need OreSpawn `[4.1.0.120011,5.0.0)`.
66

@@ -10,7 +10,7 @@ Its SHA-256 is
1010
`E6BDE47C1BB0BF4D08396F1D1FD5B1D2D3F8A5DF09905F279D39E2601D7FE4B0`.
1111

1212
Release artifacts use Maven coordinate
13-
`zone.moddev.mc.basemetals:BaseMetals:3.1.0.120011`.
13+
`zone.moddev.mc.basemetals:BaseMetals:3.1.1.120011`.
1414

1515
The provider remains schema 3, revision 1. OreSpawn 4.1 is needed for the
1616
configuration-screen API; the provider's eleven rule IDs and 1.18 distributions

‎gradle.properties‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ mod_name=Base Metals
6767
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
6868
mod_license=LGPL-2.1
6969
# The mod version. See https://semver.org/
70-
mod_version=3.1.0.120011
70+
mod_version=3.1.1.120011
7171
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
7272
# This should match the base package used for the mod sources.
7373
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

‎gradle/ide/eclipse.gradle‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ def verifyEclipseProductionClasspath = tasks.register('verifyEclipseProductionCl
315315
}
316316
}
317317
String metadata = new File(projectDir, 'bin/main/META-INF/mods.toml').getText('UTF-8')
318-
if (metadata.contains('${') || !metadata.contains('version="3.1.0.120011"')) {
318+
if (metadata.contains('${') || !metadata.contains('version="3.1.1.120011"')) {
319319
throw new GradleException('Eclipse output contains unresolved or invalid Base Metals version metadata')
320320
}
321321
}

‎gradle/prepare-forge-client-runtime.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
FORGE_INSTALLER_SHA256 = "1912760b4cb6b803d8a826de603c9076b1da71ec2765e9a1f8c1ca78f65278e3"
2424
VERSION_MANIFEST_URL = "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json"
2525
ASSET_OBJECT_URL = "https://resources.download.minecraft.net/{prefix}/{digest}"
26-
USER_AGENT = "BaseMetals-release-validation/3.1.0.120011"
26+
USER_AGENT = "BaseMetals-release-validation/3.1.1.120011"
2727

2828

2929
def digest_file(path: Path, algorithm: str) -> str:

‎gradle/release/artifacts.gradle‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ tasks.register('verifyReleaseConfiguration') {
212212
dependsOn tasks.named('verifyMavenizerCompatibilityFixture')
213213
dependsOn tasks.named('verifyJava17Toolchain')
214214
doLast {
215-
if (configuredReleaseIdentity.modVersion != '3.1.0.120011'
215+
if (configuredReleaseIdentity.modVersion != '3.1.1.120011'
216216
|| configuredReleaseIdentity.modGroup != expectedMavenGroup
217217
|| configuredReleaseIdentity.minecraftVersion != '1.20.1'
218218
|| configuredReleaseIdentity.forgeVersion != '47.4.10'
@@ -331,7 +331,7 @@ tasks.register('verifyReleaseArtifacts') {
331331
}
332332
String modsToml = zip.getInputStream(zip.getEntry('META-INF/mods.toml')).getText('UTF-8')
333333
if (modsToml.contains('${')
334-
|| !modsToml.contains('version="3.1.0.120011"')
334+
|| !modsToml.contains('version="3.1.1.120011"')
335335
|| !modsToml.contains('versionRange="[4.1.0.120011,5.0.0)"')) {
336336
throw new GradleException('Release mods.toml contains unresolved or incompatible metadata')
337337
}

‎gradle/verification/packaged-runtime.gradle‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def packagedServerStartupSmoke = tasks.register('packagedServerStartupSmoke', Ex
109109
if (!marker.isFile()) throw new GradleException('Packaged dedicated-server completion marker is missing')
110110
Properties values = new Properties()
111111
marker.withInputStream { values.load(it) }
112-
if (values.getProperty('basemetals') != '3.1.0.120011'
112+
if (values.getProperty('basemetals') != '3.1.1.120011'
113113
|| values.getProperty('orespawn') != '4.1.0.120011'
114114
|| values.getProperty('forge') != '47.4.10') {
115115
throw new GradleException("Packaged dedicated-server versions are wrong: ${values}")

0 commit comments

Comments
 (0)