Class ModConfigSpec

java.lang.Object
com.electronwill.nightconfig.core.utils.UnmodifiableConfigWrapper<com.electronwill.nightconfig.core.UnmodifiableConfig>
net.neoforged.neoforge.common.ModConfigSpec
All Implemented Interfaces:
com.electronwill.nightconfig.core.UnmodifiableConfig, net.neoforged.fml.config.IConfigSpec<ModConfigSpec>

public class ModConfigSpec extends com.electronwill.nightconfig.core.utils.UnmodifiableConfigWrapper<com.electronwill.nightconfig.core.UnmodifiableConfig> implements net.neoforged.fml.config.IConfigSpec<ModConfigSpec>
  • Nested Class Summary Link icon

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static class 
     
    private static class 
     
    static class 
     
    static class 
     
    static class 
     
    static class 
     
    static class 
     
    static class 
    ModConfigSpec.Range<V extends Comparable<? super V>>
     
    static class 
     

    Nested classes/interfaces inherited from interface com.electronwill.nightconfig.core.UnmodifiableConfig Link icon

    com.electronwill.nightconfig.core.UnmodifiableConfig.Entry
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    private com.electronwill.nightconfig.core.Config
     
    private static final com.google.common.base.Joiner
     
    private static final com.google.common.base.Splitter
     
    private boolean
     
    private Map<List<String>,String>
     
    private Map<List<String>,String>
     
    private static final com.google.common.base.Joiner
     
    private static final org.apache.logging.log4j.Logger
     
    private com.electronwill.nightconfig.core.UnmodifiableConfig
     

    Fields inherited from class com.electronwill.nightconfig.core.utils.UnmodifiableConfigWrapper Link icon

    config
  • Constructor Summary Link icon

    Constructors
    Modifier
    Constructor
    Description
    private
    ModConfigSpec(com.electronwill.nightconfig.core.UnmodifiableConfig storage, com.electronwill.nightconfig.core.UnmodifiableConfig values, Map<List<String>,String> levelComments, Map<List<String>,String> levelTranslationKeys)
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    void
    acceptConfig(com.electronwill.nightconfig.core.CommentedConfig data)
     
    void
     
    int
    correct(com.electronwill.nightconfig.core.CommentedConfig config)
     
    int
    correct(com.electronwill.nightconfig.core.CommentedConfig config, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener)
     
    int
    correct(com.electronwill.nightconfig.core.CommentedConfig config, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener commentListener)
     
    private int
    correct(com.electronwill.nightconfig.core.UnmodifiableConfig spec, com.electronwill.nightconfig.core.CommentedConfig config, LinkedList<String> parentPath, List<String> parentPathUnmodifiable, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener commentListener, boolean dryRun)
     
     
     
    com.electronwill.nightconfig.core.UnmodifiableConfig
     
    com.electronwill.nightconfig.core.UnmodifiableConfig
     
    boolean
    isCorrect(com.electronwill.nightconfig.core.CommentedConfig config)
     
    boolean
     
    boolean
     
    private void
    resetCaches(Iterable<Object> configValues)
     
    void
     
    void
    setConfig(com.electronwill.nightconfig.core.CommentedConfig config)
     
    private static List<String>
    split(String path)
     
    private boolean
    stringsMatchIgnoringNewlines(@Nullable Object obj1, @Nullable Object obj2)
     

    Methods inherited from class com.electronwill.nightconfig.core.utils.UnmodifiableConfigWrapper Link icon

    configFormat, contains, entrySet, equals, getRaw, hashCode, isEmpty, size, valueMap

    Methods inherited from class java.lang.Object Link icon

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.fml.config.IConfigSpec Link icon

    self

    Methods inherited from interface com.electronwill.nightconfig.core.UnmodifiableConfig Link icon

    apply, apply, configFormat, contains, contains, entrySet, get, get, getByte, getByte, getByteOrElse, getByteOrElse, getChar, getChar, getCharOrElse, getCharOrElse, getEnum, getEnum, getEnum, getEnum, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getInt, getInt, getIntOrElse, getIntOrElse, getIntOrElse, getIntOrElse, getLong, getLong, getLongOrElse, getLongOrElse, getLongOrElse, getLongOrElse, getOptional, getOptional, getOptionalEnum, getOptionalEnum, getOptionalEnum, getOptionalEnum, getOptionalInt, getOptionalInt, getOptionalLong, getOptionalLong, getOrElse, getOrElse, getOrElse, getOrElse, getRaw, getRaw, getShort, getShort, getShortOrElse, getShortOrElse, isEmpty, isNull, isNull, size, valueMap
  • Field Details Link icon

    • levelComments Link icon

      private Map<List<String>,String> levelComments
    • levelTranslationKeys Link icon

      private Map<List<String>,String> levelTranslationKeys
    • values Link icon

      private com.electronwill.nightconfig.core.UnmodifiableConfig values
    • childConfig Link icon

      private com.electronwill.nightconfig.core.Config childConfig
    • isCorrecting Link icon

      private boolean isCorrecting
    • LOGGER Link icon

      private static final org.apache.logging.log4j.Logger LOGGER
    • LINE_JOINER Link icon

      private static final com.google.common.base.Joiner LINE_JOINER
    • DOT_JOINER Link icon

      private static final com.google.common.base.Joiner DOT_JOINER
    • DOT_SPLITTER Link icon

      private static final com.google.common.base.Splitter DOT_SPLITTER
  • Constructor Details Link icon

    • ModConfigSpec Link icon

      private ModConfigSpec(com.electronwill.nightconfig.core.UnmodifiableConfig storage, com.electronwill.nightconfig.core.UnmodifiableConfig values, Map<List<String>,String> levelComments, Map<List<String>,String> levelTranslationKeys)
  • Method Details Link icon

    • getLevelComment Link icon

      public String getLevelComment(List<String> path)
    • getLevelTranslationKey Link icon

      public String getLevelTranslationKey(List<String> path)
    • setConfig Link icon

      public void setConfig(com.electronwill.nightconfig.core.CommentedConfig config)
    • acceptConfig Link icon

      public void acceptConfig(com.electronwill.nightconfig.core.CommentedConfig data)
      Specified by:
      acceptConfig in interface net.neoforged.fml.config.IConfigSpec<ModConfigSpec>
    • isCorrecting Link icon

      public boolean isCorrecting()
      Specified by:
      isCorrecting in interface net.neoforged.fml.config.IConfigSpec<ModConfigSpec>
    • isLoaded Link icon

      public boolean isLoaded()
    • getSpec Link icon

      public com.electronwill.nightconfig.core.UnmodifiableConfig getSpec()
    • getValues Link icon

      public com.electronwill.nightconfig.core.UnmodifiableConfig getValues()
    • afterReload Link icon

      public void afterReload()
      Specified by:
      afterReload in interface net.neoforged.fml.config.IConfigSpec<ModConfigSpec>
    • resetCaches Link icon

      private void resetCaches(Iterable<Object> configValues)
    • save Link icon

      public void save()
    • isCorrect Link icon

      public boolean isCorrect(com.electronwill.nightconfig.core.CommentedConfig config)
      Specified by:
      isCorrect in interface net.neoforged.fml.config.IConfigSpec<ModConfigSpec>
    • correct Link icon

      public int correct(com.electronwill.nightconfig.core.CommentedConfig config)
      Specified by:
      correct in interface net.neoforged.fml.config.IConfigSpec<ModConfigSpec>
    • correct Link icon

      public int correct(com.electronwill.nightconfig.core.CommentedConfig config, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener)
    • correct Link icon

      public int correct(com.electronwill.nightconfig.core.CommentedConfig config, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener commentListener)
    • correct Link icon

      private int correct(com.electronwill.nightconfig.core.UnmodifiableConfig spec, com.electronwill.nightconfig.core.CommentedConfig config, LinkedList<String> parentPath, List<String> parentPathUnmodifiable, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener listener, com.electronwill.nightconfig.core.ConfigSpec.CorrectionListener commentListener, boolean dryRun)
    • stringsMatchIgnoringNewlines Link icon

      private boolean stringsMatchIgnoringNewlines(@Nullable @Nullable Object obj1, @Nullable @Nullable Object obj2)
    • split Link icon

      private static List<String> split(String path)