MCItemDefinition
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.item.MCItemDefinition;Casters
| Result type | Is Implicit | 
|---|---|
| Result typeIItemStack | Is Implicittrue | 
Methods
Return Type: IItemStack
// MCItemDefinition.getDefaultInstance() as IItemStack
myMCItemDefinition.getDefaultInstance();Gets the tags that contain this item.
Returns: a list of tags that contain this item.
Return Type: stdlib.List<MCTag<MCItemDefinition>>
// MCItemDefinition.getTags() as stdlib.List<MCTag<MCItemDefinition>>
myMCItemDefinition.getTags();Checks if this item is in the given tag.
Returns: True if the tag contains this item.
Return Type: boolean
// MCItemDefinition.isIn(tag as MCTag<MCItemDefinition>) as boolean
myMCItemDefinition.isIn(<tag:items:minecraft:wool>);| Parameter | Type | Description | 
|---|---|---|
| Parametertag | TypeMCTag<MCItemDefinition> | DescriptionThe tag to check against. | 
Properties
| Name | Type | Has Getter | Has Setter | Description | 
|---|---|---|---|---|
| NamecommandString | Typestring | Has Gettertrue | Has Setterfalse | DescriptionNo Description Provided | 
| NamedefaultInstance | TypeIItemStack | Has Gettertrue | Has Setterfalse | DescriptionNo Description Provided |