public class CriticalHitEvent extends PlayerEvent
Cancelable.Event.HasResultMinecraftForge.EVENT_BUS.PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.VisibilityLivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEventEntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructingEvent.HasResult, Event.Result| Constructor and Description |
|---|
CriticalHitEvent(EntityPlayer player,
Entity target,
float damageModifier,
boolean vanillaCritical) |
| Modifier and Type | Method and Description |
|---|---|
float |
getDamageModifier()
The damage modifier for the hit.
This is by default 1.5F for ciritcal hits and 1F for normal hits . |
float |
getOldDamageModifier()
The orignal damage modifier for the hit wthout any changes.
This is 1.5F for ciritcal hits and 1F for normal hits . |
Entity |
getTarget()
The Entity that was damaged by the player.
|
boolean |
isVanillaCritical()
Returns true if this hit was critical by vanilla
|
void |
setDamageModifier(float mod)
This set the damage multiplier for the hit.
|
getEntityPlayergetEntityLivinggetEntitygetListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setuppublic CriticalHitEvent(EntityPlayer player, Entity target, float damageModifier, boolean vanillaCritical)
public Entity getTarget()
public void setDamageModifier(float mod)
public float getDamageModifier()
public float getOldDamageModifier()
public boolean isVanillaCritical()