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
.HasResult
MinecraftForge.EVENT_BUS
.LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Constructor and Description |
---|
LivingAttackEvent(EntityLivingBase entity,
DamageSource source,
float amount) |
Modifier and Type | Method and Description |
---|---|
float |
getAmount() |
DamageSource |
getSource() |
getEntityLiving
getEntity
public LivingAttackEvent(EntityLivingBase entity, DamageSource source, float amount)
public DamageSource getSource()
public float getAmount()