Package net.minecraft.world.damagesource
Class DamageSource
java.lang.Object
net.minecraft.world.damagesource.DamageSource
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Entity
private final Vec3
private final Entity
private final Holder
<DamageType> -
Constructor Summary
ConstructorDescriptionDamageSource
(Holder<DamageType> p_270475_) DamageSource
(Holder<DamageType> p_270811_, Entity p_270660_) DamageSource
(Holder<DamageType> p_270818_, Entity p_270162_, Entity p_270115_) DamageSource
(Holder<DamageType> p_270906_, Entity p_270796_, Entity p_270459_, Vec3 p_270623_) DamageSource
(Holder<DamageType> p_270690_, Vec3 p_270579_) -
Method Summary
Modifier and TypeMethodDescriptionfloat
getLocalizedDeathMessage
(LivingEntity p_19343_) getMsgId()
boolean
is
(ResourceKey<DamageType> p_276108_) boolean
is
(TagKey<DamageType> p_270890_) boolean
boolean
isDirect()
boolean
Deprecated.toString()
type()
-
Field Details
-
type
-
causingEntity
-
directEntity
-
damageSourcePosition
-
-
Constructor Details
-
DamageSource
public DamageSource(Holder<DamageType> p_270906_, @Nullable Entity p_270796_, @Nullable Entity p_270459_, @Nullable Vec3 p_270623_) -
DamageSource
public DamageSource(Holder<DamageType> p_270818_, @Nullable Entity p_270162_, @Nullable Entity p_270115_) -
DamageSource
-
DamageSource
-
DamageSource
-
-
Method Details
-
toString
-
getFoodExhaustion
public float getFoodExhaustion() -
isDirect
public boolean isDirect() -
getDirectEntity
-
getEntity
-
getWeaponItem
-
getLocalizedDeathMessage
-
getMsgId
-
scalesWithDifficulty
Deprecated. -
isCreativePlayer
public boolean isCreativePlayer() -
getSourcePosition
-
sourcePositionRaw
-
is
-
is
-
type
-
typeHolder
-
DamageScaling.getScalingFunction()