Class ResourceCacheManager.ResourceManagerBootCacheConfigurationHandler

java.lang.Object
net.minecraftforge.resource.ResourceCacheManager.ResourceManagerBootCacheConfigurationHandler
Enclosing class:
ResourceCacheManager

private static final class ResourceCacheManager.ResourceManagerBootCacheConfigurationHandler extends Object
Class to handle the reading, initial creation, and watching of the boot configuration file, for the resource cache manager.
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • CONFIG_PATH

      private static final Path CONFIG_PATH
      The path to the boot configuration file.
    • configSpec

      private static final com.electronwill.nightconfig.core.ConfigSpec configSpec
      The configuration specification for the resource cache configuration.
    • INSTANCE

      The current instance of the handler.
    • configurationHandle

      private final com.electronwill.nightconfig.core.file.CommentedFileConfig configurationHandle
      The configuration handle for the resource cache configuration.
  • Constructor Details

    • ResourceManagerBootCacheConfigurationHandler

      private ResourceManagerBootCacheConfigurationHandler()
      Creates a new instance of the handler. Registers the watchdog thread.
  • Method Details

    • createConfiguration

      private static com.electronwill.nightconfig.core.file.CommentedFileConfig createConfiguration()
      Creates the configuration handle for the resource cache configuration.
    • onConfigFileNotFound

      private static boolean onConfigFileNotFound(Path file, com.electronwill.nightconfig.core.ConfigFormat<?> configFormat) throws IOException
      Throws:
      IOException
    • getInstance

      Gives access to the current singleton instance of the handler.
      Returns:
      The instance of this handler.
    • getConfigValue

      private boolean getConfigValue(String configKey, boolean defaultValue)
      Reads a config value from the current configuration file.
      Parameters:
      configKey - The key of the config value to read.
      defaultValue - The default value to return if the config value is not present.
      Returns:
      The value of the config value, or the default value if it is not present.