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.Builder
EntityDamageSource.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, wait
builder
protected AbstractIndirectEntityDamageSource(AbstractIndirectEntityDamageSource.AbstractIndirectEntityDamageSourceBuilder<?,?> builder)
public Entity getSource()
EntityDamageSource
Entity
that is the source.getSource
in interface EntityDamageSource
public DamageType getType()
DamageSource
DamageType
of this source.getType
in interface DamageSource
public boolean isAbsolute()
DamageSource
DamageSource
's damage is absolute and
will ignore potion effects and enchantments.isAbsolute
in interface DamageSource
public boolean isBypassingArmor()
DamageSource
DamageSource
will deal damage that
bypasses any armor.isBypassingArmor
in interface DamageSource
public boolean isScaledByDifficulty()
DamageSource
DamageSource
's damage is scaled by
Difficulty
.isScaledByDifficulty
in interface DamageSource
public boolean isExplosive()
DamageSource
DamageSource
is an explosion.isExplosive
in interface DamageSource
public boolean isMagic()
DamageSource
DamageSource
is considered to be magical
damage, such as potions, or other sources.isMagic
in interface DamageSource
public boolean doesAffectCreative()
DamageSource
DamageSource
is considered to damage creative, or
otherwise "normally unharmable" players. Usually associated with
DamageTypes.VOID
.doesAffectCreative
in interface DamageSource
public Entity getIndirectSource()
IndirectEntityDamageSource
Entity
that is indirectly using the EntityDamageSource.getSource()
to cause damage.getIndirectSource
in interface IndirectEntityDamageSource
public double getExhaustion()
DamageSource
DamageSource
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