public class LivingAttackEvent extends LivingEvent
EntityLivingBase.attackEntityFrom(DamageSource, float) and
EntityPlayer.attackEntityFrom(DamageSource, float). ForgeHooks.onLivingAttack(EntityLivingBase, DamageSource, float).source contains the DamageSource of the attack. amount contains the amount of damage dealt to the entity. Cancelable.HasResultMinecraftForge.EVENT_BUS.LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEventEntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructingEvent.HasResult, Event.Result| Constructor and Description |
|---|
LivingAttackEvent(EntityLivingBase entity,
DamageSource source,
float amount) |
| Modifier and Type | Method and Description |
|---|---|
float |
getAmount() |
DamageSource |
getSource() |
getEntityLivinggetEntitygetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setuppublic LivingAttackEvent(EntityLivingBase entity, DamageSource source, float amount)
public DamageSource getSource()
public float getAmount()