Class NumberTag

java.lang.Object
org.moddingx.launcherlib.nbt.tag.NumberTag
All Implemented Interfaces:
Tag

public final class NumberTag extends Object implements Tag
  • Method Details

    • type

      public TagType type()
      Description copied from interface: Tag
      Gets the TagType for this tag.
      Specified by:
      type in interface Tag
    • copy

      public NumberTag copy()
      Description copied from interface: Tag
      Makes a copy of this tag. For immutable tags, this may return the same object.
      Specified by:
      copy in interface Tag
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • asByte

      public byte asByte()
      Gets the value of this tag as a byte.
    • asShort

      public short asShort()
      Gets the value of this tag as a short.
    • asInt

      public int asInt()
      Gets the value of this tag as an integer.
    • asLong

      public long asLong()
      Gets the value of this tag as a long.
    • asFloat

      public float asFloat()
      Gets the value of this tag as a float.
    • asDouble

      public double asDouble()
      Gets the value of this tag as a double.
    • value

      public Number value()
      Gets the value of this tag.
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • createByte

      public static NumberTag createByte(int value)
      Creates a new NumberTag of type TagType.BYTE.
    • createShort

      public static NumberTag createShort(int value)
      Creates a new NumberTag of type TagType.SHORT.
    • createInt

      public static NumberTag createInt(int value)
      Creates a new NumberTag of type TagType.INT.
    • createLong

      public static NumberTag createLong(long value)
      Creates a new NumberTag of type TagType.LONG.
    • createFloat

      public static NumberTag createFloat(float value)
      Creates a new NumberTag of type TagType.FLOAT.
    • createDouble

      public static NumberTag createDouble(double value)
      Creates a new NumberTag of type TagType.DOUBLE.