Skip to content

Commit 5261c13

Browse files
authored
Merge the 1.18.2 world migration fix
Release 3.1.1.118021 with safer existing-world detection and tested legacy upgrades.
2 parents 7f25cc2 + 7b2017a commit 5261c13

17 files changed

Lines changed: 685 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.118021.jar "$first/"
54-
cp build/libs/BaseMetals-3.1.0.118021-sources.jar "$first/"
55-
cp build/libs/BaseMetals-3.1.0.118021-javadoc.jar "$first/"
53+
cp build/libs/BaseMetals-3.1.1.118021.jar "$first/"
54+
cp build/libs/BaseMetals-3.1.1.118021-sources.jar "$first/"
55+
cp build/libs/BaseMetals-3.1.1.118021-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.118021.jar" build/libs/BaseMetals-3.1.0.118021.jar
64-
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.118021-sources.jar" build/libs/BaseMetals-3.1.0.118021-sources.jar
65-
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.0.118021-javadoc.jar" build/libs/BaseMetals-3.1.0.118021-javadoc.jar
63+
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.118021.jar" build/libs/BaseMetals-3.1.1.118021.jar
64+
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.118021-sources.jar" build/libs/BaseMetals-3.1.1.118021-sources.jar
65+
cmp "$RUNNER_TEMP/basemetals-first/BaseMetals-3.1.1.118021-javadoc.jar" build/libs/BaseMetals-3.1.1.118021-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.118021.jar
132-
build/libs/BaseMetals-3.1.0.118021-sources.jar
133-
build/libs/BaseMetals-3.1.0.118021-javadoc.jar
131+
build/libs/BaseMetals-3.1.1.118021.jar
132+
build/libs/BaseMetals-3.1.1.118021-sources.jar
133+
build/libs/BaseMetals-3.1.1.118021-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.118021
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.118021
28

39
- Bring raw metals, ore overlays and High/Low Fantasy modes to Minecraft 1.18.2, along with the fixes from the earlier ports.

‎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.18.2 Forge version, `3.1.0.118021`. It brings over the
15+
This is the Minecraft 1.18.2 Forge version, `3.1.1.118021`. It brings over the
1616
fixes and features from the earlier ports, 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.118021,5.0.0)` on both client and server
2727

2828
This version uses OreSpawn `4.1.0.118021`. Put
29-
`BaseMetals-3.1.0.118021.jar` and a compatible OreSpawn JAR in the `mods`
29+
`BaseMetals-3.1.1.118021.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.
@@ -179,7 +183,7 @@ artifacts. GameTests, smoke probes, migration fixtures, and reference sources
179183
are isolated from the published JAR.
180184

181185
Release artifacts use Maven coordinate
182-
`zone.moddev.mc.basemetals:BaseMetals:3.1.0.118021`.
186+
`zone.moddev.mc.basemetals:BaseMetals:3.1.1.118021`.
183187

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

‎docs/MIGRATION.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ or the `basemetals-legacy-registry.dat` snapshot
1717
when available. If neither retains a legacy map, it uses the map captured from
1818
the public Base Metals 2.5.0-rc2.332 and MMDLib 1.0.0-rc2.36 runtime.
1919

20+
That fallback is only used after confirming an old source save. An old
21+
`level.dat_old` on its own does not make a modern world a legacy world.
22+
The single-player record is captured from the current legacy save before
23+
Forge reads it, rather than restored from an older backup. Once the world has
24+
been upgraded, later visits keep the player's current progress.
25+
26+
The migrator uses Minecraft's own region reader, including external chunks.
27+
Empty region files are left alone. Backups include any external chunk files
28+
referenced by a region that needs conversion.
29+
2030
Before replacing any region file, `level.dat`, or playerdata file, the
2131
migrator copies the original to
2232
`basemetals-1.12-region-backup` inside the world. Region replacements are
@@ -64,6 +74,11 @@ These worlds already use named block states, so they do not need the numeric
6474
ID conversion. Older wall connections are converted to the current wall
6575
states. Item aliases, tool damage, names and enchantments are retained.
6676

