Class ShortData

java.lang.Object
com.blamejared.crafttweaker.api.data.ShortData
All Implemented Interfaces:
IData, INumberData

@ZenRegister public class ShortData extends Object implements INumberData
DocParam:
this 1058
  • Constructor Details

    • ShortData

      public ShortData(net.minecraft.nbt.ShortTag internal)
    • ShortData

      public ShortData(short internal)
  • Method Details

    • copy

      public ShortData 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
      Specified by:
      copy in interface INumberData
      Returns:
      a copy of this IData.
    • copyInternal

      public ShortData 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
      Specified by:
      copyInternal in interface INumberData
      Returns:
      a copy of this IData with a copy of the internal INBT object.
    • getInternal

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

      public boolean contains(IData data)
      Description copied from interface: IData
      Checks if this IData contains another IData, mainly used in subclasses of ICollectionData, is the same as an equals check on other IData types
      Specified by:
      contains in interface IData
      Parameters:
      data - data to check if it is contained
      Returns:
      true if the given IData is contained in this 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.
    • accept

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

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

      public int hashCode()
      Overrides:
      hashCode in class Object