MCItemEntity
Link to mcitementity
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 Copyimport crafttweaker.api.entity.MCItemEntity;
Extending MCEntity
Link to extending-mcentity
MCItemEntity extends MCEntity. That means all methods available in MCEntity are also available in MCItemEntity
Constructors
Link to constructors
ZenScript Copynew MCItemEntity(world as MCWorld, x as double, y as double, z as double, stack as ItemStack) as MCItemEntity
Parametro | Tipo | Descrizione |
---|---|---|
Parametro world | Tipo MCWorld | Descrizione Nessuna descrizione fornita |
Parametro x | Tipo double | Descrizione Nessuna descrizione fornita |
Parametro y | Tipo double | Descrizione Nessuna descrizione fornita |
Parametro z | Tipo double | Descrizione Nessuna descrizione fornita |
Parametro stack | Tipo ItemStack | Descrizione Nessuna descrizione fornita |
Metodi
Link to metodi
Name: getItem
Gets the IItemStack inside this ItemEntity.
Returns: The IItemStack inside this ItemEntity.
Return Type: IItemStack
ZenScript Copy// MCItemEntity.getItem() as IItemStack
itemEntity.getItem();
Name: setItem
Sets the IItemStack inside this ItemEntity.
Return Type: void
ZenScript Copy// MCItemEntity.setItem(stack as IItemStack) as void
itemEntity.setItem(<item:minecraft:diamond>);
Parametro | Tipo | Descrizione |
---|---|---|
Parametro stack | Tipo IItemStack | Descrizione The new IItemStack. |
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter | Descrizione |
---|---|---|---|---|
Nome item | Tipo IItemStack | Ha Getter sì | Ha Setter sì | Descrizione Gets the IItemStack inside this ItemEntity. |