77+
The first visit records the source version in the world-local migration
78+
sidecar. This keeps terrain protection available for chunks opened on a later
79+
visit without relying on `level.dat_old`. The sidecar does not store a player
80+
record.
81+
6782
Older custom dimensions using Minecraft's removed `vanilla_layered` biome
6883
source are converted to its 1.18 Overworld replacement. Their dimension IDs,
6984
seeds and noise settings are retained, including the large-biome setting.

‎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.118021` targets Minecraft 1.18.2, Forge 40.3.0 and Java 17.
3+
Base Metals `3.1.1.118021` targets Minecraft 1.18.2, Forge 40.3.0 and Java 17.
44
OreSpawn `4.1.0.118021` is the exact build and test dependency. Clients and
55
servers need OreSpawn `[4.1.0.118021,5.0.0)`.
66

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

1212
Release artifacts use Maven coordinate
13-
`zone.moddev.mc.basemetals:BaseMetals:3.1.0.118021`.
13+
`zone.moddev.mc.basemetals:BaseMetals:3.1.1.118021`.
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.118021
70+
mod_version=3.1.1.118021
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
@@ -304,7 +304,7 @@ def verifyEclipseProductionClasspath = tasks.register('verifyEclipseProductionCl
304304
}
305305
}
306306
String metadata = new File(projectDir, 'bin/main/META-INF/mods.toml').getText('UTF-8')
307-
if (metadata.contains('${') || !metadata.contains('version="3.1.0.118021"')) {
307+
if (metadata.contains('${') || !metadata.contains('version="3.1.1.118021"')) {
308308
throw new GradleException('Eclipse output contains unresolved or invalid Base Metals version metadata')
309309
}
310310
}

‎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 = "9434c29790504dcd11ce97cb30dd8891b4b18848982357bc1b5abfa79fb95103"
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.118021"
26+
USER_AGENT = "BaseMetals-release-validation/3.1.1.118021"
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
@@ -199,7 +199,7 @@ tasks.register('verifyReleaseConfiguration') {
199199
dependsOn tasks.named('verifyMavenizerCompatibilityFixture')
200200
dependsOn tasks.named('verifyJava17Toolchain')
201201
doLast {
202-
if (configuredReleaseIdentity.modVersion != '3.1.0.118021'
202+
if (configuredReleaseIdentity.modVersion != '3.1.1.118021'
203203
|| configuredReleaseIdentity.modGroup != expectedMavenGroup
204204
|| configuredReleaseIdentity.minecraftVersion != '1.18.2'
205205
|| configuredReleaseIdentity.forgeVersion != '40.3.0'
@@ -308,7 +308,7 @@ tasks.register('verifyReleaseArtifacts') {
308308
}
309309
String modsToml = zip.getInputStream(zip.getEntry('META-INF/mods.toml')).getText('UTF-8')
310310
if (modsToml.contains('${')
311-
|| !modsToml.contains('version="3.1.0.118021"')
311+
|| !modsToml.contains('version="3.1.1.118021"')
312312
|| !modsToml.contains('versionRange="[4.1.0.118021,5.0.0)"')) {
313313
throw new GradleException('Release mods.toml contains unresolved or incompatible metadata')
314314
}

‎gradle/verification/packaged-runtime.gradle‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def packagedServerStartupSmoke = tasks.register('packagedServerStartupSmoke', Ex
106106
if (!marker.isFile()) throw new GradleException('Packaged dedicated-server completion marker is missing')
107107
Properties values = new Properties()
108108
marker.withInputStream { values.load(it) }
109-
if (values.getProperty('basemetals') != '3.1.0.118021'
109+
if (values.getProperty('basemetals') != '3.1.1.118021'
110110
|| values.getProperty('orespawn') != '4.1.0.118021'
111111
|| values.getProperty('forge') != '40.3.0') {
112112
throw new GradleException("Packaged dedicated-server versions are wrong: ${values}")

0 commit comments

Comments
 (0)