MCItemDefinition

Link to mcitemdefinition

Importare la Classe

Link to importare-la-classe

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
Copy
import crafttweaker.api.item.MCItemDefinition;
Tipo RisultatoImplicito
Tipo Risultato
IItemStack
Implicito

Link to getDefaultInstance

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>);
ParametroTipoDescrizione
Parametro
tag
Tipo
MCTag<MCItemDefinition>
Descrizione
The tag to check against.
NomeTipoHa GetterHa SetterDescrizione
Nome
commandString
Tipo
string
Ha Getter
Ha Setter
no
Descrizione
No Description Provided
Nome
defaultInstance
Tipo
IItemStack
Ha Getter
Ha Setter
no
Descrizione
No Description Provided