setDamage

public void setDamage(EntityDamageEvent.DamageModifier type, double damage)

Sets the damage for the specified modifier.

Parameters

type

the damage modifier

damage

the scalar value of the damage's modifier

See also

Throws

if the caller does not support the particular DamageModifier, or to rephrase, when isApplicable returns false


public void setDamage(double damage)

Sets the raw amount of damage caused by the event.

For compatibility this also recalculates the modifiers and scales them by the difference between the modifier for the previous damage value and the new one.

Parameters

damage

The raw amount of damage caused by the event