Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraftforge.common
Class Configuration

    java.lang.Object
      net.minecraftforge.common.Configuration

    public class Configuration

extends Object

This class offers advanced configurations capabilities, allowing to provide various categories for configuration variables.

Nested Class Summary
`static class` | `Configuration.UnicodeInputStreamReader`

Field Summary
`static String` | `ALLOWED_CHARS`
`TreeMap<String,Property>` | `blockProperties` Deprecated.
`Map<String,Map<String,Property>>` | `categories`
`static String` | `CATEGORY_BLOCK`
`static String` | `CATEGORY_GENERAL`
`static String` | `CATEGORY_ITEM`
`static String` | `DEFAULT_ENCODING`
`String` | `defaultEncoding`
`TreeMap<String,Property>` | `generalProperties` Deprecated.
`TreeMap<String,Property>` | `itemProperties` Deprecated.

Constructor Summary
`Configuration(File file)` Create a configuration file for the file given in parameter.
`Configuration(File file, boolean caseSensitiveCustomCategories)`

Method Summary
`void` | `addCustomCategoryComment(String category, String comment)`
`Property` | `get(String category, String key, boolean defaultValue)`
`Property` | `get(String category, String key, int defaultValue)`
`Property` | `get(String category, String key, String defaultValue)`
`Property` | `get(String category, String key, String defaultValue, Property.Type type)`
`Property` | `getBlock(String key, int defaultID)` Gets or create a block id property.
`Property` | `getBlock(String category, String key, int defaultID)`
`Property` | `getItem(String key, int defaultID)`
`Property` | `getItem(String category, String key, int defaultID)`
`Property` | `getOrCreateBlockIdProperty(String key, int defaultID)` Deprecated.
`Property` | `getOrCreateBooleanProperty(String key, String category, boolean defaultValue)` Deprecated.
`Property` | `getOrCreateIntProperty(String key, String category, int defaultValue)` Deprecated.
`Property` | `getOrCreateProperty(String key, String category, String defaultValue)` Deprecated.
`boolean` | `hasCategory(String category)`
`boolean` | `hasKey(String category, String key)`
`void` | `load()`
`void` | `save()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### CATEGORY_GENERAL

    public static final String CATEGORY_GENERAL

See Also:
  Constant Field Values

### CATEGORY_BLOCK

    public static final String CATEGORY_BLOCK

See Also:
  Constant Field Values

### CATEGORY_ITEM

    public static final String CATEGORY_ITEM

See Also:
  Constant Field Values

### ALLOWED_CHARS

    public static final String ALLOWED_CHARS

See Also:
  Constant Field Values

### DEFAULT_ENCODING

    public static final String DEFAULT_ENCODING

See Also:
  Constant Field Values

### categories

    public Map<String,Map<String,Property>> categories

### blockProperties

    @Deprecated
    public TreeMap<String,Property> blockProperties

  Deprecated.

### itemProperties

    @Deprecated
    public TreeMap<String,Property> itemProperties

  Deprecated.

### generalProperties

    @Deprecated
    public TreeMap<String,Property> generalProperties

  Deprecated.

### defaultEncoding

    public String defaultEncoding

Constructor Detail

### Configuration

    public Configuration(File file)

  Create a configuration file for the file given in parameter.

### Configuration

    public Configuration(File file,
                         boolean caseSensitiveCustomCategories)

Method Detail

### getBlock

    public Property getBlock(String key,
                             int defaultID)

  Gets or create a block id property. If the block id property key is already in the configuration, then it will be used. Otherwise, defaultId will be used, except if already taken, in which case this will try to determine a free default id.

### getBlock

    public Property getBlock(String category,
                             String key,
                             int defaultID)

### getItem

    public Property getItem(String key,
                            int defaultID)

### getItem

    public Property getItem(String category,
                            String key,
                            int defaultID)

### get

    public Property get(String category,
                        String key,
                        int defaultValue)

### get

    public Property get(String category,
                        String key,
                        boolean defaultValue)

### get

    public Property get(String category,
                        String key,
                        String defaultValue)

### get

    public Property get(String category,
                        String key,
                        String defaultValue,
                        Property.Type type)

### hasCategory

    public boolean hasCategory(String category)

### hasKey

    public boolean hasKey(String category,
                          String key)

### load

    public void load()

### save

    public void save()

### addCustomCategoryComment

    public void addCustomCategoryComment(String category,
                                         String comment)

### getOrCreateIntProperty

    @Deprecated
    public Property getOrCreateIntProperty(String key,
                                                      String category,
                                                      int defaultValue)

  Deprecated.

### getOrCreateProperty

    @Deprecated
    public Property getOrCreateProperty(String key,
                                                   String category,
                                                   String defaultValue)

  Deprecated.

### getOrCreateBooleanProperty

    @Deprecated
    public Property getOrCreateBooleanProperty(String key,
                                                          String category,
                                                          boolean defaultValue)

  Deprecated.

### getOrCreateBlockIdProperty

    @Deprecated
    public Property getOrCreateBlockIdProperty(String key,
                                                          int defaultID)

  Deprecated.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD