IntArrayData
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.data.IntArrayData;
Description
Implements
IntArrayData
implements the following interfaces:
Constructors
// new IntArrayData(internal as int[]);new IntArrayData(myInt[]);
Parameters:
internal: int[]
Type: int[]
Operators
Members
Returns: this data as a bool
// IntArrayData.asBool() as bool;myIntArrayData.asBool();
Return Type:
bool
// IntArrayData as boolmyIntArrayData as bool
Return Type:
bool
Returns: this data as a byte
// IntArrayData.asByte() as byte;myIntArrayData.asByte();
Return Type:
byte
// IntArrayData as bytemyIntArrayData as byte
Return Type:
byte
Returns: this data as a double
// IntArrayData.asDouble() as double;myIntArrayData.asDouble();
Return Type:
double
// IntArrayData as doublemyIntArrayData as double
Return Type:
double
Returns: this data as a float
// IntArrayData.asFloat() as float;myIntArrayData.asFloat();
Return Type:
float
// IntArrayData as floatmyIntArrayData as float
Return Type:
float
Returns: this data as an int
// IntArrayData.asInt() as int;myIntArrayData.asInt();
Return Type:
int
// IntArrayData as intmyIntArrayData as int
Return Type:
int
Returns: this data as a long
// IntArrayData.asLong() as long;myIntArrayData.asLong();
Return Type:
long
// IntArrayData as longmyIntArrayData as long
Return Type:
long
Returns: this data as a short
// IntArrayData.asShort() as short;myIntArrayData.asShort();
Return Type:
short
// IntArrayData as shortmyIntArrayData as short
Return Type:
short
E.G println(("hello" as IData).asString())
prints "hello"
Returns: The escaped string version of this IData.
// IntArrayData.asString() as string;myIntArrayData.asString();
Return Type:
string
E.G println(("hello" as IData).getAsString())
prints hello
Returns: The literal string version of this IData.
// IntArrayData.getAsString() as string;myIntArrayData.getAsString();
Return Type:
string
E.G println(("hello" as IData).getAsString())
prints hello
// IntArrayData as stringmyIntArrayData as string
Return Type:
string
Returns: the intenral ID of this data.
// IntArrayData.getId() as byte;myIntArrayData.getId();
Return Type:
byte
// IntArrayData.isEmpty as boolmyIntArrayData.isEmpty
Return Type:
bool
Returns: True if empty.
// IntArrayData.isEmpty() as bool;myIntArrayData.isEmpty();
Return Type:
bool
// IntArrayData.keys as Set<string>myIntArrayData.keys
Return Type:
Set<string>
Returns: The keys of this IData.
// IntArrayData.keys() as Set<string>;myIntArrayData.keys();
Return Type:
Set<string>
This attempts to give the most accurate type for the given members, for example, if all the members are bytes, then it returns a ByteArrayData.
However if the types are mixed or do not have a *ArrayData version, then a ListData is returned.
Returns: A list of the given members.
Return Type:
IData
Returns: A new IData from the operation
myIntArrayData.map((data) => 3);
Parameters:
Return Type:
IData
// IntArrayData.remove(key as string);myIntArrayData.remove("key");
Parameters:
key: string
Type: string
- The key to remove.