ItemEntity
Link to itementity
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.entity.type.item.ItemEntity;
Extending Entity
Link to extending-entity
ItemEntity extends Entity. That means all methods available in Entity are also available in ItemEntity
Constructors
Link to constructors
ZenScript Copynew ItemEntity(level as invalid, x as double, y as double, z as double, stack as ItemStack) as ItemEntity
Parameter | Type | Beschreibung |
---|---|---|
Parameter level | Type invalid | Beschreibung No description provided |
Parameter x | Type double | Beschreibung No description provided |
Parameter y | Type double | Beschreibung No description provided |
Parameter z | Type double | Beschreibung No description provided |
Parameter stack | Type Artikel-Stack | Beschreibung No description provided |
Methoden
Link to methoden
Name: getItem
Gets the IItemStack inside this ItemEntity.
Returns: The IItemStack inside this ItemEntity.
Return Type: IItemStack
ZenScript Copy// ItemEntity.getItem() as IItemStack
myItemEntity.getItem();
Name: hasPickUpDelay
Return Type: boolean
ZenScript Copy// ItemEntity.hasPickUpDelay() as boolean
myItemEntity.hasPickUpDelay();
Name: setDefaultPickUpDelay
Return Type: void
ZenScript Copy// ItemEntity.setDefaultPickUpDelay() as void
myItemEntity.setDefaultPickUpDelay();
Name: setItem
Sets the IItemStack inside this ItemEntity.
Return Type: void
ZenScript Copy// ItemEntity.setItem(stack as IItemStack) as void
myItemEntity.setItem(<item:minecraft:diamond>);
Parameter | Type | Beschreibung |
---|---|---|
Parameter stack | Type IItemStack | Beschreibung The new IItemStack. |
Name: setNeverPickUp
Return Type: void
ZenScript Copy// ItemEntity.setNeverPickUp() as void
myItemEntity.setNeverPickUp();
Name: setNoPickUpDelay
Return Type: void
ZenScript Copy// ItemEntity.setNoPickUpDelay() as void
myItemEntity.setNoPickUpDelay();
Name: setPickUpDelay
Return Type: void
ZenScript CopyItemEntity.setPickUpDelay(ticks as int) as void
Parameter | Type | Beschreibung |
---|---|---|
Parameter ticks | Type int | Beschreibung No Description Provided |
Properties
Link to properties
Name | Type | Has Getter | Has Setter | Beschreibung |
---|---|---|---|---|
Name hasPickupDelay | Type boolean | Has Getter true | Has Setter false | Beschreibung No Description Provided |
Name item | Type IItemStack | Has Getter true | Has Setter true | Beschreibung Gets the IItemStack inside this ItemEntity. |