Interface DataTransformerRegistry.Transformer
- All Known Implementing Classes:
DataTransformerRegistry.CostTransformer, DataTransformerRegistry.EffectsTransformer, DataTransformerRegistry.FieldWrapperTransformer
- Enclosing class:
DataTransformerRegistry
public static interface DataTransformerRegistry.Transformer
Contract for executing targeted bidirectional JSON transformations on an enchantment root object.
-
Method Summary
Modifier and TypeMethodDescriptionvoidapplyExport(com.google.gson.JsonObject root) Mutates the enchantment JSON tree during the export phase, unwrapping dynamic configuration structures back into their static fallback representations.voidapplyImport(com.google.gson.JsonObject root, String targetNamespace, String enchantmentName) Mutates the enchantment JSON tree during the import phase, wrapping static values into dynamic configuration structures bound totargetNamespace.
-
Method Details
-
applyImport
Mutates the enchantment JSON tree during the import phase, wrapping static values into dynamic configuration structures bound totargetNamespace.- Parameters:
root- The root enchantmentJsonObjectbeing mutated.targetNamespace- The mod namespace assigned to the generated configuration properties.enchantmentName- The path identifier of the target enchantment (used as the config group name).
-
applyExport
void applyExport(com.google.gson.JsonObject root) Mutates the enchantment JSON tree during the export phase, unwrapping dynamic configuration structures back into their static fallback representations.- Parameters:
root- The root enchantmentJsonObjectbeing mutated.
-