Merge pull request #969 from ludovic111/feat/mod-extra-namespaces
🤖 Agent: merged after verify and CI parity passed, plus modpacks-10's local integration (all nine branches on main: parity 301/301, structure-start oracle 150/150 and 134/134). Content mods may own namespaces besides their id; two mods may not share one.
This commit is contained in:
@@ -236,6 +236,10 @@ How the game loads them, without touching vanilla's path:
|
||||
so the same mod set gives the same ids. Saves store block names, so ids never reach the disk.
|
||||
- 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.
|
||||
- **Namespaces.** A mod's files go under its id, and under the namespaces its manifest lists
|
||||
when its Java original ships them so (`namespaces = ["kaisyn", "towns_and_towers"]` for Towns
|
||||
and Towers, mod id `t_and_t`; docs/mods.md). No namespace has two owners: a mod whose id or
|
||||
listed namespace another mod that is on already owns is left out, with both named in the log.
|
||||
- The overlay is built on the first start with a set of mods and kept for later starts. A stamp
|
||||
(`horizon-mod-content.stamp`) hashes the game executable, the base tables and every mod file's
|
||||
size and mtime. Adding, removing or editing a mod, or a new build of Horizon, rebuilds it. For
|
||||
|
||||
+24
-4
@@ -276,10 +276,30 @@ blocks and items by declaring them in `data/<id>/horizon/block/*.json` and
|
||||
"item": true }
|
||||
```
|
||||
|
||||
The fence: files go in the mod's own namespace (`assets/<id>/`,
|
||||
`data/<id>/`), plus additions to vanilla tags (`data/minecraft/tags/`) and
|
||||
to the convention tags NeoForge and Fabric mods share (`data/c/tags/`).
|
||||
Templates and `sounds` name vanilla blocks; unknown keys are refused. Paths
|
||||
The fence: files go in the mod's own namespaces (`assets/<id>/`,
|
||||
`data/<id>/`, and those its manifest lists), plus additions to vanilla tags
|
||||
(`data/minecraft/tags/`) and to the convention tags NeoForge and Fabric mods
|
||||
share (`data/c/tags/`).
|
||||
Templates and `sounds` name vanilla blocks; unknown keys are refused.
|
||||
|
||||
Some Java mods ship their files under other names than their mod id (Towns
|
||||
and Towers, mod id `t_and_t`, under `kaisyn` and `towns_and_towers`). A
|
||||
content mod lists those in its manifest:
|
||||
|
||||
```toml
|
||||
id = "t_and_t"
|
||||
api = "0.2"
|
||||
capabilities = ["registries"]
|
||||
namespaces = ["kaisyn", "towns_and_towers"]
|
||||
```
|
||||
|
||||
A listed namespace is the mod's as its id is: its `assets/` and `data/`
|
||||
files load, and the game reads its tags, recipes, names and loot. Blocks and
|
||||
items are still declared under `data/<id>/horizon/` only. `minecraft`, `c`
|
||||
and `horizon` cannot be listed. Two mods that are on may not own the same
|
||||
namespace (one's id or listed namespace being the other's): the game keeps
|
||||
the first in load order and leaves the other's content out, with
|
||||
"mods A and B both use the namespace N; turn one of them off" in the log. Paths
|
||||
use vanilla's resource characters, at most 65,536 files, 16 MiB each and
|
||||
512 MiB in all. A mod whose content is refused stays off, with the reason on
|
||||
its row. The game reads this content into its block and item tables
|
||||
|
||||
Reference in New Issue
Block a user