public class DamageSource
extends java.lang.Object
修飾子とタイプ | フィールドと説明 |
---|---|
static DamageSource |
ANVIL |
static DamageSource |
CACTUS |
static DamageSource |
CRAMMING |
java.lang.String |
damageType |
static DamageSource |
DRAGON_BREATH |
static DamageSource |
DROWN |
static DamageSource |
DRYOUT |
static DamageSource |
FALL |
static DamageSource |
FALLING_BLOCK |
static DamageSource |
FIREWORKS |
static DamageSource |
FLY_INTO_WALL |
static DamageSource |
GENERIC |
static DamageSource |
HOT_FLOOR |
static DamageSource |
IN_FIRE |
static DamageSource |
IN_WALL |
static DamageSource |
LAVA |
static DamageSource |
LIGHTNING_BOLT |
static DamageSource |
MAGIC |
static DamageSource |
ON_FIRE |
static DamageSource |
OUT_OF_WORLD |
static DamageSource |
STARVE |
static DamageSource |
SWEET_BERRY_BUSH |
static DamageSource |
WITHER |
コンストラクタと説明 |
---|
DamageSource(java.lang.String damageTypeIn) |
修飾子とタイプ | メソッドと説明 |
---|---|
boolean |
canHarmInCreative() |
static DamageSource |
causeArrowDamage(AbstractArrowEntity arrow,
Entity indirectEntityIn)
returns EntityDamageSourceIndirect of an arrow
|
static DamageSource |
causeExplosionDamage(Explosion explosionIn) |
static DamageSource |
causeExplosionDamage(LivingEntity entityLivingBaseIn) |
static DamageSource |
causeFireballDamage(DamagingProjectileEntity fireball,
Entity indirectEntityIn)
returns EntityDamageSourceIndirect of a fireball
|
static DamageSource |
causeIndirectDamage(Entity source,
LivingEntity indirectEntityIn) |
static DamageSource |
causeIndirectMagicDamage(Entity source,
Entity indirectEntityIn) |
static DamageSource |
causeMobDamage(LivingEntity mob) |
static DamageSource |
causePlayerDamage(PlayerEntity player)
returns an EntityDamageSource of type player
|
static DamageSource |
causeThornsDamage(Entity source)
Returns the EntityDamageSource of the Thorns enchantment
|
static DamageSource |
causeThrownDamage(Entity source,
Entity indirectEntityIn) |
static DamageSource |
causeTridentDamage(Entity source,
Entity indirectEntityIn) |
static DamageSource |
func_226252_a_(LivingEntity p_226252_0_) |
Vec3d |
getDamageLocation()
Gets the location from which the damage originates.
|
java.lang.String |
getDamageType()
Return the name of damage type.
|
ITextComponent |
getDeathMessage(LivingEntity entityLivingBaseIn)
Gets the death message that is displayed when the player dies
|
float |
getHungerDamage()
How much satiate(food) is consumed by this DamageSource
|
Entity |
getImmediateSource()
Retrieves the immediate causer of the damage, e.g. the arrow entity, not its shooter
|
Entity |
getTrueSource()
Retrieves the true causer of the damage, e.g. the player who fired an arrow, the shulker who fired the bullet,
etc.
|
boolean |
isCreativePlayer() |
boolean |
isDamageAbsolute()
Whether or not the damage ignores modification by potion effects or enchantments.
|
boolean |
isDifficultyScaled()
Return whether this damage source will have its damage amount scaled based on the current difficulty.
|
boolean |
isExplosion() |
boolean |
isFireDamage()
Returns true if the damage is fire based.
|
boolean |
isMagicDamage()
Returns true if the damage is magic based.
|
boolean |
isProjectile()
Returns true if the damage is projectile based.
|
boolean |
isUnblockable() |
static DamageSource |
netherBedExplosion() |
DamageSource |
setDamageAllowedInCreativeMode() |
DamageSource |
setDamageBypassesArmor() |
DamageSource |
setDamageIsAbsolute()
Sets a value indicating whether the damage is absolute (ignores modification by potion effects or enchantments),
and also clears out hunger damage.
|
DamageSource |
setDifficultyScaled()
Set whether this damage source will have its damage amount scaled based on the current difficulty.
|
DamageSource |
setExplosion() |
DamageSource |
setFireDamage()
Define the damage type as fire based.
|
DamageSource |
setMagicDamage()
Define the damage type as magic based.
|
DamageSource |
setProjectile()
Define the damage type as projectile based.
|
public static final DamageSource IN_FIRE
public static final DamageSource LIGHTNING_BOLT
public static final DamageSource ON_FIRE
public static final DamageSource LAVA
public static final DamageSource HOT_FLOOR
public static final DamageSource IN_WALL
public static final DamageSource CRAMMING
public static final DamageSource DROWN
public static final DamageSource STARVE
public static final DamageSource CACTUS
public static final DamageSource FALL
public static final DamageSource FLY_INTO_WALL
public static final DamageSource OUT_OF_WORLD
public static final DamageSource GENERIC
public static final DamageSource MAGIC
public static final DamageSource WITHER
public static final DamageSource ANVIL
public static final DamageSource FALLING_BLOCK
public static final DamageSource DRAGON_BREATH
public static final DamageSource FIREWORKS
public static final DamageSource DRYOUT
public static final DamageSource SWEET_BERRY_BUSH
public final java.lang.String damageType
public static DamageSource func_226252_a_(LivingEntity p_226252_0_)
public static DamageSource causeMobDamage(LivingEntity mob)
public static DamageSource causeIndirectDamage(Entity source, LivingEntity indirectEntityIn)
public static DamageSource causePlayerDamage(PlayerEntity player)
public static DamageSource causeArrowDamage(AbstractArrowEntity arrow, @Nullable Entity indirectEntityIn)
public static DamageSource causeTridentDamage(Entity source, @Nullable Entity indirectEntityIn)
public static DamageSource causeFireballDamage(DamagingProjectileEntity fireball, @Nullable Entity indirectEntityIn)
public static DamageSource causeThrownDamage(Entity source, @Nullable Entity indirectEntityIn)
public static DamageSource causeIndirectMagicDamage(Entity source, @Nullable Entity indirectEntityIn)
public static DamageSource causeThornsDamage(Entity source)
public static DamageSource causeExplosionDamage(@Nullable Explosion explosionIn)
public static DamageSource causeExplosionDamage(@Nullable LivingEntity entityLivingBaseIn)
public static DamageSource netherBedExplosion()
public boolean isProjectile()
public DamageSource setProjectile()
public boolean isExplosion()
public DamageSource setExplosion()
public boolean isUnblockable()
public float getHungerDamage()
public boolean canHarmInCreative()
public boolean isDamageAbsolute()
@Nullable public Entity getImmediateSource()
@Nullable public Entity getTrueSource()
public DamageSource setDamageBypassesArmor()
public DamageSource setDamageAllowedInCreativeMode()
public DamageSource setDamageIsAbsolute()
public DamageSource setFireDamage()
public ITextComponent getDeathMessage(LivingEntity entityLivingBaseIn)
public boolean isFireDamage()
public java.lang.String getDamageType()
public DamageSource setDifficultyScaled()
public boolean isDifficultyScaled()
public boolean isMagicDamage()
public DamageSource setMagicDamage()
public boolean isCreativePlayer()
@Nullable public Vec3d getDamageLocation()