Interface IPlatformConfigHelper

All Known Implementing Classes:
NeoForgePlatformHelper

public interface IPlatformConfigHelper
Platform abstraction for config management in Obsidian Weave mods. Implemented by platform-specific helpers for Fabric and Forge.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    Gets the value of a config entry.
    void
    Loads the config for the given holder from disk.
    void
    Registers a config holder with the platform.
    void
    Saves the config for the given holder to disk.
    <T> void
    setValue(ConfigEntry<T> entry, T value)
    Sets the value of a config entry.
  • Method Details

    • register

      void register(ConfigHolder holder)
      Registers a config holder with the platform.
      Parameters:
      holder - The config holder.
    • load

      void load(ConfigHolder holder)
      Loads the config for the given holder from disk.
      Parameters:
      holder - The config holder.
    • save

      void save(ConfigHolder holder)
      Saves the config for the given holder to disk.
      Parameters:
      holder - The config holder.
    • getValue

      <T> T getValue(ConfigEntry<T> entry)
      Gets the value of a config entry.
      Type Parameters:
      T - The value type.
      Parameters:
      entry - The config entry.
      Returns:
      The value of the config entry.
    • setValue

      <T> void setValue(ConfigEntry<T> entry, T value)
      Sets the value of a config entry.
      Type Parameters:
      T - The value type.
      Parameters:
      entry - The config entry.
      value - The value to set.