public class LivingDamageEvent extends LivingEvent
EntityLivingBase.damageEntity(DamageSource, float)
and
EntityPlayer.damageEntity(DamageSource, float)
.ForgeHooks.onLivingDamage(EntityLivingBase, DamageSource, float)
.source
contains the DamageSource that caused this Entity to be hurt. amount
contains the final amount of damage that will be dealt to entity. Cancelable
.HasResult
LivingHurtEvent
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.HasResult, Event.Result
Constructor and Description |
---|
LivingDamageEvent(EntityLivingBase entity,
DamageSource source,
float amount) |
Modifier and Type | Method and Description |
---|---|
float |
getAmount() |
DamageSource |
getSource() |
void |
setAmount(float amount) |
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public LivingDamageEvent(EntityLivingBase entity, DamageSource source, float amount)
public DamageSource getSource()
public float getAmount()
public void setAmount(float amount)