Class FabricPlatformHelper

java.lang.Object
se.itssimple.obsidianweave.fabric.platform.FabricPlatformHelper
All Implemented Interfaces:
IPlatformConfigHelper

public class FabricPlatformHelper extends Object implements IPlatformConfigHelper
Fabric-specific implementation of platform config helper for Obsidian Weave. Handles loading and saving mod configuration using JSON files in the Fabric environment.
  • Constructor Details

    • FabricPlatformHelper

      public FabricPlatformHelper()
  • Method Details

    • register

      public void register(ConfigHolder holder)
      Registers a config holder. No-op in Fabric.
      Specified by:
      register in interface IPlatformConfigHelper
      Parameters:
      holder - The config holder.
    • load

      public void load(ConfigHolder holder)
      Loads the config for the given holder from disk.
      Specified by:
      load in interface IPlatformConfigHelper
      Parameters:
      holder - The config holder.
    • save

      public void save(ConfigHolder holder)
      Saves the config for the given holder to disk.
      Specified by:
      save in interface IPlatformConfigHelper
      Parameters:
      holder - The config holder.
    • getValue

      public <T> T getValue(ConfigEntry<T> entry)
      Description copied from interface: IPlatformConfigHelper
      Gets the value of a config entry.
      Specified by:
      getValue in interface IPlatformConfigHelper
      Type Parameters:
      T - The value type.
      Parameters:
      entry - The config entry.
      Returns:
      The value of the config entry.
    • setValue

      public <T> void setValue(ConfigEntry<T> entry, T value)
      Description copied from interface: IPlatformConfigHelper
      Sets the value of a config entry.
      Specified by:
      setValue in interface IPlatformConfigHelper
      Type Parameters:
      T - The value type.
      Parameters:
      entry - The config entry.
      value - The value to set.