Class ByteArrayData
java.lang.Object
com.blamejared.crafttweaker.api.data.ByteArrayData
- All Implemented Interfaces:
ICollectionData,IData
- DocParam:
- this [4, 1, 2]
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.blamejared.crafttweaker.api.data.base.IData
IData.Type -
Constructor Summary
ConstructorsConstructorDescriptionByteArrayData(byte[] internal) ByteArrayData(net.minecraft.nbt.ByteArrayTag internal) -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(DataVisitor<T> visitor) voidvoidasList()Gets a Listrepresentation of this IData, returns null on anything but ListData.voidclear()Removes every element in the listcopy()Makes a copy of this IData.Makes a copy of this IData with a copy of the internal INBT object.booleangetAt(int index) Retrieves theIDatastored at the given index.net.minecraft.nbt.ByteArrayTagGets the internal INBT stored in this IData.getType()Gets the type of this IData.inthashCode()booleanisEmpty()remove(int index) Removes theIDatastored at the given index.Sets the item at the provided index to the given valueintsize()
-
Constructor Details
-
ByteArrayData
public ByteArrayData(net.minecraft.nbt.ByteArrayTag internal) -
ByteArrayData
public ByteArrayData(byte[] internal)
-
-
Method Details
-
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.- Specified by:
copyin interfaceICollectionData- Specified by:
copyin interfaceIData- Returns:
- a copy of this IData.
-
copyInternal
Description copied from interface:IDataMakes a copy of this IData with a copy of the internal INBT object.- Specified by:
copyInternalin interfaceICollectionData- Specified by:
copyInternalin interfaceIData- Returns:
- a copy of this IData with a copy of the internal INBT object.
-
getInternal
public net.minecraft.nbt.ByteArrayTag 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.
-
setAt
Description copied from interface:ICollectionDataSets the item at the provided index to the given value- Specified by:
setAtin interfaceICollectionData- Parameters:
index- The index to set (0-based)value- The new Value- Returns:
- The replaced value
-
add
- Specified by:
addin interfaceICollectionData- Parameters:
index- The index to add to. Subsequent items will be moved one index highervalue- The value to add to the list
-
add
- Specified by:
addin interfaceICollectionData- Parameters:
value- The value to add to the list
-
remove
Description copied from interface:ICollectionDataRemoves theIDatastored at the given index.- Specified by:
removein interfaceICollectionData- Parameters:
index- The index (0-based)- Returns:
- The
IDatathat was removed
-
getAt
Description copied from interface:ICollectionDataRetrieves theIDatastored at the given index.- Specified by:
getAtin interfaceICollectionData- Parameters:
index- The index (0-based)- Returns:
- The
IData
-
size
public int size()- Specified by:
sizein interfaceICollectionData
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceICollectionData
-
clear
public void clear()Description copied from interface:ICollectionDataRemoves every element in the list- Specified by:
clearin interfaceICollectionData
-
getType
Description copied from interface:IDataGets the type of this IData. -
accept
-
asList
Description copied from interface:IDataGets a Listrepresentation of this IData, returns null on anything but ListData. -
equals
-
hashCode
public int hashCode()
-