Class ForgeConfigSpec.ConfigValue<T>

java.lang.Object
net.minecraftforge.common.ForgeConfigSpec.ConfigValue<T>
All Implemented Interfaces:
Supplier<T>
Direct Known Subclasses:
ForgeConfigSpec.BooleanValue, ForgeConfigSpec.ByteValue, ForgeConfigSpec.DoubleValue, ForgeConfigSpec.EnumValue, ForgeConfigSpec.FloatValue, ForgeConfigSpec.IntValue, ForgeConfigSpec.LongValue, ForgeConfigSpec.ShortValue
Enclosing class:
ForgeConfigSpec

public static class ForgeConfigSpec.ConfigValue<T> extends Object implements Supplier<T>
  • Field Details

  • Constructor Details

  • Method Details

    • getPath

      public List<String> getPath()
    • get

      public T get()
      Returns the actual value for the configuration setting, throwing if the config has not yet been loaded.
      Specified by:
      get in interface Supplier<T>
      Returns:
      the actual value for the setting
      Throws:
      NullPointerException - if the config spec object that will contain this has not yet been built
      IllegalStateException - if the associated config has not yet been loaded
    • getRaw

      protected T getRaw(com.electronwill.nightconfig.core.Config config, List<String> path, Supplier<T> defaultSupplier)
    • getDefault

      public T getDefault()
      Returns the default value for the configuration setting.
      Returns:
      the default value for the configuration setting
    • next

      public ForgeConfigSpec.Builder next()
    • save

      public void save()
    • set

      public void set(T value)
    • clearCache

      public void clearCache()