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.
Method Summary |
void |
addCustomCategoryComment(String category,
String comment)
|
static void |
enableGlobalConfig()
|
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)
|
boolean |
hasCategory(String category)
|
boolean |
hasKey(String category,
String key)
|
void |
load()
|
void |
save()
|
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
defaultEncoding
public String defaultEncoding
isChild
public boolean isChild
Configuration
public Configuration()
Configuration
public Configuration(File file)
- Create a configuration file for the file given in parameter.
Configuration
public Configuration(File file,
boolean caseSensitiveCustomCategories)
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)
enableGlobalConfig
public static void enableGlobalConfig()