Class BoolData

java.lang.Object
com.blamejared.crafttweaker.api.data.BoolData
All Implemented Interfaces:
IData

@ZenRegister public class BoolData extends Object implements IData
Careful with BoolData: While it works for specifying boolean attributes in JSON syntax, using it in Tags will instead use a ByteData object. Reason for this is that Minecraft does not have Boolean NBT values.
DocParam:
this true
  • Constructor Details

    • BoolData

      public BoolData(boolean internal)
  • Method Details

    • getByteData

      public ByteData getByteData()
      Converts this BoolData to a ByteData object. This will be used when this Data is converted to NBT
    • copy

      public BoolData 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

      public BoolData 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

      public net.minecraft.nbt.Tag 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.
    • getInternalValue

      public boolean getInternalValue()
    • asNumber

      public INumberData asNumber()
      Specified by:
      asNumber 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.
    • 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