From 85eee5aeec917550c544bdfbc94a0f91a23e01b1 Mon Sep 17 00:00:00 2001 From: The_miro Date: Fri, 14 Aug 2026 15:33:05 +0200 Subject: [PATCH] File material extensions under their own name An extension was written to the same path as the material it extends, one pack over. A datapack file is identified by its path, so that never added an extension to anything: it replaced the material with a stub, whichever of the two packs loaded last. The stub then named itself as its own parent, which MIAPI reads as a cycle and drops, and the material was gone entirely for anyone with both mods installed: Unresolved extension cmmodular:metal/arcane_metal for target cmmodular:metal/arcane_metal (missing or cyclic dependency) That is arcane metal and mithril, the two materials Create: Wizardry adds forms of, and it explains why they worked before the extensions existed. Ice and Fire's amethyst was never affected - it extends a miapi: material, so its own cmmodular: path collided with nothing. The generated name carries the pack that owns the extension, since the pack is why the extension exists and there could be another from a different mod later. Nothing else about the files changes. Co-Authored-By: Claude Opus 5 --- ..._metal.json => arcane_metal_from_create_wizardry.json} | 0 .../{mithril.json => mithril_from_create_wizardry.json} | 0 tools/materials.py | 8 +++++++- 3 files changed, 7 insertions(+), 1 deletion(-) rename src/main/resources/packs/create_wizardry/data/cmmodular/miapi/materials/metal/{arcane_metal.json => arcane_metal_from_create_wizardry.json} (100%) rename src/main/resources/packs/create_wizardry/data/cmmodular/miapi/materials/metal/{mithril.json => mithril_from_create_wizardry.json} (100%) diff --git a/src/main/resources/packs/create_wizardry/data/cmmodular/miapi/materials/metal/arcane_metal.json b/src/main/resources/packs/create_wizardry/data/cmmodular/miapi/materials/metal/arcane_metal_from_create_wizardry.json similarity index 100% rename from src/main/resources/packs/create_wizardry/data/cmmodular/miapi/materials/metal/arcane_metal.json rename to src/main/resources/packs/create_wizardry/data/cmmodular/miapi/materials/metal/arcane_metal_from_create_wizardry.json diff --git a/src/main/resources/packs/create_wizardry/data/cmmodular/miapi/materials/metal/mithril.json b/src/main/resources/packs/create_wizardry/data/cmmodular/miapi/materials/metal/mithril_from_create_wizardry.json similarity index 100% rename from src/main/resources/packs/create_wizardry/data/cmmodular/miapi/materials/metal/mithril.json rename to src/main/resources/packs/create_wizardry/data/cmmodular/miapi/materials/metal/mithril_from_create_wizardry.json diff --git a/tools/materials.py b/tools/materials.py index 8f284f3..27e10a6 100644 --- a/tools/materials.py +++ b/tools/materials.py @@ -1426,7 +1426,13 @@ def _extend_with_extra_forms(pack="create_wizardry"): path = f"{base['group']}/{name}" EXTENSIONS.append({ "pack": pack, - "path": path, + # The extension is filed under its own name, not the material's. A + # datapack file is identified by its path, so writing it to the + # material's path in a second pack does not add an extension - it + # replaces the material with one, whichever pack loads last. The + # extension then names itself as its own parent, MIAPI reads that as + # a cycle, and the material is gone for anyone with both mods. + "path": f"{path}_from_{pack}", "data": { "parent": f"cmmodular:{path}", "data": {