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.
Constructor Summary |
Configuration(File file)
Create a configuration file for the file given in parameter. |
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
categories
public Map<String,Map<String,Property>> categories
blockProperties
public TreeMap<String,Property> blockProperties
itemProperties
public TreeMap<String,Property> itemProperties
generalProperties
public TreeMap<String,Property> generalProperties
ALLOWED_CHARS
public static final String ALLOWED_CHARS
- See Also:
- Constant Field Values
Configuration
public Configuration(File file)
- Create a configuration file for the file given in parameter.
getOrCreateBlockIdProperty
public Property getOrCreateBlockIdProperty(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(String key,
String category,
int defaultValue)
getOrCreateBooleanProperty
public Property getOrCreateBooleanProperty(String key,
String category,
boolean defaultValue)
getOrCreateProperty
public Property getOrCreateProperty(String key,
String category,
String defaultValue)
load
public void load()
save
public void save()