Class BoolData
java.lang.Object
com.blamejared.crafttweaker.api.data.BoolData
- All Implemented Interfaces:
IData,Comparable<IData>,Iterable<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 as IData)
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.blamejared.crafttweaker.api.data.IData
IData.Type -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(DataVisitor<T> visitor) Applies a bitwise AND (&) operation to this IData and the other IDatabooleanasBool()Casts this IData to a boolean.byteasByte()Casts this IData to a byte.doubleasDouble()Casts this IData to a double.floatasFloat()Casts this IData to a float.intasInt()Casts this IData to an int.longasLong()Casts this IData to a long.shortasShort()Casts this IData to a short.intCompares this IData to the other IDatabooleanChecks if this IData contains the other IDatacopy()booleanbooleanChecks if this IData is equal to the other IData.net.minecraft.nbt.ByteTagGets the internal Tag stored in this IData.getType()Gets the type of this IData.inthashCode()not()Applies a NOT (!) operation to this IData.Applies a bitwise OR (|) operation to this IData and the other IDatatoString()Applies a bitwise XOR (^) operation to this IData and the other IDataMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.blamejared.crafttweaker.api.data.IData
add, asByteArray, asIntArray, asList, asLongArray, asMap, asString, cat, containsList, div, getAsString, getAt, getAt, getId, getKeys, isEmpty, isListable, isMappable, iterator, length, map, merge, mod, mul, neg, put, remove, remove, setAt, shl, shr, subMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
TRUE
-
FALSE
-
-
Constructor Details
-
BoolData
public BoolData(boolean internalValue)
-
-
Method Details
-
getByteData
-
getInternal
public net.minecraft.nbt.ByteTag getInternal()Description copied from interface:IDataGets the internal Tag stored in this IData.- Specified by:
getInternalin interfaceIData- Returns:
- the vanilla Tag that this IData represents.
-
or
Description copied from interface:IDataApplies a bitwise OR (|) operation to this IData and the other IData -
and
Description copied from interface:IDataApplies a bitwise AND (&) operation to this IData and the other IData -
xor
Description copied from interface:IDataApplies a bitwise XOR (^) operation to this IData and the other IData -
not
Description copied from interface:IDataApplies a NOT (!) operation to this IData. -
contains
Description copied from interface:IDataChecks if this IData contains the other IDataFor 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
-
compareTo
Description copied from interface:IDataCompares this IData to the other IData- Specified by:
compareToin interfaceComparable<IData>- Specified by:
compareToin interfaceIData- Parameters:
other- the data to be compared.- Returns:
- The comparison result.
-
equalTo
Description copied from interface:IDataChecks if this IData is equal to the other IData. -
asByte
public byte asByte()Description copied from interface:IDataCasts this IData to a byte. -
asShort
public short asShort()Description copied from interface:IDataCasts this IData to a short. -
asInt
public int asInt()Description copied from interface:IDataCasts this IData to an int. -
asLong
public long asLong()Description copied from interface:IDataCasts this IData to a long. -
asFloat
public float asFloat()Description copied from interface:IDataCasts this IData to a float. -
asDouble
public double asDouble()Description copied from interface:IDataCasts this IData to a double. -
asBool
public boolean asBool()Description copied from interface:IDataCasts this IData to a boolean. -
copy
-
copyInternal
- Specified by:
copyInternalin interfaceIData
-
accept
-
getType
Description copied from interface:IDataGets the type of this IData. -
equals
-
hashCode
public int hashCode() -
toString
-