Class NumberConverter
java.lang.Object
com.blamejared.crafttweaker.api.data.base.converter.NumberConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic INumberDataconvertNumber(Number number) Converts the given number to it's IData representation.
-
Constructor Details
-
NumberConverter
public NumberConverter()
-
-
Method Details
-
convertNumber
Converts the given number to it's IData representation. If the number is not of the following types:Integer,Byte,Double,Float,LongorShort, it will be converted to aDoubleDataas that has the most precision.- Parameters:
number- The number to convert- Returns:
- An IData representation of the given number.
-