ShortData

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

import crafttweaker.api.data.ShortData;

Implemented Interfaces

ShortData implements the following interfaces. That means all methods defined in these interfaces are also available in ShortData

Constructors

No Description Provided

new ShortData(internal as short) as ShortData
ParameterTypeDescription
internalshortNo Description Provided

Casters

Result typeIs Implicit
bytefalse
doublefalse
floatfalse
ICollectionDatafalse
intfalse
INumberDatafalse
longfalse
shortfalse

Methods

asCollection

Return Type: ICollectionData

ShortData.asCollection() as ICollectionData
1058.asCollection();

asList

Gets a List representation of this IData, returns null on anything but ListData.

Return Type: stdlib.List<IData>

ShortData.asList() as stdlib.List<IData>
1058.asList();

asMap

Gets a Map<String, IData> representation of this IData, returns null on anything but MapData.

Return Type: IData[string]

ShortData.asMap() as IData[string]
1058.asMap();

asNumber

Return Type: INumberData

ShortData.asNumber() as INumberData
1058.asNumber();

getByte

Gets the value of this IData as a byte

Return Type: byte

ShortData.getByte() as byte
1058.getByte();

getDouble

Gets the value of this IData as a double

Return Type: double

ShortData.getDouble() as double
1058.getDouble();

getFloat

Gets the value of this IData as a float

Return Type: float

ShortData.getFloat() as float
1058.getFloat();

getId

Gets the ID of the internal NBT tag.

Used to determine what NBT type is stored (in a list for example)

Return Type: byte

ShortData.getId() as byte
1058.getId();

getInt

Gets the value of this IData as an int

Return Type: int

ShortData.getInt() as int
1058.getInt();

getLong

Gets the value of this IData as a long

Return Type: long

ShortData.getLong() as long
1058.getLong();

getShort

Gets the value of this IData as a short

Return Type: short

ShortData.getShort() as short
1058.getShort();

getString

Gets the String representation of the internal INBT tag

Return Type: string

ShortData.getString() as string
1058.getString();