Assembly and Structured Presentation
Assembly rebuilds final item display from structured module layers. This prevents modules from overwriting each other's lore.
Common layers
| Namespace | Order | Meaning |
|---|---|---|
forge | 100 | Forge layer. |
strengthen | 200 | Strengthening layer. |
gem | 300 | Gem layer. |
cooking | 10000 | Cooking display layer. |
Lower order appears earlier. CoreLib reads all registered layers and renders the final name and lore.
Namespace IDs are normalised on registration: trimmed, lowercased, spaces replaced with underscores, and a blank ID becomes unknown.
Name contributions
Layers may also decorate the item name. The position enum values are PREFIX and POSTFIX (there is no SUFFIX); an unknown or blank value falls back to POSTFIX.
Lore operation ledger
Each name_actions / lore_actions execution is recorded under the item PDC key emaki:item.operations with an operationId and a sourceNamespace, so a single module's changes can be reverted precisely:
| Method | Description |
|---|---|
apply(itemStack, operationId, sourceNamespace, nameActions, loreActions, variables) | Execute the operations and record them into PDC. |
revert(itemStack, operationId) | Revert one specific operation. |
revertAll(itemStack, sourceNamespace) | Revert every operation from one namespace. |
Insert anchor behaviour
An empty anchor and an anchor that matches nothing do not behave the same way:
| Operation | Empty anchor | anchor matches nothing |
|---|---|---|
insert_below | Insert at the end of the lore. | Insert at the end of the lore. |
insert_above | Insert at the start of the lore. | Insert at the end of the lore. |
Anchors use contains matching and stop at the first matching line.
Advice
Store real state in PDC or payloads. Use lore only as presentation. When a module changes item state, request a proper refresh.