Class IntArrayData
java.lang.Object
com.blamejared.crafttweaker.api.data.IntArrayData
- All Implemented Interfaces:
IData,Comparable<IData>,Iterable<IData>
- DocParam:
- this ([4, 128, 256, 1024] as IData)
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.blamejared.crafttweaker.api.data.IData
IData.Type -
Constructor Summary
ConstructorsConstructorDescriptionIntArrayData(int[] internal) IntArrayData(net.minecraft.nbt.IntArrayTag internal) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(DataVisitor<T> visitor) byte[]Casts this IData to a byte array.int[]Casts this IData to an int array.asList()Casts this IData to a list.long[]Casts this IData to a long array.intCompares this IData to the other IDatabooleanChecks if this IData contains the other IDatacopy()booleanbooleanChecks if this IData is equal to the other IData.getAt(int index) Gets the data at the given index.net.minecraft.nbt.IntArrayTagGets the internal Tag stored in this IData.getType()Gets the type of this IData.inthashCode()booleanChecks if this data supports being cast to a list.iterator()intlength()Gets the length of this IData.voidPuts the given value inside this IData at the given index.voidremove(int index) Removes the stored data at the given index.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.blamejared.crafttweaker.api.data.IData
add, and, asBool, asByte, asDouble, asFloat, asInt, asLong, asMap, asShort, asString, cat, containsList, div, getAsString, getAt, getId, getKeys, isEmpty, isMappable, map, merge, mod, mul, neg, not, or, remove, setAt, shl, shr, sub, xorMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
IntArrayData
public IntArrayData(net.minecraft.nbt.IntArrayTag internal) -
IntArrayData
public IntArrayData(int[] internal)
-
-
Method Details
-
put
Description copied from interface:IDataPuts the given value inside this IData at the given index. -
getAt
Description copied from interface:IDataGets the data at the given index. -
remove
public void remove(int index) Description copied from interface:IDataRemoves the stored data at the given index. -
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. -
asList
Description copied from interface:IDataCasts this IData to a list. -
isListable
public boolean isListable()Description copied from interface:IDataChecks if this data supports being cast to a list.- Specified by:
isListablein interfaceIData- Returns:
- True if it can be cast to a list, false otherwise.
-
asByteArray
public byte[] asByteArray()Description copied from interface:IDataCasts this IData to a byte array.- Specified by:
asByteArrayin interfaceIData- Returns:
- this data as a byte array
-
asIntArray
public int[] asIntArray()Description copied from interface:IDataCasts this IData to an int array.- Specified by:
asIntArrayin interfaceIData- Returns:
- this data as an int array
-
asLongArray
public long[] asLongArray()Description copied from interface:IDataCasts this IData to a long array.- Specified by:
asLongArrayin interfaceIData- Returns:
- this data as a long array
-
length
public int length()Description copied from interface:IDataGets the length of this IData. -
iterator
-
getInternal
public net.minecraft.nbt.IntArrayTag 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.
-
copy
-
copyInternal
- Specified by:
copyInternalin interfaceIData
-
accept
-
getType
Description copied from interface:IDataGets the type of this IData. -
equals
-
hashCode
public int hashCode() -
toString
-