HomeCommandsExamplesGetting Started With ScriptsGlobal Keywords
BracketDumpersBracketHandlersBracketValidatorsResourceLocationBracketHandler

ItemDefinition

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.

script.zs
import crafttweaker.api.item.ItemDefinition;

Implements

ItemDefinition implements the following interfaces:

ItemLike

Undocumented Interfaces

FeatureElement,IItemExtension

Members

asItem() as Item
script.zs
// Item.asItem() as ItemDefinition;
myItem.asItem();

Return Type: ItemDefinition

as Item
script.zs
// Item as ItemDefinition
myItem as Item

Return Type: ItemDefinition

Getter
script.zs
// Item.commandString as string
myItem.commandString

Return Type: string

commandString() as string
script.zs
// Item.commandString() as string;
myItem.commandString();

Return Type: string

Getter
script.zs
// Item.defaultInstance as IItemStack
myItem.defaultInstance

Return Type: IItemStack

defaultInstance() as IItemStack
script.zs
// Item.defaultInstance() as IItemStack;
myItem.defaultInstance();

Return Type: IItemStack

implicit as IItemStack
script.zs
// Item as IItemStack
myItem as IItemStack

Return Type: IItemStack

Getter
script.zs
// Item.registryName as ResourceLocation
myItem.registryName

Return Type: ResourceLocation

registryName() as ResourceLocation
script.zs
// Item.registryName() as ResourceLocation;
myItem.registryName();

Return Type: ResourceLocation