public class CriticalHitEvent extends PlayerEvent
Cancelable
.Event.HasResult
MinecraftForge.EVENT_BUS
.PlayerEvent.BreakSpeed, PlayerEvent.Clone, PlayerEvent.HarvestCheck, PlayerEvent.LoadFromFile, PlayerEvent.NameFormat, PlayerEvent.SaveToFile, PlayerEvent.StartTracking, PlayerEvent.StopTracking, PlayerEvent.Visibility
LivingEvent.LivingJumpEvent, LivingEvent.LivingUpdateEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing
Event.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.
|
getEntityPlayer
getEntityLiving
getEntity
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
public 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()