MCLivingDropsEvent
Link to mclivingdropsevent
The event is cancelable.
If the event is canceled, the entity does not drop anything.
The event does not have a result.
Importing the class
Link to 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.
ZenScript Copyimport crafttweaker.api.event.entity.living.MCLivingDropsEvent;
Extending MCLivingEvent
Link to extending-mclivingevent
MCLivingDropsEvent extends MCLivingEvent. That means all methods available in MCLivingEvent are also available in MCLivingDropsEvent
Methods
Link to methods
Name: addDrop
Adds an item to the drops.
Return Type: void
ZenScript CopyMCLivingDropsEvent.addDrop(stack as IItemStack) as void
Parameter | Type | Description |
---|---|---|
Parameter stack | Type IItemStack | Description No Description Provided |
Name: removeDrop
Removes items that match the given ingredient from drops.
Return Type: void
ZenScript CopyMCLivingDropsEvent.removeDrop(ingredient as IIngredient) as void
Parameter | Type | Description |
---|---|---|
Parameter ingredient | Type IIngredient | Description No Description Provided |
Properties
Link to properties
이름 | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
이름 drops | Type stdlib.List<IItemStack> | Has Getter true | Has Setter true | Description Returns the list of items will be dropped. The list is read-only, modifying this list does not change the drops. You should use the drops setter, addDrop or removeDrop method to change the drops. |
이름 lootingLevel | Type int | Has Getter true | Has Setter false | Description No Description Provided |
이름 recentlyHit | Type boolean | Has Getter true | Has Setter false | Description Whether the Entity doing the drop has recently been damaged. |
이름 source | Type DamageSource | Has Getter true | Has Setter false | Description No Description Provided |