public abstract class AbstractIndirectEntityDamageSource extends Object implements IndirectEntityDamageSource
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractIndirectEntityDamageSource.AbstractIndirectEntityDamageSourceBuilder<T extends IndirectEntityDamageSource,B extends IndirectEntityDamageSource.AbstractBuilder<T,B>> |
IndirectEntityDamageSource.AbstractBuilder<T extends IndirectEntityDamageSource,B extends IndirectEntityDamageSource.AbstractBuilder<T,B>>, IndirectEntityDamageSource.BuilderEntityDamageSource.EntityDamageSourceBuilder<T extends EntityDamageSource,B extends EntityDamageSource.EntityDamageSourceBuilder<T,B>>DamageSource.DamageSourceBuilder<T extends DamageSource,B extends DamageSource.DamageSourceBuilder<T,B>>| Modifier | Constructor and Description |
|---|---|
protected |
AbstractIndirectEntityDamageSource(AbstractIndirectEntityDamageSource.AbstractIndirectEntityDamageSourceBuilder<?,?> builder) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
doesAffectCreative()
Gets whether this
DamageSource is considered to damage creative, or
otherwise "normally unharmable" players. |
double |
getExhaustion()
Gets the amount of exhaustion this
DamageSource will
add to the entity, generally only to players. |
Entity |
getIndirectSource()
Gets the
Entity that is indirectly using the EntityDamageSource.getSource()
to cause damage. |
Entity |
getSource()
Gets the
Entity that is the source. |
DamageType |
getType()
Gets the
DamageType of this source. |
boolean |
isAbsolute()
Gets whether this
DamageSource's damage is absolute and
will ignore potion effects and enchantments. |
boolean |
isBypassingArmor()
Gets whether this
DamageSource will deal damage that
bypasses any armor. |
boolean |
isExplosive()
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. |
boolean |
isScaledByDifficulty()
Gets whether this
DamageSource's damage is scaled by
Difficulty. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuilderprotected AbstractIndirectEntityDamageSource(AbstractIndirectEntityDamageSource.AbstractIndirectEntityDamageSourceBuilder<?,?> builder)
public Entity getSource()
EntityDamageSourceEntity that is the source.getSource in interface EntityDamageSourcepublic DamageType getType()
DamageSourceDamageType of this source.getType in interface DamageSourcepublic boolean isAbsolute()
DamageSourceDamageSource's damage is absolute and
will ignore potion effects and enchantments.isAbsolute in interface DamageSourcepublic boolean isBypassingArmor()
DamageSourceDamageSource will deal damage that
bypasses any armor.isBypassingArmor in interface DamageSourcepublic boolean isScaledByDifficulty()
DamageSourceDamageSource's damage is scaled by
Difficulty.isScaledByDifficulty in interface DamageSourcepublic boolean isExplosive()
DamageSourceDamageSource is an explosion.isExplosive in interface DamageSourcepublic boolean isMagic()
DamageSourceDamageSource is considered to be magical
damage, such as potions, or other sources.isMagic in interface DamageSourcepublic boolean doesAffectCreative()
DamageSourceDamageSource is considered to damage creative, or
otherwise "normally unharmable" players. Usually associated with
DamageTypes.VOID.doesAffectCreative in interface DamageSourcepublic Entity getIndirectSource()
IndirectEntityDamageSourceEntity that is indirectly using the EntityDamageSource.getSource()
to cause damage.getIndirectSource in interface IndirectEntityDamageSourcepublic double getExhaustion()
DamageSourceDamageSource will
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.
getExhaustion in interface DamageSource