public class LivingKnockBackEvent extends LivingEvent
EntityLivingBase#attackEntityFrom(DamageSource, float)
,
EntityLivingBase#blockWithShield(EntityLivingBase)
,
EntityMob#attackEntityAsMob(Entity)
and
EntityPlayer#attackTargetEntityWithCurrentItem(Entity)
ForgeHooks#onLivingKnockBack(EntityLivingBase, Entity, float, double, double)
.attacker
contains the Entity that caused the knock back. strength
contains the strength of the knock back. ratioX
contains the x ratio of the knock back. ratioZ
contains the z ratio of the knock back. Cancelable
.HasResult
MinecraftForge.EVENT_BUS
.LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.EyeHeight
Event.HasResult, Event.Result
修飾子とタイプ | フィールドと説明 |
---|---|
protected Entity |
attacker |
protected Entity |
originalAttacker |
protected double |
originalRatioX |
protected double |
originalRatioZ |
protected float |
originalStrength |
protected double |
ratioX |
protected double |
ratioZ |
protected float |
strength |
コンストラクタと説明 |
---|
LivingKnockBackEvent(LivingEntity target,
Entity attacker,
float strength,
double ratioX,
double ratioZ) |
修飾子とタイプ | メソッドと説明 |
---|---|
Entity |
getAttacker() |
Entity |
getOriginalAttacker() |
double |
getOriginalRatioX() |
double |
getOriginalRatioZ() |
float |
getOriginalStrength() |
double |
getRatioX() |
double |
getRatioZ() |
float |
getStrength() |
void |
setAttacker(Entity attacker) |
void |
setRatioX(double ratioX) |
void |
setRatioZ(double ratioZ) |
void |
setStrength(float strength) |
getEntityLiving
getEntity
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
protected Entity attacker
protected float strength
protected double ratioX
protected double ratioZ
protected final Entity originalAttacker
protected final float originalStrength
protected final double originalRatioX
protected final double originalRatioZ
public LivingKnockBackEvent(LivingEntity target, Entity attacker, float strength, double ratioX, double ratioZ)
public Entity getAttacker()
public float getStrength()
public double getRatioX()
public double getRatioZ()
public Entity getOriginalAttacker()
public float getOriginalStrength()
public double getOriginalRatioX()
public double getOriginalRatioZ()
public void setAttacker(Entity attacker)
public void setStrength(float strength)
public void setRatioX(double ratioX)
public void setRatioZ(double ratioZ)