类 DamageSource
java.lang.Object
net.minecraft.world.damagesource.DamageSource
-
字段概要
字段修饰符和类型字段说明private final Entity
private final Vec3
private final Entity
private final Holder<DamageType>
-
构造器概要
构造器构造器说明DamageSource
(Holder<DamageType> pType) DamageSource
(Holder<DamageType> pType, Entity pEntity) DamageSource
(Holder<DamageType> pType, Entity pCausingEntity, Entity pDirectEntity) DamageSource
(Holder<DamageType> pType, Entity pDirectEntity, Entity pCausingEntity, Vec3 pDamageSourcePosition) DamageSource
(Holder<DamageType> pType, Vec3 pDamageSourcePosition) -
方法概要
修饰符和类型方法说明float
getLocalizedDeathMessage
(LivingEntity pLivingEntity) getMsgId()
boolean
is
(ResourceKey<DamageType> pDamageTypeKey) boolean
is
(TagKey<DamageType> pDamageTypeKey) boolean
boolean
boolean
已过时。toString()
type()
-
字段详细资料
-
type
-
causingEntity
-
directEntity
-
damageSourcePosition
-
-
构造器详细资料
-
DamageSource
public DamageSource(Holder<DamageType> pType, @Nullable Entity pDirectEntity, @Nullable Entity pCausingEntity, @Nullable Vec3 pDamageSourcePosition) -
DamageSource
public DamageSource(Holder<DamageType> pType, @Nullable Entity pCausingEntity, @Nullable Entity pDirectEntity) -
DamageSource
-
DamageSource
-
DamageSource
-
-
方法详细资料
-
toString
-
getFoodExhaustion
public float getFoodExhaustion() -
isIndirect
public boolean isIndirect() -
getDirectEntity
-
getEntity
-
getLocalizedDeathMessage
-
getMsgId
-
scalesWithDifficulty
已过时。 -
isCreativePlayer
public boolean isCreativePlayer() -
getSourcePosition
-
sourcePositionRaw
-
is
-
is
-
type
-
typeHolder
-
DamageScaling.getScalingFunction()