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 Type
    Method
    Description
    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.
    void
    applyImport(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 to targetNamespace.
  • Method Details

    • applyImport

      void applyImport(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 to targetNamespace.
      Parameters:
      root - The root enchantment JsonObject being 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 enchantment JsonObject being mutated.