Load ATM10's 42 carried mods: room past 8,192 textures and tags

With the wide state ids, ATM10's 42 data-tier mods (193,762 states)
reach the world once these loaders stop refusing them:

- Block sprites: eight texture arrays of 2048 layers instead of four
  (9,790 block textures for the 42).
- Per-state tables read as NBT: the table limits cover 2^20 states, and
  the collision table in level data uses them.
- Worldgen block tags: 2^20 blocks instead of 8,192 (mineable/pickaxe
  holds every stone block of a pack).
- As vanilla's loaders do, a blockstate definition that does not bind,
  a missing or broken block model of a mod, and a recipe that does not
  parse are logged and skipped instead of dropping every mod (or
  stopping the game).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-17 08:53:46 +02:00
parent f48a54da09
commit 4d1596fe3b
12 changed files with 139 additions and 31 deletions
+13 -5
View File
@@ -237,11 +237,19 @@ How the game loads them, without touching vanilla's path:
- Loaders that read only `data/minecraft/` (recipes, loot, tags) read every namespace, as
vanilla does. With no mods there is only `minecraft`, so nothing changes.
- The overlay is cached like the resource-pack overlay and rebuilt when a mod file changes.
- **Limits.** Chunk sections store a block state in 16 bits: vanilla 26.3 has 35,723 states,
so mods may add 29,813. Past that the content root is refused with the states per mod
(Macaw's Doors, Fences, Paths and Trapdoors alone add 36,154: not all four fit). Block
sprites fill texture arrays of 2048 layers, four at most (8,192; vanilla takes 1,250,
identical textures share a layer). Wider state ids are the next step for big packs.
- **Limits.** Chunk sections size their global palette to the registry: 16 bits for vanilla's
35,723 states (the same chunks, saves and packets as before), one more bit each time content
mods double it, up to 2^20 states (1,048,576). Past that the content root is refused with the
states per mod. ATM10's 42 carried mods take the registry to 193,762 states (18 bits). On the
network the width is the registry's: unchanged for vanilla clients as long as no content mod
is on, wider only between Horizons that share the same mods; a Horizon with content mods still
reads a vanilla server's 16-bit chunks. Block sprites fill texture arrays of 2048 layers, eight
at most (16,384; vanilla takes 1,250, identical textures share a layer; ATM10's 42 take 9,790).
- **Broken mod files load as vanilla loads them.** A blockstate definition that does not bind
(a multipart value the block does not have), a block model that is missing or does not parse,
and a recipe that does not parse are logged and skipped: the block gets no model or the
missing model, the recipe is absent, everything else loads. Vanilla's own files never hit
these paths.
- Not in 0.2: multiplayer registry sync (single player and the integrated server first), worlds
opened without a mod they used (vanilla turns unknown blocks into air; we will ask first),
vanilla ids redefined by a mod (refused).