Interface IAuxConfig

All Known Implementing Classes:
AmadronPlayerOffers, ArmorFeatureStatus, ArmorHUDLayout, AuxConfigJson, MicromissileDefaults, ProgWidgetConfig, ThirdPartyConfig

public interface IAuxConfig
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Clear the contents of this config when init'ing a new config file.
    Get the filename (within the "pneumaticcraft/" folder in the top-level config directory) where this config should be stored.
    Which side should these configs be loaded on? If configs are only relevant to client or server, use this to skip loading them on the other side.
    void
    postInit(File file)
    Called during the post-init phase; on the server, after the server has finished loading, and on the client, during the player connection process (PlayerEvent.PlayerLoggedInEvent).
    void
    preInit(File file)
    Called during the pre-init phase, with the top-level mod config file name (pneumaticcraft.cfg).
    default boolean
    If true, use a world-local directory for this config, outside the normal config/ hierarchy.
  • Method Details

    • getConfigFilename

      String getConfigFilename()
      Get the filename (within the "pneumaticcraft/" folder in the top-level config directory) where this config should be stored.
      Returns:
      the config file name
    • preInit

      void preInit(File file) throws IOException
      Called during the pre-init phase, with the top-level mod config file name (pneumaticcraft.cfg). Pre-init configs are always loaded on both client and server (getSidedness() is ignored).
      Parameters:
      file - the config file name
      Throws:
      IOException - if there is a problem reading/writing any files
    • postInit

      void postInit(File file) throws IOException
      Called during the post-init phase; on the server, after the server has finished loading, and on the client, during the player connection process (PlayerEvent.PlayerLoggedInEvent).
      Parameters:
      file - the config file name
      Throws:
      IOException - if there is a problem reading/writing any files
    • clear

      default void clear()
      Clear the contents of this config when init'ing a new config file. This is required for world-specific configs to avoid carrying configs between worlds when switching worlds in single-player.
    • useWorldSpecificDir

      default boolean useWorldSpecificDir()
      If true, use a world-local directory for this config, outside the normal config/ hierarchy. Used for world-specific (rather than game-global) saved data. World-specific data is only loaded on the server, and only in the post-init phase.
      Returns:
      true to use a world-specific directory, false to use the usual config directory
    • getSidedness

      IAuxConfig.Sidedness getSidedness()
      Which side should these configs be loaded on? If configs are only relevant to client or server, use this to skip loading them on the other side.
      Returns:
      the side configs are relevant to