Class AbstractEntityDamageSource
- java.lang.Object
- 
- org.spongepowered.api.event.cause.entity.damage.source.common.AbstractEntityDamageSource
 
- 
- All Implemented Interfaces:
- DamageSource,- EntityDamageSource
 
 public abstract class AbstractEntityDamageSource extends java.lang.Object implements EntityDamageSource 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classAbstractEntityDamageSource.AbstractEntityDamageSourceBuilder<T extends EntityDamageSource,B extends EntityDamageSource.EntityDamageSourceBuilder<T,B>>- 
Nested classes/interfaces inherited from interface org.spongepowered.api.event.cause.entity.damage.source.DamageSourceDamageSource.DamageSourceBuilder<T extends DamageSource,B extends DamageSource.DamageSourceBuilder<T,B>>, DamageSource.Factory
 - 
Nested classes/interfaces inherited from interface org.spongepowered.api.event.cause.entity.damage.source.EntityDamageSourceEntityDamageSource.Builder, EntityDamageSource.EntityDamageSourceBuilder<T extends EntityDamageSource,B extends EntityDamageSource.EntityDamageSourceBuilder<T,B>>
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractEntityDamageSource(AbstractEntityDamageSource.AbstractEntityDamageSourceBuilder<?,?> builder)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandoesAffectCreative()Gets whether thisDamageSourceis considered to damage creative, or otherwise "normally unharmable" players.doubleexhaustion()Gets the amount of exhaustion thisDamageSourcewill add to the entity, generally only to players.booleanisAbsolute()Gets whether thisDamageSource's damage is absolute and will ignore potion effects and enchantments.booleanisBypassingArmor()Gets whether thisDamageSourcewill deal damage that bypasses any armor.booleanisExplosive()Gets whether thisDamageSourceis an explosion.booleanisFire()Gets whether thisDamageSourceis considered to be "fire" based, can be from flames or blocks that are flaming, or the entity being on fire.booleanisMagic()Gets whether thisDamageSourceis considered to be magical damage, such as potions, or other sources.booleanisScaledByDifficulty()Gets whether thisDamageSource's damage is scaled byDifficulty.Entitysource()Gets theEntitythat is the source.DamageTypetype()Gets theDamageTypeof this source.
 
- 
- 
- 
Constructor Detail- 
AbstractEntityDamageSourceprotected AbstractEntityDamageSource(AbstractEntityDamageSource.AbstractEntityDamageSourceBuilder<?,?> builder) 
 
- 
 - 
Method Detail- 
sourcepublic Entity source() Description copied from interface:EntityDamageSourceGets theEntitythat is the source.- Specified by:
- sourcein interface- EntityDamageSource
- Returns:
- The entity source
 
 - 
typepublic DamageType type() Description copied from interface:DamageSourceGets theDamageTypeof this source.- Specified by:
- typein interface- DamageSource
- Returns:
- The damage type
 
 - 
isAbsolutepublic boolean isAbsolute() Description copied from interface:DamageSourceGets whether thisDamageSource's damage is absolute and will ignore potion effects and enchantments.- Specified by:
- isAbsolutein interface- DamageSource
- Returns:
- If this damage source deals absolute damage
 
 - 
isBypassingArmorpublic boolean isBypassingArmor() Description copied from interface:DamageSourceGets whether thisDamageSourcewill deal damage that bypasses any armor.- Specified by:
- isBypassingArmorin interface- DamageSource
- Returns:
- True if this damage source bypasses armor
 
 - 
isScaledByDifficultypublic boolean isScaledByDifficulty() Description copied from interface:DamageSourceGets whether thisDamageSource's damage is scaled byDifficulty.- Specified by:
- isScaledByDifficultyin interface- DamageSource
- Returns:
- True if the damage from this source is scaled
 
 - 
isExplosivepublic boolean isExplosive() Description copied from interface:DamageSourceGets whether thisDamageSourceis an explosion.- Specified by:
- isExplosivein interface- DamageSource
- Returns:
- True if this damage source is an explosion
 
 - 
isMagicpublic boolean isMagic() Description copied from interface:DamageSourceGets whether thisDamageSourceis considered to be magical damage, such as potions, or other sources.- Specified by:
- isMagicin interface- DamageSource
- Returns:
- If this damage is magic based
 
 - 
doesAffectCreativepublic boolean doesAffectCreative() Description copied from interface:DamageSourceGets whether thisDamageSourceis considered to damage creative, or otherwise "normally unharmable" players. Usually associated withDamageTypes.VOID.- Specified by:
- doesAffectCreativein interface- DamageSource
- Returns:
- If this damage should affect creative players
 
 - 
isFirepublic boolean isFire() Description copied from interface:DamageSourceGets whether thisDamageSourceis considered to be "fire" based, can be from flames or blocks that are flaming, or the entity being on fire. Usually is possible to bypass or ignore this damage if the owning entity hasPotionEffectTypes.FIRE_RESISTANCEactive.- Specified by:
- isFirein interface- DamageSource
- Returns:
- If this damage is considered fire
 
 - 
exhaustionpublic double exhaustion() Description copied from interface:DamageSourceGets the amount of exhaustion thisDamageSourcewill add to the entity, generally only to players.In vanilla gameplay this is set to 0.1 by default and overridden to 0 if the source is set to be absolute or as overriding armor. - Specified by:
- exhaustionin interface- DamageSource
- Returns:
- The increase in exhaustion
 
 
- 
 
-