|
1 | 1 | # Migrating from Base Metals 1.10 or 1.12 |
2 | 2 |
|
3 | 3 | Always upgrade a copy and retain the original legacy world. Install Base Metals |
4 | | -3.1.1 and OreSpawn 4.1.0, but do not carry MMDLib, Additional Loot Tables, the |
| 4 | +3.1.2 and OreSpawn 4.1.0, but do not carry MMDLib, Additional Loot Tables, the |
5 | 5 | OreSpawn 3 plugin, or the old native fallback generator into the 26.2 instance. |
6 | 6 |
|
7 | 7 | Minecraft's data fixer cannot identify third-party numeric block IDs from |
@@ -156,3 +156,30 @@ an older `level.dat` over the upgraded save. |
156 | 156 | If an older single-player save has its player only in `level.dat`, Base Metals |
157 | 157 | preserves a separate player file before Minecraft converts the folders. An |
158 | 158 | existing player file always wins; a stale backup cannot restore an older player. |
| 159 | + |
| 160 | +## Companion migration extensions |
| 161 | + |
| 162 | +Companion mods can register a common-side |
| 163 | +`zone.moddev.mc.basemetals.api.migration.Legacy112MigrationExtension` with a |
| 164 | +unique `Identifier` during common setup, before a world opens. Registrations |
| 165 | +run in identifier order; duplicate identifiers fail rather than replace an owner. |
| 166 | + |
| 167 | +`prepareWorld` receives an independent copy of the selected world's saved |
| 168 | +registry snapshot before conversion. It also runs for modern worlds, so a |
| 169 | +companion can clear registry IDs retained from a previously opened legacy world. |
| 170 | + |
| 171 | +`prepareData` receives `Payload.CHUNK` or `Payload.PLAYER` before legacy |
| 172 | +flattening. `beforeChunkFlattening` runs before the block-entity snapshot, and |
| 173 | +`decodeBlockState` can restore owned block properties from raw metadata. |
| 174 | +Return `null` for an unowned block; air or multiple claims fail conversion. |
| 175 | + |
| 176 | +When a legacy host has no existing player file, `afterPlayerFlattening` |
| 177 | +receives its prepared source and the mutable schema-3465 player, before item |
| 178 | +componentization. The resulting native player seeds a separate disk file before |
| 179 | +FileFixerUpper moves it. The legacy level retains its source schema. Detached |
| 180 | +player files receive preparation only and remain under native player-loading |
| 181 | +authority. Existing player files in either layout are never replaced by the host. |
| 182 | + |
| 183 | +Chunk finalization edits the returned tag in place and does not cancel other |
| 184 | +mods' return callbacks. Extensions must preserve unowned data, register on both |
| 185 | +physical sides, and avoid client-only classes in these common callbacks. |
0 commit comments