MCItemDefinition
Link to mcitemdefinition
Diese Klasse importieren
Link to diese-klasse-importieren
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.
ZenScript Copyimport crafttweaker.api.item.MCItemDefinition;
Casters
Link to casters
Result type | Is Implicit |
---|---|
Result type IItemStack | Is Implicit true |
Methoden
Link to methoden
Name: getDefaultInstance
Return Type: IItemStack
ZenScript Copy// MCItemDefinition.getDefaultInstance() as IItemStack
myMCItemDefinition.getDefaultInstance();
Name: getTags
Gets the tags that contain this item.
Returns: a list of tags that contain this item.
Return Type: stdlib.List<MCTag<MCItemDefinition>>
ZenScript Copy// MCItemDefinition.getTags() as stdlib.List<MCTag<MCItemDefinition>>
myMCItemDefinition.getTags();
Name: isIn
Checks if this item is in the given tag.
Returns: True if the tag contains this item.
Return Type: boolean
ZenScript Copy// MCItemDefinition.isIn(tag as MCTag<MCItemDefinition>) as boolean
myMCItemDefinition.isIn(<tag:items:minecraft:wool>);
Parameter | Type | Beschreibung |
---|---|---|
Parameter tag | Type MCTag<MCItemDefinition> | Beschreibung The tag to check against. |
Properties
Link to properties
Name | Type | Has Getter | Has Setter | Beschreibung |
---|---|---|---|---|
Name commandString | Type string | Has Getter true | Has Setter false | Beschreibung No Description Provided |
Name defaultInstance | Type IItemStack | Has Getter true | Has Setter false | Beschreibung No Description Provided |