java.lang.Object
java.lang.Enum<ConfigPreset>
io.github.startsmercury.simply_no_shading.impl.client.config.v1.ConfigPreset
All Implemented Interfaces:
Serializable, Comparable<ConfigPreset>, Constable

public enum ConfigPreset extends Enum<ConfigPreset>
The configuration preset.
Since:
8.0.0
  • Enum Constant Details

    • VANILLA

      public static final ConfigPreset VANILLA
      All shading types are enabled on vanilla.
    • INTERNAL_SHADERS

      public static final ConfigPreset INTERNAL_SHADERS
      Old block lighting from internal shader.
    • SIMPLY_NO_SHADING

      public static final ConfigPreset SIMPLY_NO_SHADING
      Simply No Shading defaults disables all shading types.
    • CUSTOM

      public static final ConfigPreset CUSTOM
      The customized preset is internally retained across presets.
  • Field Details

    • VALUE_LIST

      private static final List<ConfigPreset> VALUE_LIST
    • CODEC

      public static final com.mojang.serialization.Codec<ConfigPreset> CODEC
    • override

      private final Optional<ConfigData> override
      Preset override allow preset switching without losing the custom config.
  • Constructor Details

    • ConfigPreset

      private ConfigPreset()
    • ConfigPreset

      private ConfigPreset(ConfigData override)
  • Method Details

    • values

      public static ConfigPreset[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ConfigPreset valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • valueList

      public static List<ConfigPreset> valueList()
    • override

      public Optional<ConfigData> override()
      Gets the config override for this preset.

      Preset overrides allow preset switching without losing the custom config.

      Returns:
      The config override for this preset.
      Implementation Requirements:
      
           switch (this) {
               VANILLA -> Optional.of(ConfigData.VANILLA);
               INTERNAL_SHADERS -> Optional.of(ConfigData.INTERNAL_SHADERS);
               SIMPLY_NO_SHADING -> Optional.of(ConfigData.SIMPLY_NO_SHADING);
               CUSTOM -> Option.empty();
           }