Interface INumberData
- All Superinterfaces:
IData
Represents a Number in the form of an
IData, useful for converting between types (double to int / long for example).- DocParam:
- this 1
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.blamejared.crafttweaker.api.data.base.IData
IData.Type -
Method Summary
Modifier and TypeMethodDescriptioncopy()Makes a copy of this IData.Makes a copy of this IData with a copy of the internal INBT object.default bytegetByte()Gets the value of thisIDataas a bytedefault doubleGets the value of thisIDataas a doubledefault floatgetFloat()Gets the value of thisIDataas a floatdefault intgetInt()Gets the value of thisIDataas an intnet.minecraft.nbt.NumericTagGets the internal INBT stored in this IData.default longgetLong()Gets the value of thisIDataas a longdefault shortgetShort()Gets the value of thisIDataas a short
-
Method Details
-
copy
INumberData copy()Description copied from interface:IDataMakes a copy of this IData. IData is immutable by default, use this to create a proper copy of the object. -
copyInternal
INumberData copyInternal()Description copied from interface:IDataMakes a copy of this IData with a copy of the internal INBT object.- Specified by:
copyInternalin interfaceIData- Returns:
- a copy of this IData with a copy of the internal INBT object.
-
getInternal
net.minecraft.nbt.NumericTag getInternal()Description copied from interface:IDataGets the internal INBT stored in this IData.- Specified by:
getInternalin interfaceIData- Returns:
- the vanilla INBT tag that this IData represents.
-
getLong
default long getLong()Gets the value of thisIDataas a long- Returns:
- the long value of this
IData
-
getInt
default int getInt()Gets the value of thisIDataas an int- Returns:
- the int value of this
IData
-
getShort
default short getShort()Gets the value of thisIDataas a short- Returns:
- the short value of this
IData
-
getByte
default byte getByte()Gets the value of thisIDataas a byte- Returns:
- the byte value of this
IData
-
getDouble
default double getDouble()Gets the value of thisIDataas a double- Returns:
- the double value of this
IData
-
getFloat
default float getFloat()Gets the value of thisIDataas a float- Returns:
- the float value of this
IData
-