Class BoolData
java.lang.Object
com.blamejared.crafttweaker.api.data.BoolData
- All Implemented Interfaces:
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
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.blamejared.crafttweaker.api.data.base.IData
IData.Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(DataVisitor<T> visitor) asNumber()copy()Makes a copy of this IData.Makes a copy of this IData with a copy of the internal INBT object.booleanConverts this BoolData to aByteDataobject.net.minecraft.nbt.TagGets the internal INBT stored in this IData.booleangetType()Gets the type of this IData.inthashCode()
-
Constructor Details
-
BoolData
public BoolData(boolean internal)
-
-
Method Details
-
getByteData
Converts this BoolData to aByteDataobject. This will be used when this Data is converted to NBT -
copy
Description copied from interface:IDataMakes a copy of this IData. IData is immutable by default, use this to create a proper copy of the object. -
copyInternal
Description copied from interface:IDataMakes a copy of this IData with a copy of the internal INBT object.- Specified by:
copyInternalin interfaceIData- 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:IDataGets the internal INBT stored in this IData.- Specified by:
getInternalin interfaceIData- Returns:
- the vanilla INBT tag that this IData represents.
-
getInternalValue
public boolean getInternalValue() -
asNumber
-
getType
Description copied from interface:IDataGets the type of this IData. -
accept
-
equals
-
hashCode
public int hashCode()
-