LivingDropsEvent
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
Extends
LivingDropsEvent extends LivingEvent
.
Implements
LivingDropsEvent
implements the following interfaces:
Listening to the event
This event can be listened to like so:
Members
addDrop(stack as IItemStack)
Adds an item to the drops.
Parameters:
stack: IItemStack
Type: IItemStack
cancel()
Cancels the event. Same as
setCanceled(true)
Getter
Return Type:
bool
Setter
Parameters:
cancel: bool
Type: bool
canceled() as bool
Return Type:
bool
canceled(cancel as bool)
Parameters:
cancel: bool
Type: bool
Getter
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.
Return Type:
List<IItemStack>
Setter
Sets which items will be dropped.
Parameters:
drops: List<IItemStack>
Type: List<IItemStack>
Getter
Return Type:
LivingEntity
Getter
Return Type:
Entity
Getter
Whether the Entity doing the drop has recently been damaged.
Return Type:
bool
removeDrop(ingredient as IIngredient)
Removes items that match the given ingredient from drops.
Parameters:
ingredient: IIngredient
Type: IIngredient
Getter
Return Type:
DamageSource