public class ScriptableNBTCompound
extends java.lang.Object
| Constructor and Description |
|---|
ScriptableNBTCompound(net.minecraft.nbt.NBTTagCompound compound) |
| Modifier and Type | Method and Description |
|---|---|
void |
dump(java.lang.String file)
Dumps this nbt compound into the given file.
|
boolean |
getBoolean(java.lang.String name)
Gets a boolean value from this nbt compound.
|
byte |
getByte(java.lang.String name)
Gets a byte value from this nbt compound.
|
byte[] |
getByteArray(java.lang.String name)
Gets a byte array value from this nbt compound.
|
ScriptableNBTCompound |
getCompound(java.lang.String name)
Gets a compound from this nbt compound.
|
double |
getDouble(java.lang.String name)
Gets a double value from this nbt compound.
|
float |
getFloat(java.lang.String name)
Gets a float value from this nbt compound.
|
int |
getInt(java.lang.String name)
Gets an integer value from this nbt compound.
|
int[] |
getIntArray(java.lang.String name)
Gets a int array value from this nbt compound.
|
long |
getLong(java.lang.String name)
Gets a long value from this nbt compound.
|
short |
getShort(java.lang.String name)
Gets a short value from this nbt compound.
|
java.lang.String |
getString(java.lang.String name)
Gets a string value from this nbt compound.
|
void |
setBoolean(java.lang.String name,
boolean value)
Sets a boolean value for this nbt compound.
|
void |
setByte(java.lang.String name,
byte value)
Sets a byte value for this nbt compound.
|
void |
setByteArray(java.lang.String name,
byte[] value)
Sets a byte array value for this nbt compound.
|
void |
setCompound(java.lang.String name)
Creates an empty nbt compound.
|
void |
setCompound(java.lang.String name,
ScriptableNBTCompound compound)
Clones the given compound into the given name.
|
void |
setDouble(java.lang.String name,
double value)
Sets a double value for this nbt compound.
|
void |
setFloat(java.lang.String name,
float value)
Sets a float value for this nbt compound.
|
void |
setInt(java.lang.String name,
int value)
Sets a int value for this nbt compound.
|
void |
setIntArray(java.lang.String name,
int[] value)
Sets a int array value for this nbt compound.
|
void |
setLong(java.lang.String name,
long value)
Sets a long value for this nbt compound.
|
void |
setShort(java.lang.String name,
short value)
Sets a short value for this nbt compound.
|
void |
setString(java.lang.String name,
java.lang.String value)
Sets a string value for this nbt compound.
|
public ScriptableNBTCompound(net.minecraft.nbt.NBTTagCompound compound)
public byte getByte(java.lang.String name)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aByteValue'
which is the same as calling getCompound('compound1').getCompound('compound2').getByte('aByteValue').public short getShort(java.lang.String name)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aShortValue'
which is the same as calling getCompound('compound1').getCompound('compound2').getShort('aShortValue').public int getInt(java.lang.String name)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aIntValue'
which is the same as calling getCompound('compound1').getCompound('compound2').getInt('aIntValue').public long getLong(java.lang.String name)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aLongValue'
which is the same as calling getCompound('compound1').getCompound('compound2').getLong('aLongValue').public float getFloat(java.lang.String name)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aFloatValue'
which is the same as calling getCompound('compound1').getCompound('compound2').getFloat('aFloatValue').public double getDouble(java.lang.String name)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aDoubleValue'
which is the same as calling getCompound('compound1').getCompound('compound2').getDouble('aDoubleValue').public java.lang.String getString(java.lang.String name)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aStringValue'
which is the same as calling getCompound('compound1').getCompound('compound2').getString('aStringValue').public boolean getBoolean(java.lang.String name)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aBooleanValue'
which is the same as calling getCompound('compound1').getCompound('compound2').getBoolean('aBooleanValue').public byte[] getByteArray(java.lang.String name)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aByteArrayValue'
which is the same as calling getCompound('compound1').getCompound('compound2').getByteArray('aByteArrayValue').public int[] getIntArray(java.lang.String name)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aIntArrayValue'
which is the same as calling getCompound('compound1').getCompound('compound2').getIntArray('aIntArrayValue').public ScriptableNBTCompound getCompound(java.lang.String name)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aCompoundValue'
which is the same as calling getCompound('compound1').getCompound('compound2').getCompound('aCompoundValue').public void setByte(java.lang.String name,
byte value)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aByteValue'
which is the same as calling getCompound('compound1').getCompound('compound2').setByte('aByteValue', {a byte number}).value - The byte value.public void setShort(java.lang.String name,
short value)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aShortValue'
which is the same as calling getCompound('compound1').getCompound('compound2').setShort('aShortValue', {a short number}).value - The short value.public void setInt(java.lang.String name,
int value)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aIntValue'
which is the same as calling getCompound('compound1').getCompound('compound2').setInt('aIntValue', {a int number}).value - The int value.public void setLong(java.lang.String name,
long value)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aLongValue'
which is the same as calling getCompound('compound1').getCompound('compound2').setLong('aLongValue', {a long number}).value - The long value.public void setFloat(java.lang.String name,
float value)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aFloatValue'
which is the same as calling getCompound('compound1').getCompound('compound2').setFloat('aFloatValue', {a float number}).value - The float value.public void setDouble(java.lang.String name,
double value)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aDoubleValue'
which is the same as calling getCompound('compound1').getCompound('compound2').setDouble('aDoubleValue', {a double number}).value - The double value.public void setString(java.lang.String name,
java.lang.String value)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aStringValue'
which is the same as calling getCompound('compound1').getCompound('compound2').setString('aStringValue', {a string}).value - The string value.public void setBoolean(java.lang.String name,
boolean value)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aBooleanValue'
which is the same as calling getCompound('compound1').getCompound('compound2').setBoolean('aBooleanValue', {a boolean}).value - The boolean value.public void setByteArray(java.lang.String name,
byte[] value)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aByteArrayValue'
which is the same as calling getCompound('compound1').getCompound('compound2').setByteArray('aByteArrayValue', {a byte array}).value - The byte array value.public void setIntArray(java.lang.String name,
int[] value)
name - The name of the value. Use '/' for the compound hierarchy, for example 'compound1/compound2/aIntArrayValue'
which is the same as calling getCompound('compound1').getCompound('compound2').setIntArray('aIntArrayValue', {a int array number}).value - The int array value.public void setCompound(java.lang.String name)
name - The name of the compound. Use '/' for the compound hierarchy, for example 'compound1/compound2/aCompound'
which is the same as calling setCompound('compound1').setCompound('compound2').setCompound('aCompound').
The last compound (aCompound in this case) will be emptied if it does already exist.public void setCompound(java.lang.String name,
ScriptableNBTCompound compound)
name - The name of the compound. Use '/' for the compound hierarchy, for example 'compound1/compound2/aCompound'
which is the same as calling setCompound('compound1').setCompound('compound2').setCompound('aCompound', {a compound}).compound - The compound to clone from.public void dump(java.lang.String file)
file - The file.