public class Configuration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Configuration.UnicodeInputStreamReader |
Modifier and Type | Field and Description |
---|---|
static String |
ALLOWED_CHARS |
static com.google.common.base.CharMatcher |
allowedProperties |
static String |
CATEGORY_BLOCK |
static String |
CATEGORY_GENERAL |
static String |
CATEGORY_ITEM |
static String |
CATEGORY_SPLITTER |
static String |
DEFAULT_ENCODING |
String |
defaultEncoding |
boolean |
isChild |
static String |
NEW_LINE |
Constructor and Description |
---|
Configuration() |
Configuration(File file)
Create a configuration file for the file given in parameter.
|
Configuration(File file,
boolean caseSensitiveCustomCategories) |
Modifier and Type | Method and Description |
---|---|
void |
addCustomCategoryComment(String category,
String comment) |
static void |
enableGlobalConfig() |
Property |
get(String category,
String key,
boolean defaultValue) |
Property |
get(String category,
String key,
boolean[] defaultValue) |
Property |
get(String category,
String key,
boolean[] defaultValue,
String comment) |
Property |
get(String category,
String key,
boolean defaultValue,
String comment) |
Property |
get(String category,
String key,
double defaultValue) |
Property |
get(String category,
String key,
double[] defaultValue) |
Property |
get(String category,
String key,
double[] defaultValue,
String comment) |
Property |
get(String category,
String key,
double defaultValue,
String comment) |
Property |
get(String category,
String key,
int defaultValue) |
Property |
get(String category,
String key,
int[] defaultValue) |
Property |
get(String category,
String key,
int[] defaultValue,
String comment) |
Property |
get(String category,
String key,
int defaultValue,
String comment) |
Property |
get(String category,
String key,
String defaultValue) |
Property |
get(String category,
String key,
String[] defaultValue) |
Property |
get(String category,
String key,
String[] defaultValue,
String comment) |
Property |
get(String category,
String key,
String[] defaultValue,
String comment,
Property.Type type) |
Property |
get(String category,
String key,
String defaultValue,
String comment) |
Property |
get(String category,
String key,
String defaultValue,
String comment,
Property.Type type) |
Property |
getBlock(String key,
int defaultID)
Gets or create a block id property.
|
Property |
getBlock(String key,
int defaultID,
String comment) |
Property |
getBlock(String category,
String key,
int defaultID) |
Property |
getBlock(String category,
String key,
int defaultID,
String comment) |
ConfigCategory |
getCategory(String category) |
Set<String> |
getCategoryNames() |
Property |
getItem(String key,
int defaultID) |
Property |
getItem(String key,
int defaultID,
String comment) |
Property |
getItem(String category,
String key,
int defaultID) |
Property |
getItem(String category,
String key,
int defaultID,
String comment) |
Property |
getTerrainBlock(String category,
String key,
int defaultID,
String comment)
Special version of getBlock to be used when you want to garentee the ID you get is below 256
This should ONLY be used by mods who do low level terrain generation, or ones that add new
biomes.
|
boolean |
hasCategory(String category) |
boolean |
hasChanged() |
boolean |
hasKey(String category,
String key) |
void |
load() |
void |
removeCategory(ConfigCategory category) |
void |
save() |
public static final String CATEGORY_GENERAL
public static final String CATEGORY_BLOCK
public static final String CATEGORY_ITEM
public static final String ALLOWED_CHARS
public static final String DEFAULT_ENCODING
public static final String CATEGORY_SPLITTER
public static final com.google.common.base.CharMatcher allowedProperties
public String defaultEncoding
public boolean isChild
public Configuration()
public Configuration(File file)
public Configuration(File file, boolean caseSensitiveCustomCategories)
public Property getBlock(String key, int defaultID)
public Property getTerrainBlock(String category, String key, int defaultID, String comment)
public Property get(String category, String key, String defaultValue, String comment, Property.Type type)
public Property get(String category, String key, String[] defaultValue, String comment, Property.Type type)
public boolean hasCategory(String category)
public void load()
public void save()
public ConfigCategory getCategory(String category)
public void removeCategory(ConfigCategory category)
public void addCustomCategoryComment(String category, String comment)
public static void enableGlobalConfig()
public boolean hasChanged()
public Set<String> getCategoryNames()