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.

Импорт класса

Link to импорт-класса

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
Copy
import 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

Name: addDrop

Adds an item to the drops.

Return Type: void

ZenScript
Copy
MCLivingDropsEvent.addDrop(stack as IItemStack) as void
ПараметрТипОписание
Параметр
stack
Тип
IItemStack
Описание
No Description Provided

Name: removeDrop

Removes items that match the given ingredient from drops.

Return Type: void

ZenScript
Copy
MCLivingDropsEvent.removeDrop(ingredient as IIngredient) as void
ПараметрТипОписание
Параметр
ingredient
Тип
IIngredient
Описание
No Description Provided

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
drops
Тип
stdlib.List<IItemStack>
Имеет Getter
true
Имеет Setter
true
Описание
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
Тип
int
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided
Название
recentlyHit
Тип
boolean
Имеет Getter
true
Имеет Setter
false
Описание
Whether the Entity doing the drop has recently been damaged.
Название
источник
Тип
DamageSource
Имеет Getter
true
Имеет Setter
false
Описание
No Description Provided