net.minecraft.src.forge
Class Configuration

java.lang.Object
  extended by net.minecraft.src.forge.Configuration

public class Configuration
extends java.lang.Object

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


Field Summary
static int BLOCK_PROPERTY
           
 java.util.TreeMap<java.lang.String,Property> blockProperties
           
static int GENERAL_PROPERTY
           
 java.util.TreeMap<java.lang.String,Property> generalProperties
           
static int ITEM_PROPERTY
           
 java.util.TreeMap<java.lang.String,Property> itemProperties
           
 
Constructor Summary
Configuration(java.io.File file)
          Create a configuration file for the file given in parameter.
 
Method Summary
 Property getOrCreateBlockIdProperty(java.lang.String key, int defaultId)
          Gets or create a block id property.
 Property getOrCreateBooleanProperty(java.lang.String key, int kind, boolean defaultValue)
           
 Property getOrCreateIntProperty(java.lang.String key, int kind, int defaultValue)
           
 Property getOrCreateProperty(java.lang.String key, int kind, java.lang.String defaultValue)
           
 void load()
           
 void save()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERAL_PROPERTY

public static final int GENERAL_PROPERTY
See Also:
Constant Field Values

BLOCK_PROPERTY

public static final int BLOCK_PROPERTY
See Also:
Constant Field Values

ITEM_PROPERTY

public static final int ITEM_PROPERTY
See Also:
Constant Field Values

blockProperties

public java.util.TreeMap<java.lang.String,Property> blockProperties

itemProperties

public java.util.TreeMap<java.lang.String,Property> itemProperties

generalProperties

public java.util.TreeMap<java.lang.String,Property> generalProperties
Constructor Detail

Configuration

public Configuration(java.io.File file)
Create a configuration file for the file given in parameter.

Method Detail

getOrCreateBlockIdProperty

public Property getOrCreateBlockIdProperty(java.lang.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.


getOrCreateIntProperty

public Property getOrCreateIntProperty(java.lang.String key,
                                       int kind,
                                       int defaultValue)

getOrCreateBooleanProperty

public Property getOrCreateBooleanProperty(java.lang.String key,
                                           int kind,
                                           boolean defaultValue)

getOrCreateProperty

public Property getOrCreateProperty(java.lang.String key,
                                    int kind,
                                    java.lang.String defaultValue)

load

public void load()

save

public void save()