Class IntData

java.lang.Object
com.blamejared.crafttweaker.api.data.IntData
All Implemented Interfaces:
IData, Comparable<IData>, Iterable<IData>

@ZenRegister public class IntData extends Object implements IData
DocParam:
this (8192 as IData)
  • Constructor Details

    • IntData

      public IntData(net.minecraft.nbt.IntTag internal)
    • IntData

      public IntData(int internal)
  • Method Details

    • add

      public IData add(IData other)
      Description copied from interface: IData
      Adds the given IData to this IData.
      Specified by:
      add in interface IData
      Parameters:
      other - the other data to add.
      Returns:
      A new IData after adding the other data.
    • sub

      public IData sub(IData other)
      Description copied from interface: IData
      Subtracts the given IData from this IData.
      Specified by:
      sub in interface IData
      Parameters:
      other - the other data to remove.
      Returns:
      A new IData after removing the other data.
    • mul

      public IData mul(IData other)
      Description copied from interface: IData
      Multiplies the given IData to this IData.
      Specified by:
      mul in interface IData
      Parameters:
      other - the other data to multiply by.
      Returns:
      A new IData after multiplying the other data.
    • div

      public IData div(IData other)
      Description copied from interface: IData
      Divides the given IData from this IData.
      Specified by:
      div in interface IData
      Parameters:
      other - the other data to divide by.
      Returns:
      A new IData after dividing the other data.
    • mod

      public IData mod(IData other)
      Description copied from interface: IData
      Applies a modulo operation to this IData against the other IData.
      Specified by:
      mod in interface IData
      Parameters:
      other - the other data to modulo by.
      Returns:
      A new IData after applying a modulo operation.
    • or

      public IData or(IData other)
      Description copied from interface: IData
      Applies a bitwise OR (|) operation to this IData and the other IData
      Specified by:
      or in interface IData
      Parameters:
      other - the other data.
      Returns:
      A new IData after applying a bitwise OR operation.
    • and

      public IData and(IData other)
      Description copied from interface: IData
      Applies a bitwise AND (&) operation to this IData and the other IData
      Specified by:
      and in interface IData
      Parameters:
      other - the other data.
      Returns:
      A new IData after applying a bitwise AND operation.
    • xor

      public IData xor(IData other)
      Description copied from interface: IData
      Applies a bitwise XOR (^) operation to this IData and the other IData
      Specified by:
      xor in interface IData
      Parameters:
      other - the other data.
      Returns:
      A new IData after applying a bitwise XOR operation.
    • neg

      public IData neg()
      Description copied from interface: IData
      Negates this IData.
      Specified by:
      neg in interface IData
      Returns:
      The negation of this IData.
    • contains

      public boolean contains(IData other)
      Description copied from interface: IData
      Checks if this IData contains the other IData

      For most data types, this will check equality of the data, but for map data, it will check if the other data is a string, and then check if it contains a key with that name

      Specified by:
      contains in interface IData
      Parameters:
      other - the other data to check
      Returns:
      true if this data contains the other data.
    • compareTo

      public int compareTo(@NotNull @NotNull IData other)
      Description copied from interface: IData
      Compares this IData to the other IData
      Specified by:
      compareTo in interface Comparable<IData>
      Specified by:
      compareTo in interface IData
      Parameters:
      other - the data to be compared.
      Returns:
      The comparison result.
    • equalTo

      public boolean equalTo(IData other)
      Description copied from interface: IData
      Checks if this IData is equal to the other IData.
      Specified by:
      equalTo in interface IData
      Parameters:
      other - The data to check equality of.
      Returns:
      True if equal, false otherwise.
    • shl

      public IData shl(IData other)
      Description copied from interface: IData
      Applies a SHL (<<) operation to this data by the other data
      Specified by:
      shl in interface IData
      Parameters:
      other - The data to SHL by.
      Returns:
      The result of the SHL operation.
    • shr

      public IData shr(IData other)
      Description copied from interface: IData
      Applies a SHR (>>) operation to this data by the other data
      Specified by:
      shr in interface IData
      Parameters:
      other - The data to SHR by.
      Returns:
      The result of the SHR operation.
    • asBool

      public boolean asBool()
      Description copied from interface: IData
      Casts this IData to a boolean.
      Specified by:
      asBool in interface IData
      Returns:
      this data as a bool
    • asByte

      public byte asByte()
      Description copied from interface: IData
      Casts this IData to a byte.
      Specified by:
      asByte in interface IData
      Returns:
      this data as a byte
    • asShort

      public short asShort()
      Description copied from interface: IData
      Casts this IData to a short.
      Specified by:
      asShort in interface IData
      Returns:
      this data as a short
    • asInt

      public int asInt()
      Description copied from interface: IData
      Casts this IData to an int.
      Specified by:
      asInt in interface IData
      Returns:
      this data as an int
    • asLong

      public long asLong()
      Description copied from interface: IData
      Casts this IData to a long.
      Specified by:
      asLong in interface IData
      Returns:
      this data as a long
    • asFloat

      public float asFloat()
      Description copied from interface: IData
      Casts this IData to a float.
      Specified by:
      asFloat in interface IData
      Returns:
      this data as a float
    • asDouble

      public double asDouble()
      Description copied from interface: IData
      Casts this IData to a double.
      Specified by:
      asDouble in interface IData
      Returns:
      this data as a double
    • getInternal

      public net.minecraft.nbt.IntTag getInternal()
      Description copied from interface: IData
      Gets the internal Tag stored in this IData.
      Specified by:
      getInternal in interface IData
      Returns:
      the vanilla Tag that this IData represents.
    • copy

      public IData copy()
      Specified by:
      copy in interface IData
    • copyInternal

      public IData copyInternal()
      Specified by:
      copyInternal in interface IData
    • accept

      public <T> T accept(DataVisitor<T> visitor)
      Specified by:
      accept in interface IData
    • getType

      public IData.Type getType()
      Description copied from interface: IData
      Gets the type of this IData.
      Specified by:
      getType in interface IData
      Returns:
      The type of this IData.
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object