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
.HasResult
MinecraftForge.EVENT_BUS
.LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.HasResult, Event.Result
Modifier and Type | Field and Description |
---|---|
private java.util.List<EntityItem> |
drops |
private int |
lootingLevel |
private boolean |
recentlyHit |
private DamageSource |
source |
Constructor and Description |
---|
LivingDropsEvent(EntityLivingBase entity,
DamageSource source,
java.util.List<EntityItem> drops,
int lootingLevel,
boolean recentlyHit) |
Modifier and Type | Method and Description |
---|---|
java.util.List<EntityItem> |
getDrops() |
int |
getLootingLevel() |
DamageSource |
getSource() |
boolean |
isRecentlyHit() |
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
private final DamageSource source
private final java.util.List<EntityItem> drops
private final int lootingLevel
private final boolean recentlyHit
public LivingDropsEvent(EntityLivingBase entity, DamageSource source, java.util.List<EntityItem> drops, int lootingLevel, boolean recentlyHit)
public DamageSource getSource()
public java.util.List<EntityItem> getDrops()
public int getLootingLevel()
public boolean isRecentlyHit()