public class LivingDropsEvent extends LivingEvent
EntityLivingBase#onDeath(DamageSource).ForgeHooks#onLivingDrops(EntityLivingBase, DamageSource, ArrayList, int, boolean).source contains the DamageSource that caused the drop to occur.drops contains the ArrayList of EntityItems that will be dropped.lootingLevel contains the amount of loot that will be dropped.recentlyHit determines whether the Entity doing the drop has recently been damaged.Cancelable.HasResultMinecraftForge.EVENT_BUS.LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEventEntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.EyeHeight| Modifier and Type | Field and Description |
|---|---|
private java.util.Collection<ItemEntity> |
drops |
private int |
lootingLevel |
private boolean |
recentlyHit |
private DamageSource |
source |
| Constructor and Description |
|---|
LivingDropsEvent(LivingEntity entity,
DamageSource source,
java.util.Collection<ItemEntity> drops,
int lootingLevel,
boolean recentlyHit) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<ItemEntity> |
getDrops() |
int |
getLootingLevel() |
DamageSource |
getSource() |
boolean |
isRecentlyHit() |
getEntityLivinggetEntityprivate final DamageSource source
private final java.util.Collection<ItemEntity> drops
private final int lootingLevel
private final boolean recentlyHit
public LivingDropsEvent(LivingEntity entity, DamageSource source, java.util.Collection<ItemEntity> drops, int lootingLevel, boolean recentlyHit)
public DamageSource getSource()
public java.util.Collection<ItemEntity> getDrops()
public int getLootingLevel()
public boolean isRecentlyHit()