YATS/Forge Documentation
 All Classes Namespaces Files Functions Variables Enumerator Pages
net.minecraftforge.common.Property Class Reference

Classes

enum  Type
 

Public Member Functions

 Property ()
 
 Property (String name, String value, Type type)
 
 Property (String name, String[] values, Type type)
 
String getString ()
 
int getInt ()
 
int getInt (int _default)
 
boolean isIntValue ()
 
boolean getBoolean (boolean _default)
 
boolean isBooleanValue ()
 
boolean isDoubleValue ()
 
double getDouble (double _default)
 
String[] getStringList ()
 
int[] getIntList ()
 
boolean isIntList ()
 
boolean[] getBooleanList ()
 
boolean isBooleanList ()
 
double[] getDoubleList ()
 
boolean isDoubleList ()
 
String getName ()
 
void setName (String name)
 
boolean wasRead ()
 
Type getType ()
 
boolean isList ()
 
boolean hasChanged ()
 
void set (String value)
 
void set (String[] values)
 
void set (int value)
 
void set (boolean value)
 
void set (double value)
 

Public Attributes

String comment
 

Constructor & Destructor Documentation

net.minecraftforge.common.Property.Property ( )
net.minecraftforge.common.Property.Property ( String  name,
String  value,
Type  type 
)
net.minecraftforge.common.Property.Property ( String  name,
String[]  values,
Type  type 
)

Member Function Documentation

boolean net.minecraftforge.common.Property.getBoolean ( boolean  _default)

Returns the value in this property as a boolean, if the value is not a valid boolean, it will return the provided default.

Parameters
_defaultThe default to provide
Returns
The value as a boolean, or the default
boolean [] net.minecraftforge.common.Property.getBooleanList ( )

Returns the boolean value of all values that can be parsed in the list.

Returns
Array of length 0 if none of the values could be parsed.
double net.minecraftforge.common.Property.getDouble ( double  _default)

Returns the value in this property as a double, if the value is not a valid double, it will return the provided default.

Parameters
_defaultThe default to provide if the current value is not a valid double
Returns
The value
double [] net.minecraftforge.common.Property.getDoubleList ( )

Returns the double value of all values that can be parsed in the list.

Returns
Array of length 0 if none of the values could be parsed.
int net.minecraftforge.common.Property.getInt ( )

Returns the value in this property as an integer, if the value is not a valid integer, it will return -1.

Returns
The value
int net.minecraftforge.common.Property.getInt ( int  _default)

Returns the value in this property as an integer, if the value is not a valid integer, it will return the provided default.

Parameters
_defaultThe default to provide if the current value is not a valid integer
Returns
The value
int [] net.minecraftforge.common.Property.getIntList ( )

Returns the integer value of all values that can be parsed in the list.

Returns
Array of length 0 if none of the values could be parsed.
String net.minecraftforge.common.Property.getName ( )
String net.minecraftforge.common.Property.getString ( )

Returns the value in this property as it's raw string.

Returns
current value
String [] net.minecraftforge.common.Property.getStringList ( )
Type net.minecraftforge.common.Property.getType ( )
boolean net.minecraftforge.common.Property.hasChanged ( )
boolean net.minecraftforge.common.Property.isBooleanList ( )

Checks if all of current values stored in this property can be converted to a boolean.

Returns
True if it is a boolean value
boolean net.minecraftforge.common.Property.isBooleanValue ( )

Checks if the current value held by this property is a valid boolean value.

Returns
True if it is a boolean value
boolean net.minecraftforge.common.Property.isDoubleList ( )

Checks if all of the current values stored in this property can be converted to a double.

Returns
True if the type of the Property is a double List
boolean net.minecraftforge.common.Property.isDoubleValue ( )

Checks if the current value held by this property is a valid double value.

Returns
True if the value can be converted to an double
boolean net.minecraftforge.common.Property.isIntList ( )

Checks if all of the current values stored in this property can be converted to an integer.

Returns
True if the type of the Property is an Integer List
boolean net.minecraftforge.common.Property.isIntValue ( )

Checks if the current value stored in this property can be converted to an integer.

Returns
True if the type of the Property is an Integer
boolean net.minecraftforge.common.Property.isList ( )
void net.minecraftforge.common.Property.set ( String  value)
void net.minecraftforge.common.Property.set ( String[]  values)
void net.minecraftforge.common.Property.set ( int  value)
void net.minecraftforge.common.Property.set ( boolean  value)
void net.minecraftforge.common.Property.set ( double  value)
void net.minecraftforge.common.Property.setName ( String  name)
boolean net.minecraftforge.common.Property.wasRead ( )

Determines if this config value was just created, or if it was read from the config file. This is useful for mods who auto-assign there blocks to determine if the ID returned is a configured one, or a automatically generated one.

Returns
True if this property was loaded from the config file with a value

Member Data Documentation

String net.minecraftforge.common.Property.comment

The documentation for this class was generated from the following file: