LongArrayData
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.LongArrayData;
Description
Implements
LongArrayData
implements the following interfaces:
Constructors
// new LongArrayData(internal as long[]);new LongArrayData(myLong[]);
Parameters:
internal: long[]
Type: long[]
Operators
Members
Returns: this data as a bool
// LongArrayData.asBool() as bool;([100000, 800000, 50000] as IData).asBool();
Return Type:
bool
// LongArrayData as bool([100000, 800000, 50000] as IData) as bool
Return Type:
bool
Returns: this data as a byte
// LongArrayData.asByte() as byte;([100000, 800000, 50000] as IData).asByte();
Return Type:
byte
// LongArrayData as byte([100000, 800000, 50000] as IData) as byte
Return Type:
byte
Returns: this data as a double
// LongArrayData.asDouble() as double;([100000, 800000, 50000] as IData).asDouble();
Return Type:
double
// LongArrayData as double([100000, 800000, 50000] as IData) as double
Return Type:
double
Returns: this data as a float
// LongArrayData.asFloat() as float;([100000, 800000, 50000] as IData).asFloat();
Return Type:
float
// LongArrayData as float([100000, 800000, 50000] as IData) as float
Return Type:
float
Returns: this data as an int
// LongArrayData.asInt() as int;([100000, 800000, 50000] as IData).asInt();
Return Type:
int
// LongArrayData as int([100000, 800000, 50000] as IData) as int
Return Type:
int
Returns: this data as a long
// LongArrayData.asLong() as long;([100000, 800000, 50000] as IData).asLong();
Return Type:
long
// LongArrayData as long([100000, 800000, 50000] as IData) as long
Return Type:
long
Returns: this data as a short
// LongArrayData.asShort() as short;([100000, 800000, 50000] as IData).asShort();
Return Type:
short
// LongArrayData as short([100000, 800000, 50000] as IData) as short
Return Type:
short
E.G println(("hello" as IData).asString())
prints "hello"
Returns: The escaped string version of this IData.
// LongArrayData.asString() as string;([100000, 800000, 50000] as IData).asString();
Return Type:
string
E.G println(("hello" as IData).getAsString())
prints hello
Returns: The literal string version of this IData.
// LongArrayData.getAsString() as string;([100000, 800000, 50000] as IData).getAsString();
Return Type:
string
E.G println(("hello" as IData).getAsString())
prints hello
// LongArrayData as string([100000, 800000, 50000] as IData) as string
Return Type:
string
Returns: the intenral ID of this data.
// LongArrayData.getId() as byte;([100000, 800000, 50000] as IData).getId();
Return Type:
byte
// LongArrayData.isEmpty as bool([100000, 800000, 50000] as IData).isEmpty
Return Type:
bool
Returns: True if empty.
// LongArrayData.isEmpty() as bool;([100000, 800000, 50000] as IData).isEmpty();
Return Type:
bool
// LongArrayData.keys as Set<string>([100000, 800000, 50000] as IData).keys
Return Type:
Set<string>
Returns: The keys of this IData.
// LongArrayData.keys() as Set<string>;([100000, 800000, 50000] as IData).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
([100000, 800000, 50000] as IData).map((data) => 3);
Parameters:
Return Type:
IData
// LongArrayData.remove(key as string);([100000, 800000, 50000] as IData).remove("key");
Parameters:
key: string
Type: string
- The key to remove.