Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

BlockItem

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.type.block.BlockItem;

Extends

BlockItem extends ItemDefinition.

Implements

BlockItem implements the following interfaces:

ItemLike

Undocumented Interfaces

FeatureElement,IItemExtension

Members

asItem() as Item
script.zs
// BlockItem.asItem() as Item;
myBlockItem.asItem();

Return Type: ItemDefinition

as Item
script.zs
// BlockItem as Item
myBlockItem as Item

Return Type: ItemDefinition

Getter
script.zs
// BlockItem.block as Block
myBlockItem.block

Return Type: Block

block() as Block
script.zs
// BlockItem.block() as Block;
myBlockItem.block();

Return Type: Block

as Block
script.zs
// BlockItem as Block
myBlockItem as Block

Return Type: Block

Getter
script.zs
// BlockItem.commandString as string
myBlockItem.commandString

Return Type: string

commandString() as string
script.zs
// BlockItem.commandString() as string;
myBlockItem.commandString();

Return Type: string

Getter
script.zs
// BlockItem.defaultInstance as IItemStack
myBlockItem.defaultInstance

Return Type: IItemStack

defaultInstance() as IItemStack
script.zs
// BlockItem.defaultInstance() as IItemStack;
myBlockItem.defaultInstance();

Return Type: IItemStack

implicit as IItemStack
script.zs
// BlockItem as IItemStack
myBlockItem as IItemStack

Return Type: IItemStack

Getter
script.zs
// BlockItem.registryName as ResourceLocation
myBlockItem.registryName

Return Type: ResourceLocation

registryName() as ResourceLocation
script.zs
// BlockItem.registryName() as ResourceLocation;
myBlockItem.registryName();

Return Type: ResourceLocation