ItemStack
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.item.ItemStack;Description
This is the vanilla ItemStack. It is recommended that you useIItemStack whenever possible
They can be cast from each other, though.
Extends
ItemStack extends AttachmentHolder.
Implements
ItemStack
implements the following interfaces:
Undocumented Interfaces
IItemStackExtension
Members
asIIngredient() as IIngredient
implicit as IIngredient
// ItemStack as IIngredientmyItemStack as IIngredient
Return Type:
IIngredient
asIItemStack() as IItemStack
implicit as IItemStack
// ItemStack as IItemStackmyItemStack as IItemStack
Return Type:
IItemStack
getAttachmentData(type as AttachmentType<T>) as T
myItemStack.getAttachmentData<T>(myAttachmentType);Parameters:
type: AttachmentType<T> Type: AttachmentType<T>
Return Type:
T
getAttachmentData(type as Supplier<AttachmentType<T>>) as T
myItemStack.getAttachmentData<T>(mySupplier);Parameters:
type: Supplier<AttachmentType<T>> Type: Supplier<AttachmentType<T>>
Return Type:
T
hasAttachmentData(type as AttachmentType<T>) as bool
myItemStack.hasAttachmentData<T>(myAttachmentType);Parameters:
type: AttachmentType<T> Type: AttachmentType<T>
Return Type:
bool
hasAttachmentData(type as Supplier<AttachmentType<T>>) as bool
myItemStack.hasAttachmentData<T>(mySupplier);Parameters:
type: Supplier<AttachmentType<T>> Type: Supplier<AttachmentType<T>>
Return Type:
bool
setAttachmentData(type as AttachmentType<T>, data as T) as T?
myItemStack.setAttachmentData<T>(myAttachmentType, myT);Parameters:
type: AttachmentType<T> Type: AttachmentType<T> data: T Type: T
Return Type:
T?
setAttachmentData(type as Supplier<AttachmentType<T>>, data as T) as T?
myItemStack.setAttachmentData<T>(mySupplier, myT);Parameters:
type: Supplier<AttachmentType<T>> Type: Supplier<AttachmentType<T>> data: T Type: T
Return Type:
T?