public interface DamageSource
Cause
for damage on the Entity
being
damaged. Usually the DamageSource
will have different properties
based on the source of damage, such as EntityDamageSource
s,
BlockDamageSource
s, and FallingBlockDamageSource
s.
Almost always, the DamageSource
will be the first element in
the Cause
of the event. Any additional modifiers that "aid" the
Cause
of the event will be listed subsequently.
Modifier and Type | Method and Description |
---|---|
DamageType |
getDamageType()
Gets the
DamageType of this source. |
boolean |
isAbsolute()
Gets whether this
DamageSource can not be modified and the
damage is absolute. |
boolean |
isBypassingArmor()
Gets whether this
DamageSource will deal damage that
bypasses any armor. |
boolean |
isDifficultyScaled()
Gets whether this
DamageSource 's damage is scaled by
Difficulty . |
boolean |
isExplosion()
Gets whether this
DamageSource is an explosion. |
boolean |
isMagic()
Gets whether this
DamageSource is considered to be magical
damage, such as potions, or other sources. |
DamageType getDamageType()
DamageType
of this source.boolean isAbsolute()
DamageSource
can not be modified and the
damage is absolute.boolean isBypassingArmor()
DamageSource
will deal damage that
bypasses any armor.boolean isDifficultyScaled()
DamageSource
's damage is scaled by
Difficulty
.boolean isExplosion()
DamageSource
is an explosion.boolean isMagic()
DamageSource
is considered to be magical
damage, such as potions, or other sources.