public class LivingHurtEvent extends LivingEvent
EntityLivingBase.damageEntity(DamageSource, float) and
EntityPlayer.damageEntity(DamageSource, float).ForgeHooks.onLivingHurt(EntityLivingBase, DamageSource, float).source contains the DamageSource that caused this Entity to be hurt. amount contains the amount of damage dealt to the Entity that was hurt. Cancelable.HasResultMinecraftForge.EVENT_BUS.LivingDamageEventLivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEventEntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructingEvent.HasResult, Event.Result| Modifier and Type | Field and Description |
|---|---|
private float |
amount |
private DamageSource |
source |
| Constructor and Description |
|---|
LivingHurtEvent(EntityLivingBase entity,
DamageSource source,
float amount) |
| Modifier and Type | Method and Description |
|---|---|
float |
getAmount() |
DamageSource |
getSource() |
void |
setAmount(float amount) |
getEntityLivinggetEntitygetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setupprivate final DamageSource source
private float amount
public LivingHurtEvent(EntityLivingBase entity, DamageSource source, float amount)
public DamageSource getSource()
public float getAmount()
public void setAmount(float amount)