Class LivingKnockBackEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.living.LivingEvent
net.minecraftforge.event.entity.living.LivingKnockBackEvent
LivingKnockBackEvent is fired when a living entity is about to be knocked back. 
This event is fired whenever an Entity is knocked back in
 
This event is fired via
 
 
 
 
 
This event is
If this event is canceled, the entity is not knocked back.
 
This event does not have a result.
This event is fired on the
This event is fired whenever an Entity is knocked back in
LivingEntity.hurt(DamageSource, float),
 LivingEntity#blockUsingShield(LivingEntity),
 Mob.doHurtTarget(Entity) and
 Player.attack(Entity) This event is fired via
ForgeHooks.onLivingKnockBack(LivingEntity, float, double, double) .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. This event is
Cancelable.If this event is canceled, the entity is not knocked back.
This event does not have a result.
Event.HasResultThis event is fired on the
MinecraftForge.EVENT_BUS.- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraftforge.event.entity.living.LivingEventLivingEvent.LivingJumpEvent, LivingEvent.LivingTickEvent, LivingEvent.LivingVisibilityEventNested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEventEntityEvent.EnteringSection, EntityEvent.EntityConstructingNested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Eventnet.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final doubleprotected final doubleprotected final floatprotected doubleprotected doubleprotected float
- 
Constructor SummaryConstructorsConstructorDescriptionLivingKnockBackEvent(LivingEntity target, float strength, double ratioX, double ratioZ) 
- 
Method SummaryModifier and TypeMethodDescriptiondoubledoublefloatdoubledoublefloatvoidsetRatioX(double ratioX) voidsetRatioZ(double ratioZ) voidsetStrength(float strength) Methods inherited from class net.minecraftforge.event.entity.living.LivingEventgetEntityMethods inherited from class net.minecraftforge.eventbus.api.EventgetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
- 
Field Details- 
strengthprotected float strength
- 
ratioXprotected double ratioX
- 
ratioZprotected double ratioZ
- 
originalStrengthprotected final float originalStrength
- 
originalRatioXprotected final double originalRatioX
- 
originalRatioZprotected final double originalRatioZ
 
- 
- 
Constructor Details- 
LivingKnockBackEvent
 
- 
- 
Method Details- 
getStrengthpublic float getStrength()
- 
getRatioXpublic double getRatioX()
- 
getRatioZpublic double getRatioZ()
- 
getOriginalStrengthpublic float getOriginalStrength()
- 
getOriginalRatioXpublic double getOriginalRatioX()
- 
getOriginalRatioZpublic double getOriginalRatioZ()
- 
setStrengthpublic void setStrength(float strength) 
- 
setRatioXpublic void setRatioX(double ratioX) 
- 
setRatioZpublic void setRatioZ(double ratioZ) 
 
-