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 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
使用方式
Link to 使用方式
Name: addDrop
Adds an item to the drops.
Return Type: void
ZenScript CopyMCLivingDropsEvent.addDrop(stack as IItemStack) as void
参数 | 类型 | 描述 |
---|---|---|
参数 堆叠 | 类型 IItemstack | 描述 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
参数 | 类型 | 描述 |
---|---|---|
参数 ingredient | 类型 材料(IIngredient) | 描述 No Description Provided |
名称 | 类型 | 可获得 | 可设置 | 描述 |
---|---|---|---|---|
名称 drops | 类型 stdlib.List<IItemStack> | 可获得 true | 可设置 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 | 可获得 true | 可设置 false | 描述 No Description Provided |
名称 recentlyHit | 类型 布尔值 | 可获得 true | 可设置 false | 描述 Whether the Entity doing the drop has recently been damaged. |
名称 来源 | 类型 DamageSource | 可获得 true | 可设置 false | 描述 No Description Provided |