java.lang.Object
com.blamejared.crafttweaker.api.data.base.converter.NumberConverter

public class NumberConverter extends Object
  • Constructor Details

    • NumberConverter

      public NumberConverter()
  • Method Details

    • convertNumber

      @Nullable public static INumberData convertNumber(Number number)
      Converts the given number to it's IData representation. If the number is not of the following types: Integer, Byte, Double, Float, Long or Short, it will be converted to a DoubleData as that has the most precision.
      Parameters:
      number - The number to convert
      Returns:
      An IData representation of the given number.