Interface INumberData

All Superinterfaces:
IData
All Known Implementing Classes:
ByteData, DoubleData, FloatData, IntData, LongData, ShortData

@ZenRegister(loaders={"crafttweaker","tags"}) public interface INumberData extends IData
Represents a Number in the form of an IData, useful for converting between types (double to int / long for example).
DocParam:
this 1
  • Method Details

    • copy

      INumberData copy()
      Description copied from interface: IData
      Makes a copy of this IData. IData is immutable by default, use this to create a proper copy of the object.
      Specified by:
      copy in interface IData
      Returns:
      a copy of this IData.
    • copyInternal

      INumberData copyInternal()
      Description copied from interface: IData
      Makes a copy of this IData with a copy of the internal INBT object.
      Specified by:
      copyInternal in interface IData
      Returns:
      a copy of this IData with a copy of the internal INBT object.
    • getInternal

      net.minecraft.nbt.NumericTag getInternal()
      Description copied from interface: IData
      Gets the internal INBT stored in this IData.
      Specified by:
      getInternal in interface IData
      Returns:
      the vanilla INBT tag that this IData represents.
    • getLong

      default long getLong()
      Gets the value of this IData as a long
      Returns:
      the long value of this IData
    • getInt

      default int getInt()
      Gets the value of this IData as an int
      Returns:
      the int value of this IData
    • getShort

      default short getShort()
      Gets the value of this IData as a short
      Returns:
      the short value of this IData
    • getByte

      default byte getByte()
      Gets the value of this IData as a byte
      Returns:
      the byte value of this IData
    • getDouble

      default double getDouble()
      Gets the value of this IData as a double
      Returns:
      the double value of this IData
    • getFloat

      default float getFloat()
      Gets the value of this IData as a float
      Returns:
      the float value of this IData