LivingDropsEvent
Link to livingdropsevent
The event is not cancelable.
The event does not have a result.
Importing the class
Link to importing-the-class
Importing the class is recommended for events, simply add this line to the top of your script file.
ZenScript Copyimport crafttweaker.neoforge.api.event.entity.living.LivingDropsEvent;
Listening to the event
Link to listening-to-the-event
ZenScript Copyevents.register<crafttweaker.neoforge.api.event.entity.living.LivingDropsEvent>(event => {
println("LivingDropsEvent ran!");
});
Supertype
Link to supertype
LivingDropsEvent extends LivingEvent. That means all methods available in LivingEvent are also available in LivingDropsEvent
Implemented Interfaces
Link to implemented-interfaces
LivingDropsEvent implements the following interfaces. That means all methods defined in these interfaces are also available in LivingDropsEvent
Methods
Link to methods
Name: addDrop
Adds an item to the drops.
ZenScript CopyLivingDropsEvent.addDrop(stack as IItemStack)
Parameter | Type |
---|---|
Parameter stack | Type IItemStack |
Name: removeDrop
Removes items that match the given ingredient from drops.
ZenScript CopyLivingDropsEvent.removeDrop(ingredient as IIngredient)
Parameter | Type |
---|---|
Parameter ingredient | Type IIngredient |
Properties
Link to properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name 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. |
Name isRecentlyHit | Type boolean | Has Getter true | Has Setter false | Description Whether the Entity doing the drop has recently been damaged. |
Name source | Type DamageSource | Has Getter true | Has Setter false | Description |